Comment 2 for bug 1420087

Revision history for this message
zhai weixiang (zhaiwx1987) wrote :

There is another interesting thing :

root@sb1 12:36:04>show variables like 'innodb_corrupt_table_action';
+-----------------------------+---------+
| Variable_name | Value |
+-----------------------------+---------+
| innodb_corrupt_table_action | salvage |
+-----------------------------+---------+
1 row in set (0.01 sec)

root@sb1 12:36:13>select count(*) from sbtest1;
+----------+
| count(*) |
+----------+
| 997936 |
+----------+
1 row in set (0.64 sec)

from error log:
InnoDB: space 2898 will be treated as corrupt.
InnoDB: Index corruption: rec offs 125 next offs 0, page no 4417,
InnoDB: index `k` of table `sb1`.`sbtest1`. We try to skip the rest of the page.
InnoDB: Index corruption: rec offs 125 next offs 0, page no 8024,
InnoDB: index `k` of table `sb1`.`sbtest1`. We try to skip the rest of the page.

root@sb1 12:37:52>select count(*) from sbtest1 force index(primary);
+----------+
| count(*) |
+----------+
| 999854 |
+----------+
1 row in set (3.73 sec)

from error log:
InnoDB: Index corruption: rec offs 127 next offs 0, page no 6151,
InnoDB: index `PRIMARY` of table `sb1`.`sbtest1`. We try to skip the rest of the page.
InnoDB: Index corruption: rec offs 127 next offs 0, page no 12207,
InnoDB: index `PRIMARY` of table `sb1`.`sbtest1`. We try to skip the rest of the page.

index 'k' is choosed to execute select count(*) though both indexes are corrupted . In this case ,we should use Primary index instead of index 'k'