Commit c6cdbe2c authored by Michael Widenius's avatar Michael Widenius

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.
parent 308e11b8
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment