diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 7e9e6100c6e..24682fe40d6 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -533,7 +533,7 @@ typedef struct index_read_info { static int ai_poll_fun(void *extra, float progress) { LOADER_CONTEXT context = (LOADER_CONTEXT)extra; - if (thd_killed(context->thd)) { + if (thd_kill_level(context->thd)) { sprintf(context->write_status_msg, "The process has been killed, aborting add index."); return ER_ABORTING_CONNECTION; } @@ -548,7 +548,7 @@ static int ai_poll_fun(void *extra, float progress) { static int loader_poll_fun(void *extra, float progress) { LOADER_CONTEXT context = (LOADER_CONTEXT)extra; - if (thd_killed(context->thd)) { + if (thd_kill_level(context->thd)) { sprintf(context->write_status_msg, "The process has been killed, aborting bulk load."); return ER_ABORTING_CONNECTION; } @@ -3435,7 +3435,7 @@ int ha_tokudb::end_bulk_insert(bool abort) { ai_metadata_update_required = false; loader_error = 0; if (loader) { - if (!abort_loader && !thd_killed(thd)) { + if (!abort_loader && !thd_kill_level(thd)) { DBUG_EXECUTE_IF("tokudb_end_bulk_insert_sleep", { const char *orig_proc_info = tokudb_thd_get_proc_info(thd); thd_proc_info(thd, "DBUG sleep"); @@ -3445,7 +3445,7 @@ int ha_tokudb::end_bulk_insert(bool abort) { error = loader->close(loader); loader = NULL; if (error) { - if (thd_killed(thd)) { + if (thd_kill_level(thd)) { my_error(ER_QUERY_INTERRUPTED, MYF(0)); } goto cleanup; @@ -3580,7 +3580,7 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in share->row_count(), key_info->name); thd_proc_info(thd, status_msg); - if (thd_killed(thd)) { + if (thd_kill_level(thd)) { my_error(ER_QUERY_INTERRUPTED, MYF(0)); error = ER_QUERY_INTERRUPTED; goto cleanup; @@ -5245,7 +5245,7 @@ int ha_tokudb::fill_range_query_buf( // otherwise, if we simply see that the current key is no match, // we tell the cursor to continue and don't store // the key locally - if (result == ICP_OUT_OF_RANGE || thd_killed(thd)) { + if (result == ICP_OUT_OF_RANGE || thd_kill_level(thd)) { icp_went_out_of_range = true; error = 0; DEBUG_SYNC(ha_thd(), "tokudb_icp_asc_scan_out_of_range"); @@ -5613,7 +5613,7 @@ int ha_tokudb::get_next( static_cast(thd_get_ha_data(thd, tokudb_hton)); trx->stmt_progress.queried++; track_progress(thd); - if (thd_killed(thd)) + if (thd_kill_level(thd)) error = ER_ABORTING_CONNECTION; } cleanup: @@ -8351,7 +8351,7 @@ int ha_tokudb::tokudb_add_index( (long long unsigned)share->row_count()); #endif - if (thd_killed(thd)) { + if (thd_kill_level(thd)) { error = ER_ABORTING_CONNECTION; goto cleanup; } diff --git a/storage/tokudb/ha_tokudb_admin.cc b/storage/tokudb/ha_tokudb_admin.cc index 6d8e7173c8d..e1443101bb6 100644 --- a/storage/tokudb/ha_tokudb_admin.cc +++ b/storage/tokudb/ha_tokudb_admin.cc @@ -225,7 +225,7 @@ int recount_rows_t::analyze_recount_rows_progress( _ticks = 0; uint64_t now = tokudb::time::microsec(); _total_elapsed_time = now - _recount_start; - if ((_thd && thd_killed(_thd)) || cancelled()) { + if ((_thd && thd_kill_level(_thd)) || cancelled()) { // client killed return ER_ABORTING_CONNECTION; } @@ -540,7 +540,7 @@ int standard_t::analyze_key_progress(void) { uint64_t now = tokudb::time::microsec(); _total_elapsed_time = now - _analyze_start; _key_elapsed_time = now - _analyze_key_start; - if ((_thd && thd_killed(_thd)) || cancelled()) { + if ((_thd && thd_kill_level(_thd)) || cancelled()) { // client killed return ER_ABORTING_CONNECTION; } else if (_time_limit > 0 && @@ -876,7 +876,7 @@ typedef struct hot_optimize_context { static int hot_optimize_progress_fun(void *extra, float progress) { HOT_OPTIMIZE_CONTEXT context = (HOT_OPTIMIZE_CONTEXT)extra; - if (thd_killed(context->thd)) { + if (thd_kill_level(context->thd)) { sprintf( context->write_status_msg, "The process has been killed, aborting hot optimize."); @@ -1003,7 +1003,7 @@ struct check_context { static int ha_tokudb_check_progress(void* extra, float progress) { struct check_context* context = (struct check_context*)extra; int result = 0; - if (thd_killed(context->thd)) + if (thd_kill_level(context->thd)) result = ER_ABORTING_CONNECTION; return result; } diff --git a/storage/tokudb/hatoku_hton.h b/storage/tokudb/hatoku_hton.h index ade7be128a5..d126ff4339f 100644 --- a/storage/tokudb/hatoku_hton.h +++ b/storage/tokudb/hatoku_hton.h @@ -172,12 +172,12 @@ inline uint64_t tokudb_get_killed_time_callback(uint64_t default_killed_time) { inline int tokudb_killed_callback(void) { THD *thd = current_thd; - return thd_killed(thd); + return thd_kill_level(thd); } inline bool tokudb_killed_thd_callback(void *extra, uint64_t deleted_rows) { THD *thd = static_cast(extra); - return thd_killed(thd) != 0; + return thd_kill_level(thd) != 0; } diff --git a/storage/tokudb/tokudb_information_schema.cc b/storage/tokudb/tokudb_information_schema.cc index 86af3f14f91..2b4128cc03a 100644 --- a/storage/tokudb/tokudb_information_schema.cc +++ b/storage/tokudb/tokudb_information_schema.cc @@ -87,7 +87,7 @@ int trx_callback( uint64_t tnow = (uint64_t) ::time(NULL); table->field[2]->store(tnow >= start_time ? tnow - start_time : 0, false); int error = schema_table_store_record(thd, table); - if (!error && thd_killed(thd)) + if (!error && thd_kill_level(thd)) error = ER_QUERY_INTERRUPTED; return error; } @@ -221,7 +221,7 @@ int lock_waits_callback( int error = schema_table_store_record(thd, table); - if (!error && thd_killed(thd)) + if (!error && thd_kill_level(thd)) error = ER_QUERY_INTERRUPTED; return error; @@ -365,7 +365,7 @@ int locks_callback( error = schema_table_store_record(thd, table); - if (!error && thd_killed(thd)) + if (!error && thd_kill_level(thd)) error = ER_QUERY_INTERRUPTED; } return error; @@ -497,7 +497,7 @@ int report_file_map(TABLE* table, THD* thd) { error = schema_table_store_record(thd, table); } - if (!error && thd_killed(thd)) + if (!error && thd_kill_level(thd)) error = ER_QUERY_INTERRUPTED; } if (error == DB_NOTFOUND) { @@ -702,7 +702,7 @@ int report_fractal_tree_info(TABLE* table, THD* thd) { if (error) error = 0; // ignore read uncommitted errors } - if (!error && thd_killed(thd)) + if (!error && thd_kill_level(thd)) error = ER_QUERY_INTERRUPTED; } if (error == DB_NOTFOUND) { @@ -993,7 +993,7 @@ int report_fractal_tree_block_map(TABLE* table, THD* thd) { table, thd); } - if (!error && thd_killed(thd)) + if (!error && thd_kill_level(thd)) error = ER_QUERY_INTERRUPTED; } if (error == DB_NOTFOUND) {