Debian Codegraph @

mysql-test/suite/group_replication/t/gr_udfs_charset.test

raw
1 ###############################################################################
2 # Bug#30380530
3 # GROUP ACTIONS AND UDFS RETURNING STRINGS SHOW HEX VALUES ON INTERACTIVE
4 # SESSIONS
5 #
6 # This test uses 2 servers.
7 #
8 # Test:
9 # 1. Retrieve the CHARSET of group_replication_set_communication_protocol UDF
10 # 2. Retrieve the CHARSET of group_replication_get_communication_protocol UDF
11 # 3. Retrieve the CHARSET of group_replication_set_write_concurrency UDF
12 # 4. Retrieve the CHARSET of group_replication_switch_to_single_primary_mode UDF
13 # 5. Retrieve the CHARSET of group_replication_set_as_primary UDF
14 # 6. Retrieve the CHARSET of group_replication_switch_to_multi_primary_mode UDF
15 ################################################################################
16 --source include/have_group_replication_plugin.inc
17 --source include/force_restart.inc
18 --source include/group_replication.inc
19
20 --echo ###############################################################################
21 --echo # Check the Character set of the return value
22 SELECT CHARSET(group_replication_set_communication_protocol("8.0.19"));
23 SELECT CHARSET(group_replication_get_communication_protocol());
24 SELECT CHARSET(group_replication_set_write_concurrency(15));
25
26 --let $server1_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1)
27
28 # Check the charset returned by the UDF
29 --replace_result $server1_uuid MEMBER1_UUID
30 --eval SELECT CHARSET(group_replication_switch_to_single_primary_mode("$server1_uuid"))
31
32 # Now switch to single primary mode.
33 --replace_result $server1_uuid MEMBER1_UUID
34 --eval SELECT group_replication_switch_to_single_primary_mode("$server1_uuid")
35
36 # Check the charset returned by the UDF
37 --replace_result $server1_uuid MEMBER1_UUID
38 --eval SELECT CHARSET(group_replication_set_as_primary("$server1_uuid"))
39
40 # Check the charset returned by the UDF
41 SELECT CHARSET(group_replication_switch_to_multi_primary_mode());
42 # Check that UDF returns value in decimal since it returns INT
43 --exec $MYSQL --binary-as-hex=TRUE -e "SELECT group_replication_get_write_concurrency()"
44 # Character set of the return value
45 SELECT CHARSET(group_replication_get_write_concurrency());
46 --echo ###############################################################################
47 --let $rpl_group_replication_single_primary_mode=1
48 --let $rpl_group_replication_reset_persistent_vars=1
49 --source include/group_replication_end.inc