1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
##########################################################################
# Test script to test CHECK TABLE
##########################################################################
--source include/not_valgrind.inc
--source include/have_debug.inc
--echo #########
--echo # SETUP #
--echo #########
--disable_query_log
call mtr.add_suppression("Minimum record flag is wrongly set to rec on page .* at level .* for index 'GEN_CLUST_INDEX' of table 'test/t1'.");
call mtr.add_suppression("Minimum record flag is not set to first rec on page .* at level .* for index 'GEN_CLUST_INDEX' of table 'test/t1'.");
call mtr.add_suppression("Apparent corruption in space .* page .* index `GEN_CLUST_INDEX`");
call mtr.add_suppression("In page .* of index `GEN_CLUST_INDEX` of table");
--enable_query_log
--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err
CREATE TABLE t1(c1 CHAR(10), c2 CHAR(10));
--disable_query_log
SET @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
--enable_query_log
SET GLOBAL innodb_limit_optimistic_insert_debug=2;
insert into t1 values ("r1c1", "r1c2");
insert into t1 values ("r2c1", "r2c2");
insert into t1 values ("r3c1", "r3c2");
insert into t1 values ("r4c1", "r4c2");
insert into t1 values ("r5c1", "r5c2");
insert into t1 values ("r6c1", "r6c2");
#-------------------------------------------------------------------------------
# Scenario 1 : Min bit is set wrongly to a record which is not the first record
# on first page on level.
#-------------------------------------------------------------------------------
SET SESSION debug="+d,check_table_set_wrong_min_bit";
CHECK TABLE t1;
--echo # Expect found
--let SEARCH_PATTERN= Setting wrong min bit to 2nd record
--source include/search_pattern.inc
--echo # Expect found
--let SEARCH_PATTERN= Minimum record flag is wrongly set to rec on page '4' at level '3' for index 'GEN_CLUST_INDEX' of table 'test/t1'.
--source include/search_pattern.inc
SET SESSION debug="-d,check_table_set_wrong_min_bit";
#-------------------------------------------------------------------------------
# Scenario 2 : Min bit is not set to a record which is the first record on first
# page on level.
#-------------------------------------------------------------------------------
SET SESSION debug="+d,check_table_reset_correct_min_bit";
CHECK TABLE t1;
--echo # Expect found
--let SEARCH_PATTERN= Resetting correct min bit to 1st record
--source include/search_pattern.inc
--echo # Expect found
--let SEARCH_PATTERN= Minimum record flag is not set to first rec on page '4' at level '3' for index 'GEN_CLUST_INDEX' of table 'test/t1'.
--source include/search_pattern.inc
SET SESSION debug="-d,check_table_reset_correct_min_bit";
--echo ###########
--echo # CLEANUP #
--echo ###########
--disable_query_log
SET GLOBAL innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;
--enable_query_log
drop table t1;
|