mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug #5500: EXPLAIN returned a wrong select_type for queries using views.
Select_type in the EXPLAIN output for the query SELECT * FROM t1 was 'SIMPLE', while for the query SELECT * FROM v1, where the view v1 was defined as SELECT * FROM t1, the EXPLAIN output contained 'PRIMARY' for the select_type column. mysql-test/r/group_by.result: Adjusted results after the fix for bug #5500. mysql-test/r/information_schema.result: Adjusted results after the fix for bug #5500. mysql-test/r/olap.result: Adjusted results after the fix for bug #5500. mysql-test/r/range.result: Adjusted results after the fix for bug #5500. mysql-test/r/view.result: Added a test case for bug #5500. Adjusted other results. mysql-test/r/view_grant.result: Adjusted results after the fix for bug #5500. mysql-test/t/view.test: Added a test case for bug #5500.
This commit is contained in:
@ -750,13 +750,13 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
EXPLAIN SELECT a,b FROM t1 WHERE a < 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
EXPLAIN SELECT a,b FROM v1 WHERE a < 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
SELECT a,b FROM t1 WHERE a < 2 and b=3;
|
||||
a b
|
||||
1 3
|
||||
@ -799,13 +799,13 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
explain select * from v1 where a in (3,4) and b in (1,2,3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
explain select * from v1 where a between 3 and 4 and b between 1 and 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create table t3 (a int);
|
||||
|
Reference in New Issue
Block a user