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 #####################
9INSERT INTO t1 VALUES (10,20);
10CALL SampleProc1(30,40,50);
11SET @a=1;
12SELECT @a;
13CALL SampleProc2("Jwalamukhi",34);
14SELECT @a;
15CALL SampleProc3();
16CALL SampleProc4();
17SET @change=1;
18SELECT @change;
19UPDATE t2 SET id=22 WHERE name="Jwalamukhi";
20SELECT @change;
21SET @del=1;
22SELECT @del;
23DELETE FROM t1 WHERE i=76;
24SELECT @del;
25SELECT wt_avg(1, 12, 1990, 1121990);
26SELECT fac(5);
27SELECT append("Bolly", "wood");
28
29# Clear entries before starting test
30TRUNCATE TABLE performance_schema.events_statements_history_long;
31
32--echo # Event
33# Make Sure Event scheduler is ON (by default)
34SELECT COUNT(*) = 1 FROM information_schema.processlist
35  WHERE user = 'event_scheduler' AND command = 'Daemon';
36
37
38CREATE TABLE table_t(a INT);
39DELIMITER |;
40CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
41BEGIN
42  INSERT INTO table_t VALUES(1);
43END|
44DELIMITER ;|
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
50SELECT * 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
56SET GLOBAL event_scheduler=OFF;
57--source include/no_running_event_scheduler.inc
58