Commit cb0cad81 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-25907: Assertion failed in dict_table_schema_check()

dict_table_schema_check(): Simply remove the debug assertion.
We will still return a failure.
parent 6ba938af
call mtr.add_suppression("InnoDB: Table .*innodb_index_stats.* not found");
call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table .*");
call mtr.add_suppression("InnoDB: Table mysql\\.innodb_index_stats has length mismatch in the column name stat_description\\. Please run mariadb-upgrade");
call mtr.add_suppression("InnoDB: Column stat_description in table mysql\\.innodb_index_stats is VARCHAR");
ALTER TABLE mysql.innodb_index_stats RENAME TO mysql.innodb_index_stats_;
CREATE TABLE test_ps_create_on_corrupted
(a INT, PRIMARY KEY (a))
......@@ -17,6 +19,13 @@ avg_row_length 0
max_data_length 0
index_length 0
ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats;
SET old_mode='';
ALTER TABLE mysql.innodb_index_stats
MODIFY stat_description VARCHAR(1024) COLLATE utf8_bin;
CREATE TABLE t (a INT) ENGINE=InnoDB STATS_PERSISTENT=1;
ALTER TABLE mysql.innodb_index_stats
MODIFY stat_description VARCHAR(1024) COLLATE utf8mb3_bin NOT NULL;
DROP TABLE t;
# restart
SELECT seq_in_index, column_name, cardinality
FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted'
......
......@@ -12,6 +12,8 @@
call mtr.add_suppression("InnoDB: Table .*innodb_index_stats.* not found");
call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table .*");
call mtr.add_suppression("InnoDB: Table mysql\\.innodb_index_stats has length mismatch in the column name stat_description\\. Please run mariadb-upgrade");
call mtr.add_suppression("InnoDB: Column stat_description in table mysql\\.innodb_index_stats is VARCHAR");
-- vertical_results
......@@ -34,6 +36,15 @@ FROM information_schema.tables WHERE table_name = 'test_ps_create_on_corrupted';
# restore the persistent storage
ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats;
SET old_mode='';
ALTER TABLE mysql.innodb_index_stats
MODIFY stat_description VARCHAR(1024) COLLATE utf8_bin;
CREATE TABLE t (a INT) ENGINE=InnoDB STATS_PERSISTENT=1;
ALTER TABLE mysql.innodb_index_stats
MODIFY stat_description VARCHAR(1024) COLLATE utf8mb3_bin NOT NULL;
DROP TABLE t;
--source include/restart_mysqld.inc
-- vertical_results
......
......@@ -405,7 +405,6 @@ dict_table_schema_check(
/* check length for exact match */
if (req_schema->columns[i].len != table->cols[j].len) {
ut_ad(table->cols[j].len < req_schema->columns[i].len);
sql_print_warning("InnoDB: Table %s has"
" length mismatch in the"
" column name %s."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment