| 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 |
[connection slave] |
| 7 |
SET @saved_innodb_limit_optimistic_insert_debug = @@GLOBAL.innodb_limit_optimistic_insert_debug; |
| 8 |
SET @@GLOBAL.innodb_limit_optimistic_insert_debug = 2; |
| 9 |
[connection master] |
| 10 |
CREATE TABLE t1 ( |
| 11 |
c1 INT NOT NULL, |
| 12 |
KEY(c1) |
| 13 |
) ENGINE=InnoDB; |
| 14 |
CREATE TABLE t2 ( |
| 15 |
c1 INT NOT NULL, |
| 16 |
FOREIGN KEY(c1) REFERENCES t1(c1) |
| 17 |
) ENGINE=InnoDB; |
| 18 |
INSERT INTO t1 VALUES (1), (3), (4); |
| 19 |
[connection master1] |
| 20 |
XA START 'XA1'; |
| 21 |
INSERT INTO t1 values(2); |
| 22 |
XA END 'XA1'; |
| 23 |
[connection master] |
| 24 |
XA START 'XA2'; |
| 25 |
INSERT INTO t2 values(3); |
| 26 |
XA END 'XA2'; |
| 27 |
XA PREPARE 'XA2'; |
| 28 |
[connection master1] |
| 29 |
XA PREPARE 'XA1'; |
| 30 |
XA COMMIT 'XA1'; |
| 31 |
[connection master] |
| 32 |
XA COMMIT 'XA2'; |
| 33 |
include/sync_slave_sql_with_master.inc |
| 34 |
include/stop_slave.inc |
| 35 |
DROP TABLE t2, t1; |
| 36 |
RESET SLAVE; |
| 37 |
Warnings: |
| 38 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 39 |
RESET MASTER; |
| 40 |
[connection master] |
| 41 |
Restore binary log from the master into the slave |
| 42 |
include/diff_tables.inc [master:test.t1, slave:test.t1] |
| 43 |
include/diff_tables.inc [master:test.t2, slave:test.t2] |
| 44 |
DROP TABLE t2, t1; |
| 45 |
[connection slave] |
| 46 |
SET @@GLOBAL.innodb_limit_optimistic_insert_debug = @saved_innodb_limit_optimistic_insert_debug; |
| 47 |
include/start_slave.inc |
| 48 |
include/rpl_end.inc |