List:Commits« Previous MessageNext Message »
From:kroki Date:September 27 2006 7:26pm
Subject:bk commit into 5.1 tree (kroki:1.2321)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomash. When tomash 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@stripped, 2006-09-27 23:26:13+04:00, kroki@stripped +3 -0
  Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21081
  into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21081
  MERGE: 1.1810.2054.7

  mysql-test/r/ps.result@stripped, 2006-09-27 23:26:08+04:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.56.1.17

  mysql-test/t/ps.test@stripped, 2006-09-27 23:26:08+04:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.56.1.14

  sql/item.cc@stripped, 2006-09-27 23:26:08+04:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.113.1.121

# 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:	kroki
# Host:	moonlight.intranet
# Root:	/home/tomash/src/mysql_ab/mysql-5.1-bug21081/RESYNC

--- 1.209/sql/item.cc	2006-09-27 23:26:21 +04:00
+++ 1.210/sql/item.cc	2006-09-27 23:26:21 +04:00
@@ -3795,6 +3795,7 @@ void Item_field::cleanup()
     I.e. we can drop 'field'.
    */
   field= result_field= 0;
+  null_value= FALSE;
   DBUG_VOID_RETURN;
 }
 

--- 1.73/mysql-test/r/ps.result	2006-09-27 23:26:21 +04:00
+++ 1.74/mysql-test/r/ps.result	2006-09-27 23:26:21 +04:00
@@ -1291,6 +1291,27 @@ EXECUTE stmt USING @a;
 i	j	i	i	j
 DEALLOCATE PREPARE stmt;
 DROP TABLE IF EXISTS t1, t2, t3;
+DROP TABLE IF EXISTS t1, t2;
+CREATE TABLE t1 (i INT KEY);
+CREATE TABLE t2 (i INT);
+INSERT INTO t1 VALUES (1), (2);
+INSERT INTO t2 VALUES (1);
+PREPARE stmt FROM "SELECT t2.i FROM t1 LEFT JOIN t2 ON t2.i = t1.i
+                   WHERE t1.i = ?";
+SET @arg= 1;
+EXECUTE stmt USING @arg;
+i
+1
+SET @arg= 2;
+EXECUTE stmt USING @arg;
+i
+NULL
+SET @arg= 1;
+EXECUTE stmt USING @arg;
+i
+1
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
 End of 5.0 tests.
 create procedure proc_1() reset query cache;
 call proc_1();

--- 1.71/mysql-test/t/ps.test	2006-09-27 23:26:21 +04:00
+++ 1.72/mysql-test/t/ps.test	2006-09-27 23:26:21 +04:00
@@ -1358,6 +1358,33 @@ DEALLOCATE PREPARE stmt;
 DROP TABLE IF EXISTS t1, t2, t3;
 
 
+#
+# BUG#21081: SELECT inside stored procedure returns wrong results
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
+
+CREATE TABLE t1 (i INT KEY);
+CREATE TABLE t2 (i INT);
+
+INSERT INTO t1 VALUES (1), (2);
+INSERT INTO t2 VALUES (1);
+
+PREPARE stmt FROM "SELECT t2.i FROM t1 LEFT JOIN t2 ON t2.i = t1.i
+                   WHERE t1.i = ?";
+
+SET @arg= 1;
+EXECUTE stmt USING @arg;
+SET @arg= 2;
+EXECUTE stmt USING @arg;
+SET @arg= 1;
+EXECUTE stmt USING @arg;
+
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+
+
 --echo End of 5.0 tests.
 
 #
Thread
bk commit into 5.1 tree (kroki:1.2321)kroki27 Sep