summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authormkaruza <mario.karuza@galeracluster.com>2020-12-08 10:07:45 +0100
committerJan Lindström <jan.lindstrom@mariadb.com>2021-01-26 14:02:24 +0200
commit95a2bca01f423dc97281709a7871f5901fd05c70 (patch)
tree2b7f71719e519ff17be630446ee6b9196f6cdfac /sql/sql_base.cc
parent3f871b339429441ad907ecf7dfabdc414797e664 (diff)
downloadmariadb-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_base.cc')
-rw-r--r--sql/sql_base.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 87970ee11b4..623c0eff5b9 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -4430,6 +4430,19 @@ restart:
else
tbl->reginfo.lock_type= tables->lock_type;
}
+#ifdef WITH_WSREP
+ /*
+ At this point we have SE associated with table so we can check wsrep_mode
+ rules at this point.
+ */
+ if (WSREP(thd) &&
+ wsrep_thd_is_local(thd) &&
+ !wsrep_check_mode_after_open_table(thd, tbl->file->ht->db_type))
+ {
+ error= TRUE;
+ goto error;
+ }
+#endif
}
#ifdef WITH_WSREP