From 1af855819300ba4e4dd3d582c5c521ff99321152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 10 Mar 2021 11:08:51 +0200 Subject: [PATCH] MDEV-25101 Assertion !strcmp(field->name, "table_name") failed btr_node_ptr_max_size(): Let us remove the debug assertion that was added in MDEV-14637. The assertion assumed that no additional indexes exist in mysql.innodb_index_stats or mysql.innodb_table_stats. The code path is working around an incorrect definition of a table, interpreting VARCHAR(64) as the more correct VARCHAR(199). No test case will be added, because MDEV-24579 proves that executing DDL on the statistics tables involves a race condition. The test case included the following: ALTER TABLE mysql.innodb_index_stats ADD KEY (stat_name); CREATE TABLE t (a INT) ENGINE=InnoDB STATS_PERSISTENT=1; --- storage/innobase/btr/btr0cur.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 3d03c55bf15..8f2acdb35bd 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -837,7 +837,6 @@ static ulint btr_node_ptr_max_size(const dict_index_t* index) TABLE_STATS_NAME) || !strcmp(index->table->name.m_name, INDEX_STATS_NAME))) { - ut_ad(!strcmp(field->name, "table_name")); /* Interpret "table_name" as VARCHAR(199) even if it was incorrectly defined as VARCHAR(64). While the caller of ha_innobase enforces the