diff options
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter.result | 13 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter.test | 14 | ||||
-rw-r--r-- | storage/innobase/data/data0data.cc | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result index e0661557159..b803d968836 100644 --- a/mysql-test/suite/innodb/r/instant_alter.result +++ b/mysql-test/suite/innodb/r/instant_alter.result @@ -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; diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test index 83dca4cb5a6..3d567cb0704 100644 --- a/mysql-test/suite/innodb/t/instant_alter.test +++ b/mysql-test/suite/innodb/t/instant_alter.test @@ -1,4 +1,5 @@ --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; diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc index 36fc484b82f..fe849d8ae29 100644 --- a/storage/innobase/data/data0data.cc +++ b/storage/innobase/data/data0data.cc @@ -686,7 +686,7 @@ dtuple_convert_big_rec( goto skip_field; } - longest_i = i; + longest_i = i + mblob; longest = savings; skip_field: |