1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
################################################################################
# This test does basic check around UNINSTALL and INSTALL PLUGIN commands.
#
# Test:
# 0. The test requires one server.
# 1. Bootstrap start GR.
# - Verify that GR specific two P_S tables are not empty.
# 2. Uninstall plugin.
# - Then uninstall it again twice; expect ER_SP_DOES_NOT_EXIST.
# - Verify that GR specific two P_S tables are empty.
# 3. Install plugin.
# - Then try installing it again twice; expect ER_UDF_EXISTS.
# - Verify that GR specific two P_S tables are are not empty.
################################################################################
--source include/force_restart.inc
--source include/have_group_replication_plugin_base.inc
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--echo
--echo # 1. Bootstrap start GR.
--echo # Verify that group replication specific P_S tables are not empty.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/start_and_bootstrap_group_replication.inc
--let $assert_text= P_S table replication_group_members should not be empty
--let $assert_cond= "[SELECT COUNT(*) FROM performance_schema.replication_group_members]" = 1
--source include/assert.inc
--let $assert_text= P_S table replication_group_member_stats should not be empty
--let $assert_cond= "[SELECT COUNT(*) FROM performance_schema.replication_group_member_stats]" = 1
--source include/assert.inc
--echo
--echo # 2. Uninstall plugin.
--echo # Then uninstall it again twice; expect ER_SP_DOES_NOT_EXIST.
--echo # Verify that group replication specific P_S tables are empty.
--source include/uninstall_group_replication_plugin.inc
--error ER_SP_DOES_NOT_EXIST
UNINSTALL PLUGIN group_replication;
--let $assert_text= P_S table replication_group_members should be empty
--let $assert_cond= "[SELECT COUNT(*) FROM performance_schema.replication_group_members]" = 0
--source include/assert.inc
--let $assert_text= P_S table replication_group_member_stats should be empty
--let $assert_cond= "[SELECT COUNT(*) FROM performance_schema.replication_group_member_stats]" = 0
--source include/assert.inc
--echo
--echo # 3. Install plugin.
--echo # Then Install it again twice; expect ER_UDF_EXISTS.
--echo # Verify that GR specific two P_S tables are are not empty.
--source include/install_group_replication_plugin.inc
--replace_result $GROUP_REPLICATION GROUP_REPLICATION
--error ER_UDF_EXISTS
--eval INSTALL PLUGIN group_replication SONAME '$GROUP_REPLICATION'
--let $assert_text= P_S table replication_group_members should not be empty
--let $assert_cond= "[SELECT COUNT(*) FROM performance_schema.replication_group_members]" = 1
--source include/assert.inc
--let $assert_text= P_S table replication_group_member_stats should not be empty
--let $assert_cond= "[SELECT COUNT(*) FROM performance_schema.replication_group_member_stats]" = 1
--source include/assert.inc
--source include/group_replication_end.inc
|