Browse Source
MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
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.pull/374/head
8 changed files with 116 additions and 20 deletions
-
23mysql-test/suite/galera/r/create.result
-
26mysql-test/suite/galera/t/create.test
-
16mysql-test/suite/wsrep/r/binlog_format.result
-
13mysql-test/suite/wsrep/t/binlog_format.test
-
1mysql-test/suite/wsrep/t/pool_of_threads.test
-
9sql/mysqld.cc
-
10sql/sql_class.cc
-
38sql/sys_vars.cc
@ -0,0 +1,23 @@ |
|||
# |
|||
# MDEV-6924 : Server crashed on CREATE TABLE ... SELECT |
|||
# |
|||
SET @wsrep_forced_binlog_format_saved=@@GLOBAL.wsrep_forced_binlog_format; |
|||
SET @@GLOBAL.wsrep_forced_binlog_format=STATEMENT; |
|||
SHOW VARIABLES LIKE '%log%bin%'; |
|||
Variable_name Value |
|||
log_bin OFF |
|||
log_bin_trust_function_creators ON |
|||
sql_log_bin ON |
|||
USE test; |
|||
CREATE TABLE t1(i INT) ENGINE=INNODB; |
|||
INSERT INTO t1 VALUES(1); |
|||
CREATE TEMPORARY TABLE `t1_temp` AS SELECT * FROM `t1` WHERE i = 1; |
|||
SELECT * FROM t1; |
|||
i |
|||
1 |
|||
SELECT * FROM t1_temp; |
|||
i |
|||
1 |
|||
DROP TABLE t1; |
|||
SET @@GLOBAL.wsrep_forced_binlog_format=@wsrep_forced_binlog_format_saved; |
|||
# End of tests |
|||
@ -0,0 +1,26 @@ |
|||
--source include/galera_cluster.inc |
|||
--source include/have_innodb.inc |
|||
|
|||
--echo # |
|||
--echo # MDEV-6924 : Server crashed on CREATE TABLE ... SELECT |
|||
--echo # |
|||
|
|||
SET @wsrep_forced_binlog_format_saved=@@GLOBAL.wsrep_forced_binlog_format; |
|||
SET @@GLOBAL.wsrep_forced_binlog_format=STATEMENT; |
|||
|
|||
# @@log_bin must be OFF |
|||
SHOW VARIABLES LIKE '%log%bin%'; |
|||
|
|||
USE test; |
|||
CREATE TABLE t1(i INT) ENGINE=INNODB; |
|||
INSERT INTO t1 VALUES(1); |
|||
CREATE TEMPORARY TABLE `t1_temp` AS SELECT * FROM `t1` WHERE i = 1; |
|||
SELECT * FROM t1; |
|||
SELECT * FROM t1_temp; |
|||
|
|||
# Cleanup |
|||
DROP TABLE t1; |
|||
SET @@GLOBAL.wsrep_forced_binlog_format=@wsrep_forced_binlog_format_saved; |
|||
|
|||
--echo # End of tests |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue