summaryrefslogtreecommitdiff
path: root/sql/wsrep_thd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r--sql/wsrep_thd.cc38
1 files changed, 21 insertions, 17 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index fb48c1ad60e..3835c925745 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -50,8 +50,8 @@ int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff,
/* must have (&thd->LOCK_wsrep_thd) */
void wsrep_client_rollback(THD *thd)
{
- WSREP_DEBUG("client rollback due to BF abort for (%ld), query: %s",
- thd->thread_id, thd->query());
+ WSREP_DEBUG("client rollback due to BF abort for (%lld), query: %s",
+ (longlong) thd->thread_id, thd->query());
WSREP_ATOMIC_ADD_LONG(&wsrep_bf_aborts_counter, 1);
@@ -61,14 +61,16 @@ void wsrep_client_rollback(THD *thd)
if (thd->locked_tables_mode && thd->lock)
{
- WSREP_DEBUG("unlocking tables for BF abort (%ld)", thd->thread_id);
+ WSREP_DEBUG("unlocking tables for BF abort (%lld)",
+ (longlong) thd->thread_id);
thd->locked_tables_list.unlock_locked_tables(thd);
thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
}
if (thd->global_read_lock.is_acquired())
{
- WSREP_DEBUG("unlocking GRL for BF abort (%ld)", thd->thread_id);
+ WSREP_DEBUG("unlocking GRL for BF abort (%lld)",
+ (longlong) thd->thread_id);
thd->global_read_lock.unlock_global_read_lock(thd);
}
@@ -80,7 +82,8 @@ void wsrep_client_rollback(THD *thd)
if (thd->get_binlog_table_maps())
{
- WSREP_DEBUG("clearing binlog table map for BF abort (%ld)", thd->thread_id);
+ WSREP_DEBUG("clearing binlog table map for BF abort (%lld)",
+ (longlong) thd->thread_id);
thd->clear_binlog_table_maps();
}
mysql_mutex_lock(&thd->LOCK_wsrep_thd);
@@ -202,8 +205,8 @@ void wsrep_replay_transaction(THD *thd)
close_thread_tables(thd);
if (thd->locked_tables_mode && thd->lock)
{
- WSREP_DEBUG("releasing table lock for replaying (%ld)",
- thd->thread_id);
+ WSREP_DEBUG("releasing table lock for replaying (%lld)",
+ (longlong) thd->thread_id);
thd->locked_tables_list.unlock_locked_tables(thd);
thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
}
@@ -242,8 +245,8 @@ void wsrep_replay_transaction(THD *thd)
case WSREP_OK:
thd->wsrep_conflict_state= NO_CONFLICT;
wsrep->post_commit(wsrep, &thd->wsrep_ws_handle);
- WSREP_DEBUG("trx_replay successful for: %ld %llu",
- thd->thread_id, (long long)thd->real_id);
+ WSREP_DEBUG("trx_replay successful for: %lld %lld",
+ (longlong) thd->thread_id, (longlong) thd->real_id);
if (thd->get_stmt_da()->is_sent())
{
WSREP_WARN("replay ok, thd has reported status");
@@ -292,8 +295,8 @@ void wsrep_replay_transaction(THD *thd)
mysql_mutex_lock(&LOCK_wsrep_replaying);
wsrep_replaying--;
- WSREP_DEBUG("replaying decreased: %d, thd: %lu",
- wsrep_replaying, thd->thread_id);
+ WSREP_DEBUG("replaying decreased: %d, thd: %lld",
+ wsrep_replaying, (longlong) thd->thread_id);
mysql_cond_broadcast(&COND_wsrep_replaying);
mysql_mutex_unlock(&LOCK_wsrep_replaying);
}
@@ -360,10 +363,10 @@ static void wsrep_replication_process(THD *thd)
TABLE *tmp;
while ((tmp = thd->temporary_tables))
{
- WSREP_WARN("Applier %lu, has temporary tables at exit: %s.%s",
- thd->thread_id,
- (tmp->s) ? tmp->s->db.str : "void",
- (tmp->s) ? tmp->s->table_name.str : "void");
+ WSREP_WARN("Applier %lld, has temporary tables at exit: %s.%s",
+ (longlong) thd->thread_id,
+ (tmp->s) ? tmp->s->db.str : "void",
+ (tmp->s) ? tmp->s->table_name.str : "void");
}
wsrep_return_from_bf_mode(thd, &shadow);
DBUG_VOID_RETURN;
@@ -470,8 +473,9 @@ static void wsrep_rollback_process(THD *thd)
mysql_mutex_lock(&aborting->LOCK_wsrep_thd);
wsrep_client_rollback(aborting);
- WSREP_DEBUG("WSREP rollbacker aborted thd: (%lu %llu)",
- aborting->thread_id, (long long)aborting->real_id);
+ WSREP_DEBUG("WSREP rollbacker aborted thd: (%lld %lld)",
+ (longlong) aborting->thread_id,
+ (longlong) aborting->real_id);
mysql_mutex_unlock(&aborting->LOCK_wsrep_thd);
set_current_thd(thd);