Skip to content

Commit

Permalink
MDEV-18352 Add a regression test for VARCHAR enlarging
Browse files Browse the repository at this point in the history
Add a simplest regression test. Specifically, I want to be sure that
SYS_COLUMNS.LEN is increased.

Closes #1123
  • Loading branch information
dr-m committed Jan 25, 2019
1 parent fab531a commit d97db40
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mysql-test/suite/innodb/r/instant_varchar_enlarge.result
Original file line number Diff line number Diff line change
@@ -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;
8 changes: 8 additions & 0 deletions mysql-test/suite/innodb/t/instant_varchar_enlarge.test
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit d97db40

Please sign in to comment.