@@ -258,7 +258,6 @@ static inline bool wsrep_run_commit_hook(THD* thd, bool all)
258
258
static inline int wsrep_before_prepare (THD* thd, bool all)
259
259
{
260
260
DBUG_ENTER (" wsrep_before_prepare" );
261
- WSREP_DEBUG (" wsrep_before_prepare: %d" , wsrep_is_real (thd, all));
262
261
int ret= 0 ;
263
262
DBUG_ASSERT (wsrep_run_commit_hook (thd, all));
264
263
if ((ret= thd->wsrep_parallel_slave_wait_for_prior_commit ()))
@@ -279,11 +278,12 @@ static inline int wsrep_before_prepare(THD* thd, bool all)
279
278
thd->wsrep_trx ().ws_meta ().gtid (),
280
279
wsrep_gtid_server.undefined ());
281
280
}
282
- else
283
- {
284
- WSREP_DEBUG (" before_prepare failed for %s ret=%s (%d)" ,
285
- wsrep_xid_print (&thd->wsrep_xid ), strerror (ret), ret);
286
- }
281
+
282
+ WSREP_DEBUG (" wsrep_before_prepare: %d for %s ret=%s" ,
283
+ wsrep_is_real (thd, all),
284
+ wsrep_xid_print (&thd->wsrep_xid ).c_str (),
285
+ wsrep::to_c_string (thd->wsrep_cs ().current_error ()));
286
+
287
287
mysql_mutex_lock (&thd->LOCK_thd_kill );
288
288
if (thd->killed ) wsrep_backup_kill_for_commit (thd);
289
289
mysql_mutex_unlock (&thd->LOCK_thd_kill );
@@ -318,9 +318,6 @@ static inline int wsrep_after_prepare(THD* thd, bool all)
318
318
static inline int wsrep_before_commit (THD* thd, bool all)
319
319
{
320
320
DBUG_ENTER (" wsrep_before_commit" );
321
- WSREP_DEBUG (" wsrep_before_commit: %d, %lld" ,
322
- wsrep_is_real (thd, all),
323
- (long long )wsrep_thd_trx_seqno (thd));
324
321
int ret= 0 ;
325
322
DBUG_ASSERT (wsrep_run_commit_hook (thd, all));
326
323
if ((ret= thd->wsrep_cs ().before_commit ()) == 0 )
@@ -356,6 +353,12 @@ static inline int wsrep_before_commit(THD* thd, bool all)
356
353
wsrep_register_for_group_commit (thd);
357
354
}
358
355
356
+ WSREP_DEBUG (" wsrep_before_commit: %d seqno=%lld for %s ret=%s" ,
357
+ wsrep_is_real (thd, all),
358
+ wsrep_thd_trx_seqno (thd),
359
+ wsrep_xid_print (&thd->wsrep_xid ).c_str (),
360
+ wsrep::to_c_string (thd->wsrep_cs ().current_error ()));
361
+
359
362
mysql_mutex_lock (&thd->LOCK_thd_kill );
360
363
if (thd->killed ) wsrep_backup_kill_for_commit (thd);
361
364
mysql_mutex_unlock (&thd->LOCK_thd_kill );
@@ -486,15 +489,13 @@ int wsrep_after_statement(THD* thd)
486
489
!thd->internal_transaction () ?
487
490
thd->wsrep_cs ().after_statement () : 0 );
488
491
489
- if (ret)
490
- WSREP_DEBUG (" wsrep_after_statement for %lu client_state %s "
491
- " client_mode %s trans_state %s ret=%s (%d)" ,
492
- thd_get_thread_id (thd),
493
- wsrep::to_c_string (thd->wsrep_cs ().state ()),
494
- wsrep::to_c_string (thd->wsrep_cs ().mode ()),
495
- wsrep::to_c_string (thd->wsrep_cs ().transaction ().state ()),
496
- strerror (ret), ret);
497
-
492
+ WSREP_DEBUG (" wsrep_after_statement for %lu client_state %s "
493
+ " client_mode %s trans_state %s ret=%s" ,
494
+ thd_get_thread_id (thd),
495
+ wsrep::to_c_string (thd->wsrep_cs ().state ()),
496
+ wsrep::to_c_string (thd->wsrep_cs ().mode ()),
497
+ wsrep::to_c_string (thd->wsrep_cs ().transaction ().state ()),
498
+ wsrep::to_c_string (thd->wsrep_cs ().current_error ()));
498
499
499
500
if (wsrep_is_active (thd))
500
501
{
0 commit comments