1#   - Check SHOW CREATE statement;
2
3--echo
4--echo
5
6--replace_column 7 CREATED
7SHOW CREATE TRIGGER trg1|
8--echo
9--replace_column 7 CREATED
10SHOW CREATE TRIGGER trg2|
11--echo
12--replace_column 7 CREATED
13SHOW CREATE TRIGGER mysqltest2.trg3|
14--echo
15--replace_column 7 CREATED
16SHOW CREATE TRIGGER mysqltest2.trg4|
17
18#   - Check SHOW statement;
19
20--echo
21--echo
22
23--replace_column 6 CREATED
24SHOW TRIGGERS|
25
26--echo
27
28use mysqltest2|
29
30--echo
31
32--replace_column 6 CREATED
33SHOW TRIGGERS|
34
35use mysqltest1|
36
37#   - Check INFORMATION_SCHEMA;
38
39--echo
40--echo
41
42--replace_column 17 CREATED
43SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg1'|
44
45--echo
46--replace_column 17 CREATED
47SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg2'|
48
49--echo
50--replace_column 17 CREATED
51SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg3'|
52
53--echo
54--replace_column 17 CREATED
55SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg4'|
56
57#   - Initialize the used variables (actual values don't matter);
58
59--echo
60--echo
61
62SET @a1 = '1'|
63SET @a2 = '1'|
64SET @a3 = '1'|
65
66SET @b1 = '2'|
67SET @b2 = '2'|
68SET @b3 = '2'|
69
70#   - Execute the triggers;
71
72--echo
73--echo
74
75INSERT INTO t1 VALUES(1)|
76
77--echo
78--echo ---> Log:
79SELECT msg FROM log|
80
81--echo
82SELECT
83  COLLATION(@a1) AS ca1,
84  COLLATION(@a2) AS ca2,
85  COLLATION(@a3) AS ca3,
86  COLLATION(@b1) AS cb1,
87  COLLATION(@b2) AS cb2,
88  COLLATION(@b3) AS cb3|
89
90--echo
91DELETE FROM log|
92
93--echo
94--echo
95
96INSERT INTO mysqltest2.t1 VALUES(1)|
97
98--echo
99--echo ---> Log:
100SELECT msg FROM mysqltest2.log|
101
102--echo
103SELECT
104  COLLATION(@a1) AS ca1,
105  COLLATION(@a2) AS ca2,
106  COLLATION(@a3) AS ca3,
107  COLLATION(@b1) AS cb1,
108  COLLATION(@b2) AS cb2,
109  COLLATION(@b3) AS cb3|
110
111--echo
112DELETE FROM mysqltest2.log|
113