From d97db40a9f2e97ed0317559c9587c827a3f49cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 25 Jan 2019 12:46:23 +0200 Subject: [PATCH] MDEV-18352 Add a regression test for VARCHAR enlarging Add a simplest regression test. Specifically, I want to be sure that SYS_COLUMNS.LEN is increased. Closes #1123 --- mysql-test/suite/innodb/r/instant_varchar_enlarge.result | 9 +++++++++ mysql-test/suite/innodb/t/instant_varchar_enlarge.test | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 mysql-test/suite/innodb/r/instant_varchar_enlarge.result create mode 100644 mysql-test/suite/innodb/t/instant_varchar_enlarge.test diff --git a/mysql-test/suite/innodb/r/instant_varchar_enlarge.result b/mysql-test/suite/innodb/r/instant_varchar_enlarge.result new file mode 100644 index 00000000000..14f16bd4fe2 --- /dev/null +++ b/mysql-test/suite/innodb/r/instant_varchar_enlarge.result @@ -0,0 +1,9 @@ +create table t (a varchar(100)) engine=innodb; +select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a'; +name pos mtype prtype len +a 0 1 524303 100 +alter table t modify a varchar(110), algorithm=inplace; +select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a'; +name pos mtype prtype len +a 0 1 524303 110 +drop table t; diff --git a/mysql-test/suite/innodb/t/instant_varchar_enlarge.test b/mysql-test/suite/innodb/t/instant_varchar_enlarge.test new file mode 100644 index 00000000000..42689deca11 --- /dev/null +++ b/mysql-test/suite/innodb/t/instant_varchar_enlarge.test @@ -0,0 +1,8 @@ +--source include/have_innodb.inc + +# LEN must increase here +create table t (a varchar(100)) engine=innodb; +select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a'; +alter table t modify a varchar(110), algorithm=inplace; +select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a'; +drop table t;