| 1 |
--source include/galera_cluster.inc |
| 2 |
--source include/have_innodb.inc |
| 3 |
|
| 4 |
# enforce_storage_engine should prevent the creation of tables with |
| 5 |
# non-enforced storage engines on the master node and the command |
| 6 |
# should also not replicate to other nodes. |
| 7 |
|
| 8 |
--echo # |
| 9 |
--echo # MDEV-8831 : enforce_storage_engine doesn't block table creation on |
| 10 |
--echo # other nodes (galera cluster) |
| 11 |
--echo # |
| 12 |
|
| 13 |
--connection node_1 |
| 14 |
SET @@enforce_storage_engine=INNODB; |
| 15 |
CREATE TABLE t1(i INT) ENGINE=INNODB; |
| 16 |
--error ER_OPTION_PREVENTS_STATEMENT |
| 17 |
CREATE TABLE t2(i INT) ENGINE=MYISAM; |
| 18 |
|
| 19 |
INSERT INTO t1 VALUES(1); |
| 20 |
|
| 21 |
--connection node_2 |
| 22 |
SHOW TABLES; |
| 23 |
SELECT COUNT(*)=1 FROM t1; |
| 24 |
|
| 25 |
CREATE TABLE t2(i INT) ENGINE=MYISAM; |
| 26 |
|
| 27 |
--connection node_1 |
| 28 |
SHOW TABLES; |
| 29 |
|
| 30 |
# Cleanup |
| 31 |
DROP TABLE t1, t2; |
| 32 |
|
| 33 |
--echo # End of tests |