1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

(Part#2) MDEV-13049 Querying INFORMATION_SCHEMA becomes slow in MariaDB 10.1

This is a 10.3 specific part of MDEV-13049.
It disables automatic sorting for
"SELECT .. FROM INFORMATION_SCHEMA.{SCHEMATA|TABLES}"
and adjusts the affected tests accordingly.
This commit is contained in:
Alexander Barkov
2017-10-31 13:00:20 +04:00
parent 835cbbcc7b
commit 5d3ed9acdd
64 changed files with 380 additions and 226 deletions

View File

@ -2,7 +2,7 @@ install soname 'ha_blackhole';
install soname 'ha_archive';
create table t1 (a int) engine=blackhole;
create table t2 (a int) engine=archive;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
table_catalog def
table_schema test
table_name t1
@ -12,6 +12,7 @@ row_format Fixed
table_rows 0
data_length 0
table_comment
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
table_catalog def
table_schema test
table_name t2
@ -24,7 +25,7 @@ table_comment
flush tables;
uninstall plugin blackhole;
uninstall plugin archive;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
table_catalog def
table_schema test
table_name t1
@ -34,6 +35,11 @@ row_format NULL
table_rows NULL
data_length NULL
table_comment Unknown storage engine 'BLACKHOLE'
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'BLACKHOLE'
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
table_catalog def
table_schema test
table_name t2
@ -46,9 +52,6 @@ table_comment Unknown storage engine 'ARCHIVE'
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'BLACKHOLE'
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
Phase 1/7: Checking and upgrading mysql database
Processing databases
@ -109,7 +112,7 @@ Error : Unknown storage engine 'ARCHIVE'
error : Corrupt
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
table_catalog def
table_schema test
table_name t1
@ -119,6 +122,11 @@ row_format NULL
table_rows NULL
data_length NULL
table_comment Unknown storage engine 'BLACKHOLE'
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'BLACKHOLE'
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
table_catalog def
table_schema test
table_name t2
@ -131,9 +139,6 @@ table_comment Unknown storage engine 'ARCHIVE'
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'BLACKHOLE'
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
alter table mysql.user drop column default_role, drop column max_statement_time;
Phase 1/7: Checking and upgrading mysql database
@ -195,7 +200,7 @@ Error : Unknown storage engine 'ARCHIVE'
error : Corrupt
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
table_catalog def
table_schema test
table_name t1
@ -205,6 +210,11 @@ row_format NULL
table_rows NULL
data_length NULL
table_comment Unknown storage engine 'BLACKHOLE'
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'BLACKHOLE'
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
table_catalog def
table_schema test
table_name t2
@ -217,9 +227,6 @@ table_comment Unknown storage engine 'ARCHIVE'
Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'BLACKHOLE'
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
alter table mysql.user drop column default_role, drop column max_statement_time;
Phase 1/7: Checking and upgrading mysql database
@ -256,8 +263,8 @@ mysql.user OK
Upgrading from a version before MariaDB-10.1
Phase 2/7: Installing used storage engines
Checking for tables with unknown storage engine
installing plugin for 'blackhole' storage engine
installing plugin for 'archive' storage engine
installing plugin for 'blackhole' storage engine
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
@ -273,7 +280,7 @@ test.t1 OK
test.t2 OK
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
table_catalog def
table_schema test
table_name t1
@ -283,6 +290,7 @@ row_format Fixed
table_rows 0
data_length 0
table_comment
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
table_catalog def
table_schema test
table_name t2