~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/r/rpl_row_sp001.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

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
 
 
8
<Begin test section 1 (non deterministic SP)>
 
9
---------------------------------------------
 
10
create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n));
 
11
create procedure test.p1()
 
12
begin
 
13
INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW());
 
14
end//
 
15
 
 
16
<End test section 1 (non deterministic SP)>
 
17
-------------------------------------------
 
18
CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a));
 
19
CREATE PROCEDURE test.p2(n int)
 
20
begin
 
21
CASE n
 
22
WHEN 1 THEN
 
23
UPDATE test.t2 set t ='Tex';
 
24
WHEN 2 THEN
 
25
UPDATE test.t2 set t ='SQL';
 
26
ELSE
 
27
UPDATE test.t2 set t ='NONE';
 
28
END CASE;
 
29
end//
 
30
INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW');
 
31
SELECT * FROM t2 ORDER BY a;
 
32
a       t
 
33
1       NEW
 
34
2       NEW
 
35
3       NEW
 
36
4       NEW
 
37
SELECT * FROM t2 ORDER BY a;
 
38
a       t
 
39
1       NEW
 
40
2       NEW
 
41
3       NEW
 
42
4       NEW
 
43
call test.p2(1);
 
44
SELECT * FROM t2 ORDER BY a;
 
45
a       t
 
46
1       Tex
 
47
2       Tex
 
48
3       Tex
 
49
4       Tex
 
50
SELECT * FROM t2 ORDER BY a;
 
51
a       t
 
52
1       Tex
 
53
2       Tex
 
54
3       Tex
 
55
4       Tex
 
56
call test.p2(2);
 
57
SELECT * FROM t2 ORDER BY a;
 
58
a       t
 
59
1       SQL
 
60
2       SQL
 
61
3       SQL
 
62
4       SQL
 
63
SELECT * FROM t2 ORDER BY a;
 
64
a       t
 
65
1       SQL
 
66
2       SQL
 
67
3       SQL
 
68
4       SQL
 
69
call test.p2(3);
 
70
SELECT * FROM t2 ORDER BY a;
 
71
a       t
 
72
1       NONE
 
73
2       NONE
 
74
3       NONE
 
75
4       NONE
 
76
SELECT * FROM t2 ORDER BY a;
 
77
a       t
 
78
1       NONE
 
79
2       NONE
 
80
3       NONE
 
81
4       NONE
 
82
DROP PROCEDURE test.p1;
 
83
DROP PROCEDURE test.p2;
 
84
DROP TABLE test.t1;
 
85
DROP TABLE test.t2;