mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -147,11 +147,16 @@ let $datadir=`select @@datadir`;
|
||||
CREATE SEQUENCE s engine=innodb;
|
||||
copy_file $datadir/test/s.frm $datadir/test/s1.frm;
|
||||
ALTER TABLE s sequence=0;
|
||||
--connect (prevent_purge,localhost,root)
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
|
||||
--connection default
|
||||
delete from s;
|
||||
FLUSH TABLES;
|
||||
remove_file $datadir/test/s.frm;
|
||||
move_file $datadir/test/s1.frm $datadir/test/s.frm;
|
||||
CHECK TABLE s;
|
||||
--disconnect prevent_purge
|
||||
DROP SEQUENCE s;
|
||||
|
||||
# Just one row, check ok
|
||||
|
Reference in New Issue
Block a user