mariadb/mysql-test/suite/innodb/r/check_sequence,debug.rdiff
Thirunarayanan Balathandayuthapani 6a2afb42ba 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
2025-06-09 13:52:44 +05:30

17 lines
490 B
Text

--- 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;