Commit 5bdaa5d7 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2722], have end_bulk_insert call loader->abort if thread has been killed

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@21050 c7de825b-a66e-492c-adef-691d508d4ae1
parent eb1bdcb9
...@@ -2902,6 +2902,7 @@ void ha_tokudb::start_bulk_insert(ha_rows rows) { ...@@ -2902,6 +2902,7 @@ void ha_tokudb::start_bulk_insert(ha_rows rows) {
int ha_tokudb::end_bulk_insert() { int ha_tokudb::end_bulk_insert() {
TOKUDB_DBUG_ENTER("ha_tokudb::end_bulk_insert"); TOKUDB_DBUG_ENTER("ha_tokudb::end_bulk_insert");
int error = 0; int error = 0;
THD* thd = ha_thd();
if (ai_metadata_update_required) { if (ai_metadata_update_required) {
pthread_mutex_lock(&share->mutex); pthread_mutex_lock(&share->mutex);
error = update_max_auto_inc(share->status_block, share->last_auto_increment); error = update_max_auto_inc(share->status_block, share->last_auto_increment);
...@@ -2912,7 +2913,7 @@ int ha_tokudb::end_bulk_insert() { ...@@ -2912,7 +2913,7 @@ int ha_tokudb::end_bulk_insert() {
ai_metadata_update_required = false; ai_metadata_update_required = false;
loader_error = 0; loader_error = 0;
if (loader) { if (loader) {
if (!abort_loader) { if (!abort_loader && !thd->killed) {
error = loader->close(loader); error = loader->close(loader);
loader = NULL; loader = NULL;
if (error) { goto cleanup; } if (error) { goto cleanup; }
......
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