mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
Do not allow server to start if binlog_format is set to a format other than ROW. Also restrict the change of GLOBAL/SESSION binlog_format value at runtime.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
call mtr.add_suppression("WSREP: cannot get fake InnoDB transaction ID");
|
||||
call mtr.add_suppression("WSREP: Could not open saved state file for reading:.*");
|
||||
call mtr.add_suppression("WSREP: MariaDB Galera does not support binlog format.*");
|
||||
SHOW VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
@@ -33,3 +34,18 @@ CREATE TABLE IF NOT EXISTS test.t3 AS SELECT * FROM information_schema.routines
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
DROP TABLE IF EXISTS test.t2;
|
||||
DROP TABLE IF EXISTS test.t3;
|
||||
SET @@GLOBAL.binlog_format=STATEMENT;
|
||||
ERROR 42000: Variable 'binlog_format' can't be set to the value of 'STATEMENT'
|
||||
SHOW GLOBAL VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
SET @@GLOBAL.binlog_format=MIXED;
|
||||
ERROR 42000: Variable 'binlog_format' can't be set to the value of 'MIXED'
|
||||
SHOW GLOBAL VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
SET @@GLOBAL.binlog_format=ROW;
|
||||
SHOW GLOBAL VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
# End of test.
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#
|
||||
call mtr.add_suppression("WSREP: cannot get fake InnoDB transaction ID");
|
||||
call mtr.add_suppression("WSREP: Could not open saved state file for reading:.*");
|
||||
call mtr.add_suppression("WSREP: MariaDB Galera does not support binlog format.*");
|
||||
|
||||
SHOW VARIABLES LIKE 'binlog_format';
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -25,3 +26,15 @@ DROP TABLE IF EXISTS test.t1;
|
||||
DROP TABLE IF EXISTS test.t2;
|
||||
DROP TABLE IF EXISTS test.t3;
|
||||
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@GLOBAL.binlog_format=STATEMENT;
|
||||
SHOW GLOBAL VARIABLES LIKE 'binlog_format';
|
||||
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
SET @@GLOBAL.binlog_format=MIXED;
|
||||
SHOW GLOBAL VARIABLES LIKE 'binlog_format';
|
||||
|
||||
SET @@GLOBAL.binlog_format=ROW;
|
||||
SHOW GLOBAL VARIABLES LIKE 'binlog_format';
|
||||
|
||||
--echo # End of test.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user