diff options
author | Michael Widenius <monty@mariadb.org> | 2018-08-02 17:59:11 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-08-14 12:18:38 +0300 |
commit | d6d63f4844bf87adb6250d1b1d43e86feab9a5d0 (patch) | |
tree | 3235561239dd245c9567233caeed3f295f7129ce /mysql-test/suite/innodb | |
parent | 0e0f1092b8cacd9c2aa33fb3f42203737d93a669 (diff) | |
download | mariadb-git-d6d63f4844bf87adb6250d1b1d43e86feab9a5d0.tar.gz |
MDEV-16421 Make system tables crash safe
Make all system tables in mysql directory of type
engine=Aria
Privilege tables are using transactional=1
Statistical tables are using transactional=0, to allow them
to be quickly updated with low overhead.
Help tables are also using transactional=0 as these are only
updated at init time.
Other changes:
- Aria store engine is now a required engine
- Update comment for Aria tables to reflect their new usage
- Fixed that _ma_reset_trn_for_table() removes unlocked table
from transaction table list. This was needed to allow one
to lock and unlock system tables separately from other
tables, for example when reading a procedure from mysql.proc
- Don't give a warning when using transactional=1 for engines
that is using transactions. This is both logical and also
to avoid warnings/errors when doing an alter of a privilege
table to InnoDB.
- Don't abort on warnings from ALTER TABLE for changes that
would be accepted by CREATE TABLE.
- New created Aria transactional tables are marked as not movable
(as they include create_rename_lsn).
- bootstrap.test was changed to kill orignal server, as one
can't anymore have two servers started at same time on same
data directory and data files.
- Disable maria.small_blocksize as one can't anymore change
aria block size after system tables are created.
- Speed up creation of help tables by using lock tables.
- wsrep_sst_resync now also copies Aria redo logs.
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r-- | mysql-test/suite/innodb/r/alter_table.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/system_tables.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/alter_table.test | 12 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/system_tables.test | 2 |
4 files changed, 29 insertions, 2 deletions
diff --git a/mysql-test/suite/innodb/r/alter_table.result b/mysql-test/suite/innodb/r/alter_table.result index 8a0717aa677..3a765a61dd2 100644 --- a/mysql-test/suite/innodb/r/alter_table.result +++ b/mysql-test/suite/innodb/r/alter_table.result @@ -22,3 +22,18 @@ alter table t1 change column id2 id4 varchar(100) not null; select * from t1 where id4 like 'a'; id1 id4 id3 drop table t1; +create table t1 (a int) transactional=1 engine=aria; +create table t2 (a int) transactional=1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 TRANSACTIONAL=1 +alter table t1 engine=innodb; +alter table t1 add column b int; +drop table t1,t2; diff --git a/mysql-test/suite/innodb/r/system_tables.result b/mysql-test/suite/innodb/r/system_tables.result index 79a24f7e455..8789b4f5aff 100644 --- a/mysql-test/suite/innodb/r/system_tables.result +++ b/mysql-test/suite/innodb/r/system_tables.result @@ -5,4 +5,4 @@ select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3; starttime 2008-08-12 02:43:00 drop table envois3; -alter table mysql.time_zone_name engine=MyISAM; +alter table mysql.time_zone_name engine=Aria; diff --git a/mysql-test/suite/innodb/t/alter_table.test b/mysql-test/suite/innodb/t/alter_table.test index 474035436e5..1a43016a38e 100644 --- a/mysql-test/suite/innodb/t/alter_table.test +++ b/mysql-test/suite/innodb/t/alter_table.test @@ -22,3 +22,15 @@ create table t1 ( alter table t1 change column id2 id4 varchar(100) not null; select * from t1 where id4 like 'a'; drop table t1; + +# +# Check that innodb supports transactional=1 +# + +create table t1 (a int) transactional=1 engine=aria; +create table t2 (a int) transactional=1 engine=innodb; +show create table t1; +show create table t2; +alter table t1 engine=innodb; +alter table t1 add column b int; +drop table t1,t2; diff --git a/mysql-test/suite/innodb/t/system_tables.test b/mysql-test/suite/innodb/t/system_tables.test index 90cb8c59fbd..172628790f8 100644 --- a/mysql-test/suite/innodb/t/system_tables.test +++ b/mysql-test/suite/innodb/t/system_tables.test @@ -9,4 +9,4 @@ insert envois3 values ('2008-08-11 22:43:00'); --source include/restart_mysqld.inc select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3; drop table envois3; -alter table mysql.time_zone_name engine=MyISAM; +alter table mysql.time_zone_name engine=Aria; |