@@ -11765,27 +11765,18 @@ Write_rows_log_event::do_exec_row(rpl_group_info *rgi)
11765
11765
{
11766
11766
DBUG_ASSERT (m_table != NULL );
11767
11767
const char *tmp= thd->get_proc_info ();
11768
- char *tmp_db= thd->db ;
11769
- char *message, msg[128 ];
11770
- my_snprintf (msg, sizeof (msg)," Write_rows_log_event::write_row() on table %s" ,
11771
- m_table->s ->table_name .str );
11772
- thd->db = m_table->s ->db .str ;
11773
- message= msg;
11768
+ const char *message= " Write_rows_log_event::write_row()" ;
11774
11769
11775
11770
#ifdef WSREP_PROC_INFO
11776
11771
my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
11777
- " Write_rows_log_event::write_row(%lld) on table %s " ,
11778
- (long long ) wsrep_thd_trx_seqno (thd), m_table-> s -> table_name . str );
11772
+ " Write_rows_log_event::write_row(%lld)" ,
11773
+ (long long ) wsrep_thd_trx_seqno (thd));
11779
11774
message= thd->wsrep_info ;
11780
11775
#endif /* WSREP_PROC_INFO */
11781
11776
11782
11777
thd_proc_info (thd, message);
11783
- DBUG_EXECUTE_IF (" should_sleep_for_mdev7409" ,{
11784
- my_sleep (500000 );
11785
- };);
11786
11778
int error= write_row (rgi, slave_exec_mode == SLAVE_EXEC_MODE_IDEMPOTENT);
11787
11779
thd_proc_info (thd, tmp);
11788
- thd->db = tmp_db;
11789
11780
11790
11781
if (error && !thd->is_error ())
11791
11782
{
@@ -12381,45 +12372,32 @@ int Delete_rows_log_event::do_exec_row(rpl_group_info *rgi)
12381
12372
{
12382
12373
int error;
12383
12374
const char *tmp= thd->get_proc_info ();
12384
- char *tmp_db= thd->db ;
12385
- char *message, msg[128 ];
12386
- my_snprintf (msg, sizeof (msg)," Delete_rows_log_event::find_row() on table %s" ,
12387
- m_table->s ->table_name .str );
12388
- thd->db = m_table->s ->db .str ;
12389
- message= msg;
12375
+ const char *message= " Delete_rows_log_event::find_row()" ;
12390
12376
const bool invoke_triggers=
12391
12377
slave_run_triggers_for_rbr && !master_had_triggers && m_table->triggers ;
12392
12378
DBUG_ASSERT (m_table != NULL );
12393
12379
12394
12380
#ifdef WSREP_PROC_INFO
12395
12381
my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
12396
- " Delete_rows_log_event::find_row(%lld) on table %s " ,
12397
- (long long ) wsrep_thd_trx_seqno (thd), m_table-> s -> table_name . str ) ;
12382
+ " Delete_rows_log_event::find_row(%lld)" ,
12383
+ (long long ) wsrep_thd_trx_seqno (thd)) ;
12398
12384
message= thd->wsrep_info ;
12399
12385
#endif /* WSREP_PROC_INFO */
12400
12386
12401
12387
thd_proc_info (thd, message);
12402
- DBUG_EXECUTE_IF (" should_sleep_for_mdev7409" ,{
12403
- my_sleep (500000 );
12404
- };);
12405
12388
if (!(error= find_row (rgi)))
12406
12389
{
12407
12390
/*
12408
12391
Delete the record found, located in record[0]
12409
12392
*/
12410
- my_snprintf (msg, sizeof (msg)," Delete_rows_log_event::ha_delete_row() on table %s" ,
12411
- m_table->s ->table_name .str );
12412
- message= msg;
12393
+ message= " Delete_rows_log_event::ha_delete_row()" ;
12413
12394
#ifdef WSREP_PROC_INFO
12414
12395
snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
12415
- " Delete_rows_log_event::ha_delete_row(%lld) on table %s " ,
12416
- (long long ) wsrep_thd_trx_seqno (thd), m_table-> s -> table_name . str ) ;
12396
+ " Delete_rows_log_event::ha_delete_row(%lld)" ,
12397
+ (long long ) wsrep_thd_trx_seqno (thd)) ;
12417
12398
message= thd->wsrep_info ;
12418
12399
#endif
12419
12400
thd_proc_info (thd, message);
12420
- DBUG_EXECUTE_IF (" should_sleep_for_mdev7409" ,{
12421
- my_sleep (500000 );
12422
- };);
12423
12401
12424
12402
if (invoke_triggers &&
12425
12403
process_triggers (TRG_EVENT_DELETE, TRG_ACTION_BEFORE, FALSE ))
@@ -12436,7 +12414,6 @@ int Delete_rows_log_event::do_exec_row(rpl_group_info *rgi)
12436
12414
m_table->file ->ha_index_or_rnd_end ();
12437
12415
}
12438
12416
thd_proc_info (thd, tmp);
12439
- thd->db = tmp_db;
12440
12417
return error;
12441
12418
}
12442
12419
@@ -12555,26 +12532,17 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
12555
12532
const bool invoke_triggers=
12556
12533
slave_run_triggers_for_rbr && !master_had_triggers && m_table->triggers ;
12557
12534
const char *tmp= thd->get_proc_info ();
12558
- char *tmp_db= thd->db ;
12559
- char *message, msg[128 ];
12535
+ const char *message= " Update_rows_log_event::find_row()" ;
12560
12536
DBUG_ASSERT (m_table != NULL );
12561
- my_snprintf (msg, sizeof (msg)," Update_rows_log_event::find_row() on table %s" ,
12562
- m_table->s ->table_name .str );
12563
- thd->db = m_table->s ->db .str ;
12564
- message= msg;
12565
12537
12566
12538
#ifdef WSREP_PROC_INFO
12567
12539
my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
12568
- " Update_rows_log_event::find_row(%lld) on table %s " ,
12569
- (long long ) wsrep_thd_trx_seqno (thd), m_table-> s -> table_name . str ) ;
12540
+ " Update_rows_log_event::find_row(%lld)" ,
12541
+ (long long ) wsrep_thd_trx_seqno (thd)) ;
12570
12542
message= thd->wsrep_info ;
12571
12543
#endif /* WSREP_PROC_INFO */
12572
12544
12573
12545
thd_proc_info (thd, message);
12574
- DBUG_EXECUTE_IF (" should_sleep_for_mdev7409" ,{
12575
- my_sleep (500000 );
12576
- };);
12577
-
12578
12546
int error= find_row (rgi);
12579
12547
if (error)
12580
12548
{
@@ -12585,7 +12553,6 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
12585
12553
if ((m_curr_row= m_curr_row_end))
12586
12554
unpack_current_row (rgi, &m_cols_ai);
12587
12555
thd_proc_info (thd, tmp);
12588
- thd->db = tmp_db;
12589
12556
return error;
12590
12557
}
12591
12558
@@ -12603,21 +12570,16 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
12603
12570
store_record (m_table,record[1 ]);
12604
12571
12605
12572
m_curr_row= m_curr_row_end;
12606
- my_snprintf (msg, sizeof (msg)," Update_rows_log_event::unpack_current_row() on table %s" ,
12607
- m_table->s ->table_name .str );
12608
- message= msg;
12573
+ message= " Update_rows_log_event::unpack_current_row()" ;
12609
12574
#ifdef WSREP_PROC_INFO
12610
12575
my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
12611
- " Update_rows_log_event::unpack_current_row(%lld) on table %s " ,
12612
- (long long ) wsrep_thd_trx_seqno (thd), m_table-> s -> table_name . str ) ;
12576
+ " Update_rows_log_event::unpack_current_row(%lld)" ,
12577
+ (long long ) wsrep_thd_trx_seqno (thd)) ;
12613
12578
message= thd->wsrep_info ;
12614
12579
#endif /* WSREP_PROC_INFO */
12615
12580
12616
12581
/* this also updates m_curr_row_end */
12617
12582
thd_proc_info (thd, message);
12618
- DBUG_EXECUTE_IF (" should_sleep_for_mdev7409" ,{
12619
- my_sleep (500000 );
12620
- };);
12621
12583
if ((error= unpack_current_row (rgi, &m_cols_ai)))
12622
12584
goto err;
12623
12585
@@ -12635,20 +12597,15 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
12635
12597
DBUG_DUMP (" new values" , m_table->record [0 ], m_table->s ->reclength );
12636
12598
#endif
12637
12599
12638
- my_snprintf (msg, sizeof (msg)," Update_rows_log_event::ha_update_row() on table %s" ,
12639
- m_table->s ->table_name .str );
12640
- message= msg;
12600
+ message= " Update_rows_log_event::ha_update_row()" ;
12641
12601
#ifdef WSREP_PROC_INFO
12642
12602
my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
12643
- " Update_rows_log_event::ha_update_row(%lld) on table %s " ,
12644
- (long long ) wsrep_thd_trx_seqno (thd), m_table-> s -> table_name . str ) ;
12603
+ " Update_rows_log_event::ha_update_row(%lld)" ,
12604
+ (long long ) wsrep_thd_trx_seqno (thd)) ;
12645
12605
message= thd->wsrep_info ;
12646
12606
#endif /* WSREP_PROC_INFO */
12647
12607
12648
12608
thd_proc_info (thd, message);
12649
- DBUG_EXECUTE_IF (" should_sleep_for_mdev7409" ,{
12650
- my_sleep (500000 );
12651
- };);
12652
12609
if (invoke_triggers &&
12653
12610
process_triggers (TRG_EVENT_UPDATE, TRG_ACTION_BEFORE, TRUE ))
12654
12611
{
@@ -12670,9 +12627,9 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
12670
12627
process_triggers (TRG_EVENT_UPDATE, TRG_ACTION_AFTER, TRUE ))
12671
12628
error= HA_ERR_GENERIC; // in case if error is not set yet
12672
12629
12673
- err:
12674
12630
thd_proc_info (thd, tmp);
12675
- thd->db = tmp_db;
12631
+
12632
+ err:
12676
12633
m_table->file ->ha_index_or_rnd_end ();
12677
12634
return error;
12678
12635
}
0 commit comments