Commit c5f5f7a6 authored by marko's avatar marko

branches/innodb+: ibuf_insert_low(): Do not call

page_update_max_trx_id() when buffering op == IBUF_OP_DELETE.  This
addresses Issue #319, an assertion failure because trx_id is zero in
page_update_max_trx_id() when attempting to buffer a purge operation.
(This was a harmless debug assertion failure, because
page_update_max_trx_id() would never update to zero.)

For the purge transaction, trx->id is always zero.  The purge
transaction is the only caller of IBUF_OP_DELETE, and PAGE_MAX_TRX_ID
is really about existing records.  Therefore, there is no need to
update the PAGE_MAX_TRX_ID when purging records.
parent 37312683
No related merge requests found
......@@ -3467,7 +3467,7 @@ bitmap_fail:
err = btr_cur_optimistic_insert(BTR_NO_LOCKING_FLAG, cursor,
ibuf_entry, &ins_rec,
&dummy_big_rec, 0, thr, &mtr);
if (err == DB_SUCCESS) {
if (err == DB_SUCCESS && op != IBUF_OP_DELETE) {
/* Update the page max trx id field */
page_update_max_trx_id(btr_cur_get_block(cursor), NULL,
thr_get_trx(thr)->id, &mtr);
......@@ -3487,7 +3487,7 @@ bitmap_fail:
cursor,
ibuf_entry, &ins_rec,
&dummy_big_rec, 0, thr, &mtr);
if (err == DB_SUCCESS) {
if (err == DB_SUCCESS && op != IBUF_OP_DELETE) {
/* Update the page max trx id field */
page_update_max_trx_id(btr_cur_get_block(cursor), NULL,
thr_get_trx(thr)->id, &mtr);
......
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