Debian Codegraph @

mysql-test/suite/rpl/r/rpl_auto_increment_11932.result

raw
1 include/master-slave.inc
2 [connection master]
3 call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
4 connection master;
5 drop database if exists test1;
6 create database test1;
7 use test1;
8 CREATE TABLE `t1` (
9 `id` int(10) unsigned NOT NULL auto_increment,
10 `fname` varchar(100) default NULL,
11 PRIMARY KEY (`id`)
12 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
13 INSERT INTO `t1` VALUES (1, 'blablabla');
14 CREATE TABLE `t2` (
15 `id` int(10) NOT NULL auto_increment,
16 `comment` varchar(255) NOT NULL default '',
17 PRIMARY KEY (`id`)
18 ) ENGINE=MyISAM AUTO_INCREMENT=3 ;
19 INSERT INTO `t2` VALUES (1, 'testtest 1');
20 INSERT INTO `t2` VALUES (2, 'test 2');
21 CREATE PROCEDURE simpleproc3 ()
22 NOT DETERMINISTIC
23 BEGIN
24 INSERT INTO t1 (fname) (SELECT t2.comment FROM t2 WHERE t2.id = '1');
25 INSERT INTO t1 (fname) VALUES('test');
26 END
27 $
28 CALL simpleproc3();
29 select * from t2;
30 id comment
31 1 testtest 1
32 2 test 2
33 TRUNCATE TABLE `t1`;
34 CALL simpleproc3();
35 select * from t1;
36 id fname
37 1 testtest 1
38 2 test
39 connection slave;
40 use test1;
41 select * from t1;
42 id fname
43 1 testtest 1
44 2 test
45 connection master;
46 drop database test1;
47 include/rpl_end.inc