mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Backport into MariaDB-5.2 the following:
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface" WL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB" Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614: There could be observed the following problems: 1. EXPLAIN did not mention pushdown conditions from on expressions in the 'extra' column. As a result if a query had no where conditions pushed down to a table, but had on conditions pushed to this table the 'extra' column in the EXPLAIN for the table missed 'using where'. 2. Conditions for ref access were not eliminated from on expressions though such conditions were eliminated from the where condition.
This commit is contained in:
parent
e4e1ae0d13
commit
96e092dc73
136 changed files with 18754 additions and 1169 deletions
|
@ -123,6 +123,26 @@ extern void my_handler_error_unregister(void);
|
|||
this amount of bytes.
|
||||
*/
|
||||
#define portable_sizeof_char_ptr 8
|
||||
|
||||
/**
|
||||
Return values of index_cond_func_xxx functions.
|
||||
|
||||
0=ICP_NO_MATCH - index tuple doesn't satisfy the pushed index condition (the
|
||||
engine should discard the tuple and go to the next one)
|
||||
1=ICP_MATCH - index tuple satisfies the pushed index condition (the engine
|
||||
should fetch and return the record)
|
||||
2=ICP_OUT_OF_RANGE - index tuple is out range that we're scanning, e.g. this
|
||||
if we're scanning "t.key BETWEEN 10 AND 20" and got a
|
||||
"t.key=21" tuple (the engine should stop scanning and return
|
||||
HA_ERR_END_OF_FILE right away).
|
||||
*/
|
||||
|
||||
typedef enum icp_result {
|
||||
ICP_NO_MATCH,
|
||||
ICP_MATCH,
|
||||
ICP_OUT_OF_RANGE
|
||||
} ICP_RESULT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -45,7 +45,7 @@ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
|
|||
|
||||
noinst_HEADERS = embedded_priv.h emb_qcache.h
|
||||
|
||||
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
sqlsources = ds_mrr.cc derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
ha_ndbcluster.cc ha_ndbcluster_cond.cc \
|
||||
ha_ndbcluster_binlog.cc ha_partition.cc \
|
||||
handler.cc sql_handler.cc \
|
||||
|
|
115
mysql-test/include/mrr_tests.inc
Normal file
115
mysql-test/include/mrr_tests.inc
Normal file
|
@ -0,0 +1,115 @@
|
|||
|
||||
create table t1(a int);
|
||||
show create table t1;
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2(a int);
|
||||
insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C;
|
||||
|
||||
|
||||
create table t3 (
|
||||
a char(8) not null, b char(8) not null, filler char(200),
|
||||
key(a)
|
||||
);
|
||||
insert into t3 select @a:=concat('c-', 1000+ A.a, '=w'), @a, 'filler' from t2 A;
|
||||
insert into t3 select concat('c-', 1000+A.a, '=w'), concat('c-', 2000+A.a, '=w'),
|
||||
'filler-1' from t2 A;
|
||||
insert into t3 select concat('c-', 1000+A.a, '=w'), concat('c-', 3000+A.a, '=w'),
|
||||
'filler-2' from t2 A;
|
||||
|
||||
# Test empty result set
|
||||
select a,filler from t3 where a >= 'c-9011=w';
|
||||
|
||||
# Ok, t3.ref_length=6, limit is 64 => 10 elements fit into the buffer
|
||||
# Test the cases when buffer gets exhausted at different points in source
|
||||
# intervals:
|
||||
|
||||
# 1. Split is in the middle of the range
|
||||
select a,filler from t3 where a >= 'c-1011=w' and a <= 'c-1015=w';
|
||||
|
||||
# 2. Split is at range edge
|
||||
select a,filler from t3 where (a>='c-1011=w' and a <= 'c-1013=w') or
|
||||
(a>='c-1014=w' and a <= 'c-1015=w');
|
||||
|
||||
# 3. Split is at range edge, with some rows between ranges.
|
||||
insert into t3 values ('c-1013=z', 'c-1013=z', 'err');
|
||||
insert into t3 values ('a-1014=w', 'a-1014=w', 'err');
|
||||
|
||||
select a,filler from t3 where (a>='c-1011=w' and a <= 'c-1013=w') or
|
||||
(a>='c-1014=w' and a <= 'c-1015=w');
|
||||
delete from t3 where b in ('c-1013=z', 'a-1014=w');
|
||||
|
||||
# 4. Split is within the equality range.
|
||||
select a,filler from t3 where a='c-1011=w' or a='c-1012=w' or a='c-1013=w' or
|
||||
a='c-1014=w' or a='c-1015=w';
|
||||
|
||||
# 5. Split is at the edge of equality range.
|
||||
insert into t3 values ('c-1013=w', 'del-me', 'inserted');
|
||||
select a,filler from t3 where a='c-1011=w' or a='c-1012=w' or a='c-1013=w' or
|
||||
a='c-1014=w' or a='c-1015=w';
|
||||
delete from t3 where b='del-me';
|
||||
|
||||
# PK tests are not included here.
|
||||
|
||||
alter table t3 add primary key(b);
|
||||
|
||||
## PK scan tests
|
||||
# 6. Split is between 'unique' PK ranges
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1018=w') or
|
||||
b IN ('c-1019=w', 'c-1020=w', 'c-1021=w',
|
||||
'c-1022=w', 'c-1023=w', 'c-1024=w');
|
||||
|
||||
# 7. Between non-uniq and uniq range
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1020=w') or
|
||||
b IN ('c-1021=w', 'c-1022=w', 'c-1023=w');
|
||||
|
||||
# 8. Between uniq and non-uniq range
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1018=w') or
|
||||
b IN ('c-1019=w', 'c-1020=w') or
|
||||
(b>='c-1021=w' and b<= 'c-1023=w');
|
||||
## End of PK scan tests
|
||||
|
||||
#
|
||||
# Now try different keypart types and special values
|
||||
#
|
||||
create table t4 (a varchar(10), b int, c char(10), filler char(200),
|
||||
key idx1 (a, b, c));
|
||||
|
||||
# insert buffer_size * 1.5 all-NULL tuples
|
||||
insert into t4 (filler) select concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'b-1',NULL,'c-1', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'b-1',NULL,'c-222', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'bb-1',NULL,'cc-2', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'zz-1',NULL,'cc-2', 'filler-data' from t2 order by a limit 500;
|
||||
|
||||
explain
|
||||
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
|
||||
or c='no-such-row2');
|
||||
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
|
||||
or c='no-such-row2');
|
||||
|
||||
explain
|
||||
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
|
||||
select * from t4 ignore index(idx1) where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
drop table t1, t2, t3, t4;
|
||||
|
||||
#
|
||||
# Check how ICP works with NULLs and partially-covered indexes
|
||||
#
|
||||
create table t1 (a int, b int not null,unique key (a,b),index(b));
|
||||
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
||||
create table t2 like t1;
|
||||
insert into t2 select * from t1;
|
||||
alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
|
||||
|
||||
select * from t1 where a is null;
|
||||
select * from t1 where (a is null or a > 0 and a < 3) and b > 7 limit 3;
|
||||
|
||||
select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
|
||||
drop table t1, t2;
|
|
@ -189,37 +189,37 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
|
||||
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
|
||||
fld1 fld3
|
||||
218401 faithful
|
||||
018007 fanatic
|
||||
228311 fated
|
||||
018017 featherweight
|
||||
218022 feed
|
||||
088303 feminine
|
||||
058004 Fenton
|
||||
038017 fetched
|
||||
018054 fetters
|
||||
208101 fiftieth
|
||||
238007 filial
|
||||
013606 fingerings
|
||||
218008 finishers
|
||||
038205 firearm
|
||||
188505 fitting
|
||||
202301 Fitzpatrick
|
||||
238008 fixedly
|
||||
012001 flanking
|
||||
013602 foldout
|
||||
013606 fingerings
|
||||
018007 fanatic
|
||||
018017 featherweight
|
||||
018054 fetters
|
||||
018103 flint
|
||||
018104 flopping
|
||||
188007 flurried
|
||||
013602 foldout
|
||||
226205 foothill
|
||||
232102 forgivably
|
||||
228306 forthcoming
|
||||
186002 freakish
|
||||
208113 freest
|
||||
231315 freezes
|
||||
036002 funereal
|
||||
226209 furnishings
|
||||
038017 fetched
|
||||
038205 firearm
|
||||
058004 Fenton
|
||||
088303 feminine
|
||||
186002 freakish
|
||||
188007 flurried
|
||||
188505 fitting
|
||||
198006 furthermore
|
||||
202301 Fitzpatrick
|
||||
208101 fiftieth
|
||||
208113 freest
|
||||
218008 finishers
|
||||
218022 feed
|
||||
218401 faithful
|
||||
226205 foothill
|
||||
226209 furnishings
|
||||
228306 forthcoming
|
||||
228311 fated
|
||||
231315 freezes
|
||||
232102 forgivably
|
||||
238007 filial
|
||||
238008 fixedly
|
||||
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
|
||||
fld3
|
||||
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
|
||||
|
@ -1395,15 +1395,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
|
@ -1419,15 +1419,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
|
||||
companynr companynr
|
||||
37 36
|
||||
|
|
|
@ -104,7 +104,7 @@ insert into t1 (b) values ("hello"),("my"),("world");
|
|||
create table t2 (key (b)) select * from t1;
|
||||
explain select * from t2 where b="world";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref B B 21 const 1 Using where
|
||||
1 SIMPLE t2 ref B B 21 const 1 Using index condition
|
||||
select * from t2 where b="world";
|
||||
a B
|
||||
3 world
|
||||
|
|
|
@ -566,31 +566,31 @@ INSERT INTO t1 VALUES ('i','i');
|
|||
INSERT INTO t1 VALUES ('j','j');
|
||||
EXPLAIN SELECT * FROM t1 WHERE s1='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref s1 s1 11 const 1 Using where
|
||||
1 SIMPLE t1 ref s1 s1 11 const 1 Using index condition
|
||||
EXPLAIN SELECT * FROM t1 WHERE s2='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref s2 s2 11 const 1 Using where
|
||||
1 SIMPLE t1 ref s2 s2 11 const 1 Using index condition
|
||||
EXPLAIN SELECT * FROM t1 WHERE s1='a' COLLATE latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref s1 s1 11 const 1 Using where
|
||||
1 SIMPLE t1 ref s1 s1 11 const 1 Using index condition
|
||||
EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
||||
EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range s1 s1 11 NULL 2 Using where
|
||||
1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition; Using MRR
|
||||
EXPLAIN SELECT * FROM t1 WHERE s2 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
||||
EXPLAIN SELECT * FROM t1 WHERE s1 IN ('a','b' COLLATE latin1_german1_ci);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range s1 s1 11 NULL 2 Using where
|
||||
1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition; Using MRR
|
||||
EXPLAIN SELECT * FROM t1 WHERE s2 IN ('a','b' COLLATE latin1_german1_ci);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
||||
EXPLAIN SELECT * FROM t1 WHERE s1 LIKE 'a' COLLATE latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range s1 s1 11 NULL 1 Using where
|
||||
1 SIMPLE t1 range s1 s1 11 NULL 1 Using index condition; Using MRR
|
||||
EXPLAIN SELECT * FROM t1 WHERE s2 LIKE 'a' COLLATE latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
||||
|
|
|
@ -65,8 +65,8 @@ insert into t1 (a) values ('air'),
|
|||
('tn_fakira'),('vw_silvia'),('vw_starshi'),('vw_geo'),('vw_b0x1');
|
||||
select * from t1 where a like 'we_%';
|
||||
a b
|
||||
we_iliyan NULL
|
||||
we_ivo NULL
|
||||
we_martin NULL
|
||||
we_toshko NULL
|
||||
we_ivo NULL
|
||||
we_iliyan NULL
|
||||
we_martin NULL
|
||||
drop table t1;
|
||||
|
|
|
@ -174,7 +174,7 @@ INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
|
|||
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
|
||||
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index
|
||||
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using index
|
||||
1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer
|
||||
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
a
|
||||
|
@ -190,7 +190,7 @@ insert into t3 select * from t4;
|
|||
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary
|
||||
1 SIMPLE t3 ref a a 5 test.t1.a 11 Using where; Using index; Distinct
|
||||
1 SIMPLE t3 ref a a 5 test.t1.a 11 Using index; Distinct
|
||||
select distinct t1.a from t1,t3 where t1.a=t3.a;
|
||||
a
|
||||
1
|
||||
|
|
|
@ -13,7 +13,7 @@ id str
|
|||
3 foo
|
||||
explain select * from t1 where str is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref str str 11 const 1 Using where
|
||||
1 SIMPLE t1 ref str str 11 const 1 Using index condition
|
||||
explain select * from t1 where str="foo";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const str str 11 const 1
|
||||
|
@ -50,7 +50,7 @@ insert into
|
|||
insert into ÔÁÂ (ËÏÌ0) values (2);
|
||||
explain select ËÏÌ0 from ÔÁÂ where ËÏÌ0=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE ÔÁÂ ref ÉÎÄ0,ÉÎÄ01 ÉÎÄ0 5 const 1 Using where; Using index
|
||||
1 SIMPLE ÔÁÂ ref ÉÎÄ0,ÉÎÄ01 ÉÎÄ0 5 const 1 Using index
|
||||
drop table ÔÁÂ;
|
||||
set names latin1;
|
||||
select 3 into @v1;
|
||||
|
|
|
@ -117,6 +117,6 @@ EXPLAIN SELECT CONCAT('gui_', t2.a), t1.d FROM t2
|
|||
LEFT JOIN t1 ON t1.a = CONCAT('gui_', t2.a) AND t1.b = 'a' AND t1.c = 'b';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL PRIMARY 102 NULL 3 Using index
|
||||
1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1
|
||||
1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1 Using where
|
||||
DROP TABLE t1, t2;
|
||||
# End of 5.1 tests
|
||||
|
|
|
@ -1333,7 +1333,7 @@ CREATE TABLE t2( a INT, b INT, c INT, KEY(a, b) );
|
|||
INSERT INTO t2 ( a, b, c ) VALUES ( 1, NULL, 2 ), ( 1, 3, 4 ), ( 1, 4, 4 );
|
||||
EXPLAIN SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 5 const 2 Using where
|
||||
1 SIMPLE t2 ref a a 5 const 2
|
||||
SELECT MIN(b), MIN(c) FROM t2 WHERE a = 1;
|
||||
MIN(b) MIN(c)
|
||||
3 2
|
||||
|
|
|
@ -241,7 +241,7 @@ insert into t2 select C.a*2+1, 'yes' from t1 C;
|
|||
explain
|
||||
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 5 NULL 12 Using where
|
||||
1 SIMPLE t2 range a a 5 NULL 12 Using index condition; Using MRR
|
||||
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
|
||||
a filler
|
||||
1 yes
|
||||
|
@ -256,10 +256,10 @@ a filler
|
|||
19 yes
|
||||
explain select * from t2 force index(a) where a NOT IN (2,2,2,2,2,2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 5 NULL 912 Using where
|
||||
1 SIMPLE t2 range a a 5 NULL 912 Using index condition; Using MRR
|
||||
explain select * from t2 force index(a) where a <> 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 5 NULL 912 Using where
|
||||
1 SIMPLE t2 range a a 5 NULL 912 Using index condition; Using MRR
|
||||
drop table t2;
|
||||
create table t2 (a datetime, filler char(200), key(a));
|
||||
insert into t2 select '2006-04-25 10:00:00' + interval C.a minute,
|
||||
|
@ -271,7 +271,7 @@ select * from t2 where a NOT IN (
|
|||
'2006-04-25 10:00:00','2006-04-25 10:02:00','2006-04-25 10:04:00',
|
||||
'2006-04-25 10:06:00', '2006-04-25 10:08:00');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 9 NULL 18 Using where
|
||||
1 SIMPLE t2 range a a 9 NULL 18 Using index condition; Using MRR
|
||||
select * from t2 where a NOT IN (
|
||||
'2006-04-25 10:00:00','2006-04-25 10:02:00','2006-04-25 10:04:00',
|
||||
'2006-04-25 10:06:00', '2006-04-25 10:08:00');
|
||||
|
@ -295,7 +295,7 @@ insert into t2 values ('fon', '1'), ('fop','1'), ('barbaq','1'),
|
|||
('barbas','1'), ('bazbazbay', '1'),('zz','1');
|
||||
explain select * from t2 where a not in('foo','barbar', 'bazbazbaz');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 13 NULL 7 Using where
|
||||
1 SIMPLE t2 range a a 13 NULL 7 Using index condition; Using MRR
|
||||
drop table t2;
|
||||
create table t2 (a decimal(10,5), filler char(200), key(a));
|
||||
insert into t2 select 345.67890, 'no' from t1 A, t1 B;
|
||||
|
@ -306,7 +306,7 @@ insert into t2 values (0, '1'), (22334.123,'1'), (33333,'1'),
|
|||
explain
|
||||
select * from t2 where a not in (345.67890, 43245.34, 64224.56344);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 7 NULL 7 Using where
|
||||
1 SIMPLE t2 range a a 7 NULL 7 Using index condition; Using MRR
|
||||
select * from t2 where a not in (345.67890, 43245.34, 64224.56344);
|
||||
a filler
|
||||
0.00000 1
|
||||
|
|
|
@ -204,7 +204,7 @@ key a (a)
|
|||
INSERT INTO t1 VALUES (10), (10), (10);
|
||||
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 5 const 3 Using where
|
||||
1 SIMPLE t1 ref a a 5 const 3
|
||||
SELECT * FROM t1 WHERE a=10;
|
||||
a
|
||||
10
|
||||
|
|
|
@ -19,7 +19,7 @@ Table Op Msg_type Msg_text
|
|||
test.t0 analyze status OK
|
||||
explain select * from t0 where key1 < 3 or key1 > 1020;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1 i1 4 NULL 78 Using where
|
||||
1 SIMPLE t0 range i1 i1 4 NULL 78 Using index condition; Using MRR
|
||||
explain
|
||||
select * from t0 where key1 < 3 or key2 > 1020;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -72,7 +72,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 17 Using sort_union(i1,i2); Using where
|
||||
explain select * from t0 where key2 = 45 or key1 <=> null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1,i2 i2 4 NULL 1 Using where
|
||||
1 SIMPLE t0 range i1,i2 i2 4 NULL 1 Using where; Using MRR
|
||||
explain select * from t0 where key2 = 45 or key1 is not null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
|
||||
|
@ -115,7 +115,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select * from t0 where
|
||||
(key1 < 3 or key2 < 3) and (key3 < 100);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1,i2,i3 i3 4 NULL 95 Using where
|
||||
1 SIMPLE t0 range i1,i2,i3 i3 4 NULL 95 Using index condition; Using where; Using MRR
|
||||
explain select * from t0 where
|
||||
(key1 < 3 or key2 < 3) and (key3 < 1000);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -275,7 +275,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select * from t0,t1 where t0.key1 < 3 and
|
||||
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1 i1 4 NULL 3 Using where
|
||||
1 SIMPLE t0 range i1 i1 4 NULL 3 Using index condition; Using MRR
|
||||
1 SIMPLE t1 ALL i1,i8 NULL NULL NULL 1024 Range checked for each record (index map: 0x81)
|
||||
explain select * from t1 where key1=3 or key2=4
|
||||
union select * from t1 where key1<4 or key3=5;
|
||||
|
@ -1326,19 +1326,19 @@ primary key (pk1, pk2)
|
|||
);
|
||||
explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 7 Using where
|
||||
1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 7 Using index condition; Using where; Using MRR
|
||||
select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
|
||||
pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2
|
||||
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
|
||||
1 11 0 0 0 0 0 0 0 11 0 filler-data-11 filler2
|
||||
1 12 0 0 0 0 0 0 0 12 0 filler-data-12 filler2
|
||||
1 13 0 0 0 0 0 0 0 13 0 filler-data-13 filler2
|
||||
1 14 0 0 0 0 0 0 0 14 0 filler-data-14 filler2
|
||||
1 15 0 0 0 0 0 0 0 15 0 filler-data-15 filler2
|
||||
1 16 0 0 0 0 0 0 0 16 0 filler-data-16 filler2
|
||||
1 17 0 0 0 0 0 0 0 17 0 filler-data-17 filler2
|
||||
1 18 0 0 0 0 0 0 0 18 0 filler-data-18 filler2
|
||||
1 19 0 0 0 0 0 0 0 19 0 filler-data-19 filler2
|
||||
1 18 0 0 0 0 0 0 0 18 0 filler-data-18 filler2
|
||||
1 17 0 0 0 0 0 0 0 17 0 filler-data-17 filler2
|
||||
1 16 0 0 0 0 0 0 0 16 0 filler-data-16 filler2
|
||||
1 15 0 0 0 0 0 0 0 15 0 filler-data-15 filler2
|
||||
1 14 0 0 0 0 0 0 0 14 0 filler-data-14 filler2
|
||||
1 13 0 0 0 0 0 0 0 13 0 filler-data-13 filler2
|
||||
1 12 0 0 0 0 0 0 0 12 0 filler-data-12 filler2
|
||||
1 11 0 0 0 0 0 0 0 11 0 filler-data-11 filler2
|
||||
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
|
||||
explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where
|
||||
|
|
|
@ -1293,7 +1293,7 @@ count(*)
|
|||
623
|
||||
explain select * from t1 where c between 1 and 2500;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL # Using where
|
||||
1 SIMPLE t1 range c c 5 NULL # Using index condition; Using MRR
|
||||
update t1 set c=a;
|
||||
explain select * from t1 where c between 1 and 2500;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -1986,7 +1986,7 @@ qq
|
|||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
@ -2162,7 +2162,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 ref v v 303 const # Using where; Using index
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 303 const # Using where
|
||||
1 SIMPLE t1 ref v v 303 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
|
404
mysql-test/r/innodb_mrr.result
Normal file
404
mysql-test/r/innodb_mrr.result
Normal file
|
@ -0,0 +1,404 @@
|
|||
drop table if exists t1,t2,t3,t4;
|
||||
set @save_storage_engine= @@storage_engine;
|
||||
set storage_engine=InnoDB;
|
||||
create table t1(a int);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2(a int);
|
||||
insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C;
|
||||
create table t3 (
|
||||
a char(8) not null, b char(8) not null, filler char(200),
|
||||
key(a)
|
||||
);
|
||||
insert into t3 select @a:=concat('c-', 1000+ A.a, '=w'), @a, 'filler' from t2 A;
|
||||
insert into t3 select concat('c-', 1000+A.a, '=w'), concat('c-', 2000+A.a, '=w'),
|
||||
'filler-1' from t2 A;
|
||||
insert into t3 select concat('c-', 1000+A.a, '=w'), concat('c-', 3000+A.a, '=w'),
|
||||
'filler-2' from t2 A;
|
||||
select a,filler from t3 where a >= 'c-9011=w';
|
||||
a filler
|
||||
select a,filler from t3 where a >= 'c-1011=w' and a <= 'c-1015=w';
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
select a,filler from t3 where (a>='c-1011=w' and a <= 'c-1013=w') or
|
||||
(a>='c-1014=w' and a <= 'c-1015=w');
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
insert into t3 values ('c-1013=z', 'c-1013=z', 'err');
|
||||
insert into t3 values ('a-1014=w', 'a-1014=w', 'err');
|
||||
select a,filler from t3 where (a>='c-1011=w' and a <= 'c-1013=w') or
|
||||
(a>='c-1014=w' and a <= 'c-1015=w');
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
delete from t3 where b in ('c-1013=z', 'a-1014=w');
|
||||
select a,filler from t3 where a='c-1011=w' or a='c-1012=w' or a='c-1013=w' or
|
||||
a='c-1014=w' or a='c-1015=w';
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
insert into t3 values ('c-1013=w', 'del-me', 'inserted');
|
||||
select a,filler from t3 where a='c-1011=w' or a='c-1012=w' or a='c-1013=w' or
|
||||
a='c-1014=w' or a='c-1015=w';
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
c-1013=w inserted
|
||||
delete from t3 where b='del-me';
|
||||
alter table t3 add primary key(b);
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1018=w') or
|
||||
b IN ('c-1019=w', 'c-1020=w', 'c-1021=w',
|
||||
'c-1022=w', 'c-1023=w', 'c-1024=w');
|
||||
b filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1016=w filler
|
||||
c-1017=w filler
|
||||
c-1018=w filler
|
||||
c-1019=w filler
|
||||
c-1020=w filler
|
||||
c-1021=w filler
|
||||
c-1022=w filler
|
||||
c-1023=w filler
|
||||
c-1024=w filler
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1020=w') or
|
||||
b IN ('c-1021=w', 'c-1022=w', 'c-1023=w');
|
||||
b filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1016=w filler
|
||||
c-1017=w filler
|
||||
c-1018=w filler
|
||||
c-1019=w filler
|
||||
c-1020=w filler
|
||||
c-1021=w filler
|
||||
c-1022=w filler
|
||||
c-1023=w filler
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1018=w') or
|
||||
b IN ('c-1019=w', 'c-1020=w') or
|
||||
(b>='c-1021=w' and b<= 'c-1023=w');
|
||||
b filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1016=w filler
|
||||
c-1017=w filler
|
||||
c-1018=w filler
|
||||
c-1019=w filler
|
||||
c-1020=w filler
|
||||
c-1021=w filler
|
||||
c-1022=w filler
|
||||
c-1023=w filler
|
||||
create table t4 (a varchar(10), b int, c char(10), filler char(200),
|
||||
key idx1 (a, b, c));
|
||||
insert into t4 (filler) select concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'b-1',NULL,'c-1', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'b-1',NULL,'c-222', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'bb-1',NULL,'cc-2', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'zz-1',NULL,'cc-2', 'filler-data' from t2 order by a limit 500;
|
||||
explain
|
||||
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
|
||||
or c='no-such-row2');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 range idx1 idx1 29 NULL 16 Using index condition; Using MRR
|
||||
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
|
||||
or c='no-such-row2');
|
||||
a b c filler
|
||||
NULL NULL NULL NULL-15
|
||||
NULL NULL NULL NULL-14
|
||||
NULL NULL NULL NULL-13
|
||||
NULL NULL NULL NULL-12
|
||||
NULL NULL NULL NULL-11
|
||||
NULL NULL NULL NULL-10
|
||||
NULL NULL NULL NULL-9
|
||||
NULL NULL NULL NULL-8
|
||||
NULL NULL NULL NULL-7
|
||||
NULL NULL NULL NULL-6
|
||||
NULL NULL NULL NULL-5
|
||||
NULL NULL NULL NULL-4
|
||||
NULL NULL NULL NULL-3
|
||||
NULL NULL NULL NULL-2
|
||||
NULL NULL NULL NULL-1
|
||||
explain
|
||||
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 range idx1 idx1 29 NULL 32 Using index condition; Using MRR
|
||||
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
a b c filler
|
||||
b-1 NULL c-1 NULL-15
|
||||
b-1 NULL c-1 NULL-14
|
||||
b-1 NULL c-1 NULL-13
|
||||
b-1 NULL c-1 NULL-12
|
||||
b-1 NULL c-1 NULL-11
|
||||
b-1 NULL c-1 NULL-10
|
||||
b-1 NULL c-1 NULL-9
|
||||
b-1 NULL c-1 NULL-8
|
||||
b-1 NULL c-1 NULL-7
|
||||
b-1 NULL c-1 NULL-6
|
||||
b-1 NULL c-1 NULL-5
|
||||
b-1 NULL c-1 NULL-4
|
||||
b-1 NULL c-1 NULL-3
|
||||
b-1 NULL c-1 NULL-2
|
||||
b-1 NULL c-1 NULL-1
|
||||
bb-1 NULL cc-2 NULL-15
|
||||
bb-1 NULL cc-2 NULL-14
|
||||
bb-1 NULL cc-2 NULL-13
|
||||
bb-1 NULL cc-2 NULL-12
|
||||
bb-1 NULL cc-2 NULL-11
|
||||
bb-1 NULL cc-2 NULL-10
|
||||
bb-1 NULL cc-2 NULL-9
|
||||
bb-1 NULL cc-2 NULL-8
|
||||
bb-1 NULL cc-2 NULL-7
|
||||
bb-1 NULL cc-2 NULL-6
|
||||
bb-1 NULL cc-2 NULL-5
|
||||
bb-1 NULL cc-2 NULL-4
|
||||
bb-1 NULL cc-2 NULL-3
|
||||
bb-1 NULL cc-2 NULL-2
|
||||
bb-1 NULL cc-2 NULL-1
|
||||
select * from t4 ignore index(idx1) where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
a b c filler
|
||||
b-1 NULL c-1 NULL-15
|
||||
b-1 NULL c-1 NULL-14
|
||||
b-1 NULL c-1 NULL-13
|
||||
b-1 NULL c-1 NULL-12
|
||||
b-1 NULL c-1 NULL-11
|
||||
b-1 NULL c-1 NULL-10
|
||||
b-1 NULL c-1 NULL-9
|
||||
b-1 NULL c-1 NULL-8
|
||||
b-1 NULL c-1 NULL-7
|
||||
b-1 NULL c-1 NULL-6
|
||||
b-1 NULL c-1 NULL-5
|
||||
b-1 NULL c-1 NULL-4
|
||||
b-1 NULL c-1 NULL-3
|
||||
b-1 NULL c-1 NULL-2
|
||||
b-1 NULL c-1 NULL-1
|
||||
bb-1 NULL cc-2 NULL-15
|
||||
bb-1 NULL cc-2 NULL-14
|
||||
bb-1 NULL cc-2 NULL-13
|
||||
bb-1 NULL cc-2 NULL-12
|
||||
bb-1 NULL cc-2 NULL-11
|
||||
bb-1 NULL cc-2 NULL-10
|
||||
bb-1 NULL cc-2 NULL-9
|
||||
bb-1 NULL cc-2 NULL-8
|
||||
bb-1 NULL cc-2 NULL-7
|
||||
bb-1 NULL cc-2 NULL-6
|
||||
bb-1 NULL cc-2 NULL-5
|
||||
bb-1 NULL cc-2 NULL-4
|
||||
bb-1 NULL cc-2 NULL-3
|
||||
bb-1 NULL cc-2 NULL-2
|
||||
bb-1 NULL cc-2 NULL-1
|
||||
drop table t1, t2, t3, t4;
|
||||
create table t1 (a int, b int not null,unique key (a,b),index(b));
|
||||
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
||||
create table t2 like t1;
|
||||
insert into t2 select * from t1;
|
||||
alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
|
||||
select * from t1 where a is null;
|
||||
a b c
|
||||
NULL 7 0
|
||||
NULL 9 0
|
||||
NULL 9 0
|
||||
select * from t1 where (a is null or a > 0 and a < 3) and b > 7 limit 3;
|
||||
a b c
|
||||
NULL 9 0
|
||||
NULL 9 0
|
||||
select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
|
||||
a b c
|
||||
NULL 7 0
|
||||
NULL 9 0
|
||||
NULL 9 0
|
||||
drop table t1, t2;
|
||||
set storage_engine= @save_storage_engine;
|
||||
set @read_rnd_buffer_size_save= @@read_rnd_buffer_size;
|
||||
set read_rnd_buffer_size=64;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '64'
|
||||
create table t1(a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2(a char(8), b char(8), c char(8), filler char(100), key(a,b,c) ) engine=InnoDB;
|
||||
insert into t2 select
|
||||
concat('a-', 1000 + A.a, '-a'),
|
||||
concat('b-', 1000 + B.a, '-b'),
|
||||
concat('c-', 1000 + C.a, '-c'),
|
||||
'filler'
|
||||
from t1 A, t1 B, t1 C;
|
||||
explain
|
||||
select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range a a 9 NULL 99 Using index condition; Using MRR
|
||||
select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
|
||||
count(length(a) + length(filler))
|
||||
100
|
||||
drop table t2;
|
||||
create table t2 (a char(100), b char(100), c char(100), d int,
|
||||
filler char(10), key(d), primary key (a,b,c)) engine= innodb;
|
||||
insert into t2 select A.a, B.a, B.a, A.a, 'filler' from t1 A, t1 B;
|
||||
explain select * from t2 force index (d) where d < 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range d d 5 NULL 47 Using index condition; Using MRR
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
set @@read_rnd_buffer_size= @read_rnd_buffer_size_save;
|
||||
create table t1 (f1 int not null, f2 int not null,f3 int not null, f4 char(1), primary key (f1,f2), key ix(f3))Engine=InnoDB;
|
||||
select * from t1 where (f3>=5 and f3<=10) or (f3>=1 and f3<=4);
|
||||
f1 f2 f3 f4
|
||||
1 1 1 A
|
||||
2 2 2 A
|
||||
3 3 3 A
|
||||
4 4 4 A
|
||||
5 5 5 A
|
||||
6 6 6 A
|
||||
7 7 7 A
|
||||
8 8 8 A
|
||||
9 9 9 A
|
||||
10 10 10 A
|
||||
drop table t1;
|
||||
|
||||
BUG#37977: Wrong result returned on GROUP BY + OR + Innodb
|
||||
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`date_nokey` date NOT NULL,
|
||||
`time_key` time NOT NULL,
|
||||
`time_nokey` time NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`datetime_nokey` datetime NOT NULL,
|
||||
`varchar_key` varchar(5) DEFAULT NULL,
|
||||
`varchar_nokey` varchar(5) DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `time_key` (`time_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(1,5,5,'2009-10-16','2009-10-16','09:28:15','09:28:15','2007-09-14 05:34:08','2007-09-14 05:34:08','qk','qk'),
|
||||
(2,6,6,'0000-00-00','0000-00-00','23:06:39','23:06:39','0000-00-00 00:00:00','0000-00-00 00:00:00','j','j'),
|
||||
(3,10,10,'2000-12-18','2000-12-18','22:16:19','22:16:19','2006-11-04 15:42:50','2006-11-04 15:42:50','aew','aew'),
|
||||
(4,0,0,'2001-09-18','2001-09-18','00:00:00','00:00:00','2004-03-23 13:23:35','2004-03-23 13:23:35',NULL,NULL),
|
||||
(5,6,6,'2007-08-16','2007-08-16','22:13:38','22:13:38','2004-08-19 11:01:28','2004-08-19 11:01:28','qu','qu');
|
||||
select pk from t1 WHERE `varchar_key` > 'kr' group by pk;
|
||||
pk
|
||||
1
|
||||
5
|
||||
select pk from t1 WHERE `int_nokey` IS NULL OR `varchar_key` > 'kr' group by pk;
|
||||
pk
|
||||
1
|
||||
5
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#39447: Error with NOT NULL condition and LIMIT 1
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL,
|
||||
parent_id int(11) DEFAULT NULL,
|
||||
name varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY ind_parent_id (parent_id)
|
||||
) ENGINE=InnoDB;
|
||||
insert into t1 (id, parent_id, name) values
|
||||
(10,NULL,'A'),
|
||||
(20,10,'B'),
|
||||
(30,10,'C'),
|
||||
(40,NULL,'D'),
|
||||
(50,40,'E'),
|
||||
(60,40,'F'),
|
||||
(70,NULL,'J');
|
||||
SELECT id FROM t1 WHERE parent_id IS NOT NULL ORDER BY id DESC LIMIT 1;
|
||||
id
|
||||
60
|
||||
This must show type=index, extra=Using where
|
||||
explain SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE parent_id IS NOT NULL ORDER BY id DESC LIMIT 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using where
|
||||
SELECT * FROM t1 WHERE parent_id IS NOT NULL ORDER BY id DESC LIMIT 1;
|
||||
id parent_id name
|
||||
60 40 F
|
||||
drop table t1;
|
|
@ -356,7 +356,7 @@ SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
|||
WHERE t1.name LIKE 'A%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
|
||||
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
|
||||
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using index
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
||||
WHERE t1.name LIKE 'A%' OR FALSE;
|
||||
|
|
|
@ -869,7 +869,7 @@ insert into t3 select * from t2 where a < 800;
|
|||
explain select * from t2,t3 where t2.a < 200 and t2.b=t3.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL a,b NULL NULL NULL 1000 Using where
|
||||
1 SIMPLE t3 ref b b 5 test.t2.b 1 Using where
|
||||
1 SIMPLE t3 ref b b 5 test.t2.b 1
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
|
|
@ -74,7 +74,7 @@ WHERE t3.a=1 OR t3.c IS NULL;
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` = 1) or isnull(`test`.`t3`.`c`))
|
||||
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
|
||||
|
@ -150,7 +150,7 @@ WHERE t3.a>1 OR t3.c IS NULL;
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`))
|
||||
|
@ -180,7 +180,7 @@ WHERE (t3.a>1 OR t3.c IS NULL) AND
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where (((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`)) and ((`test`.`t5`.`a` < 3) or isnull(`test`.`t5`.`c`)))
|
||||
|
@ -230,7 +230,7 @@ ON t7.b=t8.b AND t6.b < 10;
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1
|
||||
SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
|
||||
|
@ -546,12 +546,12 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) where ((`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)))
|
||||
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
|
||||
|
@ -837,8 +837,8 @@ WHERE t1.a <= 2;
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2)
|
||||
CREATE INDEX idx_b ON t2(b);
|
||||
|
@ -851,7 +851,7 @@ ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b;
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00
|
||||
1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1
|
||||
|
@ -1054,8 +1054,8 @@ t0.b=t1.b AND
|
|||
(t8.b=t9.b OR t8.c IS NULL) AND
|
||||
(t9.a=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
|
||||
1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using where
|
||||
1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00
|
||||
1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
|
||||
|
@ -1196,13 +1196,13 @@ INSERT INTO t3 VALUES (0), (1), (2), (3), (4), (5);
|
|||
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
|
||||
1 SIMPLE t3 index c c 5 NULL 6 Using index
|
||||
1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
|
||||
EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
|
||||
1 SIMPLE t3 index c c 5 NULL 6 Using index
|
||||
1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
|
||||
1 SIMPLE t2 ref b b 5 test.t3.c 2 Using where; Using index
|
||||
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
|
||||
a b c
|
||||
NULL 0 0
|
||||
|
@ -1273,7 +1273,7 @@ EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
|
|||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 21 Using index
|
||||
1 SIMPLE t3 index c c 5 NULL 0 Using index
|
||||
1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
|
||||
1 SIMPLE t2 ref b b 5 test.t3.c 2 Using where; Using index
|
||||
SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
|
||||
a b c
|
||||
NULL NULL NULL
|
||||
|
@ -1317,8 +1317,8 @@ c11 c21 c31
|
|||
EXPLAIN SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 0
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 0
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 0 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 0 Using where
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL);
|
||||
INSERT INTO t1 VALUES (23, 2340), (26, 9900);
|
||||
|
@ -1447,12 +1447,12 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 ALL NULL NULL NULL NULL X
|
||||
1 SIMPLE t3 ref a a 5 test.t2.b X
|
||||
1 SIMPLE t5 ref a a 5 test.t3.b X
|
||||
1 SIMPLE t4 ref a a 5 test.t3.b X Using where
|
||||
1 SIMPLE t4 ref a a 5 test.t3.b X Using index condition
|
||||
explain select * from (t4 join t6 on t6.a=t4.b) right join t3 on t4.a=t3.b
|
||||
join t2 left join (t5 join t7 on t7.a=t5.b) on t5.a=t2.b where t3.a<=>t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL X
|
||||
1 SIMPLE t3 ref a a 5 test.t2.b X Using where
|
||||
1 SIMPLE t3 ref a a 5 test.t2.b X Using index condition
|
||||
1 SIMPLE t4 ref a a 5 test.t3.b X
|
||||
1 SIMPLE t6 ref a a 5 test.t4.b X
|
||||
1 SIMPLE t5 ref a a 5 test.t2.b X
|
||||
|
|
|
@ -630,7 +630,7 @@ insert into t2 values (10,1),(20,2),(30,3);
|
|||
explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using index
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 2 const 1 Using index
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 2 const 1 Using where; Using index
|
||||
select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30;
|
||||
fooID barID fooID
|
||||
10 1 NULL
|
||||
|
@ -688,8 +688,8 @@ a1 a2 b1 b2 c1 c2
|
|||
explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (
|
||||
a int(11),
|
||||
|
|
|
@ -9,7 +9,7 @@ SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
|||
WHERE t1.name LIKE 'A%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
|
||||
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
|
||||
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using index
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
||||
WHERE t1.name LIKE 'A%' OR FALSE;
|
||||
|
|
|
@ -134,7 +134,7 @@ i
|
|||
explain select count(*) from t1, t2 where t1.p = t2.i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index
|
||||
1 SIMPLE t2 ref k1 k1 5 test.t1.p 2 Using where; Using index
|
||||
1 SIMPLE t2 ref k1 k1 5 test.t1.p 2 Using index
|
||||
select count(*) from t1, t2 where t1.p = t2.i;
|
||||
count(*)
|
||||
3
|
||||
|
|
|
@ -673,7 +673,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2
|
||||
AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 5 Using where
|
||||
1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 5 Using index condition; Using MRR
|
||||
EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2
|
||||
AND file_code = '0000000115' LIMIT 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
|
|
@ -1114,11 +1114,11 @@ count(*)
|
|||
29267
|
||||
explain select * from t1 where c between 1 and 2500;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL # Using where
|
||||
1 SIMPLE t1 range c c 5 NULL # Using index condition; Using MRR
|
||||
update t1 set c=a;
|
||||
explain select * from t1 where c between 1 and 2500;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL # Using where
|
||||
1 SIMPLE t1 range c c 5 NULL # Using index condition; Using MRR
|
||||
drop table t1,t2;
|
||||
create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=MyISAM;
|
||||
insert into t1 (id) values (null),(null),(null),(null),(null);
|
||||
|
@ -1559,7 +1559,7 @@ qq
|
|||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
@ -1735,7 +1735,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 ref v v 303 const # Using where; Using index
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 303 const # Using where
|
||||
1 SIMPLE t1 ref v v 303 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
|
|
@ -358,7 +358,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select * from t1,t2 where t1.b=t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL b NULL NULL NULL 2
|
||||
1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where
|
||||
1 SIMPLE t1 ref b b 5 test.t2.b 1
|
||||
explain select * from t1,t2 force index(c) where t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
|
@ -368,10 +368,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
|
||||
explain select * from t1 force index (a) where a=0 or a=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 4 NULL 4 Using where
|
||||
1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Using MRR
|
||||
explain select * from t1 where c=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c,c_2 c 5 const 1 Using where
|
||||
1 SIMPLE t1 ref c,c_2 c 5 const 1
|
||||
explain select * from t1 use index() where c=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
|
||||
|
@ -1230,7 +1230,7 @@ qq
|
|||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
@ -1406,7 +1406,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 ref v v 303 const # Using where; Using index
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 303 const # Using where
|
||||
1 SIMPLE t1 ref v v 303 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
|
393
mysql-test/r/myisam_mrr.result
Normal file
393
mysql-test/r/myisam_mrr.result
Normal file
|
@ -0,0 +1,393 @@
|
|||
drop table if exists t1, t2, t3;
|
||||
set @read_rnd_buffer_size_save= @@read_rnd_buffer_size;
|
||||
set read_rnd_buffer_size=79;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect read_rnd_buffer_size value: '79'
|
||||
select @@read_rnd_buffer_size;
|
||||
@@read_rnd_buffer_size
|
||||
8228
|
||||
create table t1(a int);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2(a int);
|
||||
insert into t2 select A.a + 10*(B.a + 10*C.a) from t1 A, t1 B, t1 C;
|
||||
create table t3 (
|
||||
a char(8) not null, b char(8) not null, filler char(200),
|
||||
key(a)
|
||||
);
|
||||
insert into t3 select @a:=concat('c-', 1000+ A.a, '=w'), @a, 'filler' from t2 A;
|
||||
insert into t3 select concat('c-', 1000+A.a, '=w'), concat('c-', 2000+A.a, '=w'),
|
||||
'filler-1' from t2 A;
|
||||
insert into t3 select concat('c-', 1000+A.a, '=w'), concat('c-', 3000+A.a, '=w'),
|
||||
'filler-2' from t2 A;
|
||||
select a,filler from t3 where a >= 'c-9011=w';
|
||||
a filler
|
||||
select a,filler from t3 where a >= 'c-1011=w' and a <= 'c-1015=w';
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
select a,filler from t3 where (a>='c-1011=w' and a <= 'c-1013=w') or
|
||||
(a>='c-1014=w' and a <= 'c-1015=w');
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
insert into t3 values ('c-1013=z', 'c-1013=z', 'err');
|
||||
insert into t3 values ('a-1014=w', 'a-1014=w', 'err');
|
||||
select a,filler from t3 where (a>='c-1011=w' and a <= 'c-1013=w') or
|
||||
(a>='c-1014=w' and a <= 'c-1015=w');
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
delete from t3 where b in ('c-1013=z', 'a-1014=w');
|
||||
select a,filler from t3 where a='c-1011=w' or a='c-1012=w' or a='c-1013=w' or
|
||||
a='c-1014=w' or a='c-1015=w';
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
insert into t3 values ('c-1013=w', 'del-me', 'inserted');
|
||||
select a,filler from t3 where a='c-1011=w' or a='c-1012=w' or a='c-1013=w' or
|
||||
a='c-1014=w' or a='c-1015=w';
|
||||
a filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1011=w filler-1
|
||||
c-1012=w filler-1
|
||||
c-1013=w filler-1
|
||||
c-1014=w filler-1
|
||||
c-1015=w filler-1
|
||||
c-1011=w filler-2
|
||||
c-1012=w filler-2
|
||||
c-1013=w filler-2
|
||||
c-1014=w filler-2
|
||||
c-1015=w filler-2
|
||||
c-1013=w inserted
|
||||
delete from t3 where b='del-me';
|
||||
alter table t3 add primary key(b);
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1018=w') or
|
||||
b IN ('c-1019=w', 'c-1020=w', 'c-1021=w',
|
||||
'c-1022=w', 'c-1023=w', 'c-1024=w');
|
||||
b filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1016=w filler
|
||||
c-1017=w filler
|
||||
c-1018=w filler
|
||||
c-1019=w filler
|
||||
c-1020=w filler
|
||||
c-1021=w filler
|
||||
c-1022=w filler
|
||||
c-1023=w filler
|
||||
c-1024=w filler
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1020=w') or
|
||||
b IN ('c-1021=w', 'c-1022=w', 'c-1023=w');
|
||||
b filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1016=w filler
|
||||
c-1017=w filler
|
||||
c-1018=w filler
|
||||
c-1019=w filler
|
||||
c-1020=w filler
|
||||
c-1021=w filler
|
||||
c-1022=w filler
|
||||
c-1023=w filler
|
||||
select b,filler from t3 where (b>='c-1011=w' and b<= 'c-1018=w') or
|
||||
b IN ('c-1019=w', 'c-1020=w') or
|
||||
(b>='c-1021=w' and b<= 'c-1023=w');
|
||||
b filler
|
||||
c-1011=w filler
|
||||
c-1012=w filler
|
||||
c-1013=w filler
|
||||
c-1014=w filler
|
||||
c-1015=w filler
|
||||
c-1016=w filler
|
||||
c-1017=w filler
|
||||
c-1018=w filler
|
||||
c-1019=w filler
|
||||
c-1020=w filler
|
||||
c-1021=w filler
|
||||
c-1022=w filler
|
||||
c-1023=w filler
|
||||
create table t4 (a varchar(10), b int, c char(10), filler char(200),
|
||||
key idx1 (a, b, c));
|
||||
insert into t4 (filler) select concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'b-1',NULL,'c-1', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'b-1',NULL,'c-222', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'bb-1',NULL,'cc-2', concat('NULL-', 15-a) from t2 order by a limit 15;
|
||||
insert into t4 (a,b,c,filler)
|
||||
select 'zz-1',NULL,'cc-2', 'filler-data' from t2 order by a limit 500;
|
||||
explain
|
||||
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
|
||||
or c='no-such-row2');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 range idx1 idx1 29 NULL 10 Using index condition; Using MRR
|
||||
select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1'
|
||||
or c='no-such-row2');
|
||||
a b c filler
|
||||
NULL NULL NULL NULL-15
|
||||
NULL NULL NULL NULL-14
|
||||
NULL NULL NULL NULL-13
|
||||
NULL NULL NULL NULL-12
|
||||
NULL NULL NULL NULL-11
|
||||
NULL NULL NULL NULL-10
|
||||
NULL NULL NULL NULL-9
|
||||
NULL NULL NULL NULL-8
|
||||
NULL NULL NULL NULL-7
|
||||
NULL NULL NULL NULL-6
|
||||
NULL NULL NULL NULL-5
|
||||
NULL NULL NULL NULL-4
|
||||
NULL NULL NULL NULL-3
|
||||
NULL NULL NULL NULL-2
|
||||
NULL NULL NULL NULL-1
|
||||
explain
|
||||
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 range idx1 idx1 29 NULL 21 Using index condition; Using MRR
|
||||
select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
a b c filler
|
||||
b-1 NULL c-1 NULL-15
|
||||
b-1 NULL c-1 NULL-14
|
||||
b-1 NULL c-1 NULL-13
|
||||
b-1 NULL c-1 NULL-12
|
||||
b-1 NULL c-1 NULL-11
|
||||
b-1 NULL c-1 NULL-10
|
||||
b-1 NULL c-1 NULL-9
|
||||
b-1 NULL c-1 NULL-8
|
||||
b-1 NULL c-1 NULL-7
|
||||
b-1 NULL c-1 NULL-6
|
||||
b-1 NULL c-1 NULL-5
|
||||
b-1 NULL c-1 NULL-4
|
||||
b-1 NULL c-1 NULL-3
|
||||
b-1 NULL c-1 NULL-2
|
||||
b-1 NULL c-1 NULL-1
|
||||
bb-1 NULL cc-2 NULL-15
|
||||
bb-1 NULL cc-2 NULL-14
|
||||
bb-1 NULL cc-2 NULL-13
|
||||
bb-1 NULL cc-2 NULL-12
|
||||
bb-1 NULL cc-2 NULL-11
|
||||
bb-1 NULL cc-2 NULL-10
|
||||
bb-1 NULL cc-2 NULL-9
|
||||
bb-1 NULL cc-2 NULL-8
|
||||
bb-1 NULL cc-2 NULL-7
|
||||
bb-1 NULL cc-2 NULL-6
|
||||
bb-1 NULL cc-2 NULL-5
|
||||
bb-1 NULL cc-2 NULL-4
|
||||
bb-1 NULL cc-2 NULL-3
|
||||
bb-1 NULL cc-2 NULL-2
|
||||
bb-1 NULL cc-2 NULL-1
|
||||
select * from t4 ignore index(idx1) where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2');
|
||||
a b c filler
|
||||
b-1 NULL c-1 NULL-15
|
||||
b-1 NULL c-1 NULL-14
|
||||
b-1 NULL c-1 NULL-13
|
||||
b-1 NULL c-1 NULL-12
|
||||
b-1 NULL c-1 NULL-11
|
||||
b-1 NULL c-1 NULL-10
|
||||
b-1 NULL c-1 NULL-9
|
||||
b-1 NULL c-1 NULL-8
|
||||
b-1 NULL c-1 NULL-7
|
||||
b-1 NULL c-1 NULL-6
|
||||
b-1 NULL c-1 NULL-5
|
||||
b-1 NULL c-1 NULL-4
|
||||
b-1 NULL c-1 NULL-3
|
||||
b-1 NULL c-1 NULL-2
|
||||
b-1 NULL c-1 NULL-1
|
||||
bb-1 NULL cc-2 NULL-15
|
||||
bb-1 NULL cc-2 NULL-14
|
||||
bb-1 NULL cc-2 NULL-13
|
||||
bb-1 NULL cc-2 NULL-12
|
||||
bb-1 NULL cc-2 NULL-11
|
||||
bb-1 NULL cc-2 NULL-10
|
||||
bb-1 NULL cc-2 NULL-9
|
||||
bb-1 NULL cc-2 NULL-8
|
||||
bb-1 NULL cc-2 NULL-7
|
||||
bb-1 NULL cc-2 NULL-6
|
||||
bb-1 NULL cc-2 NULL-5
|
||||
bb-1 NULL cc-2 NULL-4
|
||||
bb-1 NULL cc-2 NULL-3
|
||||
bb-1 NULL cc-2 NULL-2
|
||||
bb-1 NULL cc-2 NULL-1
|
||||
drop table t1, t2, t3, t4;
|
||||
create table t1 (a int, b int not null,unique key (a,b),index(b));
|
||||
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
||||
create table t2 like t1;
|
||||
insert into t2 select * from t1;
|
||||
alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
|
||||
select * from t1 where a is null;
|
||||
a b c
|
||||
NULL 7 0
|
||||
NULL 9 0
|
||||
NULL 9 0
|
||||
select * from t1 where (a is null or a > 0 and a < 3) and b > 7 limit 3;
|
||||
a b c
|
||||
NULL 9 0
|
||||
NULL 9 0
|
||||
select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
|
||||
a b c
|
||||
NULL 7 0
|
||||
NULL 9 0
|
||||
NULL 9 0
|
||||
drop table t1, t2;
|
||||
set @@read_rnd_buffer_size= @read_rnd_buffer_size_save;
|
||||
CREATE TABLE t1 (
|
||||
ID int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
col1 int(10) unsigned DEFAULT NULL,
|
||||
key1 int(10) unsigned NOT NULL DEFAULT '0',
|
||||
key2 int(10) unsigned DEFAULT NULL,
|
||||
text1 text,
|
||||
text2 text,
|
||||
col2 smallint(6) DEFAULT '100',
|
||||
col3 enum('headers','bodyandsubject') NOT NULL DEFAULT 'bodyandsubject',
|
||||
col4 tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (ID),
|
||||
KEY (key1),
|
||||
KEY (key2)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES
|
||||
(1,NULL,1130,NULL,'Hello',NULL,100,'bodyandsubject',0),
|
||||
(2,NULL,1130,NULL,'bye',NULL,100,'bodyandsubject',0),
|
||||
(3,NULL,1130,NULL,'red',NULL,100,'bodyandsubject',0),
|
||||
(4,NULL,1130,NULL,'yellow',NULL,100,'bodyandsubject',0),
|
||||
(5,NULL,1130,NULL,'blue',NULL,100,'bodyandsubject',0);
|
||||
select * FROM t1 WHERE key1=1130 AND col1 IS NULL ORDER BY text1;
|
||||
ID col1 key1 key2 text1 text2 col2 col3 col4
|
||||
5 NULL 1130 NULL blue NULL 100 bodyandsubject 0
|
||||
2 NULL 1130 NULL bye NULL 100 bodyandsubject 0
|
||||
1 NULL 1130 NULL Hello NULL 100 bodyandsubject 0
|
||||
3 NULL 1130 NULL red NULL 100 bodyandsubject 0
|
||||
4 NULL 1130 NULL yellow NULL 100 bodyandsubject 0
|
||||
drop table t1;
|
||||
|
||||
BUG#37851: Crash in test_if_skip_sort_order tab->select is zero
|
||||
|
||||
CREATE TABLE t1 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TABLE t2 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
int_key int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (pk),
|
||||
KEY int_key (int_key)
|
||||
);
|
||||
INSERT INTO t2 VALUES (1,1),(2,6),(3,0);
|
||||
EXPLAIN EXTENDED
|
||||
SELECT MIN(t1.pk)
|
||||
FROM t1 WHERE EXISTS (
|
||||
SELECT t2.pk
|
||||
FROM t2
|
||||
WHERE t2.int_key IS NULL
|
||||
GROUP BY t2.pk
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY t2 ALL int_key int_key 5 3 33.33 Using index condition; Using filesort
|
||||
Warnings:
|
||||
Note 1003 select min(`test`.`t1`.`pk`) AS `MIN(t1.pk)` from `test`.`t1` where 0
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# BUG#42048 Discrepancy between MyISAM and Maria's ICP implementation
|
||||
#
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (a int, b char(20), filler char(200), key(a,b(10)));
|
||||
insert into t1 select A.a + 10*(B.a + 10*C.a), 'bbb','filler' from t0 A, t0 B, t0 C;
|
||||
update t1 set b=repeat(char(65+a), 20) where a < 25;
|
||||
This must show range + using index condition:
|
||||
explain select * from t1 where a < 10 and b = repeat(char(65+a), 20);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 19 Using where
|
||||
select * from t1 where a < 10 and b = repeat(char(65+a), 20);
|
||||
a b filler
|
||||
0 AAAAAAAAAAAAAAAAAAAA filler
|
||||
1 BBBBBBBBBBBBBBBBBBBB filler
|
||||
2 CCCCCCCCCCCCCCCCCCCC filler
|
||||
3 DDDDDDDDDDDDDDDDDDDD filler
|
||||
4 EEEEEEEEEEEEEEEEEEEE filler
|
||||
5 FFFFFFFFFFFFFFFFFFFF filler
|
||||
6 GGGGGGGGGGGGGGGGGGGG filler
|
||||
7 HHHHHHHHHHHHHHHHHHHH filler
|
||||
8 IIIIIIIIIIIIIIIIIIII filler
|
||||
9 JJJJJJJJJJJJJJJJJJJJ filler
|
||||
drop table t0,t1;
|
||||
#
|
||||
# BUG#41136: ORDER BY + range access: EXPLAIN shows "Using MRR" while MRR is actually not used
|
||||
#
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (a int, b int, key(a));
|
||||
insert into t1 select A.a + 10 *(B.a + 10*C.a), A.a + 10 *(B.a + 10*C.a) from t0 A, t0 B, t0 C;
|
||||
This mustn't show "Using MRR":
|
||||
explain select * from t1 where a < 20 order by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 20 Using index condition
|
||||
drop table t0, t1;
|
|
@ -79,7 +79,7 @@ a
|
|||
19
|
||||
explain select * from t1 where not(a != 10);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using index
|
||||
select * from t1 where not(a != 1);
|
||||
a
|
||||
1
|
||||
|
|
|
@ -148,10 +148,10 @@ insert into t1 values
|
|||
(7,7), (8,8), (9,9), (10,10), (11,11), (12,12);
|
||||
explain select * from t1 where a between 2 and 3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range idx idx 4 NULL 2 Using where
|
||||
1 SIMPLE t1 range idx idx 4 NULL 2 Using index condition; Using MRR
|
||||
explain select * from t1 where a between 2 and 3 or b is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range idx idx 4 NULL 2 Using where
|
||||
1 SIMPLE t1 range idx idx 4 NULL 2 Using index condition; Using MRR
|
||||
drop table t1;
|
||||
select cast(NULL as signed);
|
||||
cast(NULL as signed)
|
||||
|
@ -170,7 +170,7 @@ insert into t1 select i*2 from t1;
|
|||
insert into t1 values(null);
|
||||
explain select * from t1 where i=2 or i is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null i i 5 const 9 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null i i 5 const 9 Using index
|
||||
select count(*) from t1 where i=2 or i is null;
|
||||
count(*)
|
||||
10
|
||||
|
|
|
@ -21,10 +21,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 range a,b a 9 NULL 3 Using where; Using index
|
||||
explain select * from t1 where (a is null or a = 7) and b=7;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using index
|
||||
explain select * from t1 where (a is null or a = 7) and b=7 order by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index; Using filesort
|
||||
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using index; Using filesort
|
||||
explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a,b a 5 const 3 Using where; Using index
|
||||
|
@ -151,7 +151,7 @@ alter table t1 modify b int null;
|
|||
insert into t1 values (7,null), (8,null), (8,7);
|
||||
explain select * from t1 where a = 7 and (b=7 or b is null);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null a,b a 10 const,const 2 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null a,b a 10 const,const 2 Using index
|
||||
select * from t1 where a = 7 and (b=7 or b is null);
|
||||
a b
|
||||
7 7
|
||||
|
@ -166,7 +166,7 @@ a b
|
|||
NULL 7
|
||||
explain select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null a a 5 const 5 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null a a 5 const 5 Using index
|
||||
select * from t1 where (a = 7 or a is null) and (a = 7 or a is null);
|
||||
a b
|
||||
7 NULL
|
||||
|
@ -192,7 +192,7 @@ a a b
|
|||
explain select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using index
|
||||
select * from t2,t1 where t1.a=t2.a and (b= 7 or b is null);
|
||||
a a b
|
||||
7 7 7
|
||||
|
@ -202,7 +202,7 @@ a a b
|
|||
explain select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null a a 10 test.t2.a,const 4 Using index
|
||||
select * from t2,t1 where (t1.a=t2.a or t1.a is null) and b= 7;
|
||||
a a b
|
||||
7 7 7
|
||||
|
@ -226,7 +226,7 @@ delete from t1 where a=8;
|
|||
explain select * from t2,t1 where t1.a=t2.a or t1.a is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t1 ref_or_null a a 5 test.t2.a 4 Using where; Using index
|
||||
1 SIMPLE t1 ref_or_null a a 5 test.t2.a 4 Using index
|
||||
explain select * from t2,t1 where t1.a<=>t2.a or (t1.a is null and t1.b <> 9);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 4
|
||||
|
@ -258,7 +258,7 @@ INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4
|
|||
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
|
||||
explain select id from t1 where uniq_id is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref idx1 idx1 5 const 5 Using where
|
||||
1 SIMPLE t1 ref idx1 idx1 5 const 5 Using index condition
|
||||
explain select id from t1 where uniq_id =1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const idx1 idx1 5 const 1
|
||||
|
|
|
@ -514,7 +514,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.skr = t3.uid order by t1.gid,t3.skr;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 2 test.t1.skr 1 Using where
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 2 test.t1.skr 1 Using index condition
|
||||
drop table t1,t2,t3;
|
||||
CREATE TABLE t1 (
|
||||
`titre` char(80) NOT NULL default '',
|
||||
|
@ -609,7 +609,7 @@ FieldKey LongVal StringVal
|
|||
1 2 1
|
||||
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 38 NULL 4 Using where; Using filesort
|
||||
1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 38 NULL 4 Using index condition; Using where; Using MRR; Using filesort
|
||||
SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal;
|
||||
FieldKey LongVal StringVal
|
||||
3 1 2
|
||||
|
@ -638,7 +638,7 @@ create table t1(a int, b int, index(b));
|
|||
insert into t1 values (2, 1), (1, 1), (4, NULL), (3, NULL), (6, 2), (5, 2);
|
||||
explain select * from t1 where b=1 or b is null order by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null b b 5 const 3 Using where; Using filesort
|
||||
1 SIMPLE t1 ref_or_null b b 5 const 3 Using filesort
|
||||
select * from t1 where b=1 or b is null order by a;
|
||||
a b
|
||||
1 1
|
||||
|
@ -647,7 +647,7 @@ a b
|
|||
4 NULL
|
||||
explain select * from t1 where b=2 or b is null order by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref_or_null b b 5 const 4 Using where; Using filesort
|
||||
1 SIMPLE t1 ref_or_null b b 5 const 4 Using filesort
|
||||
select * from t1 where b=2 or b is null order by a;
|
||||
a b
|
||||
3 NULL
|
||||
|
@ -1004,7 +1004,7 @@ t1 LEFT JOIN t1 t2 ON (t1.a = t2.a AND t2.a = 2)
|
|||
ORDER BY c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
|
||||
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Using where
|
||||
SELECT t2.b as c FROM
|
||||
t1 LEFT JOIN t1 t2 ON (t1.a = t2.a AND t2.a = 2)
|
||||
ORDER BY c;
|
||||
|
@ -1107,7 +1107,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 index k2 k3 5 NULL 73 Using where
|
||||
EXPLAIN SELECT id,c3 FROM t2 WHERE c2 BETWEEN 20 AND 30 ORDER BY c3 LIMIT 4000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range k2 k2 5 NULL 386 Using where; Using filesort
|
||||
1 SIMPLE t2 range k2 k2 5 NULL 386 Using index condition; Using where; Using MRR; Using filesort
|
||||
SELECT id,c3 FROM t2 WHERE c2=11 ORDER BY c3 LIMIT 20;
|
||||
id c3
|
||||
6 14
|
||||
|
@ -1454,8 +1454,8 @@ SELECT d FROM t1, t2
|
|||
WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE'
|
||||
ORDER BY t2.c LIMIT 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a,b b 4 const 4 Using where; Using temporary; Using filesort
|
||||
1 SIMPLE t2 ref a,b,c a 40 test.t1.a,const 11 Using where
|
||||
1 SIMPLE t1 ref a,b b 4 const 4 Using index condition; Using temporary; Using filesort
|
||||
1 SIMPLE t2 ref a,b,c a 40 test.t1.a,const 11 Using index condition
|
||||
SELECT d FROM t1, t2
|
||||
WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE'
|
||||
ORDER BY t2.c LIMIT 1;
|
||||
|
|
|
@ -137,7 +137,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
|
||||
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
|
||||
# Disabling warnings for the invalid date
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
|
@ -466,7 +466,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
|
||||
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
|
||||
# Disabling warnings for the invalid date
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
|
@ -1820,15 +1820,15 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 p0,p1,p2,p3 ALL NULL NULL NULL NULL 910 Using where
|
||||
explain partitions select * from t2 where b = 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76 Using where
|
||||
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76
|
||||
explain extended select * from t2 where b = 6;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ref b b 5 const 76 100.00 Using where
|
||||
1 SIMPLE t2 ref b b 5 const 76 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`b` = 6)
|
||||
explain partitions select * from t2 where b = 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76 Using where
|
||||
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76
|
||||
explain extended select * from t2 where b in (1,3,5);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t2 ALL b NULL NULL NULL 910 40.66 Using where
|
||||
|
|
|
@ -183,37 +183,37 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
|
||||
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
|
||||
fld1 fld3
|
||||
218401 faithful
|
||||
018007 fanatic
|
||||
228311 fated
|
||||
018017 featherweight
|
||||
218022 feed
|
||||
088303 feminine
|
||||
058004 Fenton
|
||||
038017 fetched
|
||||
018054 fetters
|
||||
208101 fiftieth
|
||||
238007 filial
|
||||
013606 fingerings
|
||||
218008 finishers
|
||||
038205 firearm
|
||||
188505 fitting
|
||||
202301 Fitzpatrick
|
||||
238008 fixedly
|
||||
012001 flanking
|
||||
013602 foldout
|
||||
013606 fingerings
|
||||
018007 fanatic
|
||||
018017 featherweight
|
||||
018054 fetters
|
||||
018103 flint
|
||||
018104 flopping
|
||||
188007 flurried
|
||||
013602 foldout
|
||||
226205 foothill
|
||||
232102 forgivably
|
||||
228306 forthcoming
|
||||
186002 freakish
|
||||
208113 freest
|
||||
231315 freezes
|
||||
036002 funereal
|
||||
226209 furnishings
|
||||
038017 fetched
|
||||
038205 firearm
|
||||
058004 Fenton
|
||||
088303 feminine
|
||||
186002 freakish
|
||||
188007 flurried
|
||||
188505 fitting
|
||||
198006 furthermore
|
||||
202301 Fitzpatrick
|
||||
208101 fiftieth
|
||||
208113 freest
|
||||
218008 finishers
|
||||
218022 feed
|
||||
218401 faithful
|
||||
226205 foothill
|
||||
226209 furnishings
|
||||
228306 forthcoming
|
||||
228311 fated
|
||||
231315 freezes
|
||||
232102 forgivably
|
||||
238007 filial
|
||||
238008 fixedly
|
||||
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
|
||||
fld3
|
||||
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
|
||||
|
@ -1389,15 +1389,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
|
@ -1413,15 +1413,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
|
||||
companynr companynr
|
||||
37 36
|
||||
|
|
|
@ -465,9 +465,9 @@ def key 253 64 7 Y 0 31 8
|
|||
def key_len 253 4096 1 Y 0 31 8
|
||||
def ref 253 2048 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 27 N 1 31 8
|
||||
def Extra 253 255 48 N 1 31 8
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using MRR; Using filesort
|
||||
drop table if exists t2;
|
||||
create table t2 (id smallint, name varchar(20)) ;
|
||||
prepare stmt1 from ' insert into t2 values(?, ?) ' ;
|
||||
|
|
|
@ -1509,8 +1509,8 @@ prepare stmt1 from 'insert into t1 values(?,?),(?,?)';
|
|||
execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
|
||||
select a,b from t1 where a in (@arg00,@arg02) ;
|
||||
a b
|
||||
81 8-1
|
||||
82 8-2
|
||||
81 8-1
|
||||
set @arg00=9 ;
|
||||
set @arg01='nine' ;
|
||||
prepare stmt1 from 'insert into t1 set a=?, b=? ';
|
||||
|
|
|
@ -220,31 +220,31 @@ insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|||
update t1 set y=x;
|
||||
explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref y y 5 const 1 Using where
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer
|
||||
1 SIMPLE t1 ref y y 5 const 1
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using MRR; Using join buffer
|
||||
explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref y y 5 const 1 Using where
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer
|
||||
1 SIMPLE t1 ref y y 5 const 1
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using MRR; Using join buffer
|
||||
explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref y y 5 const 1 Using where
|
||||
1 SIMPLE t2 range x x 5 NULL 3 Using where; Using join buffer
|
||||
1 SIMPLE t1 ref y y 5 const 1
|
||||
1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using MRR; Using join buffer
|
||||
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref y y 5 const 1 Using where
|
||||
1 SIMPLE t2 range x x 5 NULL 3 Using where; Using join buffer
|
||||
1 SIMPLE t1 ref y y 5 const 1
|
||||
1 SIMPLE t2 range x x 5 NULL 3 Using index condition; Using MRR; Using join buffer
|
||||
explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref y y 5 const 1 Using where
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer
|
||||
1 SIMPLE t1 ref y y 5 const 1
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using MRR; Using join buffer
|
||||
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref y y 5 const 1 Using where
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer
|
||||
1 SIMPLE t1 ref y y 5 const 1
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using index condition; Using MRR; Using join buffer
|
||||
explain select count(*) from t1 where x in (1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref x x 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref x x 5 const 1 Using index
|
||||
explain select count(*) from t1 where x in (1,2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
|
||||
|
@ -276,7 +276,7 @@ INSERT INTO t1 VALUES
|
|||
(33,5),(33,5),(33,5),(33,5),(34,5),(35,5);
|
||||
EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a,b a 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range a,b a 5 NULL 2 Using index condition; Using where; Using MRR
|
||||
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
a b
|
||||
DROP TABLE t1;
|
||||
|
@ -421,19 +421,19 @@ test.t1 analyze status OK
|
|||
test.t2 analyze status Table is already up to date
|
||||
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using where
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition; Using MRR
|
||||
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
|
||||
explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using where
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using index condition; Using MRR
|
||||
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
|
||||
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using where
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using index condition; Using MRR
|
||||
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
|
||||
explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using where
|
||||
1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using index condition; Using MRR
|
||||
1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38
|
||||
select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
|
||||
id name uid id name uid
|
||||
|
@ -615,13 +615,13 @@ INSERT INTO t1 (a) VALUES
|
|||
('111'),('222'),('222'),('222'),('222'),('444'),('aaa'),('AAA'),('bbb');
|
||||
explain select * from t1 where a='aaa';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 11 const 2 Using where
|
||||
1 SIMPLE t1 ref a a 11 const 2 Using index condition
|
||||
explain select * from t1 where a=binary 'aaa';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 11 NULL 2 Using where
|
||||
1 SIMPLE t1 range a a 11 NULL 2 Using index condition; Using MRR
|
||||
explain select * from t1 where a='aaa' collate latin1_bin;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 11 NULL 2 Using where
|
||||
1 SIMPLE t1 range a a 11 NULL 2 Using index condition; Using MRR
|
||||
explain select * from t1 where a='aaa' collate latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 9 Using where
|
||||
|
@ -704,7 +704,7 @@ WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
|
|||
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
|
||||
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 5 Using where
|
||||
1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 34 const 5 Using index condition
|
||||
1 SIMPLE s ALL OXLEFT NULL NULL NULL 6 Range checked for each record (index map: 0x4)
|
||||
SELECT s.oxid FROM t1 v, t1 s
|
||||
WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
|
||||
|
@ -878,10 +878,10 @@ INSERT INTO t1 VALUES
|
|||
(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C');
|
||||
EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range status status 23 NULL 11 Using where
|
||||
1 SIMPLE t1 range status status 23 NULL 11 Using index condition; Using MRR
|
||||
EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range status status 23 NULL 11 Using where
|
||||
1 SIMPLE t1 range status status 23 NULL 11 Using index condition; Using MRR
|
||||
SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
|
||||
id status
|
||||
53 C
|
||||
|
@ -910,10 +910,10 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index
|
||||
EXPLAIN SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range status status 23 NULL 10 Using where
|
||||
1 SIMPLE t1 range status status 23 NULL 10 Using index condition; Using MRR
|
||||
EXPLAIN SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range status status 23 NULL 10 Using where
|
||||
1 SIMPLE t1 range status status 23 NULL 10 Using index condition; Using MRR
|
||||
SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
|
||||
id status
|
||||
53 C
|
||||
|
@ -1014,20 +1014,20 @@ create table t2 (a varchar(10), filler char(200), key(a));
|
|||
insert into t2 select * from t1;
|
||||
explain select * from t1 where a between 'a' and 'a ';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 13 NULL # Using where
|
||||
1 SIMPLE t1 range a a 13 NULL # Using index condition; Using MRR
|
||||
explain select * from t1 where a = 'a' or a='a ';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 13 NULL # Using where
|
||||
1 SIMPLE t1 range a a 13 NULL # Using index condition; Using MRR
|
||||
explain select * from t2 where a between 'a' and 'a ';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 13 const # Using where
|
||||
1 SIMPLE t2 ref a a 13 const # Using index condition
|
||||
explain select * from t2 where a = 'a' or a='a ';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 13 const # Using where
|
||||
1 SIMPLE t2 ref a a 13 const # Using index condition
|
||||
update t1 set a='b' where a<>'a';
|
||||
explain select * from t1 where a not between 'b' and 'b';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 13 NULL # Using where
|
||||
1 SIMPLE t1 range a a 13 NULL # Using index condition; Using MRR
|
||||
select a, hex(filler) from t1 where a not between 'b' and 'b';
|
||||
a hex(filler)
|
||||
a 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
@ -1071,10 +1071,10 @@ id b c
|
|||
0 3 4
|
||||
EXPLAIN SELECT * FROM t1 WHERE b<=3 AND 3<=c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using where
|
||||
1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using index condition; Using where; Using MRR
|
||||
EXPLAIN SELECT * FROM t1 WHERE 3 BETWEEN b AND c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using where
|
||||
1 SIMPLE t1 range idx1,idx2 idx2 4 NULL 3 Using where; Using MRR
|
||||
SELECT * FROM t1 WHERE 0 < b OR 0 > c;
|
||||
id b c
|
||||
0 3 4
|
||||
|
@ -1085,10 +1085,10 @@ id b c
|
|||
0 3 4
|
||||
EXPLAIN SELECT * FROM t1 WHERE 0 < b OR 0 > c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
|
||||
1 SIMPLE t1 ALL idx1,idx2 NULL NULL NULL 10 Using where
|
||||
EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
|
||||
1 SIMPLE t1 ALL idx1,idx2 NULL NULL NULL 10 Using where
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
item char(20) NOT NULL default '',
|
||||
|
@ -1103,7 +1103,7 @@ INSERT INTO t1 VALUES
|
|||
('A2','2005-12-01 08:00:00',1000);
|
||||
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 2 Using where
|
||||
1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 2 Using index condition
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
|
||||
Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
|
||||
|
@ -1151,7 +1151,7 @@ INSERT INTO t1 VALUES
|
|||
This must use range access:
|
||||
explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= '2007-01-02 23:59:59';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range dateval dateval 4 NULL 2 Using where
|
||||
1 SIMPLE t1 range dateval dateval 4 NULL 2 Using index condition; Using MRR
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a varchar(32), index (a)
|
||||
|
@ -1217,5 +1217,5 @@ Z
|
|||
In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)
|
||||
explain select * from t2 where a=1000 and b<11;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 5 const 502 Using where
|
||||
1 SIMPLE t2 ref a a 5 const 502 Using index condition
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -185,37 +185,37 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
|
||||
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
|
||||
fld1 fld3
|
||||
218401 faithful
|
||||
018007 fanatic
|
||||
228311 fated
|
||||
018017 featherweight
|
||||
218022 feed
|
||||
088303 feminine
|
||||
058004 Fenton
|
||||
038017 fetched
|
||||
018054 fetters
|
||||
208101 fiftieth
|
||||
238007 filial
|
||||
013606 fingerings
|
||||
218008 finishers
|
||||
038205 firearm
|
||||
188505 fitting
|
||||
202301 Fitzpatrick
|
||||
238008 fixedly
|
||||
012001 flanking
|
||||
013602 foldout
|
||||
013606 fingerings
|
||||
018007 fanatic
|
||||
018017 featherweight
|
||||
018054 fetters
|
||||
018103 flint
|
||||
018104 flopping
|
||||
188007 flurried
|
||||
013602 foldout
|
||||
226205 foothill
|
||||
232102 forgivably
|
||||
228306 forthcoming
|
||||
186002 freakish
|
||||
208113 freest
|
||||
231315 freezes
|
||||
036002 funereal
|
||||
226209 furnishings
|
||||
038017 fetched
|
||||
038205 firearm
|
||||
058004 Fenton
|
||||
088303 feminine
|
||||
186002 freakish
|
||||
188007 flurried
|
||||
188505 fitting
|
||||
198006 furthermore
|
||||
202301 Fitzpatrick
|
||||
208101 fiftieth
|
||||
208113 freest
|
||||
218008 finishers
|
||||
218022 feed
|
||||
218401 faithful
|
||||
226205 foothill
|
||||
226209 furnishings
|
||||
228306 forthcoming
|
||||
228311 fated
|
||||
231315 freezes
|
||||
232102 forgivably
|
||||
238007 filial
|
||||
238008 fixedly
|
||||
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
|
||||
fld3
|
||||
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
|
||||
|
@ -1391,15 +1391,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
|
@ -1415,15 +1415,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
|
||||
companynr companynr
|
||||
37 36
|
||||
|
@ -2362,7 +2362,7 @@ insert into t1 values (1,2), (2,2), (3,2), (4,2);
|
|||
insert into t2 values (1,3), (2,3), (3,4), (4,4);
|
||||
explain select * from t1 left join t2 on a=c where d in (4);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref c,d d 5 const 2 Using where
|
||||
1 SIMPLE t2 ref c,d d 5 const 2
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where; Using join buffer
|
||||
select * from t1 left join t2 on a=c where d in (4);
|
||||
a b c d
|
||||
|
@ -2370,7 +2370,7 @@ a b c d
|
|||
4 2 4 4
|
||||
explain select * from t1 left join t2 on a=c where d = 4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref c,d d 5 const 2 Using where
|
||||
1 SIMPLE t2 ref c,d d 5 const 2
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where; Using join buffer
|
||||
select * from t1 left join t2 on a=c where d = 4;
|
||||
a b c d
|
||||
|
@ -2397,11 +2397,11 @@ INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five');
|
|||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
|
||||
1 SIMPLE t2 ref a a 23 test.t1.a 2
|
||||
1 SIMPLE t2 ref a a 23 test.t1.a 2 Using where
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
|
||||
1 SIMPLE t2 ref a a 23 test.t1.a 2
|
||||
1 SIMPLE t2 ref a a 23 test.t1.a 2 Using where
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 ( city char(30) );
|
||||
INSERT INTO t1 VALUES ('London');
|
||||
|
@ -2716,7 +2716,7 @@ 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 t1 ref b,c b 5 const 1 Using temporary; Using filesort
|
||||
1 SIMPLE t3 index PRIMARY,a,b PRIMARY 8 NULL 2 Using index; Using join buffer
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Range checked for each record (index map: 0x1)
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
@ -3417,7 +3417,7 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
|
|||
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using MRR
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);
|
||||
INSERT t1 SET i = 0;
|
||||
|
@ -3453,7 +3453,7 @@ In next EXPLAIN, B.rows must be exactly 10:
|
|||
explain select * from t2 A, t2 B where A.a=5 and A.b=5 and A.C<5
|
||||
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 4 Using where
|
||||
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 4 Using index condition; Using where; Using MRR
|
||||
1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
|
||||
|
@ -3467,13 +3467,13 @@ INSERT INTO t2 VALUES
|
|||
EXPLAIN
|
||||
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
|
||||
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
|
||||
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using MRR
|
||||
1 SIMPLE t2 ref c c 5 test.t1.a 2
|
||||
EXPLAIN
|
||||
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
|
||||
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
|
||||
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where; Using MRR
|
||||
1 SIMPLE t2 ref c c 5 test.t1.a 2
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
|
@ -3533,7 +3533,7 @@ WHERE t1.id=2;
|
|||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 const idx1 NULL NULL NULL 1
|
||||
1 SIMPLE t3 ref idx1 idx1 5 const 3 Using where
|
||||
1 SIMPLE t3 ref idx1 idx1 5 const 3
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
|
||||
WHERE t1.id=2;
|
||||
id a b c d e
|
||||
|
@ -3562,19 +3562,19 @@ EXPLAIN SELECT t2.*
|
|||
FROM t1 JOIN t2 ON t2.fk=t1.pk
|
||||
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using MRR
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where
|
||||
EXPLAIN SELECT t2.*
|
||||
FROM t1 JOIN t2 ON t2.fk=t1.pk
|
||||
WHERE t2.fk BETWEEN 'a' AND 'b' AND t2.pk=t1.fk;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using MRR
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where
|
||||
EXPLAIN SELECT t2.*
|
||||
FROM t1 JOIN t2 ON t2.fk=t1.pk
|
||||
WHERE t2.fk IN ('a','b') AND t2.pk=t1.fk;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using MRR
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a int, b varchar(20) NOT NULL, PRIMARY KEY(a));
|
||||
|
@ -3608,7 +3608,7 @@ WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
|
|||
t3.a=t2.a AND t3.c IN ('bb','ee');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 range si si 5 NULL 4 Using where
|
||||
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using MRR
|
||||
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
|
||||
EXPLAIN
|
||||
SELECT t3.a FROM t1,t2,t3
|
||||
|
@ -3616,7 +3616,7 @@ WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
|
|||
t3.a=t2.a AND t3.c IN ('bb','ee') ;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 range si,ai si 5 NULL 4 Using where
|
||||
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using MRR
|
||||
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
|
||||
EXPLAIN
|
||||
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
|
||||
|
@ -3624,7 +3624,7 @@ WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
|
|||
t3.c IN ('bb','ee');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 range si si 5 NULL 2 Using where
|
||||
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using MRR
|
||||
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
|
||||
EXPLAIN
|
||||
SELECT t3.a FROM t1,t2,t3
|
||||
|
@ -3632,7 +3632,7 @@ WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
|
|||
t3.c IN ('bb','ee');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t2 range si,ai si 5 NULL 2 Using where
|
||||
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using MRR
|
||||
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
|
||||
|
@ -3752,7 +3752,7 @@ AND t1.ts BETWEEN t2.dt1 AND t2.dt2
|
|||
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
|
||||
1 SIMPLE t1 range ts ts 4 NULL 1 Using where
|
||||
1 SIMPLE t1 range ts ts 4 NULL 1 Using index condition; Using where; Using MRR
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '2999-12-31 00:00:00' for column 'ts' at row 1
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
|
||||
|
@ -3854,7 +3854,7 @@ cc 3 7
|
|||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
|
||||
1 SIMPLE t2 ref name name 6 test.t1.name 2
|
||||
1 SIMPLE t2 ref name name 6 test.t1.name 2 Using where
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
|
||||
name name n
|
||||
ccc NULL NULL
|
||||
|
@ -3928,7 +3928,7 @@ cc 3 7
|
|||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
|
||||
1 SIMPLE t2 ref name name 6 test.t1.name 2
|
||||
1 SIMPLE t2 ref name name 6 test.t1.name 2 Using where
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
|
||||
name name n
|
||||
ccc NULL NULL
|
||||
|
@ -4376,12 +4376,12 @@ CREATE TABLE t1 (a INT KEY, b INT);
|
|||
INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4);
|
||||
EXPLAIN EXTENDED SELECT a, b FROM t1 WHERE a > 1 AND a = b LIMIT 2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using index condition; Using where; Using MRR
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t1`.`a`) and (`test`.`t1`.`a` > 1)) limit 2
|
||||
EXPLAIN EXTENDED SELECT a, b FROM t1 WHERE a > 1 AND b = a LIMIT 2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using index condition; Using where; Using MRR
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where ((`test`.`t1`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` > 1)) limit 2
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -67,12 +67,12 @@ insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(nu
|
|||
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL b NULL NULL NULL 21
|
||||
1 SIMPLE t2 ref b b 21 test.t1.b 6 Using where
|
||||
1 SIMPLE t2 ref b b 21 test.t1.b 6
|
||||
set MAX_SEEKS_FOR_KEY=1;
|
||||
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL b NULL NULL NULL 21
|
||||
1 SIMPLE t2 ref b b 21 test.t1.b 6 Using where
|
||||
1 SIMPLE t2 ref b b 21 test.t1.b 6
|
||||
SET MAX_SEEKS_FOR_KEY=DEFAULT;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
|
|
|
@ -6418,19 +6418,19 @@ INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
|||
CREATE VIEW v1 AS SELECT c1 FROM t1;
|
||||
EXPLAIN SELECT * FROM t1 WHERE c1=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
|
||||
EXPLAIN SELECT * FROM t1 WHERE c1=f1();
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
|
||||
EXPLAIN SELECT * FROM v1 WHERE c1=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
|
||||
EXPLAIN SELECT * FROM v1 WHERE c1=f1();
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
|
||||
EXPLAIN SELECT * FROM t1 WHERE c1=f2(10);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref c1 c1 5 const 1 Using index
|
||||
EXPLAIN SELECT * FROM t1 WHERE c1=f2(c1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL c1 5 NULL 5 Using where; Using index
|
||||
|
|
|
@ -186,37 +186,37 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
|
||||
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
|
||||
fld1 fld3
|
||||
218401 faithful
|
||||
018007 fanatic
|
||||
228311 fated
|
||||
018017 featherweight
|
||||
218022 feed
|
||||
088303 feminine
|
||||
058004 Fenton
|
||||
038017 fetched
|
||||
018054 fetters
|
||||
208101 fiftieth
|
||||
238007 filial
|
||||
013606 fingerings
|
||||
218008 finishers
|
||||
038205 firearm
|
||||
188505 fitting
|
||||
202301 Fitzpatrick
|
||||
238008 fixedly
|
||||
012001 flanking
|
||||
013602 foldout
|
||||
013606 fingerings
|
||||
018007 fanatic
|
||||
018017 featherweight
|
||||
018054 fetters
|
||||
018103 flint
|
||||
018104 flopping
|
||||
188007 flurried
|
||||
013602 foldout
|
||||
226205 foothill
|
||||
232102 forgivably
|
||||
228306 forthcoming
|
||||
186002 freakish
|
||||
208113 freest
|
||||
231315 freezes
|
||||
036002 funereal
|
||||
226209 furnishings
|
||||
038017 fetched
|
||||
038205 firearm
|
||||
058004 Fenton
|
||||
088303 feminine
|
||||
186002 freakish
|
||||
188007 flurried
|
||||
188505 fitting
|
||||
198006 furthermore
|
||||
202301 Fitzpatrick
|
||||
208101 fiftieth
|
||||
208113 freest
|
||||
218008 finishers
|
||||
218022 feed
|
||||
218401 faithful
|
||||
226205 foothill
|
||||
226209 furnishings
|
||||
228306 forthcoming
|
||||
228311 fated
|
||||
231315 freezes
|
||||
232102 forgivably
|
||||
238007 filial
|
||||
238008 fixedly
|
||||
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
|
||||
fld3
|
||||
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
|
||||
|
@ -1392,15 +1392,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
|
@ -1416,15 +1416,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
|
||||
companynr companynr
|
||||
37 36
|
||||
|
|
|
@ -189,37 +189,37 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
|
||||
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
|
||||
fld1 fld3
|
||||
218401 faithful
|
||||
018007 fanatic
|
||||
228311 fated
|
||||
018017 featherweight
|
||||
218022 feed
|
||||
088303 feminine
|
||||
058004 Fenton
|
||||
038017 fetched
|
||||
018054 fetters
|
||||
208101 fiftieth
|
||||
238007 filial
|
||||
013606 fingerings
|
||||
218008 finishers
|
||||
038205 firearm
|
||||
188505 fitting
|
||||
202301 Fitzpatrick
|
||||
238008 fixedly
|
||||
012001 flanking
|
||||
013602 foldout
|
||||
013606 fingerings
|
||||
018007 fanatic
|
||||
018017 featherweight
|
||||
018054 fetters
|
||||
018103 flint
|
||||
018104 flopping
|
||||
188007 flurried
|
||||
013602 foldout
|
||||
226205 foothill
|
||||
232102 forgivably
|
||||
228306 forthcoming
|
||||
186002 freakish
|
||||
208113 freest
|
||||
231315 freezes
|
||||
036002 funereal
|
||||
226209 furnishings
|
||||
038017 fetched
|
||||
038205 firearm
|
||||
058004 Fenton
|
||||
088303 feminine
|
||||
186002 freakish
|
||||
188007 flurried
|
||||
188505 fitting
|
||||
198006 furthermore
|
||||
202301 Fitzpatrick
|
||||
208101 fiftieth
|
||||
208113 freest
|
||||
218008 finishers
|
||||
218022 feed
|
||||
218401 faithful
|
||||
226205 foothill
|
||||
226209 furnishings
|
||||
228306 forthcoming
|
||||
228311 fated
|
||||
231315 freezes
|
||||
232102 forgivably
|
||||
238007 filial
|
||||
238008 fixedly
|
||||
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
|
||||
fld3
|
||||
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
|
||||
|
@ -1395,15 +1395,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
|
||||
|
@ -1419,15 +1419,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
|
||||
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
|
||||
companynr companynr
|
||||
37 36
|
||||
|
|
|
@ -719,7 +719,7 @@ id
|
|||
1
|
||||
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index
|
||||
1 PRIMARY t2 ref id id 5 const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1249 Select 2 was reduced during optimization
|
||||
Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1)
|
||||
|
@ -731,7 +731,7 @@ id
|
|||
2
|
||||
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t2 ref id id 5 const 1 100.00 Using where; Using index
|
||||
1 PRIMARY t2 ref id id 5 const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1249 Select 3 was reduced during optimization
|
||||
Note 1249 Select 2 was reduced during optimization
|
||||
|
@ -903,7 +903,7 @@ a t1.a in (select t2.a from t2,t3 where t3.a=t2.a)
|
|||
explain extended SELECT t1.a, t1.a in (select t2.a from t2,t3 where t3.a=t2.a) FROM t1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 index NULL PRIMARY 4 NULL 4 100.00 Using index
|
||||
2 DEPENDENT SUBQUERY t2 ref_or_null a a 5 func 2 100.00 Using where; Using index
|
||||
2 DEPENDENT SUBQUERY t2 ref_or_null a a 5 func 2 100.00 Using index
|
||||
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,<in_optimizer>(`test`.`t1`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t2`.`a`) and ((<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`) or isnull(`test`.`t2`.`a`))) having <is_not_null_test>(`test`.`t2`.`a`))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from `test`.`t1`
|
||||
|
@ -1231,7 +1231,7 @@ create table t1 (id int not null auto_increment primary key, salary int, key(sal
|
|||
insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
|
||||
explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ref salary salary 5 const 1 100.00 Using where
|
||||
1 PRIMARY t1 ref salary salary 5 const 1 100.00 Using index condition
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) AS `MAX(salary)` from `test`.`t1`))
|
||||
|
@ -1333,9 +1333,9 @@ a
|
|||
explain extended select * from t2 where t2.a in (select a from t1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
|
||||
2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
|
||||
2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))
|
||||
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a)))
|
||||
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
|
||||
a
|
||||
2
|
||||
|
@ -1353,7 +1353,7 @@ a
|
|||
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
|
||||
2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index
|
||||
2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using index
|
||||
2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 100.00 Using where; Using index; Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))
|
||||
|
@ -1767,7 +1767,7 @@ explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null
|
|||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE a ALL NULL NULL NULL NULL 14 100.00
|
||||
1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00
|
||||
1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where
|
||||
1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition
|
||||
Warnings:
|
||||
Note 1003 select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`)
|
||||
drop table t1,t2;
|
||||
|
@ -2949,7 +2949,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
|
|||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
|
||||
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
|
||||
2 DEPENDENT SUBQUERY t2 range b b 40 NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 range b b 40 NULL 2 Using index condition
|
||||
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
|
||||
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
|
||||
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
|
||||
|
@ -2961,7 +2961,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
|
|||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
|
||||
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
|
||||
2 DEPENDENT SUBQUERY t2 range b b 40 NULL 2 Using where
|
||||
2 DEPENDENT SUBQUERY t2 range b b 40 NULL 2 Using index condition
|
||||
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
|
||||
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
|
||||
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
|
||||
|
|
|
@ -724,7 +724,7 @@ WHERE t3.name='xxx' AND t2.id=t3.id);
|
|||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where
|
||||
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 func 1 Using where; Using index; Full scan on NULL key
|
||||
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 Using where; Full scan on NULL key
|
||||
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 Using index condition; Using where; Full scan on NULL key
|
||||
SELECT * FROM t1
|
||||
WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3
|
||||
WHERE t3.name='xxx' AND t2.id=t3.id);
|
||||
|
|
|
@ -58,7 +58,7 @@ t0 left join (t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and
|
|||
t3.a=t1.a) on t0.a=t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t0 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t0` left join (`test`.`t1`) on((`test`.`t0`.`a` = `test`.`t1`.`a`)) where 1
|
||||
# Elimination with aggregate functions
|
||||
|
@ -128,7 +128,7 @@ Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` where (`f`.`id` in (1,2,3
|
|||
This should use facts and a1 tables:
|
||||
explain extended select id from v1 where attr1 between 12 and 14;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using where
|
||||
1 PRIMARY a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using index condition; Using MRR
|
||||
1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a1.id 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.a2.id' of SELECT #3 was resolved in SELECT #1
|
||||
|
@ -136,7 +136,7 @@ Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t1` `a1` whe
|
|||
This should use facts, a2 and its subquery:
|
||||
explain extended select id from v1 where attr2 between 12 and 14;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using where
|
||||
1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition; Using where; Using MRR
|
||||
1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using index
|
||||
3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.a2.id 2 100.00 Using index
|
||||
Warnings:
|
||||
|
@ -156,7 +156,7 @@ Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` where (`f`.`id` in (1,2,3
|
|||
This should use facts and a1 tables:
|
||||
explain extended select id from v2 where attr1 between 12 and 14;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using where
|
||||
1 PRIMARY a1 range PRIMARY,attr1 attr1 5 NULL 2 100.00 Using index condition; Using MRR
|
||||
1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a1.id 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.f.id' of SELECT #3 was resolved in SELECT #1
|
||||
|
@ -164,7 +164,7 @@ Note 1003 select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t1` `a1` whe
|
|||
This should use facts, a2 and its subquery:
|
||||
explain extended select id from v2 where attr2 between 12 and 14;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using where
|
||||
1 PRIMARY a2 range PRIMARY,attr2 attr2 5 NULL 5 100.00 Using index condition; Using MRR
|
||||
1 PRIMARY f eq_ref PRIMARY PRIMARY 4 test.a2.id 1 100.00 Using where; Using index
|
||||
3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.f.id 2 100.00 Using index
|
||||
Warnings:
|
||||
|
@ -194,7 +194,7 @@ t2.pk3=t2.pk1+1 and
|
|||
t2.pk2=t2.pk3+t2.col;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
|
||||
This must use only t1:
|
||||
explain select t1.* from t1 left join t2 on t2.pk2=t1.a and
|
||||
t2.pk1=t2.pk2+1 and
|
||||
|
@ -212,7 +212,7 @@ explain
|
|||
select t1.* from t1 left join ( t2 left join t3 on t3.pk=t2.col) on t2.col=t1.col;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain
|
||||
select t1.*, t2.* from t1 left join (t2 left join t3 on t3.pk=t2.col) on t2.pk=t1.col;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -224,7 +224,7 @@ t1 left join ( t2 left join t3 on t3.pk=t2.col or t3.pk=t2.col)
|
|||
on t2.col=t1.col or t2.col=t1.col;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
explain select t1.*, t2.*
|
||||
from
|
||||
t1 left join
|
||||
|
@ -247,12 +247,12 @@ this must not use table elimination:
|
|||
explain select t1.* from t1 left join t2 on t2.a='foo' collate latin1_general_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 10 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 10 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 10 NULL 2 Using where; Using index
|
||||
this must not use table elimination:
|
||||
explain select t1.* from t1 left join t2 on t2.a=t1.a collate latin1_general_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 10 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 10 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;
|
||||
create table t1 (a int primary key);
|
||||
insert into t1 values (1),(2);
|
||||
|
@ -262,12 +262,12 @@ this must not use table elimination:
|
|||
explain select t1.* from t1 left join t2 on t2.a=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 10 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 10 NULL 2 Using where; Using index
|
||||
this must not use table elimination:
|
||||
explain select t1.* from t1 left join t2 on t2.a=t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 10 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;
|
||||
create table t1 (a char(10) primary key);
|
||||
insert into t1 values ('foo'),('bar');
|
||||
|
@ -276,7 +276,7 @@ insert into t2 values ('foo'),('bar');
|
|||
explain select t1.* from t1 left join t2 on t2.a=t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 10 NULL 2 Using index
|
||||
1 SIMPLE t2 ref a a 3 test.t1.a 2
|
||||
1 SIMPLE t2 ref a a 3 test.t1.a 2 Using where
|
||||
drop table t1, t2;
|
||||
#
|
||||
# check UPDATE/DELETE that look like they could be eliminated
|
||||
|
@ -322,19 +322,19 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain select t1.a from t1 left join t2 on t2.pk=t1.a or t2.b<t1.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where
|
||||
explain select t1.a from t1 left join t2 on t2.b<t1.b or t2.pk=t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 2 Using where
|
||||
explain select t1.a from t1 left join t2 on t2.pk between 10 and 20;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
explain select t1.a from t1 left join t2 on t2.pk between 0.5 and 1.5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
explain select t1.a from t1 left join t2 on t2.pk between 10 and 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
|
@ -388,7 +388,7 @@ on (t2.pk=t2.c and t2.b=t1.a and t2.c=t1.b) or
|
|||
where t1.d=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Using where
|
||||
explain
|
||||
select t1.*
|
||||
from
|
||||
|
@ -405,7 +405,7 @@ select t1.*
|
|||
from t1 left join t2 on t2.pk=3 or t2.pk= 4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using index
|
||||
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
explain
|
||||
select t1.*
|
||||
from t1 left join t2 on t2.pk=3 or t2.pk= 3;
|
||||
|
@ -416,5 +416,5 @@ select t1.*
|
|||
from t1 left join t2 on (t2.pk=3 and t2.b=3) or (t2.pk= 4 and t2.b=3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where
|
||||
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Using MRR
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -547,7 +547,7 @@ NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
|
|||
explain (select * from t1 where a=1) union (select * from t1 where b=1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
|
||||
2 UNION t1 ref b b 5 const 1 Using where
|
||||
2 UNION t1 ref b b 5 const 1
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
|
||||
drop table t1,t2;
|
||||
create table t1 ( id int not null auto_increment, primary key (id) ,user_name text );
|
||||
|
|
|
@ -1415,8 +1415,8 @@ a a b
|
|||
explain extended select * from t3 left join v3 on (t3.a = v3.a);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `b` from `test`.`t3` left join (`test`.`t1` left join `test`.`t2` on((`test`.`t1`.`a` = `test`.`t2`.`a`))) on((`test`.`t3`.`a` = `test`.`t1`.`a`)) where 1
|
||||
create view v1 (a) as select a from t1;
|
||||
|
@ -1430,8 +1430,8 @@ a a b
|
|||
explain extended select * from t3 left join v4 on (t3.a = v4.a);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `b` from `test`.`t3` left join (`test`.`t1` left join (`test`.`t2`) on((`test`.`t1`.`a` = `test`.`t2`.`a`))) on((`test`.`t3`.`a` = `test`.`t1`.`a`)) where 1
|
||||
prepare stmt1 from "select * from t3 left join v4 on (t3.a = v4.a);";
|
||||
|
@ -2132,12 +2132,12 @@ INSERT INTO t1 VALUES (2, 'foo2');
|
|||
INSERT INTO t1 VALUES (1, 'foo1');
|
||||
SELECT * FROM v1;
|
||||
id f
|
||||
1 foo1
|
||||
2 foo2
|
||||
1 foo1
|
||||
SELECT * FROM v1;
|
||||
id f
|
||||
1 foo1
|
||||
2 foo2
|
||||
1 foo1
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk int PRIMARY KEY, b int);
|
||||
|
@ -2341,15 +2341,15 @@ CREATE VIEW v1 AS SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a AND t1.b=t2.b;
|
|||
CREATE VIEW v2 AS SELECT t3.* FROM t1,t3 WHERE t1.a=t3.a;
|
||||
EXPLAIN SELECT t1.* FROM t1 JOIN t2 WHERE t1.a=t2.a AND t1.b=t2.b AND t1.a=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
|
||||
1 SIMPLE t2 ref a a 10 const,test.t1.b 2 Using where; Using index
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using index
|
||||
1 SIMPLE t2 ref a a 10 const,test.t1.b 2 Using index
|
||||
EXPLAIN SELECT * FROM v1 WHERE a=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
|
||||
1 SIMPLE t2 ref a a 10 const,test.t1.b 2 Using where; Using index
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using index
|
||||
1 SIMPLE t2 ref a a 10 const,test.t1.b 2 Using index
|
||||
EXPLAIN SELECT * FROM v2 WHERE a=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using where; Using index
|
||||
1 SIMPLE t1 ref a a 5 const 1 Using index
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using join buffer
|
||||
DROP VIEW v1,v2;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
|
29
mysql-test/suite/optimizer_unfixed_bugs/README.txt
Normal file
29
mysql-test/suite/optimizer_unfixed_bugs/README.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
Putting testcases here
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When you work on re-verifying or re-classifying a bug (not fixing it),
|
||||
it's a good idea to put the mtr-parsable '.test' testcase here.
|
||||
Benefits:
|
||||
1) tests downloaded from the bugs db are sometimes close to
|
||||
mtr-parsable but not completely (for example if they contain
|
||||
/* comment */); when you re-verify or re-classify you run the test so
|
||||
may have to make it mtr-parsable; if you then put it in this suite,
|
||||
the developer who will work on this bug in a few weeks or months will
|
||||
not have to re-do the same download&fix, she/he can instead reuse your
|
||||
work.
|
||||
2) Others can see how their own work influences many unsolved
|
||||
bugs, by running this suite. If they find that they fix a bug in this
|
||||
suite, we won't later wonder "how come this bug doesn't happen
|
||||
anymore, what fixed it?".
|
||||
3) One can also run this suite with certain switches to see how they
|
||||
influence unsolved bugs:
|
||||
./mtr --suite=optimizer_unfixed_bugs \
|
||||
--mysqld=--optimizer_switch="firstmatch=off"
|
||||
|
||||
Adding tests to this suite
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
One test file per bug, named bugNNNNN.test.
|
||||
Put the correct (not current and buggy) result file in r/, so that "[ pass ]"
|
||||
in mtr will mean that a bug looks like fixed.
|
||||
When you have fixed a bug, remove files from this suite.
|
||||
t/bug45219.test is an example.
|
|
@ -0,0 +1,9 @@
|
|||
set session debug="+d,optimizer_innodb_icp";
|
||||
create table `t1` (`c1` char(1) default null,`c2` char(10) default null,
|
||||
key (`c1`))
|
||||
engine=innodb default charset=latin1;
|
||||
insert into `t1` values ('3',null);
|
||||
select * from `t1` where `c1`='3' for update;
|
||||
c1 c2
|
||||
3 NULL
|
||||
drop table `t1`;
|
15
mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result
Normal file
15
mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result
Normal file
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on
|
||||
#
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
CREATE TABLE t (
|
||||
dummy INT PRIMARY KEY,
|
||||
a INT UNIQUE,
|
||||
b int
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES (1,1,1),(3,3,3),(5,5,5);
|
||||
SELECT * FROM t WHERE a > 2 FOR UPDATE;
|
||||
dummy a b
|
||||
3 3 3
|
||||
5 5 5
|
||||
DROP TABLE t;
|
34
mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result
Normal file
34
mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result
Normal file
|
@ -0,0 +1,34 @@
|
|||
select @default_binlog_format:=@@global.binlog_format;
|
||||
@default_binlog_format:=@@global.binlog_format
|
||||
MIXED
|
||||
set global binlog_format=row;
|
||||
set session debug="+d,optimizer_innodb_ds_mrr";
|
||||
set autocommit=0;
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (dummy int primary key, a int unique, b int) engine=innodb;
|
||||
insert into t1 values(1,1,1),(3,3,3),(5,5,5);
|
||||
commit;
|
||||
set session transaction isolation level repeatable read;
|
||||
select @@tx_isolation;
|
||||
@@tx_isolation
|
||||
REPEATABLE-READ
|
||||
start transaction;
|
||||
select * from t1 where a > 2 for update;
|
||||
dummy a b
|
||||
3 3 3
|
||||
5 5 5
|
||||
use test;
|
||||
set autocommit=0;
|
||||
start transaction;
|
||||
select 1;
|
||||
1
|
||||
1
|
||||
insert into t1 values(2,2,2);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
rollback;
|
||||
rollback;
|
||||
drop table t1;
|
||||
set global binlog_format=@default_binlog_format;
|
File diff suppressed because it is too large
Load diff
1108
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra1.result
Normal file
1108
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra1.result
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1107
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra2.result
Normal file
1107
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra2.result
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,984 @@
|
|||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
984
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra3.result
Normal file
984
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra3.result
Normal file
|
@ -0,0 +1,984 @@
|
|||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
|
@ -0,0 +1,984 @@
|
|||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
984
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra4.result
Normal file
984
mysql-test/suite/optimizer_unfixed_bugs/r/bug41996-extra4.result
Normal file
|
@ -0,0 +1,984 @@
|
|||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
c1 c2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
c1 c2
|
||||
12 1
|
||||
15 6
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
c1 c2
|
||||
21 11
|
||||
22 11
|
||||
23 13
|
||||
24 14
|
||||
25 15
|
||||
DROP TABLE t1,t2,t3;
|
|
@ -0,0 +1,8 @@
|
|||
set session debug="+d,optimizer_innodb_icp";
|
||||
drop table if exists `t1`;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb;
|
||||
insert into `t1` values(2,2);
|
||||
delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ;
|
||||
drop table `t1`;
|
252
mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
Normal file
252
mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
Normal file
File diff suppressed because one or more lines are too long
31
mysql-test/suite/optimizer_unfixed_bugs/r/bug43101.result
Normal file
31
mysql-test/suite/optimizer_unfixed_bugs/r/bug43101.result
Normal file
|
@ -0,0 +1,31 @@
|
|||
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY
|
||||
KEY(c1), UNIQUE INDEX(c2));
|
||||
insert into t1 values('-838:59:59','-838:59:59','2009-01-21');
|
||||
insert into t1 values('00:00:00','00:00:00','2009-01-09');
|
||||
insert into t1 values('00:00:11','00:00:11','2009-01-20');
|
||||
insert into t1 values('00:00:12','00:00:12','2009-01-13');
|
||||
insert into t1 values('00:00:45','00:00:45','2009-01-07');
|
||||
insert into t1 values('00:11:12','00:11:12','2009-01-19');
|
||||
insert into t1 values('00:12:30','00:12:30','2009-01-23');
|
||||
insert into t1 values('00:12:34','00:12:34','2009-01-14');
|
||||
insert into t1 values('01:23:00','01:23:00','2009-01-03');
|
||||
insert into t1 values('08:03:02','08:03:02','2009-01-18');
|
||||
insert into t1 values('08:29:45',NULL,'2009-02-01');
|
||||
insert into t1 values('09:00:45','09:00:45','2009-01-24');
|
||||
insert into t1 values('09:36:00','09:36:00','2009-01-25');
|
||||
insert into t1 values('10:00:00','10:00:00','2009-01-06');
|
||||
insert into t1 values('10:11:12','10:11:12','2009-01-11');
|
||||
insert into t1 values('10:22:33','10:22:33','2009-01-02');
|
||||
insert into t1 values('11:11:12','11:11:12','2009-01-12');
|
||||
insert into t1 values('11:11:27','11:11:27','2009-01-17');
|
||||
insert into t1 values('12:34:56','12:34:56','2009-01-01');
|
||||
insert into t1 values('12:34:58','12:34:58','2009-01-15');
|
||||
insert into t1 values('12:35:56','12:35:56','2009-01-16');
|
||||
insert into t1 values('491:22:33','491:22:33','2009-01-04');
|
||||
insert into t1 values('825:23:00','825:23:00','2009-01-05');
|
||||
insert into t1 values('838:59:59','838:59:59','2009-01-21');
|
||||
SELECT * FROM t1 WHERE c2 <> NULL ORDER BY c2 DESC;
|
||||
c1 c2 c3
|
||||
SELECT * FROM t1 WHERE c2 <> NULL ORDER BY c2 DESC LIMIT 2;
|
||||
c1 c2 c3
|
||||
drop table t1;
|
11
mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result
Normal file
11
mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result
Normal file
|
@ -0,0 +1,11 @@
|
|||
set session debug="+d,optimizer_innodb_icp";
|
||||
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY
|
||||
KEY(c1), UNIQUE INDEX(c2)) engine=innodb;
|
||||
INSERT INTO t1 VALUES('8:29:45',NULL,'2009-02-01');
|
||||
SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
|
||||
c1 c2 c3
|
||||
08:29:45 NULL 2009-02-01
|
||||
SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
|
||||
c1 c2 c3
|
||||
08:29:45 NULL 2009-02-01
|
||||
drop table `t1`;
|
44
mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
Normal file
44
mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
Normal file
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# Bug#43360 - Server crash with a simple multi-table update
|
||||
#
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
CREATE TABLE t1 (
|
||||
a CHAR(2) NOT NULL PRIMARY KEY,
|
||||
b VARCHAR(20) NOT NULL,
|
||||
KEY (b)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (
|
||||
a CHAR(2) NOT NULL PRIMARY KEY,
|
||||
b VARCHAR(20) NOT NULL,
|
||||
KEY (b)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
('AB','MySQLAB'),
|
||||
('JA','Sun Microsystems'),
|
||||
('MS','Microsoft'),
|
||||
('IB','IBM- Inc.'),
|
||||
('GO','Google Inc.');
|
||||
INSERT INTO t2 VALUES
|
||||
('AB','Sweden'),
|
||||
('JA','USA'),
|
||||
('MS','United States of America'),
|
||||
('IB','North America'),
|
||||
('GO','South America');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'b' at row 3
|
||||
UPDATE t1,t2 SET t1.b=UPPER(t1.b) WHERE t1.b LIKE 'United%';
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
GO Google Inc.
|
||||
IB IBM- Inc.
|
||||
MS Microsoft
|
||||
AB MySQLAB
|
||||
JA Sun Microsystems
|
||||
SELECT * FROM t2;
|
||||
a b
|
||||
IB North America
|
||||
GO South America
|
||||
AB Sweden
|
||||
MS United States of Ame
|
||||
JA USA
|
||||
DROP TABLE t1,t2;
|
30
mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result
Normal file
30
mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Bug#43448 - Server crashes on multi table delete with Innodb
|
||||
#
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
CREATE TABLE t1 (
|
||||
id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
t CHAR(12)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (
|
||||
id2 INT NOT NULL,
|
||||
t CHAR(12)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE t3(
|
||||
id3 INT NOT NULL,
|
||||
t CHAR(12),
|
||||
INDEX(id3)
|
||||
) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1 WHERE id1 > 90;
|
||||
COUNT(*)
|
||||
10
|
||||
SELECT COUNT(*) FROM t2 WHERE id2 > 90;
|
||||
COUNT(*)
|
||||
50
|
||||
SELECT COUNT(*) FROM t3 WHERE id3 > 90;
|
||||
COUNT(*)
|
||||
500
|
||||
DELETE t1, t2, t3
|
||||
FROM t1, t2, t3
|
||||
WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5;
|
||||
DROP TABLE t1, t2, t3;
|
97
mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
Normal file
97
mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
Normal file
|
@ -0,0 +1,97 @@
|
|||
set storage_engine=innodb;
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||
INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28');
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
Note 1265 Data truncated for column 'c3' at row 2
|
||||
INSERT INTO t1 VALUES('20070523091528','070523091528','20070524091528','070524091528'),('20070525','070525','20070526','070526');
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
INSERT INTO t1 VALUES(19830905132800,830905132800,19830906132800,830906132800),(19830907,830907,19830908,830908);
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
SET TIMESTAMP=1233216687;
|
||||
INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE);
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03');
|
||||
INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
|
||||
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
|
||||
INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3 c4
|
||||
0000-00-00 00:00:00 0000-00-00 00:00:00 2008-01-04 2008-01-05 00:00:00
|
||||
1983-09-05 13:28:00 1983-09-05 13:28:00 1983-09-06 1983-09-06 13:28:00
|
||||
1983-09-07 00:00:00 1983-09-07 00:00:00 1983-09-08 1983-09-08 00:00:00
|
||||
1998-12-28 00:00:00 1998-12-28 00:00:00 1998-12-28 1998-12-28 00:00:00
|
||||
1998-12-29 00:00:00 1998-12-29 00:00:00 1998-12-29 1998-12-29 00:00:00
|
||||
1998-12-30 11:30:45 1998-12-30 11:30:45 1998-12-30 1998-12-30 11:30:45
|
||||
1998-12-31 11:30:45 1998-12-31 11:30:45 1998-12-31 1998-12-31 11:30:45
|
||||
2007-05-23 09:15:28 2007-05-23 09:15:28 2007-05-24 2007-05-24 09:15:28
|
||||
2007-05-25 00:00:00 2007-05-25 00:00:00 2007-05-26 2007-05-26 00:00:00
|
||||
2008-01-01 00:00:00 NULL 2008-01-02 2008-01-03 00:00:00
|
||||
2009-01-29 11:11:27 2009-01-29 00:00:00 2009-01-29 2009-01-29 00:00:00
|
||||
INSERT IGNORE INTO t1(c1,c2) VALUES('20070525','20070527') /* doesn't throw error */;
|
||||
|
||||
# Ignore unique constraint
|
||||
INSERT IGNORE INTO t1(c1,c2) VALUES(19840905,830907) /* doesn't throw error */;
|
||||
SELECT * FROM t1 WHERE c1='20070527' /* Returns no rows */;
|
||||
c1 c2 c3 c4
|
||||
INSERT INTO t1(c1) VALUES('20070525') ON DUPLICATE KEY UPDATE c1='20070527';
|
||||
SELECT * FROM t1 WHERE c1='20070527' /* Returns 1 row with c1=2007-05-27 */;
|
||||
c1 c2 c3 c4
|
||||
2007-05-27 00:00:00 2007-05-25 00:00:00 2007-05-26 2007-05-26 00:00:00
|
||||
SELECT * FROM t1 WHERE c1=19830909 AND c2=830910 /* Returns no rows */;
|
||||
c1 c2 c3 c4
|
||||
INSERT INTO t1(c1,c2) VALUES(19840905,830907) ON DUPLICATE KEY UPDATE c1=19830909,c2=830910;
|
||||
SELECT * FROM t1 WHERE c1=19830909 AND c2=830910 /* Returns 1 row */;
|
||||
c1 c2 c3 c4
|
||||
1983-09-09 00:00:00 1983-09-10 00:00:00 1983-09-08 1983-09-08 00:00:00
|
||||
INSERT INTO t1 SET c1='1999-01-01',c2='1999-01-01';
|
||||
SELECT * FROM t1 WHERE c1='1999-01-01' AND c2='1999-01-01' /* Returns 1 row with values for other column as NULL */;
|
||||
c1 c2 c3 c4
|
||||
1999-01-01 00:00:00 1999-01-01 00:00:00 NULL NULL
|
||||
INSERT INTO t1 VALUES('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02'),('1990-01-01 00:00:01','2000-01-01 00:00:01','2009-01-03','2009-01-04'),('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06');
|
||||
DELETE FROM t1 WHERE c1=NOW() /* because the row with current timestamp exists */;
|
||||
INSERT INTO t1 VALUES(NULL,NOW(),NOW(),NOW());
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
SELECT * FROM t1 WHERE c1 IS NULL /* returns no rows */;
|
||||
c1 c2 c3 c4
|
||||
SELECT * FROM t1 WHERE c1=NOW() /* returns 1 row */;
|
||||
c1 c2 c3 c4
|
||||
2009-01-29 11:11:27 2009-01-29 11:11:27 2009-01-29 2009-01-29 11:11:27
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3 c4
|
||||
0000-00-00 00:00:00 0000-00-00 00:00:00 2008-01-04 2008-01-05 00:00:00
|
||||
1971-01-01 00:00:01 1980-01-01 00:00:01 2009-01-01 2009-01-02 00:00:00
|
||||
1983-09-05 13:28:00 1983-09-05 13:28:00 1983-09-06 1983-09-06 13:28:00
|
||||
1983-09-09 00:00:00 1983-09-10 00:00:00 1983-09-08 1983-09-08 00:00:00
|
||||
1990-01-01 00:00:01 2000-01-01 00:00:01 2009-01-03 2009-01-04 00:00:00
|
||||
1998-12-28 00:00:00 1998-12-28 00:00:00 1998-12-28 1998-12-28 00:00:00
|
||||
1998-12-29 00:00:00 1998-12-29 00:00:00 1998-12-29 1998-12-29 00:00:00
|
||||
1998-12-30 11:30:45 1998-12-30 11:30:45 1998-12-30 1998-12-30 11:30:45
|
||||
1998-12-31 11:30:45 1998-12-31 11:30:45 1998-12-31 1998-12-31 11:30:45
|
||||
1999-01-01 00:00:00 1999-01-01 00:00:00 NULL NULL
|
||||
2007-05-23 09:15:28 2007-05-23 09:15:28 2007-05-24 2007-05-24 09:15:28
|
||||
2007-05-27 00:00:00 2007-05-25 00:00:00 2007-05-26 2007-05-26 00:00:00
|
||||
2008-01-01 00:00:00 NULL 2008-01-02 2008-01-03 00:00:00
|
||||
2009-01-29 11:11:27 2009-01-29 11:11:27 2009-01-29 2009-01-29 11:11:27
|
||||
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2;
|
||||
c1 c2 c3 c4
|
||||
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2 LIMIT 2;
|
||||
c1 c2 c3 c4
|
||||
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2 DESC;
|
||||
c1 c2 c3 c4
|
||||
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2 DESC LIMIT 2;
|
||||
c1 c2 c3 c4
|
||||
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
|
||||
DROP TABLE t1;
|
54
mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result
Normal file
54
mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result
Normal file
|
@ -0,0 +1,54 @@
|
|||
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||
INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28');
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
Note 1265 Data truncated for column 'c3' at row 2
|
||||
INSERT INTO t1 VALUES('20070523091528','070523091528','20070524091528','070524091528'),('20070525','070525','20070526','070526');
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
INSERT INTO t1 VALUES(19830905132800,830905132800,19830906132800,830906132800),(19830907,830907,19830908,830908);
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
SET TIMESTAMP=1233216687;
|
||||
INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE);
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'c3' at row 1
|
||||
INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03');
|
||||
INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
|
||||
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
|
||||
INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
INSERT INTO t1 VALUES('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02'),('1990-01-01 00:00:01','2000-01-01 00:00:01','2009-01-03','2009-01-04'),('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06');
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3 c4
|
||||
0000-00-00 00:00:00 0000-00-00 00:00:00 2008-01-04 2008-01-05 00:00:00
|
||||
1971-01-01 00:00:01 1980-01-01 00:00:01 2009-01-01 2009-01-02 00:00:00
|
||||
1983-09-05 13:28:00 1983-09-05 13:28:00 1983-09-06 1983-09-06 13:28:00
|
||||
1983-09-07 00:00:00 1983-09-07 00:00:00 1983-09-08 1983-09-08 00:00:00
|
||||
1990-01-01 00:00:01 2000-01-01 00:00:01 2009-01-03 2009-01-04 00:00:00
|
||||
1998-12-28 00:00:00 1998-12-28 00:00:00 1998-12-28 1998-12-28 00:00:00
|
||||
1998-12-29 00:00:00 1998-12-29 00:00:00 1998-12-29 1998-12-29 00:00:00
|
||||
1998-12-30 11:30:45 1998-12-30 11:30:45 1998-12-30 1998-12-30 11:30:45
|
||||
1998-12-31 11:30:45 1998-12-31 11:30:45 1998-12-31 1998-12-31 11:30:45
|
||||
2007-05-23 09:15:28 2007-05-23 09:15:28 2007-05-24 2007-05-24 09:15:28
|
||||
2007-05-25 00:00:00 2007-05-25 00:00:00 2007-05-26 2007-05-26 00:00:00
|
||||
2008-01-01 00:00:00 NULL 2008-01-02 2008-01-03 00:00:00
|
||||
2009-01-29 11:11:27 2009-01-29 00:00:00 2009-01-29 2009-01-29 00:00:00
|
||||
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
|
||||
SELECT * FROM t1 WHERE c1 BETWEEN '0000-00-00' AND '2010-00-01 00:00:00' ORDER BY c1 DESC LIMIT 2;
|
||||
c1 c2 c3 c4
|
||||
2009-01-29 11:11:27 2009-01-29 00:00:00 2009-01-29 2009-01-29 00:00:00
|
||||
2008-01-01 00:00:00 NULL 2008-01-02 2008-01-03 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '2010-00-01 00:00:00' for column 'c1' at row 1
|
||||
Warning 1292 Incorrect datetime value: '2010-00-01 00:00:00' for column 'c1' at row 1
|
||||
SELECT * FROM t1 WHERE c2 BETWEEN '1971-01-01 00:00:01' AND '2010-10-00 00:00:00' ORDER BY c2 DESC LIMIT 2;
|
||||
c1 c2 c3 c4
|
||||
2009-01-29 11:11:27 2009-01-29 00:00:00 2009-01-29 2009-01-29 00:00:00
|
||||
2007-05-25 00:00:00 2007-05-25 00:00:00 2007-05-26 2007-05-26 00:00:00
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '2010-10-00 00:00:00' for column 'c2' at row 1
|
||||
Warning 1292 Incorrect datetime value: '2010-10-00 00:00:00' for column 'c2' at row 1
|
||||
DROP TABLE t1;
|
199
mysql-test/suite/optimizer_unfixed_bugs/r/bug45219.result
Normal file
199
mysql-test/suite/optimizer_unfixed_bugs/r/bug45219.result
Normal file
|
@ -0,0 +1,199 @@
|
|||
DROP TABLE IF EXISTS CC, C, BB;
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES
|
||||
(10,0,'2006-07-07 07:26:28','q'),(11,5,'2002-09-23 00:00:00','m'),
|
||||
(12,7,'0000-00-00 00:00:00','j'),(13,1,'2006-06-07 00:00:00','z'),
|
||||
(14,8,'2000-09-16 12:15:34','a'),(15,2,'2007-08-05 15:47:52',''),
|
||||
(16,1,'0000-00-00 00:00:00','e'),(17,8,'2005-12-02 19:34:26','t'),
|
||||
(18,5,'0000-00-00 00:00:00','q'),(19,4,'0000-00-00 00:00:00','b'),
|
||||
(20,5,'2007-12-28 00:00:00','w'),(21,3,'2004-08-02 11:48:43','m'),
|
||||
(22,0,'0000-00-00 00:00:00','x'),(23,8,'2004-04-19 12:18:43',''),
|
||||
(24,0,'2009-04-27 00:00:00','w'),(25,4,'2006-10-20 14:52:15','x'),
|
||||
(26,0,'0000-00-00 00:00:00','e'),(27,0,'2002-03-22 11:48:37','e'),
|
||||
(28,2,'0000-00-00 00:00:00','p'),(29,0,'2001-01-04 03:55:07','x');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES
|
||||
(1,9,'0000-00-00 00:00:00','p'),(2,0,'2002-02-09 07:38:13','v'),
|
||||
(3,8,'2001-05-03 12:08:14','t'),(4,3,'0000-00-00 00:00:00','u'),
|
||||
(5,7,'2009-07-28 03:43:30','n'),(6,0,'2009-08-04 00:00:00','l'),
|
||||
(7,1,'0000-00-00 00:00:00','h'),(8,9,'0000-00-00 00:00:00','u'),
|
||||
(9,0,'2005-08-02 17:16:54','n'),(10,9,'2002-12-21 00:00:00','j'),
|
||||
(11,0,'2005-08-15 12:37:35','k'),(12,5,'0000-00-00 00:00:00','e'),
|
||||
(13,0,'2006-03-10 00:00:00','i'),(14,8,'2005-05-16 11:02:36','u'),
|
||||
(15,8,'2008-11-02 00:00:00','n'),(16,5,'2006-03-15 00:00:00','b'),
|
||||
(17,1,'0000-00-00 00:00:00','x'),(18,7,'0000-00-00 00:00:00',''),
|
||||
(19,0,'2008-12-17 20:15:40','q'),(20,9,'0000-00-00 00:00:00','u');
|
||||
CREATE TABLE `BB` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `BB` VALUES
|
||||
(10,8,'2007-08-19 08:08:38','i'),(11,0,'2000-05-21 03:51:51','');
|
||||
SELECT DISTINCT `datetime_key`
|
||||
FROM C
|
||||
WHERE ( `int_nokey` , `pk` ) IN (
|
||||
SELECT INNR .`pk` , INNR .`pk`
|
||||
FROM CC LEFT JOIN BB INNR ON INNR .`varchar_key` ) AND `pk` = 9 ;
|
||||
datetime_key
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'i'
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
DROP TABLE CC, C, BB;
|
||||
DROP TABLE IF EXISTS CC, C, BB;
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES
|
||||
(10,0,8,'2007-02-14','2006-07-07 07:26:28','q','q'),
|
||||
(11,5,8,'2002-10-03','2002-09-23 00:00:00','m','m'),
|
||||
(12,7,3,'2006-12-02','0000-00-00 00:00:00','j','j'),
|
||||
(13,1,2,'2007-05-02','2006-06-07 00:00:00','z','z'),
|
||||
(14,8,2,'2001-11-18','2000-09-16 12:15:34','a','a'),
|
||||
(15,2,6,'2006-09-09','2007-08-05 15:47:52','',''),
|
||||
(16,1,8,'0000-00-00','0000-00-00 00:00:00','e','e'),
|
||||
(17,8,9,'2003-07-22','2005-12-02 19:34:26','t','t'),
|
||||
(18,5,2,'2001-12-22','0000-00-00 00:00:00','q','q'),
|
||||
(19,4,6,'0000-00-00','0000-00-00 00:00:00','b','b'),
|
||||
(20,5,5,'2006-09-02','2007-12-28 00:00:00','w','w'),
|
||||
(21,3,2,'0000-00-00','2004-08-02 11:48:43','m','m'),
|
||||
(22,0,4,'0000-00-00','0000-00-00 00:00:00','x','x'),
|
||||
(23,8,9,'2001-02-28','2004-04-19 12:18:43','',''),
|
||||
(24,0,6,'0000-00-00','2009-04-27 00:00:00','w','w'),
|
||||
(25,4,5,'2007-05-19','2006-10-20 14:52:15','x','x'),
|
||||
(26,0,0,'2005-02-15','0000-00-00 00:00:00','e','e'),
|
||||
(27,0,0,'2000-10-19','2002-03-22 11:48:37','e','e'),
|
||||
(28,2,8,'2005-07-07','0000-00-00 00:00:00','p','p'),
|
||||
(29,0,0,'2008-10-18','2001-01-04 03:55:07','x','x');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES
|
||||
(1,9,9,'2007-12-01','0000-00-00 00:00:00','p','p'),
|
||||
(2,0,0,'0000-00-00','2002-02-09 07:38:13','v','v'),
|
||||
(3,8,6,'0000-00-00','2001-05-03 12:08:14','t','t'),
|
||||
(4,3,6,'2002-05-07','0000-00-00 00:00:00','u','u'),
|
||||
(5,7,6,'0000-00-00','2009-07-28 03:43:30','n','n'),
|
||||
(6,0,4,'0000-00-00','2009-08-04 00:00:00','l','l'),
|
||||
(7,1,7,'0000-00-00','0000-00-00 00:00:00','h','h'),
|
||||
(8,9,4,'0000-00-00','0000-00-00 00:00:00','u','u'),
|
||||
(9,0,8,'0000-00-00','2005-08-02 17:16:54','n','n'),
|
||||
(10,9,4,'2000-12-18','2002-12-21 00:00:00','j','j'),
|
||||
(11,0,7,'2005-11-13','2005-08-15 12:37:35','k','k'),
|
||||
(12,5,5,'0000-00-00','0000-00-00 00:00:00','e','e'),
|
||||
(13,0,0,'2003-11-12','2006-03-10 00:00:00','i','i'),
|
||||
(14,8,5,'2006-02-20','2005-05-16 11:02:36','u','u'),
|
||||
(15,8,7,'2005-02-12','2008-11-02 00:00:00','n','n'),
|
||||
(16,5,2,'2009-07-20','2006-03-15 00:00:00','b','b'),
|
||||
(17,1,8,'2005-02-24','0000-00-00 00:00:00','x','x'),
|
||||
(18,7,0,'0000-00-00','0000-00-00 00:00:00','',''),
|
||||
(19,0,9,'0000-00-00','2008-12-17 20:15:40','q','q'),
|
||||
(20,9,5,'0000-00-00','0000-00-00 00:00:00','u','u');
|
||||
CREATE TABLE `BB` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `BB` VALUES (10,8,5,'0000-00-00','2007-08-19
|
||||
08:08:38','i','i'),(11,0,8,'2005-08-18','2000-05-21 03:51:51','','');
|
||||
SELECT DISTINCT BIT_AND( OUTR . `datetime_key` ) AS X
|
||||
FROM C AS OUTR
|
||||
WHERE ( OUTR . `int_nokey` , OUTR . `pk` ) IN (
|
||||
SELECT DISTINCT INNR . `pk` AS X , INNR . `pk` AS Y
|
||||
FROM CC AS INNR2 LEFT JOIN BB AS INNR ON
|
||||
( INNR2 . `varchar_nokey` = INNR . `varchar_key` )
|
||||
WHERE INNR . `date_key` BETWEEN '2009-04-26' AND '2004-08-21' )
|
||||
AND OUTR . `pk` = 9
|
||||
ORDER BY OUTR . `int_key` , OUTR . `pk`;
|
||||
X
|
||||
18446744073709551615
|
||||
DROP TABLE CC, C, BB;
|
100
mysql-test/suite/optimizer_unfixed_bugs/r/bug45221.result
Normal file
100
mysql-test/suite/optimizer_unfixed_bugs/r/bug45221.result
Normal file
|
@ -0,0 +1,100 @@
|
|||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES (10,8,NULL,'2002-02-26 06:14:37'),(11,9,'2006-06-14','1900-01-01 00:00:00'),(12,9,'2002-09-12','2006-12-03 09:37:26'),(13,186,'2005-02-15','2008-05-26 12:27:10'),(14,NULL,NULL,'2004-12-14 16:37:30'),(15,2,'2008-11-04','2003-02-11 21:19:41'),(16,3,'2004-09-04','2009-10-18 02:27:49'),(17,0,'2006-06-05','2000-09-26 07:45:57'),(18,133,'1900-01-01',NULL),(19,1,'1900-01-01','2005-11-10 12:40:29'),(20,8,'1900-01-01','2009-04-25 00:00:00'),(21,5,'2005-01-13','2002-11-27 00:00:00'),(22,5,'2006-05-21','2004-01-26 20:32:32'),(23,8,'2003-09-08','2007-10-26 11:41:40'),(24,6,'2006-12-23','2005-10-07 00:00:00'),(25,51,'2006-10-15','2000-07-15 05:00:34'),(26,4,'2005-04-06','2000-04-03 16:33:32'),(27,7,'2008-04-07',NULL),(28,6,'2006-10-10','2001-04-25 01:26:12'),(29,4,'1900-01-01','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES (1,2,NULL,'2004-10-11 18:13:16'),(2,9,'2001-09-19',NULL),(3,3,'2004-09-12','1900-01-01 00:00:00'),(4,9,NULL,'2009-07-25 00:00:00'),(5,NULL,'2002-07-19',NULL),(6,9,'2002-12-16','2008-07-27 00:00:00'),(7,3,'2006-02-08','2002-11-13 16:37:31'),(8,8,'2006-08-28','1900-01-01 00:00:00'),(9,8,'2001-04-14','2003-12-10 00:00:00'),(10,53,'2000-01-05','2001-12-21 22:38:22'),(11,0,'2003-12-06','2008-12-13 23:16:44'),(12,5,'1900-01-01','2005-08-15 12:39:41'),(13,166,'2002-11-27',NULL),(14,3,NULL,'2006-09-11 12:06:14'),(15,0,'2003-05-27','2007-12-15 12:39:34'),(16,1,'2005-05-03','2005-08-09 00:00:00'),(17,9,'2001-04-18','2001-09-02 22:50:02'),(18,5,'2005-12-27','2005-12-16 22:58:11'),(19,6,'2004-08-20','2007-04-19 00:19:53'),(20,2,'1900-01-01','1900-01-01 00:00:00');
|
||||
SELECT `pk`
|
||||
FROM C OUTR
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR OUTR .`date_nokey` ) ;
|
||||
pk
|
||||
9
|
||||
2
|
||||
5
|
||||
6
|
||||
SELECT `pk`
|
||||
FROM C
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR '2009-11-25' ) ;
|
||||
pk
|
||||
2
|
||||
4
|
||||
5
|
||||
6
|
||||
9
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_key` datetime DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES (10,7,8,NULL,'2002-02-26 06:14:37','2002-02-26 06:14:37'),(11,1,9,'2006-06-14','1900-01-01 00:00:00','1900-01-01 00:00:00'),(12,5,9,'2002-09-12','2006-12-03 09:37:26','2006-12-03 09:37:26'),(13,3,186,'2005-02-15','2008-05-26 12:27:10','2008-05-26 12:27:10'),(14,6,NULL,NULL,'2004-12-14 16:37:30','2004-12-14 16:37:30'),(15,92,2,'2008-11-04','2003-02-11 21:19:41','2003-02-11 21:19:41'),(16,7,3,'2004-09-04','2009-10-18 02:27:49','2009-10-18 02:27:49'),(17,NULL,0,'2006-06-05','2000-09-26 07:45:57','2000-09-26 07:45:57'),(18,3,133,'1900-01-01',NULL,NULL),(19,5,1,'1900-01-01','2005-11-10 12:40:29','2005-11-10 12:40:29'),(20,1,8,'1900-01-01','2009-04-25 00:00:00','2009-04-25 00:00:00'),(21,2,5,'2005-01-13','2002-11-27 00:00:00','2002-11-27 00:00:00'),(22,NULL,5,'2006-05-21','2004-01-26 20:32:32','2004-01-26 20:32:32'),(23,1,8,'2003-09-08','2007-10-26 11:41:40','2007-10-26 11:41:40'),(24,0,6,'2006-12-23','2005-10-07 00:00:00','2005-10-07 00:00:00'),(25,210,51,'2006-10-15','2000-07-15 05:00:34','2000-07-15 05:00:34'),(26,8,4,'2005-04-06','2000-04-03 16:33:32','2000-04-03 16:33:32'),(27,7,7,'2008-04-07',NULL,NULL),(28,5,6,'2006-10-10','2001-04-25 01:26:12','2001-04-25 01:26:12'),(29,NULL,4,'1900-01-01','2000-12-27 00:00:00','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_key` datetime DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES (1,NULL,2,NULL,'2004-10-11 18:13:16','2004-10-11 18:13:16'),(2,7,9,'2001-09-19',NULL,NULL),(3,9,3,'2004-09-12','1900-01-01 00:00:00','1900-01-01 00:00:00'),(4,7,9,NULL,'2009-07-25 00:00:00','2009-07-25 00:00:00'),(5,4,NULL,'2002-07-19',NULL,NULL),(6,2,9,'2002-12-16','2008-07-27 00:00:00','2008-07-27 00:00:00'),(7,6,3,'2006-02-08','2002-11-13 16:37:31','2002-11-13 16:37:31'),(8,8,8,'2006-08-28','1900-01-01 00:00:00','1900-01-01 00:00:00'),(9,NULL,8,'2001-04-14','2003-12-10 00:00:00','2003-12-10 00:00:00'),(10,5,53,'2000-01-05','2001-12-21 22:38:22','2001-12-21 22:38:22'),(11,NULL,0,'2003-12-06','2008-12-13 23:16:44','2008-12-13 23:16:44'),(12,6,5,'1900-01-01','2005-08-15 12:39:41','2005-08-15 12:39:41'),(13,188,166,'2002-11-27',NULL,NULL),(14,2,3,NULL,'2006-09-11 12:06:14','2006-09-11 12:06:14'),(15,1,0,'2003-05-27','2007-12-15 12:39:34','2007-12-15 12:39:34'),(16,1,1,'2005-05-03','2005-08-09 00:00:00','2005-08-09 00:00:00'),(17,0,9,'2001-04-18','2001-09-02 22:50:02','2001-09-02 22:50:02'),(18,9,5,'2005-12-27','2005-12-16 22:58:11','2005-12-16 22:58:11'),(19,NULL,6,'2004-08-20','2007-04-19 00:19:53','2007-04-19 00:19:53'),(20,4,2,'1900-01-01','1900-01-01 00:00:00','1900-01-01 00:00:00');
|
||||
SELECT OUTR . `pk` AS X
|
||||
FROM C AS OUTR
|
||||
WHERE OUTR . `pk` IN (
|
||||
SELECT INNR . `int_key` AS Y
|
||||
FROM CC AS INNR
|
||||
WHERE INNR . `date_nokey` < INNR . `datetime_nokey` XOR OUTR . `date_nokey` BETWEEN '2004-07-10' AND '2009-11-25'
|
||||
ORDER BY INNR . `int_nokey` ) AND ( OUTR . `datetime_key` BETWEEN '2000-05-25' AND '2004-08-07' OR OUTR . `datetime_nokey` = '2007-10-24' )
|
||||
ORDER BY OUTR . `int_key` , OUTR . `pk`;
|
||||
X
|
||||
9
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
39
mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result
Normal file
39
mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result
Normal file
|
@ -0,0 +1,39 @@
|
|||
SET SESSION optimizer_switch = 'firstmatch=off,index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,loosescan=on,materialization=on,semijoin=on';
|
||||
CREATE TABLE t0 (a INT);
|
||||
INSERT INTO t0 VALUES (0),(1),(2),(3),(4);
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(a));
|
||||
INSERT INTO t1 SELECT a, a from t0;
|
||||
CREATE TABLE t2 (a INT, b INT, PRIMARY KEY(a));
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
UPDATE t1 SET a=3, b=11 WHERE a=4;
|
||||
UPDATE t2 SET b=11 WHERE a=3;
|
||||
|
||||
# This result is wrong, but will be fixed by Bug#46556
|
||||
SELECT * FROM t0 WHERE t0.a IN
|
||||
(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
|
||||
a
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
SET join_cache_level = 6;
|
||||
|
||||
# This result is even more wrong ;-)
|
||||
SELECT * FROM t0 WHERE t0.a IN
|
||||
(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
|
||||
a
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
|
||||
# This result is correct
|
||||
SET SESSION optimizer_switch = 'semijoin=off';
|
||||
SELECT * FROM t0 WHERE t0.a IN
|
||||
(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
|
||||
a
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE t0, t1, t2;
|
14
mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test
Normal file
14
mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test
Normal file
|
@ -0,0 +1,14 @@
|
|||
# test for BUG#36981 "innodb crash when selecting for update"
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# crash requires this
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
create table `t1` (`c1` char(1) default null,`c2` char(10) default null,
|
||||
key (`c1`))
|
||||
engine=innodb default charset=latin1;
|
||||
insert into `t1` values ('3',null);
|
||||
select * from `t1` where `c1`='3' for update;
|
||||
drop table `t1`;
|
21
mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test
Normal file
21
mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test
Normal file
|
@ -0,0 +1,21 @@
|
|||
--echo #
|
||||
--echo # Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on
|
||||
--echo #
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Crash requires that we enable Index Condition Pushdown in InnoDB
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
CREATE TABLE t (
|
||||
dummy INT PRIMARY KEY,
|
||||
a INT UNIQUE,
|
||||
b int
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t VALUES (1,1,1),(3,3,3),(5,5,5);
|
||||
|
||||
SELECT * FROM t WHERE a > 2 FOR UPDATE;
|
||||
|
||||
DROP TABLE t;
|
|
@ -0,0 +1 @@
|
|||
--loose-innodb_lock_wait_timeout=3
|
44
mysql-test/suite/optimizer_unfixed_bugs/t/bug41029.test
Normal file
44
mysql-test/suite/optimizer_unfixed_bugs/t/bug41029.test
Normal file
|
@ -0,0 +1,44 @@
|
|||
# test for BUG#41029:
|
||||
# "MRR: SELECT FOR UPDATE fails to lock gaps (InnoDB table)"
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
select @default_binlog_format:=@@global.binlog_format;
|
||||
set global binlog_format=row;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
connection con1;
|
||||
|
||||
# bug requires this
|
||||
set session debug="+d,optimizer_innodb_ds_mrr";
|
||||
|
||||
set autocommit=0;
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
create table t1 (dummy int primary key, a int unique, b int) engine=innodb;
|
||||
insert into t1 values(1,1,1),(3,3,3),(5,5,5);
|
||||
commit;
|
||||
set session transaction isolation level repeatable read;
|
||||
select @@tx_isolation;
|
||||
start transaction;
|
||||
select * from t1 where a > 2 for update;
|
||||
|
||||
connection con2;
|
||||
|
||||
use test;
|
||||
set autocommit=0;
|
||||
start transaction;
|
||||
select 1;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
insert into t1 values(2,2,2);
|
||||
rollback;
|
||||
|
||||
connection con1;
|
||||
rollback;
|
||||
|
||||
drop table t1;
|
||||
connection default;
|
||||
set global binlog_format=@default_binlog_format;
|
|
@ -0,0 +1,487 @@
|
|||
set optimizer_use_mrr='disable';
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS d1;
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
DROP DATABASE IF EXISTS d3;
|
||||
--enable_warnings
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
|
487
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra1.test
Normal file
487
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra1.test
Normal file
|
@ -0,0 +1,487 @@
|
|||
set optimizer_use_mrr='disable';
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS d1;
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
DROP DATABASE IF EXISTS d3;
|
||||
--enable_warnings
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE d1.t1, d2.t2 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE d1.t1.*, d2.t2.*, d3.t3 FROM d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
|
|
@ -0,0 +1,486 @@
|
|||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS d1;
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
DROP DATABASE IF EXISTS d3;
|
||||
--enable_warnings
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
|
486
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra2.test
Normal file
486
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra2.test
Normal file
|
@ -0,0 +1,486 @@
|
|||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS d1;
|
||||
DROP DATABASE IF EXISTS d2;
|
||||
DROP DATABASE IF EXISTS d3;
|
||||
--enable_warnings
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
CREATE DATABASE d1;
|
||||
CREATE DATABASE d2;
|
||||
CREATE DATABASE d3;
|
||||
CREATE TABLE d1.t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d2.t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE d3.t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO d1.t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO d2.t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO d3.t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM d1.t1, d2.t2, d3.t3 USING d1.t1, d2.t2, d3.t3 WHERE d1.t1.c1=d2.t2.c2 AND d2.t2.c1=d3.t3.c2;
|
||||
SELECT * FROM d1.t1 ORDER BY c1;
|
||||
SELECT * FROM d2.t2 ORDER BY c1;
|
||||
SELECT * FROM d3.t3 ORDER BY c1;
|
||||
DROP DATABASE d1;
|
||||
DROP DATABASE d2;
|
||||
DROP DATABASE d3;
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
--disable_warnings
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
363
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra3.test
Normal file
363
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra3.test
Normal file
|
@ -0,0 +1,363 @@
|
|||
--disable_warnings
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE t1, t2 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE t1.*, t2.*, t3 FROM t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
--disable_warnings
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
363
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra4.test
Normal file
363
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996-extra4.test
Normal file
|
@ -0,0 +1,363 @@
|
|||
--disable_warnings
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 TINYINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t2 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
CREATE TABLE t3 (c1 BIGINT NOT NULL PRIMARY KEY, c2 INTEGER, KEY(c2));
|
||||
INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
INSERT INTO t2 VALUES(11,1),(12,1),(13,1),(14,2),(15,6);
|
||||
INSERT INTO t3 VALUES(21,11),(22,11),(23,13),(24,14),(25,15);
|
||||
DELETE QUICK IGNORE FROM t1, t2 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DELETE QUICK IGNORE FROM t1, t2, t3 USING t1, t2, t3 WHERE t1.c1=t2.c2 AND t2.c1=t3.c2;
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
SELECT * FROM t2 ORDER BY c1;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
14
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test
Normal file
14
mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Test for BUG#41996 "multi-table delete crashes server (InnoDB
|
||||
# table)"
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# crash requires this
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
drop table if exists `t1`;
|
||||
create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb;
|
||||
insert into `t1` values(2,2);
|
||||
delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ;
|
||||
drop table `t1`;
|
248
mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
Normal file
248
mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
Normal file
File diff suppressed because one or more lines are too long
41
mysql-test/suite/optimizer_unfixed_bugs/t/bug43101.test
Normal file
41
mysql-test/suite/optimizer_unfixed_bugs/t/bug43101.test
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Test for BUG#43101 "MyISAM&Maria gives rows for <>NULL and >NULL
|
||||
# with LIMIT clause"
|
||||
|
||||
--source include/have_debug.inc
|
||||
|
||||
# Goes away with
|
||||
#set session debug=+d,optimizer_no_icp;
|
||||
|
||||
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY
|
||||
KEY(c1), UNIQUE INDEX(c2));
|
||||
|
||||
insert into t1 values('-838:59:59','-838:59:59','2009-01-21');
|
||||
insert into t1 values('00:00:00','00:00:00','2009-01-09');
|
||||
insert into t1 values('00:00:11','00:00:11','2009-01-20');
|
||||
insert into t1 values('00:00:12','00:00:12','2009-01-13');
|
||||
insert into t1 values('00:00:45','00:00:45','2009-01-07');
|
||||
insert into t1 values('00:11:12','00:11:12','2009-01-19');
|
||||
insert into t1 values('00:12:30','00:12:30','2009-01-23');
|
||||
insert into t1 values('00:12:34','00:12:34','2009-01-14');
|
||||
insert into t1 values('01:23:00','01:23:00','2009-01-03');
|
||||
insert into t1 values('08:03:02','08:03:02','2009-01-18');
|
||||
insert into t1 values('08:29:45',NULL,'2009-02-01');
|
||||
insert into t1 values('09:00:45','09:00:45','2009-01-24');
|
||||
insert into t1 values('09:36:00','09:36:00','2009-01-25');
|
||||
insert into t1 values('10:00:00','10:00:00','2009-01-06');
|
||||
insert into t1 values('10:11:12','10:11:12','2009-01-11');
|
||||
insert into t1 values('10:22:33','10:22:33','2009-01-02');
|
||||
insert into t1 values('11:11:12','11:11:12','2009-01-12');
|
||||
insert into t1 values('11:11:27','11:11:27','2009-01-17');
|
||||
insert into t1 values('12:34:56','12:34:56','2009-01-01');
|
||||
insert into t1 values('12:34:58','12:34:58','2009-01-15');
|
||||
insert into t1 values('12:35:56','12:35:56','2009-01-16');
|
||||
insert into t1 values('491:22:33','491:22:33','2009-01-04');
|
||||
insert into t1 values('825:23:00','825:23:00','2009-01-05');
|
||||
insert into t1 values('838:59:59','838:59:59','2009-01-21');
|
||||
|
||||
SELECT * FROM t1 WHERE c2 <> NULL ORDER BY c2 DESC;
|
||||
|
||||
SELECT * FROM t1 WHERE c2 <> NULL ORDER BY c2 DESC LIMIT 2;
|
||||
|
||||
drop table t1;
|
17
mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test
Normal file
17
mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Test for BUG#43249 "Innodb returns zero time for the time column
|
||||
# with <=> NULL order by limit"
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY
|
||||
KEY(c1), UNIQUE INDEX(c2)) engine=innodb;
|
||||
INSERT INTO t1 VALUES('8:29:45',NULL,'2009-02-01');
|
||||
# first time, good results:
|
||||
SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
|
||||
# second time, bad results:
|
||||
SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
|
||||
|
||||
drop table `t1`;
|
44
mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
Normal file
44
mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
--echo #
|
||||
--echo # Bug#43360 - Server crash with a simple multi-table update
|
||||
--echo #
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# crash requires this
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a CHAR(2) NOT NULL PRIMARY KEY,
|
||||
b VARCHAR(20) NOT NULL,
|
||||
KEY (b)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a CHAR(2) NOT NULL PRIMARY KEY,
|
||||
b VARCHAR(20) NOT NULL,
|
||||
KEY (b)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
('AB','MySQLAB'),
|
||||
('JA','Sun Microsystems'),
|
||||
('MS','Microsoft'),
|
||||
('IB','IBM- Inc.'),
|
||||
('GO','Google Inc.');
|
||||
|
||||
INSERT INTO t2 VALUES
|
||||
('AB','Sweden'),
|
||||
('JA','USA'),
|
||||
('MS','United States of America'),
|
||||
('IB','North America'),
|
||||
('GO','South America');
|
||||
|
||||
UPDATE t1,t2 SET t1.b=UPPER(t1.b) WHERE t1.b LIKE 'United%';
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
SELECT * FROM t2;
|
||||
|
||||
DROP TABLE t1,t2;
|
58
mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test
Normal file
58
mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test
Normal file
|
@ -0,0 +1,58 @@
|
|||
--echo #
|
||||
--echo # Bug#43448 - Server crashes on multi table delete with Innodb
|
||||
--echo #
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# crash requires ICP support in InnoDB
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
CREATE TABLE t1 (
|
||||
id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
t CHAR(12)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
id2 INT NOT NULL,
|
||||
t CHAR(12)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t3(
|
||||
id3 INT NOT NULL,
|
||||
t CHAR(12),
|
||||
INDEX(id3)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
disable_query_log;
|
||||
|
||||
let $1 = 100;
|
||||
while ($1)
|
||||
{
|
||||
let $2 = 5;
|
||||
eval INSERT INTO t1(t) VALUES ('$1');
|
||||
while ($2)
|
||||
{
|
||||
eval INSERT INTO t2(id2,t) VALUES ($1,'$2');
|
||||
let $3 = 10;
|
||||
while ($3)
|
||||
{
|
||||
eval INSERT INTO t3(id3,t) VALUES ($1,'$2');
|
||||
dec $3;
|
||||
}
|
||||
dec $2;
|
||||
}
|
||||
dec $1;
|
||||
}
|
||||
|
||||
enable_query_log;
|
||||
|
||||
SELECT COUNT(*) FROM t1 WHERE id1 > 90;
|
||||
SELECT COUNT(*) FROM t2 WHERE id2 > 90;
|
||||
SELECT COUNT(*) FROM t3 WHERE id3 > 90;
|
||||
|
||||
DELETE t1, t2, t3
|
||||
FROM t1, t2, t3
|
||||
WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
83
mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
Normal file
83
mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
Normal file
|
@ -0,0 +1,83 @@
|
|||
# test for BUG#43617 "Innodb returns wrong results with timestamp's
|
||||
# range value in IN clause"
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
set storage_engine=innodb;
|
||||
|
||||
set session debug="+d,optimizer_innodb_icp";
|
||||
|
||||
######## Running INSERT tests for TIMESTAMP ########
|
||||
|
||||
# Create tables
|
||||
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||
|
||||
# Insert some rows with targeted values
|
||||
|
||||
# As a string in either 'YYYY-MM-DD HH:MM:SS', 'YY-MM-DD HH:MM:SS', 'YYYY-MM-DD' or 'YY-MM-DD' format
|
||||
INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28');
|
||||
|
||||
# As a string with no delimiters in either 'YYYYMMDDHHMMSS', 'YYMMDDHHMMSS', 'YYYYMMDD' or 'YYMMDD' format
|
||||
INSERT INTO t1 VALUES('20070523091528','070523091528','20070524091528','070524091528'),('20070525','070525','20070526','070526');
|
||||
|
||||
# As a number in either YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD or YYMMDD format
|
||||
INSERT INTO t1 VALUES(19830905132800,830905132800,19830906132800,830906132800),(19830907,830907,19830908,830908);
|
||||
|
||||
# As the result of a function
|
||||
SET TIMESTAMP=1233216687; # 2009-01-29 13:41:27
|
||||
INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE);
|
||||
|
||||
# Insert permissible NULLs
|
||||
INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03');
|
||||
|
||||
# Insert duplicate NULLs to unique column
|
||||
INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
|
||||
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
|
||||
|
||||
# Insert empty string '', would be converted to zero value of the appropriate type
|
||||
INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
|
||||
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Test 'INSERT IGNORE' with the same rows that reported constraint violation above
|
||||
# Ignore pk constraint
|
||||
INSERT IGNORE INTO t1(c1,c2) VALUES('20070525','20070527') /* doesn't throw error */;
|
||||
|
||||
# Ignore unique constraint
|
||||
INSERT IGNORE INTO t1(c1,c2) VALUES(19840905,830907) /* doesn't throw error */;
|
||||
|
||||
# Test 'INSERT ON DUPLICATE KEY UPDATE' with single column PK
|
||||
SELECT * FROM t1 WHERE c1='20070527' /* Returns no rows */;
|
||||
INSERT INTO t1(c1) VALUES('20070525') ON DUPLICATE KEY UPDATE c1='20070527';
|
||||
SELECT * FROM t1 WHERE c1='20070527' /* Returns 1 row with c1=2007-05-27 */;
|
||||
|
||||
# Test 'INSERT ON DUPLICATE KEY UPDATE' with single column unique
|
||||
SELECT * FROM t1 WHERE c1=19830909 AND c2=830910 /* Returns no rows */;
|
||||
INSERT INTO t1(c1,c2) VALUES(19840905,830907) ON DUPLICATE KEY UPDATE c1=19830909,c2=830910;
|
||||
SELECT * FROM t1 WHERE c1=19830909 AND c2=830910 /* Returns 1 row */;
|
||||
|
||||
# Test 'INSERT SET'
|
||||
INSERT INTO t1 SET c1='1999-01-01',c2='1999-01-01';
|
||||
SELECT * FROM t1 WHERE c1='1999-01-01' AND c2='1999-01-01' /* Returns 1 row with values for other column as NULL */;
|
||||
|
||||
# Test insert range values to 'TIMESTAMP' columns
|
||||
INSERT INTO t1 VALUES('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02'),('1990-01-01 00:00:01','2000-01-01 00:00:01','2009-01-03','2009-01-04'),('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06');
|
||||
|
||||
# Test insert NULL to non-null column
|
||||
# Inserting NULL to TIMESTAMP NOT NULL field doesn't throw error, but records the current/set timestamp
|
||||
|
||||
DELETE FROM t1 WHERE c1=NOW() /* because the row with current timestamp exists */;
|
||||
INSERT INTO t1 VALUES(NULL,NOW(),NOW(),NOW());
|
||||
SELECT * FROM t1 WHERE c1 IS NULL /* returns no rows */;
|
||||
SELECT * FROM t1 WHERE c1=NOW() /* returns 1 row */;
|
||||
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2;
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2 LIMIT 2;
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2 DESC;
|
||||
SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER BY c2 DESC LIMIT 2;
|
||||
DROP TABLE t1;
|
||||
|
46
mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test
Normal file
46
mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test
Normal file
|
@ -0,0 +1,46 @@
|
|||
# test for BUG#43618 "MyISAM&Maria returns wrong results with
|
||||
# 'between' on timestamp"
|
||||
|
||||
--source include/have_debug.inc
|
||||
|
||||
# bug goes away with
|
||||
#set session debug="+d,optimizer_no_icp";
|
||||
|
||||
######## Running INSERT tests for TIMESTAMP ########
|
||||
|
||||
# Create tables
|
||||
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||
|
||||
# Insert some rows with targeted values
|
||||
|
||||
# As a string in either 'YYYY-MM-DD HH:MM:SS', 'YY-MM-DD HH:MM:SS', 'YYYY-MM-DD' or 'YY-MM-DD' format
|
||||
INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28');
|
||||
|
||||
# As a string with no delimiters in either 'YYYYMMDDHHMMSS', 'YYMMDDHHMMSS', 'YYYYMMDD' or 'YYMMDD' format
|
||||
INSERT INTO t1 VALUES('20070523091528','070523091528','20070524091528','070524091528'),('20070525','070525','20070526','070526');
|
||||
|
||||
# As a number in either YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD or YYMMDD format
|
||||
INSERT INTO t1 VALUES(19830905132800,830905132800,19830906132800,830906132800),(19830907,830907,19830908,830908);
|
||||
|
||||
# As the result of a function
|
||||
SET TIMESTAMP=1233216687; # 2009-01-29 13:41:27
|
||||
INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE);
|
||||
|
||||
# Insert permissible NULLs
|
||||
INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03');
|
||||
|
||||
# Insert duplicate NULLs to unique column
|
||||
INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
|
||||
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
|
||||
|
||||
# Insert empty string '', would be converted to zero value of the appropriate type
|
||||
INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
|
||||
|
||||
INSERT INTO t1 VALUES('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02'),('1990-01-01 00:00:01','2000-01-01 00:00:01','2009-01-03','2009-01-04'),('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06');
|
||||
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t1 WHERE c1 BETWEEN '0000-00-00' AND '2010-00-01 00:00:00' ORDER BY c1 DESC LIMIT 2;
|
||||
SELECT * FROM t1 WHERE c2 BETWEEN '1971-01-01 00:00:01' AND '2010-10-00 00:00:00' ORDER BY c2 DESC LIMIT 2;
|
||||
DROP TABLE t1;
|
||||
|
183
mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test
Normal file
183
mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test
Normal file
|
@ -0,0 +1,183 @@
|
|||
# BUG#45219 "Azalea crash on query containing a JOIN in subquery"
|
||||
|
||||
# Both SELECT DISTINCT cause similar crashes.
|
||||
# With ./mtr --mysqld=--optimizer_switch="semijoin=off" optimizer_unfixed_bugs.bug45219
|
||||
# there is no crash, the result file has been created with this
|
||||
# command, but it has *not* been checked for correctness of returned
|
||||
# data (at least 5.1 gives the same result).
|
||||
|
||||
|
||||
# Begin test case for query 0
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS CC, C, BB;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES
|
||||
(10,0,'2006-07-07 07:26:28','q'),(11,5,'2002-09-23 00:00:00','m'),
|
||||
(12,7,'0000-00-00 00:00:00','j'),(13,1,'2006-06-07 00:00:00','z'),
|
||||
(14,8,'2000-09-16 12:15:34','a'),(15,2,'2007-08-05 15:47:52',''),
|
||||
(16,1,'0000-00-00 00:00:00','e'),(17,8,'2005-12-02 19:34:26','t'),
|
||||
(18,5,'0000-00-00 00:00:00','q'),(19,4,'0000-00-00 00:00:00','b'),
|
||||
(20,5,'2007-12-28 00:00:00','w'),(21,3,'2004-08-02 11:48:43','m'),
|
||||
(22,0,'0000-00-00 00:00:00','x'),(23,8,'2004-04-19 12:18:43',''),
|
||||
(24,0,'2009-04-27 00:00:00','w'),(25,4,'2006-10-20 14:52:15','x'),
|
||||
(26,0,'0000-00-00 00:00:00','e'),(27,0,'2002-03-22 11:48:37','e'),
|
||||
(28,2,'0000-00-00 00:00:00','p'),(29,0,'2001-01-04 03:55:07','x');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES
|
||||
(1,9,'0000-00-00 00:00:00','p'),(2,0,'2002-02-09 07:38:13','v'),
|
||||
(3,8,'2001-05-03 12:08:14','t'),(4,3,'0000-00-00 00:00:00','u'),
|
||||
(5,7,'2009-07-28 03:43:30','n'),(6,0,'2009-08-04 00:00:00','l'),
|
||||
(7,1,'0000-00-00 00:00:00','h'),(8,9,'0000-00-00 00:00:00','u'),
|
||||
(9,0,'2005-08-02 17:16:54','n'),(10,9,'2002-12-21 00:00:00','j'),
|
||||
(11,0,'2005-08-15 12:37:35','k'),(12,5,'0000-00-00 00:00:00','e'),
|
||||
(13,0,'2006-03-10 00:00:00','i'),(14,8,'2005-05-16 11:02:36','u'),
|
||||
(15,8,'2008-11-02 00:00:00','n'),(16,5,'2006-03-15 00:00:00','b'),
|
||||
(17,1,'0000-00-00 00:00:00','x'),(18,7,'0000-00-00 00:00:00',''),
|
||||
(19,0,'2008-12-17 20:15:40','q'),(20,9,'0000-00-00 00:00:00','u');
|
||||
CREATE TABLE `BB` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `BB` VALUES
|
||||
(10,8,'2007-08-19 08:08:38','i'),(11,0,'2000-05-21 03:51:51','');
|
||||
|
||||
SELECT DISTINCT `datetime_key`
|
||||
FROM C
|
||||
WHERE ( `int_nokey` , `pk` ) IN (
|
||||
SELECT INNR .`pk` , INNR .`pk`
|
||||
FROM CC LEFT JOIN BB INNR ON INNR .`varchar_key` ) AND `pk` = 9 ;
|
||||
|
||||
DROP TABLE CC, C, BB;
|
||||
|
||||
# End of test case for query 0
|
||||
|
||||
# Begin test case for query 1
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS CC, C, BB;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES
|
||||
(10,0,8,'2007-02-14','2006-07-07 07:26:28','q','q'),
|
||||
(11,5,8,'2002-10-03','2002-09-23 00:00:00','m','m'),
|
||||
(12,7,3,'2006-12-02','0000-00-00 00:00:00','j','j'),
|
||||
(13,1,2,'2007-05-02','2006-06-07 00:00:00','z','z'),
|
||||
(14,8,2,'2001-11-18','2000-09-16 12:15:34','a','a'),
|
||||
(15,2,6,'2006-09-09','2007-08-05 15:47:52','',''),
|
||||
(16,1,8,'0000-00-00','0000-00-00 00:00:00','e','e'),
|
||||
(17,8,9,'2003-07-22','2005-12-02 19:34:26','t','t'),
|
||||
(18,5,2,'2001-12-22','0000-00-00 00:00:00','q','q'),
|
||||
(19,4,6,'0000-00-00','0000-00-00 00:00:00','b','b'),
|
||||
(20,5,5,'2006-09-02','2007-12-28 00:00:00','w','w'),
|
||||
(21,3,2,'0000-00-00','2004-08-02 11:48:43','m','m'),
|
||||
(22,0,4,'0000-00-00','0000-00-00 00:00:00','x','x'),
|
||||
(23,8,9,'2001-02-28','2004-04-19 12:18:43','',''),
|
||||
(24,0,6,'0000-00-00','2009-04-27 00:00:00','w','w'),
|
||||
(25,4,5,'2007-05-19','2006-10-20 14:52:15','x','x'),
|
||||
(26,0,0,'2005-02-15','0000-00-00 00:00:00','e','e'),
|
||||
(27,0,0,'2000-10-19','2002-03-22 11:48:37','e','e'),
|
||||
(28,2,8,'2005-07-07','0000-00-00 00:00:00','p','p'),
|
||||
(29,0,0,'2008-10-18','2001-01-04 03:55:07','x','x');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES
|
||||
(1,9,9,'2007-12-01','0000-00-00 00:00:00','p','p'),
|
||||
(2,0,0,'0000-00-00','2002-02-09 07:38:13','v','v'),
|
||||
(3,8,6,'0000-00-00','2001-05-03 12:08:14','t','t'),
|
||||
(4,3,6,'2002-05-07','0000-00-00 00:00:00','u','u'),
|
||||
(5,7,6,'0000-00-00','2009-07-28 03:43:30','n','n'),
|
||||
(6,0,4,'0000-00-00','2009-08-04 00:00:00','l','l'),
|
||||
(7,1,7,'0000-00-00','0000-00-00 00:00:00','h','h'),
|
||||
(8,9,4,'0000-00-00','0000-00-00 00:00:00','u','u'),
|
||||
(9,0,8,'0000-00-00','2005-08-02 17:16:54','n','n'),
|
||||
(10,9,4,'2000-12-18','2002-12-21 00:00:00','j','j'),
|
||||
(11,0,7,'2005-11-13','2005-08-15 12:37:35','k','k'),
|
||||
(12,5,5,'0000-00-00','0000-00-00 00:00:00','e','e'),
|
||||
(13,0,0,'2003-11-12','2006-03-10 00:00:00','i','i'),
|
||||
(14,8,5,'2006-02-20','2005-05-16 11:02:36','u','u'),
|
||||
(15,8,7,'2005-02-12','2008-11-02 00:00:00','n','n'),
|
||||
(16,5,2,'2009-07-20','2006-03-15 00:00:00','b','b'),
|
||||
(17,1,8,'2005-02-24','0000-00-00 00:00:00','x','x'),
|
||||
(18,7,0,'0000-00-00','0000-00-00 00:00:00','',''),
|
||||
(19,0,9,'0000-00-00','2008-12-17 20:15:40','q','q'),
|
||||
(20,9,5,'0000-00-00','0000-00-00 00:00:00','u','u');
|
||||
CREATE TABLE `BB` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `BB` VALUES (10,8,5,'0000-00-00','2007-08-19
|
||||
08:08:38','i','i'),(11,0,8,'2005-08-18','2000-05-21 03:51:51','','');
|
||||
|
||||
SELECT DISTINCT BIT_AND( OUTR . `datetime_key` ) AS X
|
||||
FROM C AS OUTR
|
||||
WHERE ( OUTR . `int_nokey` , OUTR . `pk` ) IN (
|
||||
SELECT DISTINCT INNR . `pk` AS X , INNR . `pk` AS Y
|
||||
FROM CC AS INNR2 LEFT JOIN BB AS INNR ON
|
||||
( INNR2 . `varchar_nokey` = INNR . `varchar_key` )
|
||||
WHERE INNR . `date_key` BETWEEN '2009-04-26' AND '2004-08-21' )
|
||||
AND OUTR . `pk` = 9
|
||||
ORDER BY OUTR . `int_key` , OUTR . `pk`;
|
||||
|
||||
DROP TABLE CC, C, BB;
|
||||
|
||||
# End of test case for query 1
|
97
mysql-test/suite/optimizer_unfixed_bugs/t/bug45221.test
Normal file
97
mysql-test/suite/optimizer_unfixed_bugs/t/bug45221.test
Normal file
|
@ -0,0 +1,97 @@
|
|||
# test for BUG#45221 "Query "SELECT pk FROM C WHERE pk IN (SELECT
|
||||
# int_key)" failing"
|
||||
|
||||
--source include/have_debug.inc
|
||||
|
||||
# bug goes away with
|
||||
#set session debug="+d,optimizer_no_icp";
|
||||
|
||||
# those don't remove the problem but make the result diff different:
|
||||
#set optimizer_switch="materialization=off";
|
||||
#set optimizer_switch="semijoin=off";
|
||||
#set optimizer_switch="materialization=off,semijoin=off";
|
||||
|
||||
#/* Begin test case for query 0 */
|
||||
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES (10,8,NULL,'2002-02-26 06:14:37'),(11,9,'2006-06-14','1900-01-01 00:00:00'),(12,9,'2002-09-12','2006-12-03 09:37:26'),(13,186,'2005-02-15','2008-05-26 12:27:10'),(14,NULL,NULL,'2004-12-14 16:37:30'),(15,2,'2008-11-04','2003-02-11 21:19:41'),(16,3,'2004-09-04','2009-10-18 02:27:49'),(17,0,'2006-06-05','2000-09-26 07:45:57'),(18,133,'1900-01-01',NULL),(19,1,'1900-01-01','2005-11-10 12:40:29'),(20,8,'1900-01-01','2009-04-25 00:00:00'),(21,5,'2005-01-13','2002-11-27 00:00:00'),(22,5,'2006-05-21','2004-01-26 20:32:32'),(23,8,'2003-09-08','2007-10-26 11:41:40'),(24,6,'2006-12-23','2005-10-07 00:00:00'),(25,51,'2006-10-15','2000-07-15 05:00:34'),(26,4,'2005-04-06','2000-04-03 16:33:32'),(27,7,'2008-04-07',NULL),(28,6,'2006-10-10','2001-04-25 01:26:12'),(29,4,'1900-01-01','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES (1,2,NULL,'2004-10-11 18:13:16'),(2,9,'2001-09-19',NULL),(3,3,'2004-09-12','1900-01-01 00:00:00'),(4,9,NULL,'2009-07-25 00:00:00'),(5,NULL,'2002-07-19',NULL),(6,9,'2002-12-16','2008-07-27 00:00:00'),(7,3,'2006-02-08','2002-11-13 16:37:31'),(8,8,'2006-08-28','1900-01-01 00:00:00'),(9,8,'2001-04-14','2003-12-10 00:00:00'),(10,53,'2000-01-05','2001-12-21 22:38:22'),(11,0,'2003-12-06','2008-12-13 23:16:44'),(12,5,'1900-01-01','2005-08-15 12:39:41'),(13,166,'2002-11-27',NULL),(14,3,NULL,'2006-09-11 12:06:14'),(15,0,'2003-05-27','2007-12-15 12:39:34'),(16,1,'2005-05-03','2005-08-09 00:00:00'),(17,9,'2001-04-18','2001-09-02 22:50:02'),(18,5,'2005-12-27','2005-12-16 22:58:11'),(19,6,'2004-08-20','2007-04-19 00:19:53'),(20,2,'1900-01-01','1900-01-01 00:00:00');
|
||||
|
||||
SELECT `pk`
|
||||
FROM C OUTR
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR OUTR .`date_nokey` ) ;
|
||||
|
||||
SELECT `pk`
|
||||
FROM C
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR '2009-11-25' ) ;
|
||||
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
#/* End of test case for query 0 */
|
||||
|
||||
#/* Begin test case for query 1 */
|
||||
|
||||
CREATE TABLE `CC` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_key` datetime DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES (10,7,8,NULL,'2002-02-26 06:14:37','2002-02-26 06:14:37'),(11,1,9,'2006-06-14','1900-01-01 00:00:00','1900-01-01 00:00:00'),(12,5,9,'2002-09-12','2006-12-03 09:37:26','2006-12-03 09:37:26'),(13,3,186,'2005-02-15','2008-05-26 12:27:10','2008-05-26 12:27:10'),(14,6,NULL,NULL,'2004-12-14 16:37:30','2004-12-14 16:37:30'),(15,92,2,'2008-11-04','2003-02-11 21:19:41','2003-02-11 21:19:41'),(16,7,3,'2004-09-04','2009-10-18 02:27:49','2009-10-18 02:27:49'),(17,NULL,0,'2006-06-05','2000-09-26 07:45:57','2000-09-26 07:45:57'),(18,3,133,'1900-01-01',NULL,NULL),(19,5,1,'1900-01-01','2005-11-10 12:40:29','2005-11-10 12:40:29'),(20,1,8,'1900-01-01','2009-04-25 00:00:00','2009-04-25 00:00:00'),(21,2,5,'2005-01-13','2002-11-27 00:00:00','2002-11-27 00:00:00'),(22,NULL,5,'2006-05-21','2004-01-26 20:32:32','2004-01-26 20:32:32'),(23,1,8,'2003-09-08','2007-10-26 11:41:40','2007-10-26 11:41:40'),(24,0,6,'2006-12-23','2005-10-07 00:00:00','2005-10-07 00:00:00'),(25,210,51,'2006-10-15','2000-07-15 05:00:34','2000-07-15 05:00:34'),(26,8,4,'2005-04-06','2000-04-03 16:33:32','2000-04-03 16:33:32'),(27,7,7,'2008-04-07',NULL,NULL),(28,5,6,'2006-10-10','2001-04-25 01:26:12','2001-04-25 01:26:12'),(29,NULL,4,'1900-01-01','2000-12-27 00:00:00','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
`datetime_key` datetime DEFAULT NULL,
|
||||
`datetime_nokey` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES (1,NULL,2,NULL,'2004-10-11 18:13:16','2004-10-11 18:13:16'),(2,7,9,'2001-09-19',NULL,NULL),(3,9,3,'2004-09-12','1900-01-01 00:00:00','1900-01-01 00:00:00'),(4,7,9,NULL,'2009-07-25 00:00:00','2009-07-25 00:00:00'),(5,4,NULL,'2002-07-19',NULL,NULL),(6,2,9,'2002-12-16','2008-07-27 00:00:00','2008-07-27 00:00:00'),(7,6,3,'2006-02-08','2002-11-13 16:37:31','2002-11-13 16:37:31'),(8,8,8,'2006-08-28','1900-01-01 00:00:00','1900-01-01 00:00:00'),(9,NULL,8,'2001-04-14','2003-12-10 00:00:00','2003-12-10 00:00:00'),(10,5,53,'2000-01-05','2001-12-21 22:38:22','2001-12-21 22:38:22'),(11,NULL,0,'2003-12-06','2008-12-13 23:16:44','2008-12-13 23:16:44'),(12,6,5,'1900-01-01','2005-08-15 12:39:41','2005-08-15 12:39:41'),(13,188,166,'2002-11-27',NULL,NULL),(14,2,3,NULL,'2006-09-11 12:06:14','2006-09-11 12:06:14'),(15,1,0,'2003-05-27','2007-12-15 12:39:34','2007-12-15 12:39:34'),(16,1,1,'2005-05-03','2005-08-09 00:00:00','2005-08-09 00:00:00'),(17,0,9,'2001-04-18','2001-09-02 22:50:02','2001-09-02 22:50:02'),(18,9,5,'2005-12-27','2005-12-16 22:58:11','2005-12-16 22:58:11'),(19,NULL,6,'2004-08-20','2007-04-19 00:19:53','2007-04-19 00:19:53'),(20,4,2,'1900-01-01','1900-01-01 00:00:00','1900-01-01 00:00:00');
|
||||
|
||||
SELECT OUTR . `pk` AS X
|
||||
FROM C AS OUTR
|
||||
WHERE OUTR . `pk` IN (
|
||||
SELECT INNR . `int_key` AS Y
|
||||
FROM CC AS INNR
|
||||
WHERE INNR . `date_nokey` < INNR . `datetime_nokey` XOR OUTR . `date_nokey` BETWEEN '2004-07-10' AND '2009-11-25'
|
||||
ORDER BY INNR . `int_nokey` ) AND ( OUTR . `datetime_key` BETWEEN '2000-05-25' AND '2004-08-07' OR OUTR . `datetime_nokey` = '2007-10-24' )
|
||||
ORDER BY OUTR . `int_key` , OUTR . `pk`;
|
||||
|
||||
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
#/* End of test case for query 1 */
|
||||
|
34
mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test
Normal file
34
mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test
Normal file
|
@ -0,0 +1,34 @@
|
|||
SET SESSION optimizer_switch = 'firstmatch=off,index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,loosescan=on,materialization=on,semijoin=on';
|
||||
|
||||
CREATE TABLE t0 (a INT);
|
||||
INSERT INTO t0 VALUES (0),(1),(2),(3),(4);
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(a));
|
||||
INSERT INTO t1 SELECT a, a from t0;
|
||||
|
||||
CREATE TABLE t2 (a INT, b INT, PRIMARY KEY(a));
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
|
||||
UPDATE t1 SET a=3, b=11 WHERE a=4;
|
||||
UPDATE t2 SET b=11 WHERE a=3;
|
||||
|
||||
--echo
|
||||
--echo # This result is wrong, but will be fixed by Bug#46556
|
||||
SELECT * FROM t0 WHERE t0.a IN
|
||||
(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
|
||||
|
||||
SET join_cache_level = 6;
|
||||
|
||||
--echo
|
||||
--echo # This result is even more wrong ;-)
|
||||
SELECT * FROM t0 WHERE t0.a IN
|
||||
(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
|
||||
|
||||
SET SESSION optimizer_switch = 'semijoin=off';
|
||||
|
||||
--echo
|
||||
--echo # This result is correct
|
||||
SELECT * FROM t0 WHERE t0.a IN
|
||||
(SELECT t1.a FROM t1, t2 WHERE t2.a=t0.a AND t1.b=t2.b);
|
||||
|
||||
DROP TABLE t0, t1, t2;
|
7
mysql-test/suite/optimizer_unfixed_bugs/t/disabled.def
Normal file
7
mysql-test/suite/optimizer_unfixed_bugs/t/disabled.def
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Disabling all subquery problems
|
||||
|
||||
bug49129 : Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
|
||||
bug45221 : Query "SELECT pk FROM C WHERE pk IN (SELECT # int_key)" failing
|
||||
bug45219 : Azalea crash on query containing a JOIN in subquery
|
||||
|
||||
|
124
mysql-test/t/innodb_mrr.test
Normal file
124
mysql-test/t/innodb_mrr.test
Normal file
|
@ -0,0 +1,124 @@
|
|||
-- source include/have_innodb.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
--enable_warnings
|
||||
|
||||
set @save_storage_engine= @@storage_engine;
|
||||
set storage_engine=InnoDB;
|
||||
|
||||
--source include/mrr_tests.inc
|
||||
|
||||
set storage_engine= @save_storage_engine;
|
||||
|
||||
# Try big rowid sizes
|
||||
set @read_rnd_buffer_size_save= @@read_rnd_buffer_size;
|
||||
set read_rnd_buffer_size=64;
|
||||
|
||||
# By default InnoDB will fill values only for key parts used by the query,
|
||||
# which will cause DS-MRR to supply an invalid tuple on scan restoration.
|
||||
# Verify that DS-MRR's code extra(HA_EXTRA_RETRIEVE_ALL_COLS) call has effect:
|
||||
create table t1(a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2(a char(8), b char(8), c char(8), filler char(100), key(a,b,c) ) engine=InnoDB;
|
||||
|
||||
insert into t2 select
|
||||
concat('a-', 1000 + A.a, '-a'),
|
||||
concat('b-', 1000 + B.a, '-b'),
|
||||
concat('c-', 1000 + C.a, '-c'),
|
||||
'filler'
|
||||
from t1 A, t1 B, t1 C;
|
||||
|
||||
explain
|
||||
select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
|
||||
select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
|
||||
drop table t2;
|
||||
|
||||
# Try a very big rowid
|
||||
create table t2 (a char(100), b char(100), c char(100), d int,
|
||||
filler char(10), key(d), primary key (a,b,c)) engine= innodb;
|
||||
insert into t2 select A.a, B.a, B.a, A.a, 'filler' from t1 A, t1 B;
|
||||
explain select * from t2 force index (d) where d < 10;
|
||||
drop table t2;
|
||||
|
||||
drop table t1;
|
||||
set @@read_rnd_buffer_size= @read_rnd_buffer_size_save;
|
||||
|
||||
#
|
||||
# BUG#33033 "MySQL/InnoDB crashes with simple select range query"
|
||||
#
|
||||
create table t1 (f1 int not null, f2 int not null,f3 int not null, f4 char(1), primary key (f1,f2), key ix(f3))Engine=InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
let $1=55;
|
||||
|
||||
while ($1)
|
||||
{
|
||||
eval insert into t1(f1,f2,f3,f4) values ($1,$1,$1,'A');
|
||||
dec $1;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
# The following must not crash:
|
||||
select * from t1 where (f3>=5 and f3<=10) or (f3>=1 and f3<=4);
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo
|
||||
--echo BUG#37977: Wrong result returned on GROUP BY + OR + Innodb
|
||||
--echo
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`date_nokey` date NOT NULL,
|
||||
`time_key` time NOT NULL,
|
||||
`time_nokey` time NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`datetime_nokey` datetime NOT NULL,
|
||||
`varchar_key` varchar(5) DEFAULT NULL,
|
||||
`varchar_nokey` varchar(5) DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `time_key` (`time_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1,5,5,'2009-10-16','2009-10-16','09:28:15','09:28:15','2007-09-14 05:34:08','2007-09-14 05:34:08','qk','qk'),
|
||||
(2,6,6,'0000-00-00','0000-00-00','23:06:39','23:06:39','0000-00-00 00:00:00','0000-00-00 00:00:00','j','j'),
|
||||
(3,10,10,'2000-12-18','2000-12-18','22:16:19','22:16:19','2006-11-04 15:42:50','2006-11-04 15:42:50','aew','aew'),
|
||||
(4,0,0,'2001-09-18','2001-09-18','00:00:00','00:00:00','2004-03-23 13:23:35','2004-03-23 13:23:35',NULL,NULL),
|
||||
(5,6,6,'2007-08-16','2007-08-16','22:13:38','22:13:38','2004-08-19 11:01:28','2004-08-19 11:01:28','qu','qu');
|
||||
select pk from t1 WHERE `varchar_key` > 'kr' group by pk;
|
||||
select pk from t1 WHERE `int_nokey` IS NULL OR `varchar_key` > 'kr' group by pk;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#39447: Error with NOT NULL condition and LIMIT 1
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
id int(11) NOT NULL,
|
||||
parent_id int(11) DEFAULT NULL,
|
||||
name varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY ind_parent_id (parent_id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
insert into t1 (id, parent_id, name) values
|
||||
(10,NULL,'A'),
|
||||
(20,10,'B'),
|
||||
(30,10,'C'),
|
||||
(40,NULL,'D'),
|
||||
(50,40,'E'),
|
||||
(60,40,'F'),
|
||||
(70,NULL,'J');
|
||||
|
||||
SELECT id FROM t1 WHERE parent_id IS NOT NULL ORDER BY id DESC LIMIT 1;
|
||||
--echo This must show type=index, extra=Using where
|
||||
explain SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE parent_id IS NOT NULL ORDER BY id DESC LIMIT 1;
|
||||
SELECT * FROM t1 WHERE parent_id IS NOT NULL ORDER BY id DESC LIMIT 1;
|
||||
drop table t1;
|
99
mysql-test/t/myisam_mrr.test
Normal file
99
mysql-test/t/myisam_mrr.test
Normal file
|
@ -0,0 +1,99 @@
|
|||
#
|
||||
# MRR/MyISAM tests.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, t3;
|
||||
--enable_warnings
|
||||
|
||||
set @read_rnd_buffer_size_save= @@read_rnd_buffer_size;
|
||||
set read_rnd_buffer_size=79;
|
||||
select @@read_rnd_buffer_size;
|
||||
|
||||
-- source include/mrr_tests.inc
|
||||
|
||||
set @@read_rnd_buffer_size= @read_rnd_buffer_size_save;
|
||||
|
||||
#
|
||||
# BUG#30622: Incorrect query results for MRR + filesort
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
ID int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
col1 int(10) unsigned DEFAULT NULL,
|
||||
key1 int(10) unsigned NOT NULL DEFAULT '0',
|
||||
key2 int(10) unsigned DEFAULT NULL,
|
||||
text1 text,
|
||||
text2 text,
|
||||
col2 smallint(6) DEFAULT '100',
|
||||
col3 enum('headers','bodyandsubject') NOT NULL DEFAULT 'bodyandsubject',
|
||||
col4 tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (ID),
|
||||
KEY (key1),
|
||||
KEY (key2)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(1,NULL,1130,NULL,'Hello',NULL,100,'bodyandsubject',0),
|
||||
(2,NULL,1130,NULL,'bye',NULL,100,'bodyandsubject',0),
|
||||
(3,NULL,1130,NULL,'red',NULL,100,'bodyandsubject',0),
|
||||
(4,NULL,1130,NULL,'yellow',NULL,100,'bodyandsubject',0),
|
||||
(5,NULL,1130,NULL,'blue',NULL,100,'bodyandsubject',0);
|
||||
|
||||
select * FROM t1 WHERE key1=1130 AND col1 IS NULL ORDER BY text1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo
|
||||
--echo BUG#37851: Crash in test_if_skip_sort_order tab->select is zero
|
||||
--echo
|
||||
CREATE TABLE t1 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
CREATE TABLE t2 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
int_key int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (pk),
|
||||
KEY int_key (int_key)
|
||||
);
|
||||
INSERT INTO t2 VALUES (1,1),(2,6),(3,0);
|
||||
|
||||
EXPLAIN EXTENDED
|
||||
SELECT MIN(t1.pk)
|
||||
FROM t1 WHERE EXISTS (
|
||||
SELECT t2.pk
|
||||
FROM t2
|
||||
WHERE t2.int_key IS NULL
|
||||
GROUP BY t2.pk
|
||||
);
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
-- echo #
|
||||
-- echo # BUG#42048 Discrepancy between MyISAM and Maria's ICP implementation
|
||||
-- echo #
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (a int, b char(20), filler char(200), key(a,b(10)));
|
||||
insert into t1 select A.a + 10*(B.a + 10*C.a), 'bbb','filler' from t0 A, t0 B, t0 C;
|
||||
update t1 set b=repeat(char(65+a), 20) where a < 25;
|
||||
|
||||
--echo This must show range + using index condition:
|
||||
explain select * from t1 where a < 10 and b = repeat(char(65+a), 20);
|
||||
select * from t1 where a < 10 and b = repeat(char(65+a), 20);
|
||||
drop table t0,t1;
|
||||
|
||||
-- echo #
|
||||
-- echo # BUG#41136: ORDER BY + range access: EXPLAIN shows "Using MRR" while MRR is actually not used
|
||||
-- echo #
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (a int, b int, key(a));
|
||||
insert into t1 select A.a + 10 *(B.a + 10*C.a), A.a + 10 *(B.a + 10*C.a) from t0 A, t0 B, t0 C;
|
||||
-- echo This mustn't show "Using MRR":
|
||||
explain select * from t1 where a < 20 order by a;
|
||||
drop table t0, t1;
|
||||
|
|
@ -47,7 +47,7 @@ mysqld_LDADD = libndb.la \
|
|||
$(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
|
||||
$(yassl_libs) $(openssl_libs) @MYSQLD_EXTRA_LIBS@
|
||||
|
||||
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
||||
noinst_HEADERS = ds_mrr.h item.h item_func.h item_sum.h item_cmpfunc.h \
|
||||
item_strfunc.h item_timefunc.h \
|
||||
item_xmlfunc.h \
|
||||
item_create.h item_subselect.h item_row.h \
|
||||
|
@ -79,7 +79,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
|||
sql_partition.h partition_info.h partition_element.h \
|
||||
contributors.h sql_servers.h
|
||||
|
||||
mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
|
||||
mysqld_SOURCES = ds_mrr.cc sql_lex.cc sql_handler.cc sql_partition.cc \
|
||||
item.cc item_sum.cc item_buff.cc item_func.cc \
|
||||
item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
|
||||
thr_malloc.cc item_create.cc item_subselect.cc \
|
||||
|
|
1333
sql/ds_mrr.cc
Normal file
1333
sql/ds_mrr.cc
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue