mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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.
This commit is contained in:
parent
2dbce3d089
commit
fef08da3e7
2 changed files with 16 additions and 16 deletions
|
@ -1936,22 +1936,22 @@ event_object_table trigger_name
|
|||
#
|
||||
# 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
|
||||
SELECT column_name FROM v1
|
||||
WHERE (TABLE_SCHEMA = "osm") AND (TABLE_NAME = "test");
|
||||
select column_name from v1
|
||||
where (table_schema = "osm") and (table_name = "test");
|
||||
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:
|
||||
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
|
||||
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');
|
||||
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');
|
||||
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:
|
||||
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;
|
||||
#
|
||||
# Clean-up.
|
||||
|
|
|
@ -1794,16 +1794,16 @@ disconnect con12828477_3;
|
|||
--echo # MDEV-3818: Query against view over IS tables worse than equivalent query without view
|
||||
--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
|
||||
SELECT column_name FROM v1
|
||||
WHERE (TABLE_SCHEMA = "osm") AND (TABLE_NAME = "test");
|
||||
select column_name from v1
|
||||
where (table_schema = "osm") and (table_name = "test");
|
||||
|
||||
explain extended
|
||||
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');
|
||||
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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue