1include/master-slave.inc
2Warnings:
3Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
4Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
5[connection master]
6DROP PROCEDURE IF EXISTS test.p1;
7DROP TABLE IF EXISTS test.t2;
8CREATE TABLE test.t1 (a INT,PRIMARY KEY(a));
9CREATE TABLE test.t2 (a INT,PRIMARY KEY(a));
10INSERT INTO test.t1 VALUES(1),(2);
11CREATE PROCEDURE test.p1()
12BEGIN
13SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1;
14INSERT INTO test.t2 VALUES(FOUND_ROWS());
15END|
16
17< ---- Master selects-- >
18-------------------------
19CALL test.p1();
20a
211
22SELECT * FROM test.t2;
23a
242
25
26< ---- Slave selects-- >
27------------------------
28include/sync_slave_sql_with_master.inc
29SELECT * FROM test.t2;
30a
312
32DROP PROCEDURE IF EXISTS test.p1;
33DROP TABLE IF EXISTS test.t1;
34DROP TABLE IF EXISTS test.t2;
35include/sync_slave_sql_with_master.inc
36include/rpl_end.inc
37