Commit 86f568fb authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:3171], make fix after CR with Rich

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@27088 c7de825b-a66e-492c-adef-691d508d4ae1
parent b14d398f
...@@ -6855,12 +6855,12 @@ cleanup: ...@@ -6855,12 +6855,12 @@ cleanup:
if (txn) { if (txn) {
if (error) { if (error) {
// //
// need to restore num_DBs // need to restore num_DBs, and we have to do it before we close the dictionaries
// so that there is not a window
// //
if (incremented_numDBs) { if (incremented_numDBs) {
rw_wrlock(&share->num_DBs_lock); rw_wrlock(&share->num_DBs_lock);
share->num_DBs--; share->num_DBs--;
rw_unlock(&share->num_DBs_lock);
} }
curr_index = curr_num_DBs; curr_index = curr_num_DBs;
for (uint i = 0; i < num_of_keys; i++, curr_index++) { for (uint i = 0; i < num_of_keys; i++, curr_index++) {
...@@ -6874,6 +6874,9 @@ cleanup: ...@@ -6874,6 +6874,9 @@ cleanup:
} }
} }
abort_txn(txn); abort_txn(txn);
if (incremented_numDBs) {
rw_unlock(&share->num_DBs_lock);
}
} }
else { else {
commit_txn(txn,0); commit_txn(txn,0);
......
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