1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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:
Nirbhay Choubey
2014-11-17 11:56:03 -05:00
parent 7dd74fa3a2
commit 6f65d2d114
8 changed files with 116 additions and 20 deletions

View File

@@ -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.