summaryrefslogtreecommitdiff
path: root/storage/innobase/row
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-26 10:25:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-26 10:25:34 +0300
commite3c39c0be82e69acb813e7c5e0f2aea7d5546e31 (patch)
tree9b58d735b429f0689e7e8a10ed62c11cd9bb9c53 /storage/innobase/row
parentd3350c160a7a884e97a5e4a696432230c13d53e0 (diff)
downloadmariadb-git-e3c39c0be82e69acb813e7c5e0f2aea7d5546e31.tar.gz
MDEV-13564 follow-up: Remove dead code
In MariaDB 10.4.0, commit 09af00cbde1d62dfda574dee10e5c0fd240c3f7f removed the crash-upgrade logic for the MariaDB 10.2 innodb_safe_truncate=OFF TRUNCATE TABLE (which was the only option between MariaDB 10.2.2 and 10.2.18), but failed to adjust some comments and code. buf_page_io_complete(): Remove a bogus comment about TRUNCATE. dict_recreate_index_tree(): Unused function; remove. fil_space_t::stop_new_ops: Clarify the comment. fil_space_acquire_low(): Remove a bogus comment about TRUNCATE. fil_check_pending_ops(), fil_check_pending_io(): Adjust a warning message. This code is only invoked as part of DISCARD TABLESPACE or DROP TABLE. DROP TABLE is internally used as part of ALTER TABLE, OPTIMIZE TABLE, or TRUNCATE TABLE. RemoteDatafile::create_link_file(): Clarify a comment. ibuf_delete_for_discarded_space(): Clarify the function comment. dict_table_x_lock_indexes(), dict_table_x_unlock_indexes(): Merge with the only remaining caller, row_quiesce_set_state(). page_create_zip(): Remove a bogus comment about TRUNCATE.
Diffstat (limited to 'storage/innobase/row')
-rw-r--r--storage/innobase/row/row0quiesce.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc
index 192545192d4..02c8c495e88 100644
--- a/storage/innobase/row/row0quiesce.cc
+++ b/storage/innobase/row/row0quiesce.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -669,8 +669,11 @@ row_quiesce_set_state(
}
row_mysql_lock_data_dictionary(trx);
-
- dict_table_x_lock_indexes(table);
+ for (dict_index_t* index = dict_table_get_first_index(table);
+ index != NULL;
+ index = dict_table_get_next_index(index)) {
+ rw_lock_x_lock(&index->lock);
+ }
switch (state) {
case QUIESCE_START:
@@ -687,7 +690,11 @@ row_quiesce_set_state(
table->quiesce = state;
- dict_table_x_unlock_indexes(table);
+ for (dict_index_t* index = dict_table_get_first_index(table);
+ index != NULL;
+ index = dict_table_get_next_index(index)) {
+ rw_lock_x_unlock(&index->lock);
+ }
row_mysql_unlock_data_dictionary(trx);