mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
26 lines
522 B
Text
26 lines
522 B
Text
include/master-slave.inc
|
|
[connection master]
|
|
connection master;
|
|
CREATE TABLE t1 (a INT);
|
|
CREATE TABLE t2 (a INT, b INT);
|
|
INSERT INTO t1 SELECT 1;
|
|
connection master1;
|
|
INSERT INTO t1 VALUES (2),(3),(4),(5),(6);
|
|
connection master;
|
|
INSERT INTO t2 SELECT 1, ROW_COUNT();
|
|
INSERT INTO t1 VALUES (2),(3),(4);
|
|
INSERT INTO t2 SELECT 2, ROW_COUNT();
|
|
SELECT b FROM t2 ORDER BY a;
|
|
b
|
|
1
|
|
3
|
|
connection slave;
|
|
SELECT b FROM t2 ORDER BY a;
|
|
b
|
|
1
|
|
3
|
|
connection master;
|
|
DROP TABLE t1, t2;
|
|
connection slave;
|
|
connection master;
|
|
include/rpl_end.inc
|