~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_row_func003.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
stop slave;
 
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
3
reset master;
 
4
reset slave;
 
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
6
start slave;
 
7
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
 
8
DROP FUNCTION IF EXISTS test.f1;
 
9
DROP TABLE IF EXISTS test.t1;
 
10
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB;
 
11
create function test.f1() RETURNS CHAR(16) 
 
12
BEGIN
 
13
DECLARE tmp CHAR(16);
 
14
DECLARE var_name FLOAT;
 
15
SET var_name = RAND();
 
16
IF var_name > .6 
 
17
THEN SET tmp = 'Texas';
 
18
ELSE SET tmp = 'MySQL';
 
19
END IF;
 
20
RETURN tmp;
 
21
END|
 
22
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
 
23
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
 
24
SET AUTOCOMMIT=0;
 
25
START TRANSACTION;
 
26
INSERT INTO test.t1 VALUES (null,test.f1());
 
27
ROLLBACK;
 
28
SET AUTOCOMMIT=1;
 
29
DROP FUNCTION test.f1;
 
30
DROP TABLE test.t1;