1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-23801 Assertion failed in btr_pcur_store_position()

btr_lift_page_up(): If the leaf page only contains a hidden metadata
record for MDEV-11369 instant ADD COLUMN, convert the table to the
canonical format like we are supposed to do whenever the table
becomes empty.
This commit is contained in:
Marko Mäkelä
2022-09-13 15:46:40 +03:00
parent 4c14243373
commit 68ce0231ad
3 changed files with 87 additions and 2 deletions

View File

@ -201,4 +201,36 @@ SELECT * FROM t1;
c1 c2 c3
1 0 10
DROP TABLE t1;
#
# MDEV-23801 Assertion index->table->instant... failed
# in btr_pcur_store_position()
#
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t (
pk int auto_increment,
c01 char(255) not null default repeat('a',255),
c02 char(255) default repeat('a',255),
c03 char(255) default repeat('a',255),
c04 char(255) default repeat('a',255),
c05 char(255) not null default repeat('a',255),
c06 char(255) default repeat('a',255),
c07 char(255) default repeat('a',255),
c08 char(255) not null default repeat('a',255),
c09 char(255) default repeat('a',255),
c10 char(255) default repeat('a',255),
c11 char(255) default repeat('a',255),
c12 char(255) not null default repeat('a',255),
primary key (pk)
) ENGINE=InnoDB CHARACTER SET ucs2;
INSERT INTO t () VALUES ();
ALTER TABLE t ADD c INT;
BEGIN;
INSERT INTO t () VALUES (),();
ROLLBACK;
DELETE FROM t;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
CREATE TABLE tt ENGINE=InnoDB AS SELECT c FROM t;
DROP TABLE t, tt;
# End of 10.3 tests

View File

@ -204,4 +204,45 @@ ALTER TABLE t1 IMPORT TABLESPACE;
SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-23801 Assertion index->table->instant... failed
--echo # in btr_pcur_store_position()
--echo #
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t (
pk int auto_increment,
c01 char(255) not null default repeat('a',255),
c02 char(255) default repeat('a',255),
c03 char(255) default repeat('a',255),
c04 char(255) default repeat('a',255),
c05 char(255) not null default repeat('a',255),
c06 char(255) default repeat('a',255),
c07 char(255) default repeat('a',255),
c08 char(255) not null default repeat('a',255),
c09 char(255) default repeat('a',255),
c10 char(255) default repeat('a',255),
c11 char(255) default repeat('a',255),
c12 char(255) not null default repeat('a',255),
primary key (pk)
) ENGINE=InnoDB CHARACTER SET ucs2;
INSERT INTO t () VALUES ();
ALTER TABLE t ADD c INT;
BEGIN;
INSERT INTO t () VALUES (),();
ROLLBACK;
DELETE FROM t;
--source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
CREATE TABLE tt ENGINE=InnoDB AS SELECT c FROM t;
DROP TABLE t, tt;
--echo # End of 10.3 tests