File: gr_udfs_charset.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (49 lines) | stat: -rw-r--r-- 2,378 bytes parent folder | download
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
###############################################################################
# Bug#30380530
# GROUP ACTIONS AND UDFS RETURNING STRINGS SHOW HEX VALUES ON INTERACTIVE
# SESSIONS
#
# This test uses 2 servers.
#
# Test:
# 1. Retrieve the CHARSET of group_replication_set_communication_protocol UDF
# 2. Retrieve the CHARSET of group_replication_get_communication_protocol UDF
# 3. Retrieve the CHARSET of group_replication_set_write_concurrency UDF
# 4. Retrieve the CHARSET of group_replication_switch_to_single_primary_mode UDF
# 5. Retrieve the CHARSET of group_replication_set_as_primary UDF
# 6. Retrieve the CHARSET of group_replication_switch_to_multi_primary_mode UDF
################################################################################
--source include/have_group_replication_plugin.inc
--source include/force_restart.inc
--source include/group_replication.inc

--echo ###############################################################################
--echo # Check the Character set of the return value
SELECT CHARSET(group_replication_set_communication_protocol("8.0.19"));
SELECT CHARSET(group_replication_get_communication_protocol());
SELECT CHARSET(group_replication_set_write_concurrency(15));

--let $server1_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1)

# Check the charset returned by the UDF
--replace_result $server1_uuid MEMBER1_UUID
--eval SELECT CHARSET(group_replication_switch_to_single_primary_mode("$server1_uuid"))

# Now switch to single primary mode.
--replace_result $server1_uuid MEMBER1_UUID
--eval SELECT group_replication_switch_to_single_primary_mode("$server1_uuid")

# Check the charset returned by the UDF
--replace_result $server1_uuid MEMBER1_UUID
--eval SELECT CHARSET(group_replication_set_as_primary("$server1_uuid"))

# Check the charset returned by the UDF
SELECT CHARSET(group_replication_switch_to_multi_primary_mode());
# Check that UDF returns value in decimal since it returns INT
--exec $MYSQL --binary-as-hex=TRUE -e "SELECT group_replication_get_write_concurrency()"
# Character set of the return value
SELECT CHARSET(group_replication_get_write_concurrency());
--echo ###############################################################################
--let $rpl_group_replication_single_primary_mode=1
--let $rpl_group_replication_reset_persistent_vars=1
--source include/group_replication_end.inc