From 8ba3585b47ee678de16dd7d4ec063e76fe7b7b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 24 Nov 2014 19:42:39 +0200 Subject: [PATCH] MDEV-7168: Tests innodb.innodb_stats_create_table innodb.innodb_stats_drop_locked fail and innodb.innodb_stats_fetch_nonexistent fails in buildbot on Windows Analysis: Problem is that innodb_stats_create_on_corrupted test renames mysql.innodb.index_stats and all the rest are dependend on this table. Fix: After rename back to original, restart mysqld to make sure that table is correct. --- .../innodb/r/innodb_stats_create_on_corrupted.result | 12 ++++++++++++ .../innodb/t/innodb_stats_create_on_corrupted.test | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result index 47c714bb0a6..c351b222496 100644 --- a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result +++ b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result @@ -17,4 +17,16 @@ avg_row_length 0 max_data_length 0 index_length 0 ALTER TABLE mysql.innodb_index_stats_ RENAME TO mysql.innodb_index_stats; +SELECT seq_in_index, column_name, cardinality +FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted' +ORDER BY index_name, seq_in_index; +seq_in_index 1 +column_name a +cardinality 0 +SELECT table_rows, avg_row_length, max_data_length, index_length +FROM information_schema.tables WHERE table_name = 'test_ps_create_on_corrupted'; +table_rows 0 +avg_row_length 0 +max_data_length 0 +index_length 0 DROP TABLE test_ps_create_on_corrupted; diff --git a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test index 78c9334f800..de6026a23aa 100644 --- a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test +++ b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test @@ -33,4 +33,16 @@ 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; +--source include/restart_mysqld.inc + +-- vertical_results + +# check again +SELECT seq_in_index, column_name, cardinality +FROM information_schema.statistics WHERE table_name = 'test_ps_create_on_corrupted' +ORDER BY index_name, seq_in_index; + +SELECT table_rows, avg_row_length, max_data_length, index_length +FROM information_schema.tables WHERE table_name = 'test_ps_create_on_corrupted'; + DROP TABLE test_ps_create_on_corrupted;