Commit 20b52e66 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4920], in ha_tokudb.cc, protect indexer->close and indexer->abort with shanre->num_DBs_lock

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@44159 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2a9c58c2
......@@ -7484,7 +7484,9 @@ int ha_tokudb::tokudb_add_index(
error = indexer->build(indexer);
if (error) { goto cleanup; }
rw_wrlock(&share->num_DBs_lock);
error = indexer->close(indexer);
rw_unlock(&share->num_DBs_lock);
if (error) { goto cleanup; }
indexer = NULL;
}
......@@ -7660,7 +7662,9 @@ int ha_tokudb::tokudb_add_index(
if (indexer != NULL) {
sprintf(status_msg, "aborting creation of indexes.");
thd_proc_info(thd, status_msg);
rw_wrlock(&share->num_DBs_lock);
indexer->abort(indexer);
rw_unlock(&share->num_DBs_lock);
}
if (error == DB_LOCK_NOTGRANTED && ((tokudb_debug & TOKUDB_DEBUG_HIDE_DDL_LOCK_ERRORS) == 0)) {
sql_print_error("Could not add indexes to table %s because \
......
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