Skip to content

Commit ca29101

Browse files
committed
MDEV-10269 - Killed queries from I_S stay in 'Killed' state for long
time and don't let server shut down Queries from I_S in "Filling schema table" state didn't check killed flag. For large tables this phase may take a while to complete. Fixed by adding thd->killed flag check for each processed row.
1 parent 4092f90 commit ca29101

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sql/sql_show.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3483,6 +3483,13 @@ extern ST_SCHEMA_TABLE schema_tables[];
34833483
bool schema_table_store_record(THD *thd, TABLE *table)
34843484
{
34853485
int error;
3486+
3487+
if (thd->killed)
3488+
{
3489+
thd->send_kill_message();
3490+
return 1;
3491+
}
3492+
34863493
if ((error= table->file->ha_write_tmp_row(table->record[0])))
34873494
{
34883495
TMP_TABLE_PARAM *param= table->pos_in_table_list->schema_table_param;

0 commit comments

Comments
 (0)