@@ -6212,6 +6212,7 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
6212
6212
table->in_use = thd;
6213
6213
6214
6214
error= do_exec_row (rgi);
6215
+ THD_STAGE_INFO (thd, stage_executing);
6215
6216
6216
6217
if (unlikely (error))
6217
6218
DBUG_PRINT (" info" , (" error: %s" , HA_ERR (error)));
@@ -8084,36 +8085,10 @@ int Rows_log_event::update_sequence()
8084
8085
int
8085
8086
Write_rows_log_event::do_exec_row (rpl_group_info *rgi)
8086
8087
{
8087
- DBUG_ASSERT (m_table != NULL );
8088
- const char *tmp= thd->get_proc_info ();
8089
- char *message, msg[128 ];
8090
- const LEX_CSTRING &table_name= m_table->s ->table_name ;
8091
- const char quote_char=
8092
- get_quote_char_for_identifier (thd, table_name.str , table_name.length );
8093
- my_snprintf (msg, sizeof msg,
8094
- " Write_rows_log_event::write_row() on table %c%.*s%c" ,
8095
- quote_char, int (table_name.length ), table_name.str , quote_char);
8096
- message= msg;
8097
8088
int error;
8098
-
8099
- #ifdef WSREP_PROC_INFO
8100
- my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
8101
- " Write_rows_log_event::write_row(%lld) on table %c%.*s%c" ,
8102
- (long long ) wsrep_thd_trx_seqno (thd), quote_char,
8103
- int (table_name.length ), table_name.str , quote_char);
8104
- message= thd->wsrep_info ;
8105
- #endif /* WSREP_PROC_INFO */
8106
-
8107
- thd_proc_info (thd, message);
8089
+ thd_proc_info (thd, " Write_rows_log_event::write_row()" );
8108
8090
error= write_row (rgi, slave_exec_mode == SLAVE_EXEC_MODE_IDEMPOTENT);
8109
- thd_proc_info (thd, tmp);
8110
-
8111
- if (unlikely (error) && unlikely (!thd->is_error ()))
8112
- {
8113
- DBUG_ASSERT (0 );
8114
- my_error (ER_UNKNOWN_ERROR, MYF (0 ));
8115
- }
8116
-
8091
+ DBUG_ASSERT (!error || thd->is_error ());
8117
8092
return error;
8118
8093
}
8119
8094
@@ -8725,46 +8700,15 @@ Delete_rows_log_event::do_after_row_operations(const Slave_reporting_capability
8725
8700
int Delete_rows_log_event::do_exec_row (rpl_group_info *rgi)
8726
8701
{
8727
8702
int error;
8728
- const char *tmp= thd->get_proc_info ();
8729
- char *message, msg[128 ];
8730
- const LEX_CSTRING &table_name= m_table->s ->table_name ;
8731
- const char quote_char=
8732
- get_quote_char_for_identifier (thd, table_name.str , table_name.length );
8733
- my_snprintf (msg, sizeof msg,
8734
- " Delete_rows_log_event::find_row() on table %c%.*s%c" ,
8735
- quote_char, int (table_name.length ), table_name.str , quote_char);
8736
- message= msg;
8737
- const bool invoke_triggers= (m_table->triggers && do_invoke_trigger ());
8738
- DBUG_ASSERT (m_table != NULL );
8739
-
8740
- #ifdef WSREP_PROC_INFO
8741
- my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
8742
- " Delete_rows_log_event::find_row(%lld) on table %c%.*s%c" ,
8743
- (long long ) wsrep_thd_trx_seqno (thd), quote_char,
8744
- int (table_name.length ), table_name.str ,
8745
- quote_char);
8746
- message= thd->wsrep_info ;
8747
- #endif /* WSREP_PROC_INFO */
8748
-
8749
- thd_proc_info (thd, message);
8703
+ const bool invoke_triggers= m_table->triggers && do_invoke_trigger ();
8704
+
8705
+ thd_proc_info (thd, " Delete_rows_log_event::find_row()" );
8750
8706
if (likely (!(error= find_row (rgi))))
8751
8707
{
8752
8708
/*
8753
8709
Delete the record found, located in record[0]
8754
8710
*/
8755
- my_snprintf (msg, sizeof msg,
8756
- " Delete_rows_log_event::ha_delete_row() on table %c%.*s%c" ,
8757
- quote_char, int (table_name.length ), table_name.str ,
8758
- quote_char);
8759
- message= msg;
8760
- #ifdef WSREP_PROC_INFO
8761
- snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
8762
- " Delete_rows_log_event::ha_delete_row(%lld) on table %c%.*s%c" ,
8763
- (long long ) wsrep_thd_trx_seqno (thd), quote_char,
8764
- int (table_name.length ), table_name.str , quote_char);
8765
- message= thd->wsrep_info ;
8766
- #endif
8767
- thd_proc_info (thd, message);
8711
+ thd_proc_info (thd, " Delete_rows_log_event::ha_delete_row()" );
8768
8712
8769
8713
if (invoke_triggers &&
8770
8714
unlikely (process_triggers (TRG_EVENT_DELETE, TRG_ACTION_BEFORE, FALSE )))
@@ -8791,7 +8735,6 @@ int Delete_rows_log_event::do_exec_row(rpl_group_info *rgi)
8791
8735
error= HA_ERR_GENERIC; // in case if error is not set yet
8792
8736
m_table->file ->ha_index_or_rnd_end ();
8793
8737
}
8794
- thd_proc_info (thd, tmp);
8795
8738
return error;
8796
8739
}
8797
8740
@@ -8885,28 +8828,7 @@ int
8885
8828
Update_rows_log_event::do_exec_row (rpl_group_info *rgi)
8886
8829
{
8887
8830
const bool invoke_triggers= (m_table->triggers && do_invoke_trigger ());
8888
- const char *tmp= thd->get_proc_info ();
8889
- DBUG_ASSERT (m_table != NULL );
8890
- char *message, msg[128 ];
8891
- const LEX_CSTRING &table_name= m_table->s ->table_name ;
8892
- const char quote_char=
8893
- get_quote_char_for_identifier (thd, table_name.str , table_name.length );
8894
- my_snprintf (msg, sizeof msg,
8895
- " Update_rows_log_event::find_row() on table %c%.*s%c" ,
8896
- quote_char, int (table_name.length ), table_name.str , quote_char);
8897
- message= msg;
8898
-
8899
- #ifdef WSREP_PROC_INFO
8900
- my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
8901
- " Update_rows_log_event::find_row(%lld) on table %c%.*s%c" ,
8902
- (long long ) wsrep_thd_trx_seqno (thd), quote_char,
8903
- int (table_name.length ), table_name.str ,
8904
- quote_char);
8905
- message= thd->wsrep_info ;
8906
- #endif /* WSREP_PROC_INFO */
8907
-
8908
- thd_proc_info (thd, message);
8909
-
8831
+ thd_proc_info (thd, " Update_rows_log_event::find_row()" );
8910
8832
int error= find_row (rgi);
8911
8833
if (unlikely (error))
8912
8834
{
@@ -8916,7 +8838,6 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
8916
8838
*/
8917
8839
if ((m_curr_row= m_curr_row_end))
8918
8840
unpack_current_row (rgi, &m_cols_ai);
8919
- thd_proc_info (thd, tmp);
8920
8841
return error;
8921
8842
}
8922
8843
@@ -8939,20 +8860,8 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
8939
8860
store_record (m_table,record[1 ]);
8940
8861
8941
8862
m_curr_row= m_curr_row_end;
8942
- my_snprintf (msg, sizeof msg,
8943
- " Update_rows_log_event::unpack_current_row() on table %c%.*s%c" ,
8944
- quote_char, int (table_name.length ), table_name.str , quote_char);
8945
- message= msg;
8946
- #ifdef WSREP_PROC_INFO
8947
- my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
8948
- " Update_rows_log_event::unpack_current_row(%lld) on table %c%.*s%c" ,
8949
- (long long ) wsrep_thd_trx_seqno (thd), quote_char,
8950
- int (table_name.length ), table_name.str , quote_char);
8951
- message= thd->wsrep_info ;
8952
- #endif /* WSREP_PROC_INFO */
8953
-
8954
8863
/* this also updates m_curr_row_end */
8955
- thd_proc_info (thd, message );
8864
+ thd_proc_info (thd, " Update_rows_log_event::unpack_current_row() " );
8956
8865
if (unlikely ((error= unpack_current_row (rgi, &m_cols_ai))))
8957
8866
goto err;
8958
8867
if (m_table->s ->long_unique_table )
@@ -8972,19 +8881,7 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
8972
8881
DBUG_DUMP (" new values" , m_table->record [0 ], m_table->s ->reclength );
8973
8882
#endif
8974
8883
8975
- my_snprintf (msg, sizeof msg,
8976
- " Update_rows_log_event::ha_update_row() on table %c%.*s%c" ,
8977
- quote_char, int (table_name.length ), table_name.str , quote_char);
8978
- message= msg;
8979
- #ifdef WSREP_PROC_INFO
8980
- my_snprintf (thd->wsrep_info , sizeof (thd->wsrep_info ) - 1 ,
8981
- " Update_rows_log_event::ha_update_row(%lld) on table %c%.*s%c" ,
8982
- (long long ) wsrep_thd_trx_seqno (thd), quote_char,
8983
- int (table_name.length ), table_name.str , quote_char);
8984
- message= thd->wsrep_info ;
8985
- #endif /* WSREP_PROC_INFO */
8986
-
8987
- thd_proc_info (thd, message);
8884
+ thd_proc_info (thd, " Update_rows_log_event::ha_update_row()" );
8988
8885
if (invoke_triggers &&
8989
8886
unlikely (process_triggers (TRG_EVENT_UPDATE, TRG_ACTION_BEFORE, TRUE )))
8990
8887
{
@@ -9016,9 +8913,7 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
9016
8913
unlikely (process_triggers (TRG_EVENT_UPDATE, TRG_ACTION_AFTER, TRUE )))
9017
8914
error= HA_ERR_GENERIC; // in case if error is not set yet
9018
8915
9019
-
9020
8916
err:
9021
- thd_proc_info (thd, tmp);
9022
8917
m_table->file ->ha_index_or_rnd_end ();
9023
8918
return error;
9024
8919
}
0 commit comments