Commit dbb3960a authored by Marko Mäkelä's avatar Marko Mäkelä

Follow-up to MDEV-11236/MDEV-14846 debug assertion

ha_innobase::unlock_row(): Use a relaxed version of the
trx_state_eq() debug assertion, because rr_unlock_row()
may be invoked after an error has been already reported
and the transaction has been rolled back.
parent 723f87e9
...@@ -9040,7 +9040,7 @@ ha_innobase::unlock_row(void) ...@@ -9040,7 +9040,7 @@ ha_innobase::unlock_row(void)
But there are some calls to this function from the SQL layer when the But there are some calls to this function from the SQL layer when the
transaction is in state TRX_STATE_NOT_STARTED. The check on transaction is in state TRX_STATE_NOT_STARTED. The check on
prebuilt->select_lock_type above gets around this issue. */ prebuilt->select_lock_type above gets around this issue. */
ut_ad(trx_state_eq(prebuilt->trx, TRX_STATE_ACTIVE)); ut_ad(trx_state_eq(prebuilt->trx, TRX_STATE_ACTIVE, true));
switch (prebuilt->row_read_type) { switch (prebuilt->row_read_type) {
case ROW_READ_WITH_LOCKS: case ROW_READ_WITH_LOCKS:
......
...@@ -9616,7 +9616,7 @@ ha_innobase::unlock_row(void) ...@@ -9616,7 +9616,7 @@ ha_innobase::unlock_row(void)
But there are some calls to this function from the SQL layer when the But there are some calls to this function from the SQL layer when the
transaction is in state TRX_STATE_NOT_STARTED. The check on transaction is in state TRX_STATE_NOT_STARTED. The check on
prebuilt->select_lock_type above gets around this issue. */ prebuilt->select_lock_type above gets around this issue. */
ut_ad(trx_state_eq(prebuilt->trx, TRX_STATE_ACTIVE)); ut_ad(trx_state_eq(prebuilt->trx, TRX_STATE_ACTIVE, true));
switch (prebuilt->row_read_type) { switch (prebuilt->row_read_type) {
case ROW_READ_WITH_LOCKS: case ROW_READ_WITH_LOCKS:
......
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