diff options
Diffstat (limited to 'mysql-test/r/information_schema.result')
-rw-r--r-- | mysql-test/r/information_schema.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 790198ddb44..a30fe668490 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1940,6 +1940,26 @@ event_object_table trigger_name # Switching to connection 'default'. # # +# 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; +explain extended +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 +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')) +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'); +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 +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')) +drop view v1; +# # Clean-up. drop database mysqltest; # |