Skip to content

Commit 1f37a67

Browse files
committed
Bug#35115601 InnoDB - Page [...] still fixed or dirty crash during shutdown
Enable backporting to 8.0 by moving previous error message from 8.1 section to 8.0 section. Relax few checks on number of fixed pages Change-Id: I5de03de2bb0c9d7ce37dbb45e65b22b084e757ac
1 parent 8428933 commit 1f37a67

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

mysql-test/suite/innodb/t/builder_insert_direct_freed.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CREATE TABLE t1 (c1 INT);
66

77
--echo # Create big enough table to ensure another call to Builder::insert_direct
88
--disable_query_log
9-
call mtr.add_suppression("\\[ERROR\\] .* DDL Failed as Builder is already freed");
9+
call mtr.add_suppression("\\[ERROR\\] .* DDL failed as Builder is already freed");
1010
DELIMITER |;
1111
CREATE PROCEDURE populate_t1(IN BASE INT, IN SIZE INT)
1212
BEGIN

share/messages_to_error_log.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12279,6 +12279,9 @@ ER_PERFORMANCE_SCHEMA_VERSION_CHANGE
1227912279
ER_WARN_DEPRECATED_OR_BLOCKED_CIPHER
1228012280
eng "Value for option '%s' contains cipher '%s' that is either blocked or deprecated (and will be removed in a future release). Please refer to the documentation for more details."
1228112281

12282+
ER_IB_MSG_DDL_FAIL_NO_BUILDER
12283+
eng "DDL failed as Builder is already freed. Builder: state=%u, error_state=%u. Index: id=%zu, name='%s', space_id=%u, page=%u. Table: old_name='%s', new_name='%s'."
12284+
1228212285
#
1228312286
# End of 8.0 error messages intended to be written to the server error log.
1228412287
#
@@ -12550,9 +12553,6 @@ ER_GROUP_REPLICATION_NO_CERTIFICATION_DONOR_AVAILABLE
1255012553
ER_GROUP_REPLICATION_RECOVERY_STOPPED_GTID_PRESENT
1255112554
eng "The group replication recovery is complete, joiner gtid executed set has all the transactions of the donor's gtid set %s."
1255212555

12553-
ER_IB_MSG_DDL_FAIL_NO_BUILDER
12554-
eng "DDL Failed as Builder is already freed"
12555-
1255612556
ER_RPL_ASYNC_CHECK_CONNECTION_ERROR
1255712557
eng "The Monitor IO thread encountered an error while executing the query to check connection to the source server. Error: %s. The query failed to execute on the source (host:%s port:%u network_namespace:%s) for channel '%s'."
1255812558

storage/innobase/btr/btr0load.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Page_load : private ut::Non_copyable {
8585

8686
/** Destructor */
8787
~Page_load() noexcept {
88-
ut_a(m_n_blocks_buf_fixed == 0);
88+
ut_ad(m_n_blocks_buf_fixed == 0);
8989
if (m_heap != nullptr) {
9090
/* mtr is allocated using heap. */
9191
if (m_mtr != nullptr) {
@@ -858,7 +858,7 @@ void Page_load::latch() noexcept {
858858

859859
buf_block_buf_fix_dec(m_block);
860860
m_n_blocks_buf_fixed--;
861-
ut_a(m_n_blocks_buf_fixed >= 0);
861+
ut_ad(m_n_blocks_buf_fixed >= 0);
862862

863863
/* The caller is going to use the m_block, so it needs to be buffer-fixed
864864
even after the decrement above. This works like this:

storage/innobase/ddl/ddl0builder.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,11 @@ dberr_t Builder::insert_direct(Cursor &cursor, size_t thread_id) noexcept {
12641264
{ static_cast<void>(online_build_handle_error(DB_ERROR)); });
12651265

12661266
if (m_btr_load == nullptr) {
1267-
ib::error(ER_IB_MSG_DDL_FAIL_NO_BUILDER);
1267+
auto ind = index();
1268+
ib::error(ER_IB_MSG_DDL_FAIL_NO_BUILDER, static_cast<unsigned>(get_state()),
1269+
static_cast<unsigned>(get_error()), id(), ind->name(),
1270+
ind->space_id(), static_cast<unsigned>(ind->page),
1271+
ctx().old_table()->name.m_name, ctx().new_table()->name.m_name);
12681272
return DB_ERROR;
12691273
}
12701274

0 commit comments

Comments
 (0)