mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#38918 selecting from information_schema.columns is disproportionately slow
The problem: table_open_method is not calculated properly if '*' is used in 'select' The fix: added table_open_method calculation for such case mysql-test/r/information_schema.result: test result mysql-test/t/information_schema.test: test case sql/sql_show.cc: The problem: table_open_method is not calculated properly if '*' is used in 'select' The fix: added table_open_method calculation for such case
This commit is contained in:
@ -1646,4 +1646,13 @@ drop table t1;
|
||||
drop function f1;
|
||||
select * from information_schema.tables where 1=sleep(100000);
|
||||
select * from information_schema.columns where 1=sleep(100000);
|
||||
explain select count(*) from information_schema.tables;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE tables ALL NULL NULL NULL NULL NULL Skip_open_table; Scanned all databases
|
||||
explain select count(*) from information_schema.columns;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE columns ALL NULL NULL NULL NULL NULL Open_frm_only; Scanned all databases
|
||||
explain select count(*) from information_schema.views;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE views ALL NULL NULL NULL NULL NULL Open_frm_only; Scanned all databases
|
||||
End of 5.1 tests.
|
||||
|
@ -1338,4 +1338,12 @@ where state='User sleep' and
|
||||
info='select * from information_schema.columns where 1=sleep(100000)';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
||||
#
|
||||
# Bug#38918 selecting from information_schema.columns is disproportionately slow
|
||||
#
|
||||
explain select count(*) from information_schema.tables;
|
||||
explain select count(*) from information_schema.columns;
|
||||
explain select count(*) from information_schema.views;
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
Reference in New Issue
Block a user