mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
Closes #1868 A parent can prelock a table, and then the child, or vice versa without crashing.
This does not add any performance optimizations git-svn-id: file:///svn/toku/tokudb@13337 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
bf03fe85e1
commit
2e7835e6b5
1 changed files with 2 additions and 1 deletions
|
@ -4881,7 +4881,8 @@ int
|
||||||
toku_brt_note_table_lock (BRT brt, TOKUTXN txn)
|
toku_brt_note_table_lock (BRT brt, TOKUTXN txn)
|
||||||
{
|
{
|
||||||
if (brt->h->txnid_that_created_or_locked_when_empty != toku_txn_get_txnid(txn) &&
|
if (brt->h->txnid_that_created_or_locked_when_empty != toku_txn_get_txnid(txn) &&
|
||||||
brt_is_empty(brt, toku_txn_logger(txn))) {
|
brt_is_empty(brt, toku_txn_logger(txn)) &&
|
||||||
|
brt->h->txnid_that_created_or_locked_when_empty == 0) {
|
||||||
assert(brt->h->txnid_that_created_or_locked_when_empty == 0);
|
assert(brt->h->txnid_that_created_or_locked_when_empty == 0);
|
||||||
brt->h->txnid_that_created_or_locked_when_empty = toku_txn_get_txnid(txn);
|
brt->h->txnid_that_created_or_locked_when_empty = toku_txn_get_txnid(txn);
|
||||||
int r = toku_txn_note_brt(txn, brt);
|
int r = toku_txn_note_brt(txn, brt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue