Debian Codegraph @

mysql-test/suite/perfschema/include/program_execution.inc

raw
1 #
2 # Execute the stored programs created in
3 # suite/perfschema/include/program_setup.inc
4 #
5
6 --echo #####################
7 --echo # Executing queries #
8 --echo #####################
9 INSERT INTO t1 VALUES (10,20);
10 CALL SampleProc1(30,40,50);
11 SET @a=1;
12 SELECT @a;
13 CALL SampleProc2("Jwalamukhi",34);
14 SELECT @a;
15 CALL SampleProc3();
16 CALL SampleProc4();
17 SET @change=1;
18 SELECT @change;
19 UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
20 SELECT @change;
21 SET @del=1;
22 SELECT @del;
23 DELETE FROM t1 WHERE i=76;
24 SELECT @del;
25 SELECT wt_avg(1, 12, 1990, 1121990);
26 SELECT fac(5);
27 SELECT append("Bolly", "wood");
28
29 # Clear entries before starting test
30 TRUNCATE TABLE performance_schema.events_statements_history_long;
31
32 --echo # Event
33 # Make Sure Event scheduler is ON (by default)
34 SELECT COUNT(*) = 1 FROM information_schema.processlist
35 WHERE user = 'event_scheduler' AND command = 'Daemon';
36
37
38 CREATE TABLE table_t(a INT);
39 DELIMITER |;
40 CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
41 BEGIN
42 INSERT INTO table_t VALUES(1);
43 END|
44 DELIMITER ;|
45
46 # Let e1 insert 1 record into the table table_t
47
48 --let $wait_condition= select count(*) = 1 from table_t
49 --source include/wait_condition.inc
50 SELECT * FROM table_t;
51
52 # Wait till the above one execution of event is instrumented.
53 --let $wait_condition= select count(*) = 1 from performance_schema.events_statements_history_long where object_type='EVENT'
54 --source include/wait_condition.inc
55
56 SET GLOBAL event_scheduler=OFF;
57 --source include/no_running_event_scheduler.inc