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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
# This test does the basic validations around transaction-write-set-extraction
#
# Test outline
# 0) Start the group and save the default values
# 1) Test that you cannot change the algorithm while GR is running
# 2) Test that you cannot join a group if your algorithm is different.
#
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
# Value of TWSE cannot be changed when binlog_transaction_dependency_tracking!= COMMIT_ORDER
SET @binlog_transaction_dependency_tracking_save= @@GLOBAL.binlog_transaction_dependency_tracking;
SET GLOBAL binlog_transaction_dependency_tracking= COMMIT_ORDER;
SET @transaction_write_set_extraction_save= @@GLOBAL.transaction_write_set_extraction;
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
# Save default value of binlog_transaction_dependency_tracking, change it to
# COMMIT_ORDER
SET @binlog_transaction_dependency_tracking_save= @@GLOBAL.binlog_transaction_dependency_tracking;
SET GLOBAL binlog_transaction_dependency_tracking= COMMIT_ORDER;
SET @transaction_write_set_extraction_save= @@GLOBAL.transaction_write_set_extraction;
--echo #
--echo # 1. Try to change the algorithm while Group Replication is running.
--echo # It will be disallowed.
--echo #
SET GLOBAL transaction_write_set_extraction='MURMUR32';
--let $write_set_algorithm= `SELECT @@GLOBAL.transaction_write_set_extraction`
--let $assert_text= transaction_write_set_extraction is correct
--let $assert_cond= "$write_set_algorithm"= "MURMUR32"
--source include/assert.inc
--source include/start_and_bootstrap_group_replication.inc
--error ER_GROUP_REPLICATION_RUNNING
SET SESSION transaction_write_set_extraction=OFF;
--error ER_GROUP_REPLICATION_RUNNING
SET SESSION transaction_write_set_extraction='XXHASH64';
--let $write_set_algorithm= `SELECT @@GLOBAL.transaction_write_set_extraction`
--let $assert_text= transaction_write_set_extraction is correct
--let $assert_cond= "$write_set_algorithm"= "MURMUR32"
--source include/assert.inc
--echo #
--echo # 2. Try to join a member with a different algorithm
--echo # It will be disallowed.
--echo #
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--disable_query_log
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
--enable_query_log
SET GLOBAL transaction_write_set_extraction='XXHASH64';
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;
--replace_regex /[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][-+Z][0-9:]* *[0-9]* *\[/DATE_TIME [/
--let $grep_file=$MYSQLTEST_VARDIR/tmp/group_replication_write_set_extraction_algorithm.err
--let $grep_pattern=The member is configured with a transaction-write-set-extraction option value
--source include/grep_pattern.inc
--echo #
--echo # 3. Cleanup
--echo #
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
SET GLOBAL transaction_write_set_extraction= @transaction_write_set_extraction_save;
SET GLOBAL binlog_transaction_dependency_tracking= @binlog_transaction_dependency_tracking_save;
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL transaction_write_set_extraction= @transaction_write_set_extraction_save;
SET GLOBAL binlog_transaction_dependency_tracking= @binlog_transaction_dependency_tracking_save;
--source include/group_replication_end.inc
|