diff options
author | mkaruza <mario.karuza@galeracluster.com> | 2020-12-08 10:07:45 +0100 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-26 14:02:24 +0200 |
commit | 95a2bca01f423dc97281709a7871f5901fd05c70 (patch) | |
tree | 2b7f71719e519ff17be630446ee6b9196f6cdfac /sql/sql_parse.cc | |
parent | 3f871b339429441ad907ecf7dfabdc414797e664 (diff) | |
download | mariadb-git-bb-10.6-MDEV-20008.tar.gz |
MDEV-20008: Galera strict modebb-10.6-MDEV-20008
Added new enum variable `wsrep_mode` which can be used to turn on WSREP
features which are not part of default behaviour.
Added enum `BINLOG_ROW_FORMAT_ONLY`, `REQUIRED_PRIMARY_KEY` and
`STRICT_REPLICATION`. `wsrep-mode=STRICT_REPLICATION` behaves
like variable `wsrep_strict_ddl`.
Variable wsrep_strict_ddl is deprecated and if set we use
new wsrep_mode setting instead.
Reviewed and improved by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d976e75843a..97b7dd427a5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3707,6 +3707,11 @@ mysql_execute_command(THD *thd) thd->set_query_timer(); #ifdef WITH_WSREP + /* Check wsrep_mode rules before command execution. */ + if (WSREP(thd) && + wsrep_thd_is_local(thd) && !wsrep_check_mode_before_cmd_execute(thd)) + goto error; + /* Always start a new transaction for a wsrep THD unless the current command is DDL or explicit BEGIN. This will guarantee that |