summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/status2.result
blob: 60309e14fe385e98067754ff5e10ba4b052e7b90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines
#
FLUSH STATUS;
CREATE FUNCTION testQuestion() RETURNS INTEGER
BEGIN
DECLARE foo INTEGER;
DECLARE bar INTEGER;
SET foo=1;
SET bar=2;
RETURN foo;
END $$
CREATE PROCEDURE testQuestion2()
BEGIN
SELECT 1;
END $$
DROP TABLE IF EXISTS t1,t2;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES(1);
CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);
Assert Questions == 7
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	7
SELECT testQuestion();
testQuestion()
1
Assert Questions == 9
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	9
CALL testQuestion2();
1
1
Assert Questions == 11
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	11
SELECT 1;
1
1
Assert Questions == 13
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	13
connect  con1,localhost,root,,;
connection con1;
SELECT 1;
1
1
connection default;
disconnect con1;
Assert Questions == 14
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	14
CREATE TRIGGER trigg1 AFTER INSERT ON t1
FOR EACH ROW BEGIN
INSERT INTO t2 VALUES (1);
END;
$$
Assert Questions == 16
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	16
INSERT INTO t1 VALUES (1);
Assert Questions == 18
SHOW STATUS LIKE 'Questions';
Variable_name	Value
Questions	18
DROP PROCEDURE testQuestion2;
DROP TRIGGER trigg1;
DROP FUNCTION testQuestion;
DROP EVENT ev1;
DROP TABLE t1,t2;
#
# End of 5.5 tests
#
select variable_value < 1024*1024*1024 from information_schema.global_status where variable_name='memory_used';
variable_value < 1024*1024*1024
1
#
# End of 10.2 tests
#