mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-36487 Fix ha_innobase::check() for sequences
InnoDB does the following check for sequence table during check table command: - There should be only one index should exist on sequence table - There should be only one row should exist on sequence table - The leaf page must be the root page for the sequence table - Delete marked record should not exist - DB_TRX_ID and DB_ROLL_PTR of the record should be 0 and 1U << 55
This commit is contained in:
17
mysql-test/suite/innodb/r/check_sequence,debug.rdiff
Normal file
17
mysql-test/suite/innodb/r/check_sequence,debug.rdiff
Normal file
@@ -0,0 +1,17 @@
|
||||
--- check_sequence.result
|
||||
+++ check_sequence,debug.result
|
||||
@@ -112,3 +112,14 @@
|
||||
3
|
||||
disconnect prevent_purge;
|
||||
DROP SEQUENCE s1;
|
||||
+CREATE SEQUENCE s ENGINE=InnoDB;
|
||||
+ALTER TABLE s SEQUENCE=0;
|
||||
+FLUSH TABLES;
|
||||
+SET STATEMENT DEBUG_DBUG="+d,fail_root_page" FOR
|
||||
+CHECK TABLE s;
|
||||
+Table Op Msg_type Msg_text
|
||||
+test.s check Warning InnoDB: Sequence table test/s is corrupted.
|
||||
+test.s check error Corrupt
|
||||
+ALTER TABLE s SEQUENCE=1;
|
||||
+ERROR HY000: InnoDB: Table `test`.`s` is corrupted.
|
||||
+DROP SEQUENCE s;
|
Reference in New Issue
Block a user