diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-03-05 13:35:29 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-03-05 13:35:29 +0530 |
commit | 5c82f7f8b1219d40d24c4ac4cf9535ce215a907a (patch) | |
tree | ac0a38ac94160b4d9ac5aa88ab17157e264b5684 | |
parent | 82efe4a15a985c3902e80eb7e1a70841c08d9f2e (diff) | |
download | mariadb-git-bb-10.4-MDEV-25057.tar.gz |
MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'bb-10.4-MDEV-25057
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.
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter.test | 11 | ||||
-rw-r--r-- | storage/innobase/data/data0data.cc | 2 |
3 files changed, 21 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..5b24c3b6caa 100644 --- a/mysql-test/suite/innodb/r/instant_alter.result +++ b/mysql-test/suite/innodb/r/instant_alter.result @@ -2841,3 +2841,12 @@ 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, a CHAR(255) NOT NULL, +b CHAR(255) NOT NULL, c INT) ENGINE=InnoDB +CHARSET utf32; +ALTER TABLE t1 DROP c; +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..f1dd664c34c 100644 --- a/mysql-test/suite/innodb/t/instant_alter.test +++ b/mysql-test/suite/innodb/t/instant_alter.test @@ -903,3 +903,14 @@ 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, a CHAR(255) NOT NULL, + b CHAR(255) NOT NULL, c INT) ENGINE=InnoDB + CHARSET utf32; +ALTER TABLE t1 DROP c; +# 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: |