Commit fef08da3 authored by unknown's avatar unknown

MDEV-3818: Query against view over IS tables worse than equivalent query without view

Fixed the test to be lower-case because it fails on windows with mixed case.
parent 2dbce3d0
...@@ -1936,22 +1936,22 @@ event_object_table trigger_name ...@@ -1936,22 +1936,22 @@ event_object_table trigger_name
# #
# MDEV-3818: Query against view over IS tables worse than equivalent query without view # MDEV-3818: Query against view over IS tables worse than equivalent query without view
# #
CREATE VIEW v1 AS SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS; create view v1 as select table_schema, table_name, column_name from information_schema.columns;
explain extended explain extended
SELECT column_name FROM v1 select column_name from v1
WHERE (TABLE_SCHEMA = "osm") AND (TABLE_NAME = "test"); where (table_schema = "osm") and (table_name = "test");
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE COLUMNS ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL NULL Using where; Open_frm_only; Scanned 0 databases 1 SIMPLE columns ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL NULL Using where; Open_frm_only; Scanned 0 databases
Warnings: Warnings:
Note 1003 select `information_schema`.`COLUMNS`.`COLUMN_NAME` AS `COLUMN_NAME` from `INFORMATION_SCHEMA`.`COLUMNS` where ((`information_schema`.`COLUMNS`.`TABLE_SCHEMA` = 'osm') and (`information_schema`.`COLUMNS`.`TABLE_NAME` = 'test')) Note 1003 select `information_schema`.`columns`.`COLUMN_NAME` AS `column_name` from `information_schema`.`columns` where ((`information_schema`.`columns`.`TABLE_SCHEMA` = 'osm') and (`information_schema`.`columns`.`TABLE_NAME` = 'test'))
explain extended explain extended
SELECT INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME AS COLUMN_NAME select information_schema.columns.column_name as column_name
FROM INFORMATION_SCHEMA.COLUMNS from information_schema.columns
WHERE (information_schema.COLUMNS.TABLE_SCHEMA = 'osm') and (information_schema.COLUMNS.TABLE_NAME = 'test'); where (information_schema.columns.table_schema = 'osm') and (information_schema.columns.table_name = 'test');
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE COLUMNS ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL NULL Using where; Open_frm_only; Scanned 0 databases 1 SIMPLE columns ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL NULL Using where; Open_frm_only; Scanned 0 databases
Warnings: Warnings:
Note 1003 select `information_schema`.`COLUMNS`.`COLUMN_NAME` AS `COLUMN_NAME` from `INFORMATION_SCHEMA`.`COLUMNS` where ((`information_schema`.`COLUMNS`.`TABLE_SCHEMA` = 'osm') and (`information_schema`.`COLUMNS`.`TABLE_NAME` = 'test')) Note 1003 select `information_schema`.`columns`.`COLUMN_NAME` AS `column_name` from `information_schema`.`columns` where ((`information_schema`.`columns`.`TABLE_SCHEMA` = 'osm') and (`information_schema`.`columns`.`TABLE_NAME` = 'test'))
drop view v1; drop view v1;
# #
# Clean-up. # Clean-up.
......
...@@ -1794,16 +1794,16 @@ disconnect con12828477_3; ...@@ -1794,16 +1794,16 @@ disconnect con12828477_3;
--echo # MDEV-3818: Query against view over IS tables worse than equivalent query without view --echo # MDEV-3818: Query against view over IS tables worse than equivalent query without view
--echo # --echo #
CREATE VIEW v1 AS SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS; create view v1 as select table_schema, table_name, column_name from information_schema.columns;
explain extended explain extended
SELECT column_name FROM v1 select column_name from v1
WHERE (TABLE_SCHEMA = "osm") AND (TABLE_NAME = "test"); where (table_schema = "osm") and (table_name = "test");
explain extended explain extended
SELECT INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME AS COLUMN_NAME select information_schema.columns.column_name as column_name
FROM INFORMATION_SCHEMA.COLUMNS from information_schema.columns
WHERE (information_schema.COLUMNS.TABLE_SCHEMA = 'osm') and (information_schema.COLUMNS.TABLE_NAME = 'test'); where (information_schema.columns.table_schema = 'osm') and (information_schema.columns.table_name = 'test');
drop view v1; drop view v1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment