mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21081 sql/item.cc: Auto merged
This commit is contained in:
commit
b17addbe1f
3 changed files with 49 additions and 0 deletions
|
@ -1291,6 +1291,27 @@ EXECUTE stmt USING @a;
|
||||||
i j i i j
|
i j i i j
|
||||||
DEALLOCATE PREPARE stmt;
|
DEALLOCATE PREPARE stmt;
|
||||||
DROP TABLE IF EXISTS t1, t2, t3;
|
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.
|
End of 5.0 tests.
|
||||||
create procedure proc_1() reset query cache;
|
create procedure proc_1() reset query cache;
|
||||||
call proc_1();
|
call proc_1();
|
||||||
|
|
|
@ -1358,6 +1358,33 @@ DEALLOCATE PREPARE stmt;
|
||||||
DROP TABLE IF EXISTS t1, t2, t3;
|
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.
|
--echo End of 5.0 tests.
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -3795,6 +3795,7 @@ void Item_field::cleanup()
|
||||||
I.e. we can drop 'field'.
|
I.e. we can drop 'field'.
|
||||||
*/
|
*/
|
||||||
field= result_field= 0;
|
field= result_field= 0;
|
||||||
|
null_value= FALSE;
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue