summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/t')
-rw-r--r--mysql-test/suite/innodb/t/alter_table.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb-16k.test10
-rw-r--r--mysql-test/suite/innodb/t/innodb-32k.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-table.test33
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb-get-fk.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5980-alter.test34
-rw-r--r--mysql-test/suite/innodb/t/table_definition_cache_debug.opt1
-rw-r--r--mysql-test/suite/innodb/t/table_definition_cache_debug.test66
-rw-r--r--mysql-test/suite/innodb/t/undo_log.test139
11 files changed, 279 insertions, 53 deletions
diff --git a/mysql-test/suite/innodb/t/alter_table.test b/mysql-test/suite/innodb/t/alter_table.test
index 13fb574972a..474035436e5 100644
--- a/mysql-test/suite/innodb/t/alter_table.test
+++ b/mysql-test/suite/innodb/t/alter_table.test
@@ -8,3 +8,17 @@ create index idx1 on t1(a(3073));
show create table t1;
drop table t1;
set @@sql_mode=default;
+
+#
+# MDEV-14081 ALTER TABLE CHANGE COLUMN Corrupts Index Leading to Crashes in 10.2
+#
+create table t1 (
+ id1 int(11) not null auto_increment,
+ id2 varchar(30) not null,
+ id3 datetime not null default current_timestamp,
+ primary key (id1),
+ unique key unique_id2 (id2)
+) engine=innodb;
+alter table t1 change column id2 id4 varchar(100) not null;
+select * from t1 where id4 like 'a';
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test
index a771fac27ed..a4f88f23457 100644
--- a/mysql-test/suite/innodb/t/innodb-16k.test
+++ b/mysql-test/suite/innodb/t/innodb-16k.test
@@ -324,10 +324,10 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
# because the UNDO records will be smaller.
CREATE INDEX t1f ON t1 (f(767));
---error 1713
+BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
-
+ROLLBACK;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
@@ -367,8 +367,9 @@ UPDATE t1 SET s=@e;
# that CANNOT be updated.
CREATE INDEX t1t ON t1 (t(767));
---error 1713
+BEGIN;
UPDATE t1 SET t=@e;
+ROLLBACK;
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -496,9 +497,10 @@ INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751));
COMMIT;
# The following used to cause a hang while doing infinite undo log allocation.
---error 1713
+BEGIN;
UPDATE bug12547647 SET c = REPEAT('b',16928);
SHOW WARNINGS;
+ROLLBACK;
DROP TABLE bug12547647;
SET SESSION innodb_strict_mode = on;
diff --git a/mysql-test/suite/innodb/t/innodb-32k.test b/mysql-test/suite/innodb/t/innodb-32k.test
index 80a05c350d0..a0e314aea03 100644
--- a/mysql-test/suite/innodb/t/innodb-32k.test
+++ b/mysql-test/suite/innodb/t/innodb-32k.test
@@ -282,13 +282,14 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
CREATE INDEX t1f17 ON t1 (v(767));
---error 1713
+BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d,
v=@d,w=@d,x=@d,y=@d,z=@d,
aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d,
ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d,
va=@d,wa=@d,xa=@d,ya=@d,za=@d;
+ROLLBACK;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test
index 2e08645f5b0..b091eee6d57 100644
--- a/mysql-test/suite/innodb/t/innodb-64k.test
+++ b/mysql-test/suite/innodb/t/innodb-64k.test
@@ -292,7 +292,7 @@ COMMIT;
CREATE INDEX tg1f2 ON t1 (ia(767),ja(767));
---error 1713
+BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d,
v=@d,w=@d,x=@d,y=@d,z=@d,
@@ -305,6 +305,7 @@ UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d,
kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d,
vc=@d,wc=@d,xc=@d,yc=@d,zc=@d;
+ROLLBACK;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test
index 97f0075f344..0cf456ad146 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-table.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-table.test
@@ -1,4 +1,5 @@
--source include/innodb_page_size.inc
+--source include/have_partition.inc
#
# MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb
@@ -171,3 +172,35 @@ ALTER TABLE ticket
SHOW CREATE TABLE ticket;
DROP TABLE ticket;
+
+#
+# MDEV-13838: Wrong result after altering a partitioned table
+#
+
+CREATE TABLE t (
+id bigint(20) unsigned NOT NULL auto_increment,
+d date NOT NULL,
+a bigint(20) unsigned NOT NULL,
+b smallint(5) unsigned DEFAULT NULL,
+PRIMARY KEY (id,d)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2
+PARTITION BY RANGE COLUMNS(d)
+(
+PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB,
+PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB);
+
+insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10);
+insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10);
+
+replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4;
+
+select count(*) from t where d ='2017-09-15';
+
+ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a);
+SHOW CREATE TABLE t;
+analyze table t;
+
+select count(*) from t where d ='2017-09-15';
+select count(*) from t force index(primary) where d ='2017-09-15';
+
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index d936dcad15c..9d84e95b88d 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -298,21 +298,12 @@ SHOW CREATE TABLE t1n;
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
--error ER_KEY_COLUMN_DOES_NOT_EXITS
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
-# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table
-# when renaming a column and adding index
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
-ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE;
-ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE;
SHOW CREATE TABLE t1n;
ALTER TABLE t1n DROP INDEX c4;
--error ER_DUP_FIELDNAME
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
-# FIXME: MDEV-13668
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
-ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE;
-ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE;
SHOW CREATE TABLE t1n;
DROP TABLE t1n;
@@ -370,16 +361,8 @@ CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL;
ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
-# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
-call mtr.add_suppression("InnoDB: No matching column for `FTS_DOC_ID` in index `ct` of table `test`\\.`t1o`");
---error ER_NOT_KEYFILE
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ADD FULLTEXT INDEX(ct);
-# FIXME: MDEV-9469 (enable this)
-#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
-#ALGORITHM=INPLACE;
-#end of MDEV-9469 FIXME
DROP TABLE sys_indexes;
CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
@@ -496,6 +479,9 @@ eval DROP DATABASE $source_db;
eval DROP DATABASE $dest_db;
USE test;
+#
+# End of 10.1 tests
+#
--echo #
--echo # MDEV-14038 ALTER TABLE does not exit on error with InnoDB + bad default function
@@ -525,3 +511,7 @@ ALTER TABLE t1 ADD b TIME NOT NULL DEFAULT if(unix_timestamp()>1,TIMESTAMP'2001-
--disable_info
SELECT * FROM t1;
DROP TABLE t1;
+
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test
index 339a7968623..46eb7dd0273 100644
--- a/mysql-test/suite/innodb/t/innodb-get-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-get-fk.test
@@ -40,6 +40,11 @@ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `rep
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
+# These should be ignored in innodb_read_only mode.
+SET GLOBAL innodb_buffer_pool_load_now = ON;
+SET GLOBAL innodb_buffer_pool_dump_now = ON;
+SET GLOBAL innodb_buffer_pool_load_abort = ON;
+
-- let $restart_parameters=
-- source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
index 4b26661793c..a0d80ea8374 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
@@ -8,7 +8,7 @@
--disable_query_log
# These values can change during the test
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-LET $regexp=/FTS_([0-9a-f_]+)([A-Z0-9_]+)\.ibd/FTS_AUX_\2.ibd/;
+LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/;
# Set up some variables
LET $MYSQL_DATA_DIR = `select @@datadir`;
@@ -447,12 +447,7 @@ ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
--error ER_KEY_COLUMN_DOES_NOT_EXITS
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
-# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table
-# when renaming a column and adding index
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
-ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE;
-ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE;
--echo ### files in MYSQL_DATA_DIR/test
--replace_regex $regexp
@@ -474,11 +469,7 @@ ALTER TABLE t1n DROP INDEX c4;
--error ER_DUP_FIELDNAME
ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE;
-# FIXME: MDEV-13668
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE;
-ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE;
-ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE;
--echo ### files in MYSQL_DATA_DIR/test
--replace_regex $regexp
@@ -500,18 +491,10 @@ ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL;
--replace_regex $regexp
--list_files $MYSQL_TMP_DIR/alt_dir/test
-# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
-call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o");
---error ER_NOT_KEYFILE
ALTER TABLE t1o ADD FULLTEXT INDEX(ct),
CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ALGORITHM=INPLACE;
---echo # The following would crash 10.2. Re-enable this and test after merge!
-ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE;
-ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
-# end of MDEV-9469 FIXME
-
--echo ### files in MYSQL_DATA_DIR/test
--replace_regex $regexp
--list_files $MYSQL_DATA_DIR/test
@@ -520,11 +503,9 @@ ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
--list_files $MYSQL_TMP_DIR/alt_dir/test
# This would create a hidden FTS_DOC_ID column, which cannot be done online.
-# FIXME: MDEV-9469 (enable this)
-#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
-#LOCK=NONE;
-#end of MDEV-9469 FIXME
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
+LOCK=NONE;
# This should not show duplicates.
SELECT sc.pos FROM information_schema.innodb_sys_columns sc
@@ -535,7 +516,6 @@ WHERE st.NAME='test/t1o' AND sc.NAME='FTS_DOC_ID';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1o;
-# FIXME: MDEV-13668
ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL,
DROP INDEX ct, LOCK=NONE;
@@ -573,15 +553,9 @@ ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id);
--replace_regex $regexp
--list_files $MYSQL_TMP_DIR/alt_dir/test
-# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
---error ER_NOT_KEYFILE
ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ADD FULLTEXT INDEX(ct);
-ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE;
-ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE;
-#end of MDEV-9469 FIXME
-
--echo ### files in MYSQL_DATA_DIR/test
--replace_regex $regexp
--list_files $MYSQL_DATA_DIR/test
diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.opt b/mysql-test/suite/innodb/t/table_definition_cache_debug.opt
new file mode 100644
index 00000000000..6195e055dc8
--- /dev/null
+++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.opt
@@ -0,0 +1 @@
+--innodb-open-files=13
diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.test b/mysql-test/suite/innodb/t/table_definition_cache_debug.test
new file mode 100644
index 00000000000..57d64d6844e
--- /dev/null
+++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.test
@@ -0,0 +1,66 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+SET @save_tdc= @@GLOBAL.table_definition_cache;
+SET @save_toc= @@GLOBAL.table_open_cache;
+
+# InnoDB plugin essentially ignores table_definition_cache size
+# and hard-wires it to 400, which also is the minimum allowed value.
+SET GLOBAL table_definition_cache= 400;
+SET GLOBAL table_open_cache= 1024;
+
+CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB;
+INSERT INTO to_be_evicted VALUES(1,2),(2,1);
+
+connect(ddl,localhost,root,,);
+SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate';
+--send
+ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b);
+
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR scanned';
+
+# During the ADD UNIQUE INDEX, start a transaction that inserts a duplicate
+# and then hogs the table lock, so that the unique index cannot be dropped.
+BEGIN;
+INSERT INTO to_be_evicted VALUES(3, 2);
+SET DEBUG_SYNC = 'now SIGNAL got_duplicate';
+
+connection ddl;
+--error ER_DUP_ENTRY
+reap;
+
+disconnect ddl;
+connection default;
+# Release the table lock.
+COMMIT;
+SET DEBUG_SYNC = RESET;
+
+# Allow cache eviction.
+FLUSH TABLES;
+--disable_query_log
+
+# Pollute the cache with many tables, so that our table will be evicted.
+let $N=1000;
+let $loop=$N;
+while ($loop)
+{
+ eval CREATE TABLE t_$loop(id INT)ENGINE=InnoDB;
+ dec $loop;
+}
+
+# Hopefully let InnoDB evict the tables.
+sleep 10;
+
+let $loop=$N;
+while ($loop)
+{
+ eval DROP TABLE t_$loop;
+ dec $loop;
+}
+
+SET GLOBAL table_definition_cache= @save_tdc;
+SET GLOBAL table_open_cache= @save_toc;
+
+DROP TABLE to_be_evicted;
diff --git a/mysql-test/suite/innodb/t/undo_log.test b/mysql-test/suite/innodb/t/undo_log.test
new file mode 100644
index 00000000000..c1a98793d91
--- /dev/null
+++ b/mysql-test/suite/innodb/t/undo_log.test
@@ -0,0 +1,139 @@
+--source include/have_innodb.inc
+CREATE TABLE test_tab (
+a_str_18 mediumtext,
+b_str_3 varchar(32) DEFAULT NULL,
+a_str_13 mediumtext,
+b_str_5 varchar(40) DEFAULT NULL,
+b_str_6 varchar(50) DEFAULT NULL,
+b_str_7 char(32) DEFAULT NULL,
+b_str_8 varchar(32) DEFAULT NULL,
+b_str_9 varchar(255) DEFAULT NULL,
+a_str_28 char(255) DEFAULT NULL,
+a_str_27 varchar(255) DEFAULT NULL,
+b_str_10 varchar(32) DEFAULT NULL,
+a_str_26 varchar(255) DEFAULT NULL,
+a_str_6 varchar(50) DEFAULT NULL,
+b_str_11 varchar(32) DEFAULT NULL,
+b_str_12 varchar(255) DEFAULT NULL,
+b_str_13 char(32) DEFAULT NULL,
+b_str_14 varchar(32) DEFAULT NULL,
+b_str_15 char(32) DEFAULT NULL,
+b_str_16 char(32) DEFAULT NULL,
+b_str_17 varchar(32) DEFAULT NULL,
+b_str_18 varchar(32) DEFAULT NULL,
+a_str_25 varchar(40) DEFAULT NULL,
+b_str_19 varchar(255) DEFAULT NULL,
+a_str_23 varchar(40) DEFAULT NULL,
+b_str_20 varchar(32) DEFAULT NULL,
+a_str_21 varchar(255) DEFAULT NULL,
+a_str_20 varchar(255) DEFAULT NULL,
+a_str_39 varchar(255) DEFAULT NULL,
+a_str_38 varchar(255) DEFAULT NULL,
+a_str_37 varchar(255) DEFAULT NULL,
+b_str_21 char(32) DEFAULT NULL,
+b_str_23 varchar(80) DEFAULT NULL,
+b_str_24 varchar(32) DEFAULT NULL,
+b_str_25 varchar(32) DEFAULT NULL,
+b_str_26 char(32) NOT NULL DEFAULT '',
+b_str_27 varchar(255) DEFAULT NULL,
+a_str_36 varchar(255) DEFAULT NULL,
+a_str_33 varchar(100) DEFAULT NULL,
+a_ref_10 char(32) DEFAULT NULL,
+b_str_28 char(32) DEFAULT NULL,
+b_str_29 char(32) DEFAULT NULL,
+a_ref_6 char(32) DEFAULT NULL,
+a_ref_12 varchar(32) DEFAULT NULL,
+a_ref_11 varchar(32) DEFAULT NULL,
+a_str_49 varchar(40) DEFAULT NULL,
+b_str_30 varchar(32) DEFAULT NULL,
+a_ref_3 varchar(32) DEFAULT NULL,
+a_str_48 varchar(40) DEFAULT NULL,
+a_ref_1 char(32) DEFAULT NULL,
+b_str_31 varchar(32) DEFAULT NULL,
+b_str_32 varchar(255) DEFAULT NULL,
+b_str_33 char(32) DEFAULT NULL,
+b_str_34 varchar(32) DEFAULT NULL,
+a_str_47 varchar(40) DEFAULT NULL,
+b_str_36 varchar(255) DEFAULT NULL,
+a_str_46 varchar(40) DEFAULT NULL,
+a_str_45 varchar(255) DEFAULT NULL,
+b_str_38 varchar(32) DEFAULT NULL,
+b_str_39 char(32) DEFAULT NULL,
+b_str_40 varchar(32) DEFAULT NULL,
+a_str_41 varchar(255) DEFAULT NULL,
+b_str_41 varchar(32) DEFAULT NULL,
+PRIMARY KEY (b_str_26),
+UNIQUE KEY a_str_47 (a_str_47),
+UNIQUE KEY a_str_49 (a_str_49),
+UNIQUE KEY a_str_33 (a_str_33),
+UNIQUE KEY a_str_46 (a_str_46),
+UNIQUE KEY a_str_48 (a_str_48),
+KEY b_str_18 (b_str_18),
+KEY a_str_26 (a_str_26),
+KEY b_str_27 (b_str_27,b_str_19),
+KEY b_str_41 (b_str_41),
+KEY b_str_15 (b_str_15),
+KEY a_str_20 (a_str_20),
+KEY b_str_17 (b_str_17),
+KEY b_str_40 (b_str_40),
+KEY b_str_24 (b_str_24),
+KEY b_str_10 (b_str_10),
+KEY b_str_16 (b_str_16),
+KEY b_str_29 (b_str_29),
+KEY a_str_41 (a_str_41),
+KEY b_str_7 (b_str_7),
+KEY a_str_45 (a_str_45),
+KEY a_str_28 (a_str_28),
+KEY a_str_37 (a_str_37),
+KEY b_str_6 (b_str_6),
+KEY a_ref_6 (a_ref_6),
+KEY b_str_34 (b_str_34),
+KEY b_str_38 (b_str_38),
+KEY a_ref_10 (a_ref_10),
+KEY b_str_21 (b_str_21),
+KEY b_str_23 (b_str_23,b_str_19),
+KEY b_str_33 (b_str_33),
+KEY a_ref_12 (a_ref_12),
+KEY a_str_18 (a_str_18(255)),
+KEY a_str_39 (a_str_39),
+KEY a_str_27 (a_str_27),
+KEY a_str_25 (a_str_25),
+KEY b_str_9 (b_str_9),
+KEY a_str_23 (a_str_23),
+KEY b_str_8 (b_str_8),
+KEY a_str_21 (a_str_21),
+KEY b_str_3 (b_str_3),
+KEY b_str_30 (b_str_30),
+KEY b_str_12 (b_str_12),
+KEY b_str_25 (b_str_25),
+KEY b_str_13 (b_str_13),
+KEY a_str_38 (a_str_38),
+KEY a_str_13 (a_str_13(255)),
+KEY a_str_36 (a_str_36),
+KEY b_str_28 (b_str_28),
+KEY b_str_19 (b_str_19),
+KEY b_str_11 (b_str_11),
+KEY a_ref_1 (a_ref_1),
+KEY b_str_20 (b_str_20),
+KEY b_str_14 (b_str_14),
+KEY a_ref_3 (a_ref_3),
+KEY b_str_39 (b_str_39),
+KEY b_str_32 (b_str_32),
+KEY a_str_6 (a_str_6),
+KEY b_str_5 (b_str_5),
+KEY b_str_31 (b_str_31),
+KEY a_ref_11 (a_ref_11)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
+
+BEGIN;
+INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES
+('a', REPEAT('f',4031), REPEAT('g', 4031));
+
+UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032);
+SELECT 'Reducing length to 4030';
+UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030);
+UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031);
+ROLLBACK;
+SELECT COUNT(*) FROM test_tab;
+CHECK TABLE test_tab;
+DROP TABLE test_tab;