mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
#250 reset thd proc info in end_bulk_insert to fix invalid proc info pointer inside of a deleted ha_tokudb object
This commit is contained in:
parent
f16b3122ab
commit
eb00a1221e
2 changed files with 3 additions and 5 deletions
|
@ -3382,6 +3382,7 @@ cleanup:
|
|||
}
|
||||
}
|
||||
trx->stmt_progress.using_loader = false;
|
||||
thd_proc_info(thd, 0);
|
||||
TOKUDB_HANDLER_DBUG_RETURN(error ? error : loader_error);
|
||||
}
|
||||
|
||||
|
|
|
@ -210,11 +210,10 @@ static int hot_poll_fun(void *extra, float progress) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
volatile int ha_tokudb_optimize_wait;
|
||||
|
||||
// flatten all DB's in this table, to do so, peform hot optimize on each db
|
||||
int ha_tokudb::do_optimize(THD *thd) {
|
||||
TOKUDB_HANDLER_DBUG_ENTER("%s", share->table_name);
|
||||
const char *orig_proc_info = tokudb_thd_get_proc_info(thd);
|
||||
int error;
|
||||
uint curr_num_DBs = table->s->keys + tokudb_test(hidden_primary_key);
|
||||
|
||||
|
@ -247,23 +246,21 @@ int ha_tokudb::do_optimize(THD *thd) {
|
|||
error = 0;
|
||||
|
||||
cleanup:
|
||||
while (ha_tokudb_optimize_wait) sleep(1);
|
||||
#ifdef HA_TOKUDB_HAS_THD_PROGRESS
|
||||
thd_progress_end(thd);
|
||||
#endif
|
||||
thd_proc_info(thd, orig_proc_info);
|
||||
TOKUDB_HANDLER_DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
int ha_tokudb::optimize(THD *thd, HA_CHECK_OPT *check_opt) {
|
||||
TOKUDB_HANDLER_DBUG_ENTER("%s", share->table_name);
|
||||
const char *orig_proc_info = tokudb_thd_get_proc_info(thd);
|
||||
int error;
|
||||
#if TOKU_OPTIMIZE_WITH_RECREATE
|
||||
error = HA_ADMIN_TRY_ALTER;
|
||||
#else
|
||||
error = do_optimize(thd);
|
||||
#endif
|
||||
thd_proc_info(thd, orig_proc_info);
|
||||
TOKUDB_HANDLER_DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue