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]
6SET SESSION sql_log_bin= 0;
7call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
8SET SESSION sql_log_bin= 1;
9drop database if exists test1;
10create database test1;
11use test1;
12CREATE TABLE `t1` (
13`id` int(10) unsigned NOT NULL auto_increment,
14`fname` varchar(100) default NULL,
15PRIMARY KEY  (`id`)
16) DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
17INSERT INTO `t1` VALUES (1, 'blablabla');
18CREATE TABLE `t2` (
19`id` int(10) NOT NULL auto_increment,
20`comment` varchar(255) NOT NULL default '',
21PRIMARY KEY  (`id`)
22) AUTO_INCREMENT=3 ;
23INSERT INTO `t2` VALUES (1, 'testtest 1');
24INSERT INTO `t2` VALUES (2, 'test 2');
25CREATE PROCEDURE simpleproc3 ()
26NOT DETERMINISTIC
27BEGIN
28INSERT INTO t1 (fname) (SELECT t2.comment FROM t2 WHERE t2.id = '1');
29INSERT INTO t1 (fname) VALUES('test');
30END
31$
32CALL simpleproc3();
33select * from t2;
34id	comment
351	testtest 1
362	test 2
37TRUNCATE TABLE `t1`;
38CALL simpleproc3();
39select * from t1;
40id	fname
411	testtest 1
422	test
43include/sync_slave_sql_with_master.inc
44SET SESSION sql_log_bin= 0;
45call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
46SET SESSION sql_log_bin= 1;
47use test1;
48select * from t1;
49id	fname
501	testtest 1
512	test
52drop database test1;
53include/rpl_end.inc
54