| 1 |
################################################################################ |
| 2 |
# WL#11615 - MySQL GCS: Improve XCom Cache Management |
| 3 |
# |
| 4 |
# This test checks the setting of value of the |
| 5 |
# group_replication_message_cache_size parameter. |
| 6 |
# |
| 7 |
# Test: |
| 8 |
# 0. The test requires one server with GR started. |
| 9 |
# 1. Set group_replication_message_cache_size=<INVALID_VALUE>. Expect error. |
| 10 |
# 2. Set group_replication_message_cache_size=<INVALID_TYPE>. Expect error. |
| 11 |
# 3. Set group_replication_message_cache_size=<INVALID_VALUE>. Expect error. |
| 12 |
# 4. Set group_replication_message_cache_size=<VALID_VALUE>. Assert check the value. |
| 13 |
# 5. Stop GR. |
| 14 |
# 6. Set group_replication_message_cache_size=<INVALID_VALUE>. Expect error. |
| 15 |
# 7. Set group_replication_message_cache_size=<INVALID_TYPE>. Expect error. |
| 16 |
# 8. Set group_replication_message_cache_size=<INVALID_VALUE>. Expect error. |
| 17 |
# 9. Set group_replication_message_cache_size=<VALID_VALUE>. Assert check the value. |
| 18 |
#10. Clean up. |
| 19 |
################################################################################ |
| 20 |
|
| 21 |
--source include/have_64bit.inc |
| 22 |
# Bug#11752618 - 64-BIT WINDOWS VARIABLES LIMITED TO DIFFERENT VALUES THAN 64-BIT LINUX/SO |
| 23 |
--source include/linux.inc |
| 24 |
--let $group_replication_group_name= aaaaaaaa-cccc-bbbb-cccc-aaaaaaaaaaaa |
| 25 |
--source include/have_group_replication_plugin.inc |
| 26 |
--let $rpl_skip_group_replication_start= 1 |
| 27 |
--source include/group_replication.inc |
| 28 |
|
| 29 |
--error ER_WRONG_VALUE_FOR_VAR |
| 30 |
SET GLOBAL group_replication_message_cache_size= -200; |
| 31 |
|
| 32 |
--error ER_WRONG_TYPE_FOR_VAR |
| 33 |
SET GLOBAL group_replication_message_cache_size= 5.5; |
| 34 |
|
| 35 |
# This is a valid value for the parameter |
| 36 |
--eval SET GLOBAL group_replication_message_cache_size= 3221225472 |
| 37 |
|
| 38 |
--let $rpl_connection_name= server1 |
| 39 |
--source include/rpl_connection.inc |
| 40 |
--source include/start_and_bootstrap_group_replication.inc |
| 41 |
|
| 42 |
--let $assert_text= The value of group_replication_message_cache_size should be 3221225472 |
| 43 |
--let $assert_cond= "[SELECT @@group_replication_message_cache_size]" = 3221225472 |
| 44 |
--source include/assert.inc |
| 45 |
|
| 46 |
--error ER_WRONG_VALUE_FOR_VAR |
| 47 |
SET GLOBAL group_replication_message_cache_size= -100000000000000000; |
| 48 |
|
| 49 |
--error ER_WRONG_TYPE_FOR_VAR |
| 50 |
SET GLOBAL group_replication_message_cache_size= 0.5; |
| 51 |
|
| 52 |
# minimum boundary is 128 MB |
| 53 |
--error ER_WRONG_VALUE_FOR_VAR |
| 54 |
--eval SET GLOBAL group_replication_message_cache_size = 134217727 |
| 55 |
|
| 56 |
# Check for overflows |
| 57 |
## Long long |
| 58 |
SET GLOBAL group_replication_message_cache_size= 9223372036854775808; |
| 59 |
--let $assert_text= The value of group_replication_message_cache_size should be 9223372036854775808 |
| 60 |
--let $assert_cond= "[SELECT @@group_replication_message_cache_size]" = 9223372036854775808 |
| 61 |
--source include/assert.inc |
| 62 |
|
| 63 |
SET GLOBAL group_replication_message_cache_size= 18446744073709551615; |
| 64 |
--let $assert_text= The value of group_replication_message_cache_size should be 18446744073709551615 |
| 65 |
--let $assert_cond= "[SELECT @@group_replication_message_cache_size]" = 18446744073709551615 |
| 66 |
--source include/assert.inc |
| 67 |
|
| 68 |
## Unsigned long long |
| 69 |
--error ER_WRONG_TYPE_FOR_VAR |
| 70 |
SET GLOBAL group_replication_message_cache_size= 18446744073709551616; |
| 71 |
|
| 72 |
# This is a valid value for the parameter |
| 73 |
SET GLOBAL group_replication_message_cache_size= 2147483648; |
| 74 |
|
| 75 |
--source include/stop_group_replication.inc |
| 76 |
|
| 77 |
--let $assert_text= The value of group_replication_message_cache_size should be 2147483648 |
| 78 |
--let $assert_cond= "[SELECT @@group_replication_message_cache_size]" = 2147483648 |
| 79 |
--source include/assert.inc |
| 80 |
|
| 81 |
######################## |
| 82 |
# Test for permissions # |
| 83 |
######################## |
| 84 |
CREATE user 'group_rpl_user'@localhost; |
| 85 |
grant ALL on *.* to 'group_rpl_user'@localhost; |
| 86 |
--disable_warnings |
| 87 |
revoke SUPER, SYSTEM_VARIABLES_ADMIN on *.* from 'group_rpl_user'@localhost; |
| 88 |
--enable_warnings |
| 89 |
--connect (group_rpl_user_con, localhost, group_rpl_user, , ) |
| 90 |
--let $rpl_connection_name= group_rpl_user_con |
| 91 |
--source include/rpl_connection.inc |
| 92 |
--error ER_SPECIFIC_ACCESS_DENIED_ERROR |
| 93 |
SET GLOBAL group_replication_message_cache_size= default; |
| 94 |
--let $rpl_connection_name= server1 |
| 95 |
--source include/rpl_connection.inc |
| 96 |
grant SYSTEM_VARIABLES_ADMIN on *.* to 'group_rpl_user'@localhost; |
| 97 |
--let $rpl_connection_name= group_rpl_user_con |
| 98 |
--source include/rpl_connection.inc |
| 99 |
SET GLOBAL group_replication_message_cache_size= default; |
| 100 |
-- disconnect group_rpl_user_con |
| 101 |
|
| 102 |
# Reset parameter value to default |
| 103 |
--let $rpl_connection_name= server1 |
| 104 |
--source include/rpl_connection.inc |
| 105 |
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'group_rpl_user'@localhost; |
| 106 |
DROP USER 'group_rpl_user'@localhost; |
| 107 |
flush privileges; |
| 108 |
--source include/group_replication_end.inc |