################################################################################ # This test verifies that a deprecation warning is thrown/logged when # group_replication_recovery_complete_at variable is used. # # Test: # 0. The test requires one server: server1. # 1. Set group_replication_recovery_complete_at to TRANSACTIONS_APPLIED # A deprecation warning is thrown on the client session. # 2. Set group_replication_recovery_complete_at to TRANSACTIONS_CERTIFIED # A deprecation warning is thrown on the client session. # 3. Start Group Replication from client session. # A deprecation warning is thrown on the client session because # group_replication_recovery_complete_at is not the default one. # 4. Start Group Replication on server start. # A deprecation warning is logged on the error log because # group_replication_recovery_complete_at is not the default one. # 5. Cleanup. ################################################################################ --source include/big_test.inc --source include/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source include/group_replication.inc --echo --echo ############################################################ --echo # 1. Set group_replication_recovery_complete_at to TRANSACTIONS_APPLIED --echo # A deprecation warning is thrown on the client session. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --let $saved_group_replication_recovery_complete_at= `SELECT @@GLOBAL.group_replication_recovery_complete_at;` SET @@GLOBAL.group_replication_recovery_complete_at= "TRANSACTIONS_APPLIED"; --echo --echo ############################################################ --echo # 2. Set group_replication_recovery_complete_at to TRANSACTIONS_CERTIFIED --echo # A deprecation warning is thrown on the client session. --let $rpl_connection_name= server1 --source include/rpl_connection.inc SET @@GLOBAL.group_replication_recovery_complete_at= "TRANSACTIONS_CERTIFIED"; --echo --echo ############################################################ --echo # 3. Start Group Replication from client session. --echo # A deprecation warning is thrown on the client session because --echo # group_replication_recovery_complete_at is not the default one. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --source include/start_and_bootstrap_group_replication.inc --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err --let $assert_only_after= CURRENT_TEST: group_replication.gr_group_replication_recovery_complete_at_deprecation --let $assert_select= The syntax 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release. --let $assert_count= 0 --let $assert_text= Deprecation warning is not logged on the error log when thrown in client. --source include/assert_grep.inc --echo --echo ############################################################ --echo # 4. Start Group Replication on server start. --echo # A deprecation warning is logged on the error log because --echo # group_replication_recovery_complete_at is not the default one. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --let $allow_rpl_inited=1 --let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address` --let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds` --let $restart_parameters=restart:--group_replication_group_name=$group_replication_group_name --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_start_on_boot=1 --group_replication_recovery_complete_at=TRANSACTIONS_CERTIFIED --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS --source include/restart_mysqld.inc --let $rpl_server_number= 1 --source include/rpl_reconnect.inc --let $group_replication_member_state= ONLINE --source include/gr_wait_for_member_state.inc --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err --let $assert_only_after= CURRENT_TEST: group_replication.gr_group_replication_recovery_complete_at_deprecation --let $assert_select= The syntax 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release. --let $assert_count= 1 --let $assert_text= Deprecation warning is logged on the error log. --source include/assert_grep.inc --echo --echo ############################################################ --echo # 5. Cleanup. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --replace_result $saved_group_replication_recovery_complete_at GROUP_REPLICATION_RECOVERY_COMPLETE_AT --eval SET @@GLOBAL.group_replication_recovery_complete_at= $saved_group_replication_recovery_complete_at --source include/group_replication_end.inc