Skip to content

Commit 9249a16

Browse files
author
Tatiana Azundris Nuernberg
committed
Bug#31327337: SUBSYSTEM NAME FOR SEMISYNC ERRORS IS [SERVER]
Messages from semi-sync replication appeared in the error-log with a subsystem tag of "Server", rather than the expected "Repl". This was a result of a fault in the per-subtree set-up of semi-sync. Messages from semi-sync, such as MY-011171 (ER_SEMISYNC_STOP_BINLOG_DUMP_TO_SLAVE) are now correctly issued with a subsystem tag of "Repl". This incidently is a great example of how easy testing for error-log contents is since the addition of the table performance_schema.error_log (WL#13681): > SELECT subsystem, error_code FROM performance_schema.error_log WHERE error_code="MY-011170" LIMIT 1; subsystem error_code Repl MY-011170 Change-Id: I5ae349338c46d75d7e7d7641cd8bff6404b95933
1 parent 909ffbc commit 9249a16

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

mysql-test/suite/rpl_nogtid/r/rpl_semi_sync.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,11 @@ Rpl_semi_sync_master_no_tx 1
391391
show status like 'Rpl_semi_sync_master_yes_tx';
392392
Variable_name Value
393393
Rpl_semi_sync_master_yes_tx 2
394+
select subsystem, error_code
395+
from performance_schema.error_log
396+
where error_code="MY-011170" limit 1;
397+
subsystem error_code
398+
Repl MY-011170
394399
#
395400
# Test semi-sync slave connect to non-semi-sync master
396401
#

mysql-test/suite/rpl_nogtid/t/rpl_semi_sync.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,11 @@ show status like 'Rpl_semi_sync_master_status';
525525
show status like 'Rpl_semi_sync_master_no_tx';
526526
show status like 'Rpl_semi_sync_master_yes_tx';
527527

528+
# Bug#31327337: SUBSYSTEM NAME FOR SEMISYNC ERRORS IS [SERVER] - pt2
529+
select subsystem, error_code
530+
from performance_schema.error_log
531+
where error_code="MY-011170" limit 1;
532+
528533
--echo #
529534
--echo # Test semi-sync slave connect to non-semi-sync master
530535
--echo #

plugin/semisync/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 2020, Oracle and/or its affiliates.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License, version 2.0,
@@ -21,7 +21,7 @@
2121
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2222

2323
ADD_DEFINITIONS(-DMYSQL_SERVER)
24-
ADD_DEFINITIONS(-DLOG_SUBSYS_TAG="Repl")
24+
ADD_DEFINITIONS(-DLOG_SUBSYSTEM_TAG="Repl")
2525
ADD_DEFINITIONS(-DLOG_COMPONENT_TAG="semisync")
2626

2727
MYSQL_ADD_PLUGIN(semisync_master

0 commit comments

Comments
 (0)