Skip to content

Commit 0462d8f

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 d5c1264 commit 0462d8f

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12280,7 +12280,7 @@ 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

1228212282
ER_IB_MSG_DDL_FAIL_NO_BUILDER
12283-
eng "DDL Failed as Builder is already freed"
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'."
1228412284

1228512285
# DO NOT add server-to-client messages here;
1228612286
# they go in messages_to_clients.txt

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)