diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-03-20 17:25:49 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-03-23 15:33:53 +0400 |
commit | ca291015bcb900bcfe3fb1418ba6a345d3cea2fd (patch) | |
tree | c393a30cbea08479a56b0c23f625cdba94fc9dbe /sql/sql_show.cc | |
parent | 4092f90655626aa36d3f9952d0287afdc1ceeef1 (diff) | |
download | mariadb-git-ca291015bcb900bcfe3fb1418ba6a345d3cea2fd.tar.gz |
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.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 5a78a27a907..c152efdc082 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3483,6 +3483,13 @@ extern ST_SCHEMA_TABLE schema_tables[]; bool schema_table_store_record(THD *thd, TABLE *table) { int error; + + if (thd->killed) + { + thd->send_kill_message(); + return 1; + } + if ((error= table->file->ha_write_tmp_row(table->record[0]))) { TMP_TABLE_PARAM *param= table->pos_in_table_list->schema_table_param; |