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 PROCEDURE IF EXISTS test.p2; 8DROP TABLE IF EXISTS test.t2; 9DROP TABLE IF EXISTS test.t1; 10DROP TABLE IF EXISTS test.t3; 11CREATE PROCEDURE test.p1() 12BEGIN 13CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a)); 14CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a)); 15INSERT INTO test.t1 VALUES (4),(2),(1),(3); 16UPDATE test.t1 SET a=a+4 WHERE a=4; 17INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1; 18UPDATE test.t1 SET a=a+4 WHERE a=8; 19CREATE TABLE IF NOT EXISTS test.t3(n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); 20END| 21CREATE PROCEDURE test.p2() 22BEGIN 23DROP TABLE IF EXISTS test.t1; 24DROP TABLE IF EXISTS test.t2; 25INSERT INTO test.t3 VALUES(NULL,11111111.233333,NOW()); 26END| 27CALL test.p1(); 28SELECT * FROM test.t1 ORDER BY a; 29a 301 312 323 3312 34SELECT * FROM test.t2 ORDER BY a; 35a 361 372 383 398 40include/sync_slave_sql_with_master.inc 41SELECT * FROM test.t1 ORDER BY a; 42a 431 442 453 4612 47SELECT * FROM test.t2 ORDER BY a; 48a 491 502 513 528 53CALL test.p2(); 54USE test; 55SHOW TABLES; 56Tables_in_test 57t3 58include/sync_slave_sql_with_master.inc 59USE test; 60SHOW TABLES; 61Tables_in_test 62t3 63CALL test.p1(); 64Warnings: 65Note 1050 Table 't3' already exists 66SELECT * FROM test.t1 ORDER BY a; 67a 681 692 703 7112 72SELECT * FROM test.t2 ORDER BY a; 73a 741 752 763 778 78include/sync_slave_sql_with_master.inc 79SELECT * FROM test.t1 ORDER BY a; 80a 811 822 833 8412 85SELECT * FROM test.t2 ORDER BY a; 86a 871 882 893 908 91DROP PROCEDURE IF EXISTS test.p1; 92DROP PROCEDURE IF EXISTS test.p2; 93DROP TABLE IF EXISTS test.t1; 94DROP TABLE IF EXISTS test.t2; 95DROP TABLE IF EXISTS test.t3; 96include/sync_slave_sql_with_master.inc 97include/rpl_end.inc 98