Debian Codegraph @

mysql-test/suite/rpl/r/rpl_multi_source_mts_slave_retry.result

raw
1 # Create channel_1 to server_1 from server_2(slave)
2 include/rpl_init.inc [topology=1->2]
3 Warnings:
4 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
5 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
6 #
7 # Insert data on the master
8 #
9 [connection server_1]
10 CREATE TABLE t1( a int unique);
11 # sync data to the slave
12 [connection server_1]
13 include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
14 # stop slave
15 include/rpl_stop_slaves.inc
16 SET @saved_innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout;
17 SET @saved_replica_transaction_retries = @@GLOBAL.replica_transaction_retries;
18 #
19 # Set the variables needed for this test
20 #
21 SET GLOBAL replica_transaction_retries=10;
22 SET GLOBAL innodb_lock_wait_timeout=2;
23 #start slave
24 include/rpl_start_slaves.inc
25 #
26 # Lock the rows of the table t1
27 #
28 BEGIN;
29 INSERT INTO t1 VALUES(1);
30 #
31 # Insert the rows on the same table on master
32 #
33 [connection server_1]
34 INSERT INTO t1 VALUES(1);
35 #
36 # On slave, check that this transaction from the master has been retried.
37 #
38 [connection server_2]
39 # Release the lock.
40 ROLLBACK;
41 # Now sync with master on channel_1
42 [connection server_1]
43 include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
44 # check that data shows the value 1
45 SELECT * FROM t1;
46 a
47 1
48 #cleanup
49 [connection server_1]
50 DROP TABLE t1;
51 include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
52 SET GLOBAL innodb_lock_wait_timeout = @saved_innodb_lock_wait_timeout;
53 SET GLOBAL replica_transaction_retries = @saved_replica_transaction_retries;
54 include/rpl_end.inc
55 RESET REPLICA ALL FOR CHANNEL 'channel_1';