diff options
author | Monty <monty@mariadb.org> | 2018-02-14 02:30:11 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:40 +0300 |
commit | c3f37c070ce1224173fa5ed9033d50aa6f0bc535 (patch) | |
tree | cd420eceea1ab0fab740e1b1b7e801398e1ce9b3 /mysql-test/suite/maria | |
parent | 209375fdd07d9be79784984f8543be73d1f92a9a (diff) | |
download | mariadb-git-c3f37c070ce1224173fa5ed9033d50aa6f0bc535.tar.gz |
Fixed alter online table for Aria tables
fill_alter_table() always thought that index was changed because of
of a wrong check of block_size. Some engines had code to correct this
that should not be needed, Aria didn't and because of this some online
operations didn't work.
This code fixes the comparision of block_size to only compare if it's set.
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r-- | mysql-test/suite/maria/maria.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/maria/maria.test | 3 |
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index 805fb536848..bd2403ad461 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -1904,7 +1904,28 @@ t1 CREATE TABLE `t1` ( KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, KEY `c` (`c`) KEY_BLOCK_SIZE=8192 ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=2048 +alter table t1 key_block_size=4096; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + `c` int(11) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, + KEY `c` (`c`) KEY_BLOCK_SIZE=8192 +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 KEY_BLOCK_SIZE=4096 alter table t1 key_block_size=0; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(2048) DEFAULT NULL, + `c` int(11) DEFAULT NULL, + KEY `a` (`a`) KEY_BLOCK_SIZE=8192, + KEY `b` (`b`(1000)) KEY_BLOCK_SIZE=8192, + KEY `c` (`c`) KEY_BLOCK_SIZE=8192 +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 alter table t1 add d int, add key (d); show create table t1; Table Create Table diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index 34bd4a638bb..e4f8d2427c4 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -1166,7 +1166,10 @@ 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=4096; +show create table t1; alter table t1 key_block_size=0; +show create table t1; alter table t1 add d int, add key (d); show create table t1; drop table t1; |