summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-03-16 08:34:12 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-03-16 08:38:48 +0200
commit7033af9e81a69d75199faa028f8959667f755551 (patch)
treed1ed24a5d350bddf414c2d0c3fe1e995270e61df
parentca40330d1da6c1b30a33249eab546a5275a1a103 (diff)
downloadmariadb-git-7033af9e81a69d75199faa028f8959667f755551.tar.gz
Conditionally define TRX_WSREP_ABORT
-rw-r--r--storage/innobase/handler/ha_innodb.cc4
-rw-r--r--storage/innobase/include/trx0trx.h12
-rw-r--r--storage/xtradb/handler/ha_innodb.cc4
-rw-r--r--storage/xtradb/include/trx0trx.h12
4 files changed, 22 insertions, 10 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 31ea969fa21..7c412344920 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4917,8 +4917,10 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
ut_ad(trx->mysql_thd == thd);
switch (trx->abort_type) {
+#ifdef WITH_WSREP
case TRX_WSREP_ABORT:
break;
+#endif
case TRX_SERVER_ABORT:
if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
lock_mutex_enter();
@@ -4930,8 +4932,10 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
/* Cancel a pending lock request if there are any */
lock_trx_handle_wait(trx);
switch (trx->abort_type) {
+#ifdef WITH_WSREP
case TRX_WSREP_ABORT:
break;
+#endif
case TRX_SERVER_ABORT:
if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
lock_mutex_exit();
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index 68941363620..fe16b8272b8 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2017, MariaDB Corporation.
+Copyright (c) 2015, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -695,11 +695,13 @@ lock_rec_convert_impl_to_expl()) will access transactions associated
to other connections. The locks of transactions are protected by
lock_sys->mutex and sometimes by trx->mutex. */
-typedef enum {
+enum trx_abort_t {
TRX_SERVER_ABORT = 0,
- TRX_WSREP_ABORT = 1,
- TRX_REPLICATION_ABORT = 2
-} trx_abort_t;
+#ifdef WITH_WSREP
+ TRX_WSREP_ABORT,
+#endif
+ TRX_REPLICATION_ABORT
+};
struct trx_t{
ulint magic_n;
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 7d550c45356..2b7dc01238c 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -5513,8 +5513,10 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
ut_ad(trx->mysql_thd == thd);
switch (trx->abort_type) {
+#ifdef WITH_WSREP
case TRX_WSREP_ABORT:
break;
+#endif
case TRX_SERVER_ABORT:
if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
lock_mutex_enter();
@@ -5526,8 +5528,10 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
/* Cancel a pending lock request if there are any */
lock_trx_handle_wait(trx);
switch (trx->abort_type) {
+#ifdef WITH_WSREP
case TRX_WSREP_ABORT:
break;
+#endif
case TRX_SERVER_ABORT:
if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
lock_mutex_exit();
diff --git a/storage/xtradb/include/trx0trx.h b/storage/xtradb/include/trx0trx.h
index 5db19b3959a..77afde4c35c 100644
--- a/storage/xtradb/include/trx0trx.h
+++ b/storage/xtradb/include/trx0trx.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2017, MariaDB Corporation
+Copyright (c) 2015, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -744,11 +744,13 @@ lock_rec_convert_impl_to_expl()) will access transactions associated
to other connections. The locks of transactions are protected by
lock_sys->mutex and sometimes by trx->mutex. */
-typedef enum {
+enum trx_abort_t {
TRX_SERVER_ABORT = 0,
- TRX_WSREP_ABORT = 1,
- TRX_REPLICATION_ABORT = 2
-} trx_abort_t;
+#ifdef WITH_WSREP
+ TRX_WSREP_ABORT,
+#endif
+ TRX_REPLICATION_ABORT
+};
struct trx_t{
ulint magic_n;