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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-05-11 18:47:32 UTC
  • mto: (2.1.2 sid) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100511184732-jhn055kfhxze24kt
Tags: upstream-5.1.46
ImportĀ upstreamĀ versionĀ 5.1.46

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
CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n));
 
8
CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n));
 
9
CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n));
 
10
INSERT INTO test.t1 VALUES (1,NOW());
 
11
CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t1 SET d=NOW() where n = 1;//
 
12
CREATE PROCEDURE test.p3()
 
13
BEGIN
 
14
INSERT INTO test.t3 (d) VALUES (NOW());
 
15
END//
 
16
CREATE TRIGGER test.t3_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW CALL test.p3()//
 
17
CREATE PROCEDURE test.p2()
 
18
BEGIN
 
19
INSERT INTO test.t2 (f,d) VALUES (RAND(),NOW());
 
20
END//
 
21
 
 
22
<End test section 2 (Tiggers & SP)>
 
23
-----------------------------------
 
24
DROP PROCEDURE test.p2;
 
25
DROP PROCEDURE test.p3;
 
26
DROP TRIGGER test.t2_ai;
 
27
DROP TRIGGER test.t3_bi_t2;
 
28
DROP TABLE test.t1;
 
29
DROP TABLE test.t2;
 
30
DROP TABLE test.t3;