From 711b36732b6913c189e1075441c7c9bd8ef529da Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 5 Jan 2011 14:50:08 +0200 Subject: [PATCH] Make copy from heap to MyISAM / Aria killable. Fixes LP#695006 converting HEAP to Aria" status do not respond to KILL QUERY sql/sql_select.cc: Make copy from heap to MyISAM / Aria killable. --- sql/sql_select.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 60bfa0dfcd6..98ebef5bb9c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11210,6 +11210,11 @@ create_internal_tmp_table_from_heap2(THD *thd, TABLE *table, DBUG_EXECUTE_IF("raise_error", write_err= HA_ERR_FOUND_DUPP_KEY ;); if (write_err) goto err; + if (thd->killed) + { + thd->send_kill_message(); + goto err_killed; + } } /* copy row that filled HEAP table */ if ((write_err=new_table.file->ha_write_row(table->record[0]))) @@ -11240,6 +11245,7 @@ create_internal_tmp_table_from_heap2(THD *thd, TABLE *table, err: DBUG_PRINT("error",("Got error: %d",write_err)); table->file->print_error(write_err, MYF(0)); +err_killed: (void) table->file->ha_rnd_end(); (void) new_table.file->close(); err1: