mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
merge with 4.0.5
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged Docs/manual.texi: Auto merged myisam/mi_open.c: Auto merged mysql-test/r/null_key.result: Auto merged mysql-test/r/select.result: Auto merged sql/field.h: Auto merged sql/field_conv.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/log.cc: Auto merged sql/sql_parse.cc: Auto merged sql/table.cc: Auto merged
This commit is contained in:
@ -172,10 +172,10 @@ b
|
||||
INSERT INTO t2 values (1),(2),(3);
|
||||
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;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t3 index a a 5 NULL 6 Using index; Using temporary
|
||||
t2 index a a 4 NULL 5 Using index; Distinct
|
||||
t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 where used; Distinct
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 index a a 5 NULL 6 Using index; Using temporary
|
||||
1 SIMPLE t2 index a a 4 NULL 5 Using index; Distinct
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 where used; Distinct
|
||||
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
a
|
||||
1
|
||||
@ -188,9 +188,9 @@ insert into t3 select * from t4;
|
||||
insert into t4 select * from t3;
|
||||
insert into t3 select * from t4;
|
||||
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary
|
||||
t3 ref a a 5 t1.a 10 where used; Using index; Distinct
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary
|
||||
1 SIMPLE t3 ref a a 5 t1.a 10 where used; Using index; Distinct
|
||||
select distinct t1.a from t1,t3 where t1.a=t3.a;
|
||||
a
|
||||
1
|
||||
@ -274,14 +274,14 @@ on j_lj_t3.id=t3_lj.id
|
||||
WHERE
|
||||
((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2))
|
||||
AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2));
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t1 index id id 4 NULL 2 Using index; Using temporary
|
||||
t2 index id id 8 NULL 1 Using index; Distinct
|
||||
t3 index id id 8 NULL 1 Using index; Distinct
|
||||
j_lj_t2 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
t2_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
j_lj_t3 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
t3_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary
|
||||
1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct
|
||||
1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct
|
||||
1 SIMPLE j_lj_t2 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
1 SIMPLE t2_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
1 SIMPLE j_lj_t3 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
1 SIMPLE t3_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
SELECT DISTINCT
|
||||
t1.id
|
||||
from
|
||||
|
Reference in New Issue
Block a user