summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/dict/dict0dict.cc3
-rw-r--r--storage/innobase/row/row0merge.cc3
-rw-r--r--storage/xtradb/dict/dict0dict.cc3
-rw-r--r--storage/xtradb/row/row0merge.cc3
4 files changed, 8 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 7ec4364becc..623657ef9fe 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -507,7 +507,8 @@ dict_table_try_drop_aborted(
ut_ad(table->id == table_id);
}
- if (table && table->n_ref_count == ref_count && table->drop_aborted) {
+ if (table && table->n_ref_count == ref_count && table->drop_aborted
+ && !UT_LIST_GET_FIRST(table->locks)) {
/* Silence a debug assertion in row_merge_drop_indexes(). */
ut_d(table->n_ref_count++);
row_merge_drop_indexes(trx, table, TRUE);
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 80ab10cdbc0..0206d415342 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -3108,7 +3108,8 @@ row_merge_drop_indexes(
A concurrent purge will be prevented by dict_operation_lock. */
- if (!locked && table->n_ref_count > 1) {
+ if (!locked && (table->n_ref_count > 1
+ || UT_LIST_GET_FIRST(table->locks))) {
/* We will have to drop the indexes later, when the
table is guaranteed to be no longer in use. Mark the
indexes as incomplete and corrupted, so that other
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index 4aa29de1cf4..e361b73ab77 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -507,7 +507,8 @@ dict_table_try_drop_aborted(
ut_ad(table->id == table_id);
}
- if (table && table->n_ref_count == ref_count && table->drop_aborted) {
+ if (table && table->n_ref_count == ref_count && table->drop_aborted
+ && !UT_LIST_GET_FIRST(table->locks)) {
/* Silence a debug assertion in row_merge_drop_indexes(). */
ut_d(table->n_ref_count++);
row_merge_drop_indexes(trx, table, TRUE);
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index d9585818577..9f8fc39e06b 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -3111,7 +3111,8 @@ row_merge_drop_indexes(
A concurrent purge will be prevented by dict_operation_lock. */
- if (!locked && table->n_ref_count > 1) {
+ if (!locked && (table->n_ref_count > 1
+ || UT_LIST_GET_FIRST(table->locks))) {
/* We will have to drop the indexes later, when the
table is guaranteed to be no longer in use. Mark the
indexes as incomplete and corrupted, so that other