mirror of
https://github.com/MariaDB/server.git
synced 2025-08-03 17:11:34 +02:00

@@enforce_storage_engine is local setting and there is no knowledge how other nodes are configured. Statement CREATE TABLE xxx ENGINE=yyy is replicated as it is and if required engine != enforced engine it could lead inconsistent used storage engine in the cluster. Fix is to return error and a warning if required engine is not same as enforced engine. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
25 lines
1.3 KiB
Text
25 lines
1.3 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
set session sql_mode='';
|
|
SET @@enforce_storage_engine=INNODB;
|
|
CREATE TABLE t1 (c INT ) ENGINE=ARIA;
|
|
ERROR HY000: The MariaDB server is running with the ENFORCE_STORAGE_ENGINE option so it cannot execute this statement
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Error 1290 The MariaDB server is running with the ENFORCE_STORAGE_ENGINE option so it cannot execute this statement
|
|
Note 1290 Do not use ENGINE=x when @@enforce_storage_engine is set
|
|
Error 1290 The MariaDB server is running with the ENFORCE_STORAGE_ENGINE option so it cannot execute this statement
|
|
Note 1290 Do not use ENGINE=x when @@enforce_storage_engine is set
|
|
CREATE TABLE t1 (c INT );
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (c INT ) ENGINE=INNODB;
|
|
DROP TABLE t1;
|
|
SET @@enforce_storage_engine=ARIA;
|
|
CREATE TABLE t1 (c INT ) ENGINE=INNODB;
|
|
ERROR HY000: The MariaDB server is running with the ENFORCE_STORAGE_ENGINE option so it cannot execute this statement
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
Error 1290 The MariaDB server is running with the ENFORCE_STORAGE_ENGINE option so it cannot execute this statement
|
|
Note 1290 Do not use ENGINE=x when @@enforce_storage_engine is set
|
|
Error 1290 The MariaDB server is running with the ENFORCE_STORAGE_ENGINE option so it cannot execute this statement
|
|
Note 1290 Do not use ENGINE=x when @@enforce_storage_engine is set
|