1991
1991
execute stmt using @arg;
1992
1992
deallocate prepare stmt;
1995
--echo # Bug#48508: Crash on prepared statement re-execution.
1997
create table t1(b int);
1998
insert into t1 values (0);
1999
create view v1 AS select 1 as a from t1 where b;
2000
prepare stmt from "select * from v1 where a";
2003
deallocate prepare stmt;
2007
create table t1(a bigint);
2008
create table t2(b tinyint);
2009
insert into t2 values (null);
2010
prepare stmt from "select 1 from t1 join t2 on a xor b where b > 1 and a =1";
2013
deallocate prepare stmt;
2019
--echo # Bug #49570: Assertion failed: !(order->used & map)
2020
--echo # on re-execution of prepared statement
2022
CREATE TABLE t1(a INT PRIMARY KEY);
2023
INSERT INTO t1 VALUES(0), (1);
2025
"SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a";
2029
DEALLOCATE PREPARE stmt;
1994
2033
--echo End of 5.0 tests.
3010
3049
deallocate prepare stmt;
3052
--echo # Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0
3055
prepare encode from "select encode(?, ?) into @ciphertext";
3056
prepare decode from "select decode(?, ?) into @plaintext";
3057
set @str="abc", @key="cba";
3058
execute encode using @str, @key;
3059
execute decode using @ciphertext, @key;
3061
set @str="bcd", @key="dcb";
3062
execute encode using @str, @key;
3063
execute decode using @ciphertext, @key;
3065
deallocate prepare encode;
3066
deallocate prepare decode;
3069
--echo # Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
3071
CREATE TABLE t1 (a DATETIME NOT NULL, b TINYINT);
3072
INSERT INTO t1 VALUES (0, 0),(0, 0);
3073
PREPARE stmt FROM "SELECT 1 FROM t1 WHERE
3074
ROW(a, b) >= ROW('1', (SELECT 1 FROM t1 WHERE a > 1234))";
3079
DEALLOCATE PREPARE stmt;
3083
--echo # Bug#54494 crash with explain extended and prepared statements
3085
CREATE TABLE t1(a INT);
3086
INSERT INTO t1 VALUES (1),(2);
3087
PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1';
3090
DEALLOCATE PREPARE stmt;
3094
--echo # Bug#54488 crash when using explain and prepared statements with subqueries
3096
CREATE TABLE t1(f1 INT);
3097
INSERT INTO t1 VALUES (1),(1);
3098
PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE (SELECT (SELECT 1 FROM t1 GROUP BY f1))';
3101
DEALLOCATE PREPARE stmt;
3013
3104
--echo End of 5.1 tests.