Debian Codegraph @

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

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 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.
5 [connection master]
6 CALL mtr.add_suppression("Statement is unsafe because it is being used inside a XA transaction");
7 [connection slave]
8 CALL mtr.add_suppression(".*replica coordinator and worker threads are stopped.*");
9 CALL mtr.add_suppression("Could not execute Write_rows event on table test.*");
10 CALL mtr.add_suppression("Worker .* failed executing transaction");
11 CALL mtr.add_suppression("Error writing relay log configuration");
12 # Adding debug point 'rpl_fake_commit_order_deadlock_for_timestamp_100' to @@GLOBAL.debug
13 [connection master]
14
15 # Setup
16
17 [connection slave]
18 CALL mtr.add_suppression("You need to use --log-bin to make --binlog-format work");
19 SET @save_replica_parallel_workers= @@global.replica_parallel_workers;
20 SET @save_replica_parallel_type= @@global.replica_parallel_type;
21 Warnings:
22 Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
23 SET @save_replica_preserve_commit_order= @@global.replica_preserve_commit_order;
24 SET GLOBAL replica_parallel_type = 'LOGICAL_CLOCK';
25 Warnings:
26 Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
27 SET GLOBAL replica_parallel_workers= 2;
28 SET GLOBAL replica_preserve_commit_order= ON;
29 include/start_slave.inc
30 [connection master]
31 SET @save_binlog_transaction_dependency_tracking= @@global.binlog_transaction_dependency_tracking;
32 Warnings:
33 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
34 SET @@global.binlog_transaction_dependency_tracking = COMMIT_ORDER;
35 Warnings:
36 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
37 [connection master]
38 CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE = InnoDB; CREATE TABLE t2 (c1 INT PRIMARY KEY) ENGINE = InnoDB;;
39 include/sync_slave_sql_with_master.inc
40
41 # Block slave sql applier threads
42
43 [connection slave]
44 BEGIN; INSERT INTO t1 VALUES (1);;
45
46 # Generate the transactions which can be applied in parallel on slave
47
48 [connection master]
49 # Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug
50 INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); XA START 'xa_test_xid1'; INSERT INTO t1 VALUES (3); XA END 'xa_test_xid1'; SET TIMESTAMP = 200; XA PREPARE 'xa_test_xid1';;
51 [connection server_1]
52 BEGIN; INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (2); COMMIT;;
53 # Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug
54
55 # Verify the transactions are ordered correctly on slave
56
57 [connection server_2]
58 include/assert.inc [Verify table t1 has two rows]
59 include/assert.inc [Verify table t2 is empty]
60
61 # Rollback the first insert so that slave applier threads can
62 # unblock and proceed. Verify the transactions are applied.
63
64 [connection slave]
65 ROLLBACK;;
66
67 # On slave, verify table t1 has only two rows which were inserted before
68 # XA transaction. Wait for slave sql thread to fail with ER_UNKNOWN_ERROR
69 # error and then remove rpl_fake_commit_order_deadlock_for_timestamp_100
70 # debug sync points, and then restart slave sql thread.
71
72 include/wait_for_slave_sql_error.inc [errno=1105, 1402, 3030]
73 # Removing debug point 'rpl_fake_commit_order_deadlock_for_timestamp_100' from @@GLOBAL.debug
74 include/start_slave_sql.inc
75
76 # On master, execute XA COMMIT for prepared XA transaction.
77
78 [connection master]
79 XA COMMIT 'xa_test_xid1';
80
81 # Cleanup
82
83 [connection master]
84 DROP TABLE t1;
85 DROP TABLE t2;
86 SET GLOBAL binlog_transaction_dependency_tracking=@save_binlog_transaction_dependency_tracking;
87 Warnings:
88 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
89 include/sync_slave_sql_with_master.inc
90 include/stop_slave.inc
91 SET GLOBAL replica_parallel_type= @save_replica_parallel_type;
92 Warnings:
93 Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
94 SET GLOBAL replica_parallel_workers= @save_replica_parallel_workers;
95 SET GLOBAL replica_preserve_commit_order= @save_replica_preserve_commit_order;
96 include/start_slave.inc
97 include/rpl_end.inc