summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-25 12:46:23 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-25 12:46:23 +0200
commitd97db40a9f2e97ed0317559c9587c827a3f49cce (patch)
treed36f72dd39fa9de20516d29fc70e91e85779d243
parentfab531a150ec588f87e8a636d2ba1ecbfffdb08e (diff)
downloadmariadb-git-d97db40a9f2e97ed0317559c9587c827a3f49cce.tar.gz
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
-rw-r--r--mysql-test/suite/innodb/r/instant_varchar_enlarge.result9
-rw-r--r--mysql-test/suite/innodb/t/instant_varchar_enlarge.test8
2 files changed, 17 insertions, 0 deletions
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;