summaryrefslogtreecommitdiff
path: root/include/wsrep.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-09-27 17:28:01 +0200
committerSergei Golubchik <serg@mariadb.org>2018-10-24 14:48:08 +0200
commit329058be298a471006e55a674db1c4d769acaf67 (patch)
tree15b06cd31a74ad39aeff25abfb7d48fa4db094f1 /include/wsrep.h
parent0140bfac5e216bd7ba8ad324bd914d596bf59a1f (diff)
downloadmariadb-git-329058be298a471006e55a674db1c4d769acaf67.tar.gz
wsrep: create a macro for the error: label
that is used by WSREP_TO_ISOLATION_BEGIN and other galera macros, to avoid the need for wrapping this label in #ifdef WITH_WSREP/#endif
Diffstat (limited to 'include/wsrep.h')
-rw-r--r--include/wsrep.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/wsrep.h b/include/wsrep.h
index 0d32547d69c..14d624aec26 100644
--- a/include/wsrep.h
+++ b/include/wsrep.h
@@ -25,12 +25,12 @@
#define WSREP_MYSQL_DB (char *)"mysql"
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
- goto error;
+ goto wsrep_error_label;
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) \
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, \
table_list_, alter_info_)) \
- goto error;
+ goto wsrep_error_label;
#define WSREP_TO_ISOLATION_END \
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
@@ -42,7 +42,7 @@
*/
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
if (WSREP(thd) && !thd->lex->no_write_to_binlog \
- && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error;
+ && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto wsrep_error_label;
#define WSREP_DEBUG(...) \
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
@@ -52,8 +52,8 @@
#define WSREP_SYNC_WAIT(thd_, before_) \
{ if (WSREP_CLIENT(thd_) && \
- wsrep_sync_wait(thd_, before_)) goto error; }
-
+ wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
+#define WSREP_ERROR_LABEL wsrep_error_label
#else
#define IF_WSREP(A,B) B
#define DBUG_ASSERT_IF_WSREP(A)
@@ -65,6 +65,7 @@
#define WSREP_TO_ISOLATION_END
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
#define WSREP_SYNC_WAIT(thd_, before_)
+#define WSREP_ERROR_LABEL goto wsrep_error_label; wsrep_error_label
#endif /* WITH_WSREP */