1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fixing EXPLAIN select types

This commit is contained in:
unknown
2002-10-03 18:47:04 +03:00
parent c9a2b58986
commit f094b6af4c
25 changed files with 189 additions and 187 deletions

View File

@ -86,29 +86,29 @@ a b
1 a
explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 FIRST t1 ALL NULL NULL NULL NULL 4
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
2 UNION t2 ALL NULL NULL NULL NULL 4 Using filesort
select found_rows();
FOUND_ROWS()
0
explain select a,b from t1 union all select a,b from t2;
id select_type table type possible_keys key key_len ref rows Extra
1 FIRST t1 ALL NULL NULL NULL NULL 4
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
2 UNION t2 ALL NULL NULL NULL NULL 4
explain select xx from t1 union select 1;
Unknown column 'xx' in 'field list'
explain select a,b from t1 union select 1;
id select_type table type possible_keys key key_len ref rows Extra
1 FIRST t1 ALL NULL NULL NULL NULL 4
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
2 UNION No tables used
explain select 1 union select a,b from t1 union select 1;
id select_type table type possible_keys key key_len ref rows Extra
1 FIRST No tables used
1 PRIMARY No tables used
2 UNION t1 ALL NULL NULL NULL NULL 4
3 UNION No tables used
explain select a,b from t1 union select 1 limit 0;
id select_type table type possible_keys key key_len ref rows Extra
1 FIRST Impossible WHERE
1 PRIMARY Impossible WHERE
2 UNION Impossible WHERE
select a,b from t1 into outfile 'skr' union select a,b from t2;
Wrong usage of UNION and INTO