List:Commits« Previous MessageNext Message »
From:konstantin Date:January 14 2006 4:12pm
Subject:bk commit into 5.0 tree (konstantin:1.2018)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2018 06/01/14 19:12:07 konstantin@stripped +4 -0
  Merge mysql.com:/opt/local/work/mysql-4.1-12734
  into  mysql.com:/opt/local/work/mysql-5.0-root

  sql/item_cmpfunc.h
    1.119 06/01/14 19:12:02 konstantin@stripped +1 -1
    Manual merge

  mysql-test/t/ps.test
    1.57 06/01/14 19:12:02 konstantin@stripped +30 -30
    Manual merge

  mysql-test/r/ps.result
    1.57 06/01/14 19:12:02 konstantin@stripped +0 -34
    Manual merge

  sql/item_cmpfunc.cc
    1.190 06/01/14 19:05:31 konstantin@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	konstantin
# Host:	dragonfly.local
# Root:	/opt/local/work/mysql-5.0-root/RESYNC

--- 1.189/sql/item_cmpfunc.cc	2006-01-13 12:12:43 +03:00
+++ 1.190/sql/item_cmpfunc.cc	2006-01-14 19:05:31 +03:00
@@ -3059,6 +3059,12 @@
   return FALSE;
 }
 
+void Item_func_like::cleanup()
+{
+  canDoTurboBM= FALSE;
+  Item_bool_func2::cleanup();
+}
+
 #ifdef USE_REGEX
 
 bool

--- 1.118/sql/item_cmpfunc.h	2006-01-13 12:12:43 +03:00
+++ 1.119/sql/item_cmpfunc.h	2006-01-14 19:12:02 +03:00
@@ -1001,6 +1001,7 @@
   cond_result eq_cmp_result() const { return COND_TRUE; }
   const char *func_name() const { return "like"; }
   bool fix_fields(THD *thd, Item **ref);
+  void cleanup();
 };
 
 #ifdef USE_REGEX

--- 1.56/mysql-test/t/ps.test	2005-11-28 21:51:26 +03:00
+++ 1.57/mysql-test/t/ps.test	2006-01-14 19:12:02 +03:00
@@ -870,6 +870,36 @@
 set names default;
 deallocate prepare stmt;
 
+#
+# A test case for Bug#12734 "prepared statement may return incorrect result
+# set for a select SQL request": test that canDoTurboBM is reset for each
+# execute of a prepared statement.
+#
+create table t1 (
+  word_id mediumint(8) unsigned not null default '0',
+  formatted varchar(20) not null default ''
+);
+
+insert into t1 values
+  (80,'pendant'), (475,'pretendants'), (989,'tendances'),
+  (1019,'cependant'),(1022,'abondance'),(1205,'independants'),
+  (13,'lessiver'),(25,'lambiner'),(46,'situer'),(71,'terminer'),
+  (82,'decrocher');
+
+select count(*) from t1 where formatted like '%NDAN%';
+select count(*) from t1 where formatted like '%ER';
+prepare stmt from "select count(*) from t1 where formatted like ?";
+set @like="%NDAN%";
+execute stmt using @like;
+set @like="%ER";
+execute stmt using @like;
+set @like="%NDAN%";
+execute stmt using @like;
+set @like="%ER";
+execute stmt using @like;
+deallocate prepare stmt;
+drop table t1;
+
 # End of 4.1 tests
 
 #
Thread
bk commit into 5.0 tree (konstantin:1.2018)konstantin14 Jan