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]
6CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
7DROP FUNCTION IF EXISTS test.f1;
8DROP TABLE IF EXISTS test.t1;
9CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB;
10create function test.f1() RETURNS CHAR(16)
11BEGIN
12DECLARE tmp CHAR(16);
13DECLARE var_name FLOAT;
14SET var_name = RAND();
15IF var_name > .6
16THEN SET tmp = 'Texas';
17ELSE SET tmp = 'MySQL';
18END IF;
19RETURN tmp;
20END|
21INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
22INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
23SET AUTOCOMMIT=0;
24START TRANSACTION;
25INSERT INTO test.t1 VALUES (null,test.f1());
26ROLLBACK;
27SET AUTOCOMMIT=1;
28include/sync_slave_sql_with_master.inc
29DROP FUNCTION test.f1;
30DROP TABLE test.t1;
31include/rpl_end.inc
32