BUG#12427262 : 60961: SHOW TABLES VERY SLOW WHEN NOT IN SYSTEM DISK CACHE
Reason: This is a regression happened because of changes done in code refactoring in 5.1 from 5.0. Issue: While doing "Show tables" lex->verbose was being checked to avoid opening FRM files to get table type. In case of "Show full table", lex->verbose is true to indicate table type is required. In 5.0, this check was present which got missing in >=5.5. Fix: Added the required check to avoid opening FRM files unnecessarily in case of "Show tables".
This commit is contained in:
parent
adb352ca3e
commit
5203d9bb98
@ -3198,7 +3198,11 @@ end:
|
||||
|
||||
static int fill_schema_table_names(THD *thd, TABLE *table,
|
||||
LEX_STRING *db_name, LEX_STRING *table_name,
|
||||
bool with_i_schema)
|
||||
bool with_i_schema,
|
||||
bool need_table_type)
|
||||
{
|
||||
/* Avoid opening FRM files if table type is not needed. */
|
||||
if (need_table_type)
|
||||
{
|
||||
if (with_i_schema)
|
||||
{
|
||||
@ -3233,6 +3237,7 @@ static int fill_schema_table_names(THD *thd, TABLE *table,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (schema_table_store_record(thd, table))
|
||||
return 1;
|
||||
return 0;
|
||||
@ -3551,7 +3556,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
if (schema_table_idx == SCH_TABLE_NAMES)
|
||||
{
|
||||
if (fill_schema_table_names(thd, tables->table, db_name,
|
||||
table_name, with_i_schema))
|
||||
table_name, with_i_schema,
|
||||
lex->verbose))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user