Bug #90671 Connection error messages not shown in gr. gr_recovery_connection_options wrong
Submitted: 27 Apr 2018 20:40 Modified: 29 Jan 2019 11:45
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[27 Apr 2018 20:40] Sven Sandberg
Description:
gr_recovery_connection_options contains this code:

let $show_statement= SHOW SLAVE STATUS FOR CHANNEL 'group_replication_recovery';
let $field= Last_IO_Error;
let $condition= 'Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.';
--source include/wait_show_condition.inc

This is wrong way to use wait_show_condition.inc, because $condition must begin with an operator. This causes wait_show_condition.inc to return immediately always. The correct way to use wait_show_condition.inc here would be:

let $condition = = 'Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.';

Note that $condition should begin with an equality operator. (Even better for this case would be to use include/wait_for_slave_io_error.inc.)

However, when adding the equality sign, the test fails. The expected error message never happens. Assuming the *intention* of the test was correct (even if the typo made it suppress the check), there is either a server bug or another bug in the test. Setting category to server just in case, change to test if needed.

The same problem occurs for two invocations of wait_show_condition.inc in this test.

How to repeat:
diff --git a/mysql-test/suite/group_replication/t/gr_recovery_connection_options.test b/mysql-test/suite/group_replication/t/gr_recovery_connection_options.test
index 8439d201208..f3b035daed9 100644
--- a/mysql-test/suite/group_replication/t/gr_recovery_connection_options.test
+++ b/mysql-test/suite/group_replication/t/gr_recovery_connection_options.test
@@ -161,7 +161,7 @@ SET DEBUG_SYNC= "now SIGNAL signal.recovery_end";
 --echo # Verify that the show slave status shows specific IO_error
 let $show_statement= SHOW SLAVE STATUS FOR CHANNEL 'group_replication_recovery';
 let $field= Last_IO_Error;
-let $condition= 'Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.';
+let $condition = = 'Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.';
 --source include/wait_show_condition.inc
 
 --source include/stop_group_replication.inc
[29 Jan 2019 11:45] David Moss
Posted by developer:
 
Seems to be related to internal testing only, closing without change log
entry
[30 Jan 2019 13:53] David Moss
Posted by developer:
 
Based on discussion with Anibal we decided this did require a change log entry.

Thank you for your feedback, this has been fixed in upcoming versions and the following was added to the 8.0.16 changelog:
In the event of the recovery channel failing, unprocessed relay logs were being erased.