[Commits] Rev 3002: Make copy from heap to MyISAM / Aria killable. in lp:maria/5.1

Michael Widenius monty at askmonty.org
Wed Jan 5 14:50:08 EET 2011


At lp:maria/5.1

------------------------------------------------------------
revno: 3002
revision-id: monty at askmonty.org-20110105125008-9lxxtgqua5x45v01
parent: monty at askmonty.org-20110104220905-8fy72l3ythyhkvp7
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.1
timestamp: Wed 2011-01-05 14:50:08 +0200
message:
  Make copy from heap to MyISAM / Aria killable.
  Fixes LP#695006 converting HEAP to Aria" status do not respond to KILL QUERY
-------------- next part --------------
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-11-25 11:19:01 +0000
+++ b/sql/sql_select.cc	2011-01-05 12:50:08 +0000
@@ -11210,6 +11210,11 @@ create_internal_tmp_table_from_heap2(THD
     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
  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:



More information about the commits mailing list