From baca1a40e98c4d1ac107118f5f4b6012f398bdf2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 16 Jan 2012 21:02:43 +0100 Subject: [PATCH] enable test cases for bugs fixed in xtradb. disable test cases for bugs not fixed in xtradb. mysql-test/suite/innodb/t/innodb-lock.test: instead of disabling the test in disabled.def (hoping that somebody someday will enable it), skip it only for xtradb (not for innodb), and only for the current xtradb version. the test will enable itself automatically on the next xtradb merge mysql-test/suite/innodb/t/innodb_cmp_drop_table.test: instead of disabling the test in disabled.def (hoping that somebody someday will enable it), skip it only for xtradb (not for innodb), and only for the current xtradb version. the test will enable itself automatically on the next xtradb merge mysql-test/suite/innodb/t/innodb_corrupt_bit.test: fix the error number storage/innobase/handler/ha_innodb.cc: fix the error number storage/xtradb/handler/ha_innodb.cc: fix the error number --- mysql-test/suite/innodb/r/innodb_corrupt_bit.result | 8 ++++---- mysql-test/suite/innodb/t/disabled.def | 3 --- mysql-test/suite/innodb/t/innodb-lock.test | 4 ++++ mysql-test/suite/innodb/t/innodb_cmp_drop_table.test | 4 ++++ mysql-test/suite/innodb/t/innodb_corrupt_bit.test | 6 +++--- mysql-test/suite/sys_vars/t/disabled.def | 3 --- storage/innobase/handler/ha_innodb.cc | 2 +- storage/xtradb/handler/ha_innodb.cc | 2 +- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result index c88e1ed2504..7e8792bb5b4 100644 --- a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result +++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result @@ -40,13 +40,13 @@ test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxā" is co test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxē" is corrupted. test.corrupt_bit_test_ā check error Corrupt select c from corrupt_bit_test_ā; -ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +ERROR HY000: Index corrupt_bit_test_ā is corrupted select z from corrupt_bit_test_ā; -ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +ERROR HY000: Index corrupt_bit_test_ā is corrupted show warnings; Level Code Message Warning 179 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted -Error 1034 Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +Error 1712 Index corrupt_bit_test_ā is corrupted insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); select * from corrupt_bit_test_ā use index(primary) where a = 10001; a b c z @@ -63,7 +63,7 @@ test.corrupt_bit_test_ā check Warning InnoDB: Index "idxē" is marked as corrup test.corrupt_bit_test_ā check error Corrupt set names utf8; select z from corrupt_bit_test_ā; -ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +ERROR HY000: Index corrupt_bit_test_ā is corrupted drop index idxē on corrupt_bit_test_ā; select z from corrupt_bit_test_ā limit 10; z diff --git a/mysql-test/suite/innodb/t/disabled.def b/mysql-test/suite/innodb/t/disabled.def index 2080a009fb6..888298bbb09 100644 --- a/mysql-test/suite/innodb/t/disabled.def +++ b/mysql-test/suite/innodb/t/disabled.def @@ -9,6 +9,3 @@ # Do not use any TAB characters for whitespace. # ############################################################################## - -innodb-index : the fix is not in XtraDB yet -innodb_corrupt_bit : the fix is not in XtraDB yet diff --git a/mysql-test/suite/innodb/t/innodb-lock.test b/mysql-test/suite/innodb/t/innodb-lock.test index 49fe1127074..817b18ee6df 100644 --- a/mysql-test/suite/innodb/t/innodb-lock.test +++ b/mysql-test/suite/innodb/t/innodb-lock.test @@ -1,3 +1,7 @@ +if (`select plugin_auth_version <= "1.1.8-20.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not supported by XtraDB 1.1.8-20.1 or earlier +} # # Check and select innodb lock type diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test index 84527e1b035..827bb4bcc74 100644 --- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test +++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test @@ -1,3 +1,7 @@ +if (`select plugin_auth_version <= "1.1.8-20.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not supported by XtraDB 1.1.8-20.1 or earlier +} let $per_table=`select @@innodb_file_per_table`; let $format=`select @@innodb_file_format`; diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test index 7c4ea00afec..b8d19ddfcee 100644 --- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test +++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test @@ -79,10 +79,10 @@ CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z); check table corrupt_bit_test_ā; # This selection intend to use the corrupted index. Expect to fail --- error ER_NOT_KEYFILE +-- error ER_INDEX_CORRUPT select c from corrupt_bit_test_ā; --- error ER_NOT_KEYFILE +-- error ER_INDEX_CORRUPT select z from corrupt_bit_test_ā; show warnings; @@ -108,7 +108,7 @@ check table corrupt_bit_test_ā; set names utf8; --- error ER_NOT_KEYFILE +-- error ER_INDEX_CORRUPT select z from corrupt_bit_test_ā; # Drop the corrupted index diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def index 133754ed6ce..888298bbb09 100644 --- a/mysql-test/suite/sys_vars/t/disabled.def +++ b/mysql-test/suite/sys_vars/t/disabled.def @@ -9,6 +9,3 @@ # Do not use any TAB characters for whitespace. # ############################################################################## - -innodb_force_load_corrupted_basic : not in XtraDB (yet?) -innodb_random_read_ahead_basic : not in XtraDB (yet?) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 27ad19456cc..8b6d347bef9 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5913,7 +5913,7 @@ ha_innobase::change_active_index( "InnoDB: Index %s for table %s is" " marked as corrupted", index_name, table_name); - DBUG_RETURN(1); + DBUG_RETURN(HA_ERR_INDEX_CORRUPT); } else { push_warning_printf( user_thd, MYSQL_ERROR::WARN_LEVEL_WARN, diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index b706523596f..3aa5ff1622d 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -6710,7 +6710,7 @@ ha_innobase::change_active_index( "InnoDB: Index %s for table %s is" " marked as corrupted", index_name, table_name); - DBUG_RETURN(1); + DBUG_RETURN(HA_ERR_INDEX_CORRUPT); } else { push_warning_printf( user_thd, MYSQL_ERROR::WARN_LEVEL_WARN,