mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
[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
This commit is contained in:
parent
d72a5a4240
commit
caaa06c1c8
1 changed files with 5 additions and 1 deletions
|
@ -3896,7 +3896,7 @@ int ha_tokudb::write_row(uchar * record) {
|
|||
}
|
||||
}
|
||||
|
||||
txn = create_sub_trans ? sub_trans : transaction;
|
||||
txn = create_sub_trans ? sub_trans : transaction;
|
||||
|
||||
if (tokudb_debug & TOKUDB_DEBUG_CHECK_KEY) {
|
||||
test_row_packing(record,&prim_key,&row);
|
||||
|
@ -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 @@ cleanup:
|
|||
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 \
|
||||
|
|
Loading…
Reference in a new issue