diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-04-23 19:52:39 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-04-23 19:52:39 +0200 |
commit | e1b22ab9a1f0acfaec4cf3077b94e49fbadf2684 (patch) | |
tree | 4df0e681dd853cab2c9d1f90010406767d39bc2b /sql/sql_table.cc | |
parent | f8b219ee296f58358d66c443dc89adfa6b718bda (diff) | |
download | mariadb-git-e1b22ab9a1f0acfaec4cf3077b94e49fbadf2684.tar.gz |
Bug#33146 CHECKSUM TABLE is not interruptable by KILL
QUERY statement
Commit 55629 applied to 5.0-bugteam and 5.1-bugteam:
Check for thd->killed in CHECKSUM loop.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index eec6ad626f0..08ea093f2c8 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4376,6 +4376,16 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, HA_CHECK_OPT *check_opt) { for (;;) { + if (thd->killed) + { + /* + we've been killed; let handler clean up, and remove the + partial current row from the recordset (embedded lib) + */ + t->file->ha_rnd_end(); + thd->protocol->remove_last_row(); + goto err; + } ha_checksum row_crc= 0; int error= t->file->rnd_next(t->record[0]); if (unlikely(error)) |