1 --source include/not_embedded.inc
4 --echo # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines
8 CREATE FUNCTION testQuestion() RETURNS INTEGER
16 CREATE PROCEDURE testQuestion2()
22 DROP TABLE IF EXISTS t1,t2;
24 CREATE TABLE t1 (c1 INT);
25 CREATE TABLE t2 (c1 INT);
26 CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
27 DO INSERT INTO t1 VALUES(1);
29 --echo Assert Questions == 7
30 SHOW STATUS LIKE 'Questions';
31 SELECT testQuestion();
32 --echo Assert Questions == 9
33 SHOW STATUS LIKE 'Questions';
35 --echo Assert Questions == 11
36 SHOW STATUS LIKE 'Questions';
38 --echo Assert Questions == 13
39 SHOW STATUS LIKE 'Questions';
40 connect (con1,localhost,root,,);
45 --echo Assert Questions == 14
46 SHOW STATUS LIKE 'Questions';
48 CREATE TRIGGER trigg1 AFTER INSERT ON t1
50 INSERT INTO t2 VALUES (1);
54 --echo Assert Questions == 16
55 SHOW STATUS LIKE 'Questions';
56 INSERT INTO t1 VALUES (1);
57 --echo Assert Questions == 18
58 SHOW STATUS LIKE 'Questions';
59 # TODO: Uncomment the lines below when FLUSH GLOBAL STATUS is implemented.
61 # SHOW GLOBAL STATUS LIKE 'Questions';
62 DROP PROCEDURE testQuestion2;
64 DROP FUNCTION testQuestion;
67 --echo End of 6.0 tests