Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.28
-
None
-
None
-
Linux x64
Description
A view which access an information schema table seems to use another plan, than the query in its extend explain output (it scan's all databases)
CREATE VIEW v1 AS SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS;
explain extended select column_name FROM v1 WHERE TABLE_SCHEMA="osm" AND TABLE_NAME="test";
extra: Using where; Open_frm_only; Scanned all databases
show warnings;
..
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 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'));
extra: Using where; Open_frm_only; Scanned 0 databases