summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/handler/ha_innodb.cc11
-rw-r--r--storage/xtradb/handler/ha_innodb.h18
-rw-r--r--storage/xtradb/trx/trx0trx.cc24
3 files changed, 35 insertions, 18 deletions
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 5ffd8b6e129..93d2d049d8a 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -4570,6 +4570,9 @@ innobase_commit_low(
#ifdef WITH_WSREP
THD* thd = (THD*)trx->mysql_thd;
const char* tmp = 0;
+ WSREP_DEBUGX(3, "innobase_commit_low(): thd: %lu",
+ wsrep_thd_thread_id(trx->mysql_thd));
+
if (wsrep_on(thd)) {
#ifdef WSREP_PROC_INFO
char info[64];
@@ -4693,6 +4696,10 @@ innobase_commit_ordered_2(
THD* thd) /*!< in: MySQL thread handle */
{
DBUG_ENTER("innobase_commit_ordered_2");
+ WSREP_DEBUGX(3, "innobase_commit_ordered_2(): thd: %lu, "
+ "concurrency: %lu",
+ wsrep_thd_thread_id(trx->mysql_thd),
+ innobase_commit_concurrency);
/* We need current binlog position for mysqlbackup to work. */
retry:
@@ -4819,6 +4826,8 @@ innobase_commit(
DBUG_PRINT("trans", ("ending transaction"));
trx = check_trx_exists(thd);
+ WSREP_DEBUGX(3, "innobase_commit(): thd: %lu, commit: %d",
+ wsrep_thd_thread_id(trx->mysql_thd), commit_trx);
/* Since we will reserve the trx_sys->mutex, we have to release
the search system latch first to obey the latching order. */
@@ -4929,6 +4938,8 @@ innobase_rollback(
DBUG_PRINT("trans", ("aborting transaction"));
trx = check_trx_exists(thd);
+ WSREP_DEBUGX(3, "innobase_rollback(): thd: %lu",
+ wsrep_thd_thread_id(trx->mysql_thd));
/* Release a possible FIFO ticket and search latch. Since we will
reserve the trx_sys->mutex, we have to release the search system
diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h
index 7b0d20aec72..3a163ad8aff 100644
--- a/storage/xtradb/handler/ha_innodb.h
+++ b/storage/xtradb/handler/ha_innodb.h
@@ -476,23 +476,7 @@ extern void mysql_bin_log_commit_pos(THD *thd, ulonglong *out_pos, const char **
struct trx_t;
#ifdef WITH_WSREP
-#include <wsrep_mysqld.h>
-//extern "C" int wsrep_trx_order_before(void *thd1, void *thd2);
-
-extern "C" bool wsrep_thd_is_wsrep_on(THD *thd);
-
-
-extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode);
-extern "C" void wsrep_thd_set_query_state(
- THD *thd, enum wsrep_query_state state);
-
-extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id);
-
-extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd);
-extern "C" time_t wsrep_thd_query_start(THD *thd);
-extern "C" query_id_t wsrep_thd_query_id(THD *thd);
-extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd);
-extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id);
+#include <mysql/service_wsrep.h>
#endif
extern const struct _ft_vft ft_vft_result;
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc
index 41f8c166190..d7e334d687b 100644
--- a/storage/xtradb/trx/trx0trx.cc
+++ b/storage/xtradb/trx/trx0trx.cc
@@ -52,7 +52,6 @@ Created 3/26/1996 Heikki Tuuri
#include "ut0vec.h"
#include<set>
-
extern "C"
int thd_deadlock_victim_preference(const MYSQL_THD thd1, const MYSQL_THD thd2);
@@ -1399,6 +1398,12 @@ trx_commit_in_memory(
if the transaction did not modify anything */
{
trx->must_flush_log_later = FALSE;
+#ifdef WITH_WSREP
+ if (wsrep_debug > 2)
+ fprintf(stderr, "WSREP: trx_commit_in_memory(): thd: %lu, "
+ "lsn: %lu\n",
+ wsrep_thd_thread_id(trx->mysql_thd), lsn);
+#endif /* WITH_WSREP */
if (trx_is_autocommit_non_locking(trx)) {
ut_ad(trx->read_only);
@@ -1594,6 +1599,11 @@ trx_commit_low(
or NULL if trx made no modifications */
{
lsn_t lsn;
+#ifdef WITH_WSREP
+ if (wsrep_debug > 2)
+ fprintf(stderr, "WSREP: trx_commit_low(): thd: %lu \n",
+ wsrep_thd_thread_id(trx->mysql_thd));
+#endif /* WITH_WSREP */
assert_trx_nonlocking_or_in_list(trx);
ut_ad(!trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY));
@@ -1912,6 +1922,11 @@ trx_commit_for_mysql(
started. */
ut_a(trx);
+#ifdef WITH_WSREP
+ if (wsrep_debug > 2)
+ fprintf(stderr, "WSREP: trx_commit_for_mysql(): thd: %lu\n",
+ wsrep_thd_thread_id(trx->mysql_thd));
+#endif /* WITH_WSREP */
switch (trx->state) {
case TRX_STATE_NOT_STARTED:
@@ -1929,6 +1944,13 @@ trx_commit_for_mysql(
ut_d(trx->start_file = __FILE__);
ut_d(trx->start_line = __LINE__);
+#ifdef WITH_WSREP
+ if (wsrep_debug > 1)
+ fprintf(stderr, "WSREP: trx_commit_for_mysql() "
+ "started trx, thd: %lu\n",
+ wsrep_thd_thread_id(trx->mysql_thd));
+#endif /* WITH_WSREP */
+
trx_start_low(trx);
/* fall through */
case TRX_STATE_ACTIVE: