diff options
author | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2019-02-15 14:51:39 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-02-19 07:58:03 +0200 |
commit | 4baab8697ac398e461d2a07988d9ad1739ce9019 (patch) | |
tree | 5005e2ec3ec775edd050018a6ef40d0f3634d9f5 /sql/sql_class.cc | |
parent | 75c6fce5a35a6ce38882e8228dd1a2b6020831b6 (diff) | |
download | mariadb-git-4baab8697ac398e461d2a07988d9ad1739ce9019.tar.gz |
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.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index bb0227df212..029da77761e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -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()) { |