MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'

		failed in dtuple_convert_big_rec

In dtuple_convert_big_rec(), InnoDB fails to consider the
instant metadata blob while choosing the variable length
field.
parent 1dff411e
......@@ -2841,3 +2841,16 @@ t1 CREATE TABLE `t1` (
KEY `i1` (`a`) COMMENT 'comment2'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'
# failed in dtuple_convert_big_rec
#
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
a CHAR(255) NOT NULL,
b CHAR(255) NOT NULL, c INT) ENGINE=InnoDB CHARSET utf32;
ALTER TABLE t1 DROP c;
INSERT INTO t1(a, b) SELECT '', '' FROM seq_1_to_16;
SELECT COUNT(*) FROM t1;
COUNT(*)
16
DROP TABLE t1;
--source include/innodb_page_size.inc
--source include/have_sequence.inc
--echo #
--echo # MDEV-11369: Instant ADD COLUMN for InnoDB
......@@ -903,3 +904,16 @@ CREATE INDEX i1 ON t1(a) COMMENT 'comment1';
ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2', ALGORITHM=INSTANT;
SHOW CREATE TABLE t1;
DROP TABLE t1;
--echo #
--echo # MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'
--echo # failed in dtuple_convert_big_rec
--echo #
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
a CHAR(255) NOT NULL,
b CHAR(255) NOT NULL, c INT) ENGINE=InnoDB CHARSET utf32;
ALTER TABLE t1 DROP c;
INSERT INTO t1(a, b) SELECT '', '' FROM seq_1_to_16;
SELECT COUNT(*) FROM t1;
# Cleanup
DROP TABLE t1;
......@@ -686,7 +686,7 @@ dtuple_convert_big_rec(
goto skip_field;
}
longest_i = i;
longest_i = i + mblob;
longest = savings;
skip_field:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment