1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-18587 Don't reject DDLs if streaming replication is on

The check for streaming replication logging format in
THD::decide_logging_format() did the check also for DDLs running
in TOI mode. This caused DROP DATABASE to fail if streaming
replication was enabled.

Added check for THD wsrep execution mode and perform the check
only if the THD is in local processing mode (i.e. not TOI).

Added galera_sr_create_drop test to verify that CREATE/DROP
statements pass even if streaming replication is on.
This commit is contained in:
Teemu Ollakka
2019-02-15 14:51:39 +02:00
committed by Jan Lindström
parent 75c6fce5a3
commit 4baab8697a
3 changed files with 63 additions and 1 deletions

View File

@ -5987,7 +5987,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
binlog by filtering rules.
*/
#ifdef WITH_WSREP
if (WSREP_CLIENT_NNULL(this) && variables.wsrep_trx_fragment_size > 0)
if (WSREP_CLIENT_NNULL(this) && wsrep_thd_is_local(this) &&
variables.wsrep_trx_fragment_size > 0)
{
if (!is_current_stmt_binlog_format_row())
{