Skip to content

Commit 86ca135

Browse files
SachinSetiyamariadb-SachinSetiya
authored andcommitted
Revert "MDEV-7409 On RBR, extend the PROCESSLIST info to include at least the name of the recently used table"
This reverts commit 15f46d5.
1 parent 15f46d5 commit 86ca135

File tree

3 files changed

+20
-204
lines changed

3 files changed

+20
-204
lines changed

mysql-test/suite/rpl/r/rpl_rbr_monitor.result

Lines changed: 0 additions & 62 deletions
This file was deleted.

mysql-test/suite/rpl/t/rpl_rbr_monitor.test

Lines changed: 0 additions & 79 deletions
This file was deleted.

sql/log_event.cc

Lines changed: 20 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -11765,27 +11765,18 @@ Write_rows_log_event::do_exec_row(rpl_group_info *rgi)
1176511765
{
1176611766
DBUG_ASSERT(m_table != NULL);
1176711767
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()";
1177411769

1177511770
#ifdef WSREP_PROC_INFO
1177611771
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));
1177911774
message= thd->wsrep_info;
1178011775
#endif /* WSREP_PROC_INFO */
1178111776

1178211777
thd_proc_info(thd, message);
11783-
DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
11784-
my_sleep(500000);
11785-
};);
1178611778
int error= write_row(rgi, slave_exec_mode == SLAVE_EXEC_MODE_IDEMPOTENT);
1178711779
thd_proc_info(thd, tmp);
11788-
thd->db= tmp_db;
1178911780

1179011781
if (error && !thd->is_error())
1179111782
{
@@ -12381,45 +12372,32 @@ int Delete_rows_log_event::do_exec_row(rpl_group_info *rgi)
1238112372
{
1238212373
int error;
1238312374
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()";
1239012376
const bool invoke_triggers=
1239112377
slave_run_triggers_for_rbr && !master_had_triggers && m_table->triggers;
1239212378
DBUG_ASSERT(m_table != NULL);
1239312379

1239412380
#ifdef WSREP_PROC_INFO
1239512381
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));
1239812384
message= thd->wsrep_info;
1239912385
#endif /* WSREP_PROC_INFO */
1240012386

1240112387
thd_proc_info(thd, message);
12402-
DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
12403-
my_sleep(500000);
12404-
};);
1240512388
if (!(error= find_row(rgi)))
1240612389
{
1240712390
/*
1240812391
Delete the record found, located in record[0]
1240912392
*/
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()";
1241312394
#ifdef WSREP_PROC_INFO
1241412395
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));
1241712398
message= thd->wsrep_info;
1241812399
#endif
1241912400
thd_proc_info(thd, message);
12420-
DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
12421-
my_sleep(500000);
12422-
};);
1242312401

1242412402
if (invoke_triggers &&
1242512403
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)
1243612414
m_table->file->ha_index_or_rnd_end();
1243712415
}
1243812416
thd_proc_info(thd, tmp);
12439-
thd->db= tmp_db;
1244012417
return error;
1244112418
}
1244212419

@@ -12555,26 +12532,17 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
1255512532
const bool invoke_triggers=
1255612533
slave_run_triggers_for_rbr && !master_had_triggers && m_table->triggers;
1255712534
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()";
1256012536
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;
1256512537

1256612538
#ifdef WSREP_PROC_INFO
1256712539
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));
1257012542
message= thd->wsrep_info;
1257112543
#endif /* WSREP_PROC_INFO */
1257212544

1257312545
thd_proc_info(thd, message);
12574-
DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
12575-
my_sleep(500000);
12576-
};);
12577-
1257812546
int error= find_row(rgi);
1257912547
if (error)
1258012548
{
@@ -12585,7 +12553,6 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
1258512553
if ((m_curr_row= m_curr_row_end))
1258612554
unpack_current_row(rgi, &m_cols_ai);
1258712555
thd_proc_info(thd, tmp);
12588-
thd->db= tmp_db;
1258912556
return error;
1259012557
}
1259112558

@@ -12603,21 +12570,16 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
1260312570
store_record(m_table,record[1]);
1260412571

1260512572
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()";
1260912574
#ifdef WSREP_PROC_INFO
1261012575
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));
1261312578
message= thd->wsrep_info;
1261412579
#endif /* WSREP_PROC_INFO */
1261512580

1261612581
/* this also updates m_curr_row_end */
1261712582
thd_proc_info(thd, message);
12618-
DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
12619-
my_sleep(500000);
12620-
};);
1262112583
if ((error= unpack_current_row(rgi, &m_cols_ai)))
1262212584
goto err;
1262312585

@@ -12635,20 +12597,15 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
1263512597
DBUG_DUMP("new values", m_table->record[0], m_table->s->reclength);
1263612598
#endif
1263712599

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()";
1264112601
#ifdef WSREP_PROC_INFO
1264212602
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));
1264512605
message= thd->wsrep_info;
1264612606
#endif /* WSREP_PROC_INFO */
1264712607

1264812608
thd_proc_info(thd, message);
12649-
DBUG_EXECUTE_IF("should_sleep_for_mdev7409",{
12650-
my_sleep(500000);
12651-
};);
1265212609
if (invoke_triggers &&
1265312610
process_triggers(TRG_EVENT_UPDATE, TRG_ACTION_BEFORE, TRUE))
1265412611
{
@@ -12670,9 +12627,9 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
1267012627
process_triggers(TRG_EVENT_UPDATE, TRG_ACTION_AFTER, TRUE))
1267112628
error= HA_ERR_GENERIC; // in case if error is not set yet
1267212629

12673-
err:
1267412630
thd_proc_info(thd, tmp);
12675-
thd->db= tmp_db;
12631+
12632+
err:
1267612633
m_table->file->ha_index_or_rnd_end();
1267712634
return error;
1267812635
}

0 commit comments

Comments
 (0)