summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2019-10-29 13:11:34 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2019-10-30 10:14:56 +0200
commit36a969437845ce9f47a9e6d91514ddc7e00ca83a (patch)
tree847bffee755a4017242e5ca576b78c5fc3d2018d /storage/innobase
parent44b0c8697135be4139c4431bbf02fbf4433e058f (diff)
downloadmariadb-git-36a969437845ce9f47a9e6d91514ddc7e00ca83a.tar.gz
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.
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/row/row0upd.cc14
1 files changed, 12 insertions, 2 deletions
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;
}