mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
ps.test, ps.result: a test case for Bug#6042 "constants
propogation works only once (prepared statements)". mysql-test/r/ps.result: Test case for Bug#6042: test results fixed mysql-test/t/ps.test: A test case for Bug#6042 "constants propogation works only once (prepared statements).
This commit is contained in:
@ -318,3 +318,21 @@ execute stmt;
|
||||
a
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
create table t1 (a int, b int);
|
||||
insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2);
|
||||
prepare stmt from
|
||||
"explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?";
|
||||
set @v=5;
|
||||
execute stmt using @v;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
- - - - - - - - NULL Impossible WHERE
|
||||
set @v=0;
|
||||
execute stmt using @v;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
- - - - - - - - 4 Using where
|
||||
set @v=5;
|
||||
execute stmt using @v;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
- - - - - - - - NULL Impossible WHERE
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
|
Reference in New Issue
Block a user