From b044898b97729c36dd22e1133e47c92ed7c42e04 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 1 Mar 2021 21:16:13 +0530 Subject: MDEV-24748 extern column check missing in btr_index_rec_validate() In btr_index_rec_validate(), externally stored column check is missing while matching the length of the field with the length of the field data stored in record. Fetch the length of the externally stored part and compare it with the fixed field length. --- mysql-test/suite/innodb/t/innodb.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/suite/innodb/t/innodb.test') diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index 7aa146d7d99..d494f40bcb6 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -2628,3 +2628,21 @@ SELECT * FROM t2; DROP TABLE t1; DROP TABLE t2; + +--echo # +--echo # MDEV-24748 Extern field check missing +--echo # in btr_index_rec_validate() +--echo # +CREATE TABLE t1 (pk INT, c1 char(255), +c2 char(255), c3 char(255), c4 char(255), +c5 char(255), c6 char(255), c7 char(255), +c8 char(255), primary key (pk) +) CHARACTER SET utf32 ENGINE=InnoDB; + +INSERT INTO t1 VALUES + (1, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'), + (2, 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'); +CHECK TABLE t1; +ALTER TABLE t1 FORCE; +# Cleanup +DROP TABLE t1; -- cgit v1.2.1