From 36a969437845ce9f47a9e6d91514ddc7e00ca83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 29 Oct 2019 13:11:34 +0200 Subject: MDEV-18562 [ERROR] InnoDB: WSREP: referenced FK check fail: Lock wait index Lock wait can happen on secondary index when doing FK checks for wsrep. We should just return error to upper layer and applier will retry operation when needed. --- storage/innobase/row/row0upd.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'storage/innobase/row/row0upd.cc') diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 021e3d69f8a..db4b7b18269 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2472,17 +2472,27 @@ row_upd_sec_index_entry( case DB_NO_REFERENCED_ROW: err = DB_SUCCESS; break; + case DB_LOCK_WAIT: + if (wsrep_debug) { + ib::warn() << "WSREP: sec index FK lock wait" + << " index " << index->name + << " table " << index->table->name + << " query " << wsrep_thd_query(trx->mysql_thd); + } + break; case DB_DEADLOCK: if (wsrep_debug) { ib::warn() << "WSREP: sec index FK check fail for deadlock" << " index " << index->name - << " table " << index->table->name; + << " table " << index->table->name + << " query " << wsrep_thd_query(trx->mysql_thd); } break; default: ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) << " index " << index->name - << " table " << index->table->name; + << " table " << index->table->name + << " query " << wsrep_thd_query(trx->mysql_thd); break; } -- cgit v1.2.1