diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-06-06 00:07:27 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-06-06 00:07:27 +0200 |
commit | e27c338634739ef56a6888e7948e04c0fa0ba677 (patch) | |
tree | ad63ccae614f3dd77509825d1905fd815ef322cb /mysql-test/t/myisampack.test | |
parent | 2a5905141a3c509a7c34c3d370fb146dbc1c965f (diff) | |
parent | 6d75570e99fbf070cdbeefdfbcfc94d1c7b3ad1f (diff) | |
download | mariadb-git-e27c338634739ef56a6888e7948e04c0fa0ba677.tar.gz |
5.5.38 merge
Diffstat (limited to 'mysql-test/t/myisampack.test')
-rw-r--r-- | mysql-test/t/myisampack.test | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test index ac47d521930..1f97a28e6fd 100644 --- a/mysql-test/t/myisampack.test +++ b/mysql-test/t/myisampack.test @@ -268,6 +268,53 @@ FLUSH TABLE t1; CHECK TABLE t1; DROP TABLE t1; +# +# MDEV-6245 Certain compressed tables with myisampack are corrupted by +# "CHECK TABLE" +# +# Issue was that checksum failed for tables with NULL and VARCHAR fields +# + +create table `t1` (`id` varchar(15) DEFAULT NULL) ENGINE=MyISAM ROW_FORMAT=FIXED; +insert into t1 values ('aaa'),('bbb'),('ccc'),('ddd'),('eee'); +insert into t1 (select * from t1); +insert into t1 (select * from t1); +insert into t1 (select * from t1); +insert into t1 (select * from t1); +checksum table t1; +insert into t1 values(NULL); +checksum table t1; +flush table t1; +--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1 +--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1 +check table t1; +checksum table t1; +alter table t1 checksum=1 row_format=fixed; +checksum table t1; +flush table t1; +--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1 +--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1 +check table t1; +checksum table t1; + +# Testing with row_format=dynamic + +alter table t1 row_format=dynamic checksum=0; +checksum table t1; +flush table t1; +--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1 +--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1 +check table t1; +checksum table t1; +alter table t1 checksum=1 row_format=dynamic; +checksum table t1; +flush table t1; +--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1 +--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1 +check table t1; +checksum table t1; +drop table t1; + --echo # --echo # BUG#11751736: DROP DATABASE STATEMENT SHOULD REMOVE .OLD SUFFIX FROM --echo # DATABASE DIRECTORY |