diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-07-23 18:23:54 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-07-23 18:34:06 +0300 |
commit | 9d1f3bf2e9425db8e352ee80e7b456dd6ef73fcb (patch) | |
tree | 9cd8811b3e03bee09776e8adb878d1f8ee348877 | |
parent | c5ba13dda0464b1316bfb45efbcdcc924817f0de (diff) | |
download | mariadb-git-9d1f3bf2e9425db8e352ee80e7b456dd6ef73fcb.tar.gz |
row_purge_poss_sec(): Add debug instrumentation
This helped fix MDEV-16779.
-rw-r--r-- | storage/innobase/row/row0purge.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index cc2dcc9b798..7e7dd794f1b 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -323,6 +323,8 @@ row_purge_poss_sec( if (store_cur) { row_purge_store_vsec_cur(node, index, sec_pcur, sec_mtr); + ut_ad(sec_mtr->has_committed() + == node->vcol_info.is_requested()); /* The PRIMARY KEY value was not found in the clustered index. The secondary index record found. We can purge @@ -346,7 +348,15 @@ retry_purge_sec: if (node->vcol_info.is_first_fetch()) { ut_ad(store_cur); - if (node->vcol_info.table()) { + const TABLE* t= node->vcol_info.table(); + DBUG_LOG("purge", "retry " << t + << (is_tree ? " tree" : " leaf") + << index->name << "," << index->table->name + << ": " << rec_printer(entry).str()); + + ut_ad(mtr.has_committed()); + + if (t) { node->vcol_info.set_used(); goto retry_purge_sec; } @@ -360,9 +370,11 @@ retry_purge_sec: if (node->found_clust) { btr_pcur_commit_specify_mtr(&node->pcur, &mtr); } else { - mtr_commit(&mtr); + mtr.commit(); } + ut_ad(mtr.has_committed()); + if (store_cur && !row_purge_restore_vsec_cur( node, index, sec_pcur, sec_mtr, is_tree)) { return false; |