From dbb3960ad8d92f3cc17527440b059bf80bf83120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 15 Mar 2018 19:48:29 +0200 Subject: [PATCH] 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. --- storage/innobase/handler/ha_innodb.cc | 2 +- storage/xtradb/handler/ha_innodb.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 521ac005437..9c3b04b2a67 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -9040,7 +9040,7 @@ ha_innobase::unlock_row(void) 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 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) { case ROW_READ_WITH_LOCKS: diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index d0a98eda0de..347b235b049 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -9616,7 +9616,7 @@ ha_innobase::unlock_row(void) 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 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) { case ROW_READ_WITH_LOCKS: