mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/opt/local/work/mysql-5.1-merge1
This commit is contained in:
@ -900,3 +900,17 @@ explain select * from t2 left join
|
||||
join t5 on t5.a=t3.b) on t3.a=t2.b;
|
||||
|
||||
drop table t0, t1, t2, t3, t4, t5, t6, t7;
|
||||
|
||||
# BUG#16393
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2 (a int, filler char(100), key(a));
|
||||
insert into t2 select A.a + 10*B.a, '' from t1 A, t1 B;
|
||||
create table t3 like t2;
|
||||
insert into t3 select * from t2;
|
||||
|
||||
explain select * from t1 left join
|
||||
(t2 left join t3 on (t2.a = t3.a))
|
||||
on (t1.a = t2.a);
|
||||
drop table t1, t2, t3;
|
||||
|
||||
|
@ -870,6 +870,36 @@ drop table t1;
|
||||
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
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user