| 1 |
######### |
| 2 |
# SETUP # |
| 3 |
######### |
| 4 |
CREATE TABLE t1(c1 CHAR(10), c2 CHAR(10)); |
| 5 |
SET GLOBAL innodb_limit_optimistic_insert_debug=2; |
| 6 |
insert into t1 values ("r1c1", "r1c2"); |
| 7 |
insert into t1 values ("r2c1", "r2c2"); |
| 8 |
insert into t1 values ("r3c1", "r3c2"); |
| 9 |
insert into t1 values ("r4c1", "r4c2"); |
| 10 |
insert into t1 values ("r5c1", "r5c2"); |
| 11 |
insert into t1 values ("r6c1", "r6c2"); |
| 12 |
SET SESSION debug="+d,check_table_set_wrong_min_bit"; |
| 13 |
CHECK TABLE t1; |
| 14 |
Table Op Msg_type Msg_text |
| 15 |
test.t1 check Warning InnoDB: The B-tree of index GEN_CLUST_INDEX is corrupted. |
| 16 |
test.t1 check error Corrupt |
| 17 |
# Expect found |
| 18 |
Pattern "Setting wrong min bit to 2nd record" found |
| 19 |
# Expect found |
| 20 |
Pattern "Minimum record flag is wrongly set to rec on page '4' at level '3' for index 'GEN_CLUST_INDEX' of table 'test/t1'." found |
| 21 |
SET SESSION debug="-d,check_table_set_wrong_min_bit"; |
| 22 |
SET SESSION debug="+d,check_table_reset_correct_min_bit"; |
| 23 |
CHECK TABLE t1; |
| 24 |
Table Op Msg_type Msg_text |
| 25 |
test.t1 check Warning InnoDB: The B-tree of index GEN_CLUST_INDEX is corrupted. |
| 26 |
test.t1 check error Corrupt |
| 27 |
# Expect found |
| 28 |
Pattern "Resetting correct min bit to 1st record" found |
| 29 |
# Expect found |
| 30 |
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'." found |
| 31 |
SET SESSION debug="-d,check_table_reset_correct_min_bit"; |
| 32 |
########### |
| 33 |
# CLEANUP # |
| 34 |
########### |
| 35 |
drop table t1; |