summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-11-14 20:05:35 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-11-14 20:05:35 +0100
commit10aa5764835ba5bc5fa49a1051e1cc647c0f301b (patch)
tree951d6bc7bf5f5958141bdaab19ea8fb9be5c915f /include
parent6083c5a05407dcb137e4ae1d39b944c9c392c48e (diff)
parent81b9c78500a9326a85290992a9340eb887b74048 (diff)
downloadmariadb-git-10aa5764835ba5bc5fa49a1051e1cc647c0f301b.tar.gz
Merge branch '10.5' into 10.6
Diffstat (limited to 'include')
-rw-r--r--include/wsrep.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/wsrep.h b/include/wsrep.h
index f8a1863b966..703b89f966a 100644
--- a/include/wsrep.h
+++ b/include/wsrep.h
@@ -25,21 +25,24 @@
#define DBUG_ASSERT_IF_WSREP(A) DBUG_ASSERT(A)
#define WSREP_MYSQL_DB (char *)"mysql"
+#define WSREP_TO_ISOLATION_BEGIN_IF(db_, table_, table_list_) \
+ if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_))
-#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
- if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
+#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
+ if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
goto wsrep_error_label;
#define WSREP_TO_ISOLATION_BEGIN_CREATE(db_, table_, table_list_, create_info_) \
- if (WSREP(thd) && \
+ if (WSREP_ON && WSREP(thd) && \
wsrep_to_isolation_begin(thd, db_, table_, \
- table_list_, NULL, create_info_)) \
+ table_list_, nullptr, nullptr, create_info_))\
goto wsrep_error_label;
-#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, create_info_) \
- if (WSREP(thd) && wsrep_thd_is_local(thd) && \
- wsrep_to_isolation_begin(thd, db_, table_, \
- table_list_, alter_info_, create_info_)) \
+#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_, create_info_) \
+ if (WSREP(thd) && wsrep_thd_is_local(thd) && \
+ wsrep_to_isolation_begin(thd, db_, table_, \
+ table_list_, alter_info_, \
+ fk_tables_, create_info_)) \
goto wsrep_error_label;
#define WSREP_TO_ISOLATION_END \
@@ -55,6 +58,10 @@
if (WSREP(thd) && !thd->lex->no_write_to_binlog \
&& wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto wsrep_error_label;
+#define WSREP_TO_ISOLATION_BEGIN_FK_TABLES(db_, table_, table_list_, fk_tables) \
+ if (WSREP(thd) && !thd->lex->no_write_to_binlog \
+ && wsrep_to_isolation_begin(thd, db_, table_, table_list_, NULL, fk_tables))
+
#define WSREP_SYNC_WAIT(thd_, before_) \
{ if (WSREP_CLIENT(thd_) && \
wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
@@ -68,7 +75,8 @@
#define WSREP_DEBUG(...)
#define WSREP_ERROR(...)
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0)
-#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, create_info_)
+#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_, create_info_)
+#define WSREP_TO_ISOLATION_BEGIN_FK_TABLES(db_, table_, table_list_, fk_tables_)
#define WSREP_TO_ISOLATION_END
#define WSREP_TO_ISOLATION_BEGIN_CREATE(db_, table_, table_list_, create_info_)
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)