diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/galera/t/enforce_storage_engine.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/galera/t/enforce_storage_engine.test')
-rw-r--r-- | mysql-test/suite/galera/t/enforce_storage_engine.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/enforce_storage_engine.test b/mysql-test/suite/galera/t/enforce_storage_engine.test new file mode 100644 index 00000000..5f07dd53 --- /dev/null +++ b/mysql-test/suite/galera/t/enforce_storage_engine.test @@ -0,0 +1,33 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# enforce_storage_engine should prevent the creation of tables with +# non-enforced storage engines on the master node and the command +# should also not replicate to other nodes. + +--echo # +--echo # MDEV-8831 : enforce_storage_engine doesn't block table creation on +--echo # other nodes (galera cluster) +--echo # + +--connection node_1 +SET @@enforce_storage_engine=INNODB; +CREATE TABLE t1(i INT) ENGINE=INNODB; +--error ER_UNKNOWN_STORAGE_ENGINE +CREATE TABLE t2(i INT) ENGINE=MYISAM; + +INSERT INTO t1 VALUES(1); + +--connection node_2 +SHOW TABLES; +SELECT COUNT(*)=1 FROM t1; + +CREATE TABLE t2(i INT) ENGINE=MYISAM; + +--connection node_1 +SHOW TABLES; + +# Cleanup +DROP TABLE t1, t2; + +--echo # End of tests |