mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
bad merge fixed for b4981.
This commit is contained in:
@@ -2716,6 +2716,20 @@ select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 fro
|
||||
f1 f2
|
||||
1 1
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1(a int, b int, c int, KEY b(b), KEY c(c));
|
||||
insert into t1 values (1,0,0),(2,0,0);
|
||||
CREATE TABLE t2 (a int, b varchar(2), c varchar(2), PRIMARY KEY(a));
|
||||
insert into t2 values (1,'',''), (2,'','');
|
||||
CREATE TABLE t3 (a int, b int, PRIMARY KEY (a,b), KEY a (a), KEY b (b));
|
||||
insert into t3 values (1,1),(1,2);
|
||||
explain select straight_join DISTINCT t2.a,t2.b, t1.c from t1, t3, t2
|
||||
where (t1.c=t2.a or (t1.c=t3.a and t2.a=t3.b)) and t1.b=556476786 and
|
||||
t2.b like '%%' order by t2.b limit 0,1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref b,c b 5 const 1 Using where; Using temporary; Using filesort
|
||||
1 SIMPLE t3 index PRIMARY,a,b PRIMARY 8 NULL 2 Using index
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Range checked for each record (index map: 0x1)
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 ( city char(30) );
|
||||
INSERT INTO t1 VALUES ('London');
|
||||
INSERT INTO t1 VALUES ('Paris');
|
||||
@@ -3446,17 +3460,3 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using where
|
||||
1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1(a int, b int, c int, KEY b(b), KEY c(c));
|
||||
insert into t1 values (1,0,0),(2,0,0);
|
||||
CREATE TABLE t2 (a int, b varchar(2), c varchar(2), PRIMARY KEY(a));
|
||||
insert into t2 values (1,'',''), (2,'','');
|
||||
CREATE TABLE t3 (a int, b int, PRIMARY KEY (a,b), KEY a (a), KEY b (b));
|
||||
insert into t3 values (1,1),(1,2);
|
||||
explain select straight_join DISTINCT t2.a,t2.b, t1.c from t1, t3, t2
|
||||
where (t1.c=t2.a or (t1.c=t3.a and t2.a=t3.b)) and t1.b=556476786 and
|
||||
t2.b like '%%' order by t2.b limit 0,1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref b,c b 5 const 1 Using where; Using temporary; Using filesort
|
||||
1 SIMPLE t3 index PRIMARY,a,b PRIMARY 8 NULL 2 Using index
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Range checked for each record (index map: 0x1)
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
Reference in New Issue
Block a user