mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-22708 Assertion `!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()' failed in Delayed_insert::handle_inserts and in Diagnostics_area::set_eof_status
Variable wsrep_forced_binlog_format has higher priority than binlog_format. In situation where STATEMENT is used and DELAYED INSERT is executing we should fall back to non-delay INSERT. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
parent
2f5ae0da71
commit
86a2e2ba90
4 changed files with 30 additions and 1 deletions
11
mysql-test/suite/galera/r/MDEV-22708.result
Normal file
11
mysql-test/suite/galera/r/MDEV-22708.result
Normal file
|
@ -0,0 +1,11 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
SET @wsrep_forced_binlog_format_saved = @@GLOBAL.wsrep_forced_binlog_format;
|
||||
SET @@GLOBAL.wsrep_forced_binlog_format = STATEMENT;
|
||||
CREATE TABLE t1(c INT PRIMARY KEY) ENGINE = MyISAM;
|
||||
INSERT DELAYED INTO t1 VALUES (1),(2),(3);
|
||||
SELECT SLEEP(1);
|
||||
SLEEP(1)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
SET @@GLOBAL.wsrep_forced_binlog_format = @wsrep_forced_binlog_format_saved;
|
4
mysql-test/suite/galera/t/MDEV-22708.cnf
Normal file
4
mysql-test/suite/galera/t/MDEV-22708.cnf
Normal file
|
@ -0,0 +1,4 @@
|
|||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
log-bin
|
14
mysql-test/suite/galera/t/MDEV-22708.test
Normal file
14
mysql-test/suite/galera/t/MDEV-22708.test
Normal file
|
@ -0,0 +1,14 @@
|
|||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @wsrep_forced_binlog_format_saved = @@GLOBAL.wsrep_forced_binlog_format;
|
||||
SET @@GLOBAL.wsrep_forced_binlog_format = STATEMENT;
|
||||
|
||||
CREATE TABLE t1(c INT PRIMARY KEY) ENGINE = MyISAM;
|
||||
|
||||
INSERT DELAYED INTO t1 VALUES (1),(2),(3);
|
||||
SELECT SLEEP(1);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
SET @@GLOBAL.wsrep_forced_binlog_format = @wsrep_forced_binlog_format_saved;
|
|
@ -474,7 +474,7 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type,
|
|||
}
|
||||
|
||||
bool log_on= (thd->variables.option_bits & OPTION_BIN_LOG);
|
||||
if (global_system_variables.binlog_format == BINLOG_FORMAT_STMT &&
|
||||
if (thd->wsrep_binlog_format() == BINLOG_FORMAT_STMT &&
|
||||
log_on && mysql_bin_log.is_open())
|
||||
{
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue