diff options
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r-- | mysql-test/t/myisam.test | 86 |
1 files changed, 69 insertions, 17 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 15533ca00e6..87a00399c23 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -727,23 +727,6 @@ create table t1 (v varchar(65535)); eval set storage_engine=$default; # -# Test how DROP TABLE works if the index or data file doesn't exists - -create table t1 (a int) engine=myisam; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; -drop table if exists t1; -create table t1 (a int) engine=myisam; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYI ; ---error 1051,6 -drop table t1; -create table t1 (a int) engine=myisam; -system rm $MYSQLTEST_VARDIR/master-data/test/t1.MYD ; ---error 1105,6,29 -drop table t1; ---error 1051 -drop table t1; - -# # Test concurrent insert # First with static record length # @@ -824,3 +807,72 @@ create table t3 (c1 int) engine=myisam pack_keys=default; create table t4 (c1 int) engine=myisam pack_keys=2; drop table t1, t2, t3; +# +# Test of key_block_size +# + +# Old format, to be obsolete in 5.3 +create table t1 (a int not null, key `a` key_block_size=1024 (a)); +show create table t1; +drop table t1; + +set @@new=1; + +create table t1 (a int not null, key `a` (a) key_block_size=1024); +show create table t1; +drop table t1; + +create table t1 (a int not null, key `a` (a) key_block_size=2048); +show create table t1; +drop table t1; + +create table t1 (a varchar(2048), key `a` (a)); +show create table t1; +drop table t1; + +create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); +show create table t1; +drop table t1; + +create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; +show create table t1; +alter table t1 key_block_size=2048; +show create table t1; +alter table t1 add c int, add key (c); +show create table t1; +alter table t1 key_block_size=0; +alter table t1 add d int, add key (d); +show create table t1; +drop table t1; + +create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; +show create table t1; +drop table t1; + +create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; +show create table t1; +drop table t1; + +create table t1 (a int not null, b int, key (a) key_block_size=1024, key(b) key_block_size=8192) key_block_size=16384; +show create table t1; +drop table t1; + + +# Test limits and errors of key_block_size + +create table t1 (a int not null, key `a` (a) key_block_size=512); +show create table t1; +drop table t1; + +create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); +show create table t1; +drop table t1; + +create table t1 (a int not null, key `a` (a) key_block_size=1025); +show create table t1; +drop table t1; + +--error 1064 +create table t1 (a int not null, key key_block_size=1024 (a)); + +set @@new=0; |