Skip to content
Permalink
Browse files
Conditionally define TRX_WSREP_ABORT
  • Loading branch information
dr-m committed Mar 16, 2018
1 parent ca40330 commit 7033af9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
@@ -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();
@@ -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;
@@ -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();
@@ -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;

0 comments on commit 7033af9

Please sign in to comment.