From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- .../suite/perfschema/include/program_execution.inc | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 mysql-test/suite/perfschema/include/program_execution.inc (limited to 'mysql-test/suite/perfschema/include/program_execution.inc') diff --git a/mysql-test/suite/perfschema/include/program_execution.inc b/mysql-test/suite/perfschema/include/program_execution.inc new file mode 100644 index 00000000..8c0bc691 --- /dev/null +++ b/mysql-test/suite/perfschema/include/program_execution.inc @@ -0,0 +1,54 @@ +# +# Execute the stored programs created in +# suite/perfschema/include/program_setup.inc +# + +--echo ##################### +--echo # Executing queries # +--echo ##################### +INSERT INTO t1 VALUES (10,20); +CALL SampleProc1(30,40,50); +SET @a=1; +SELECT @a; +CALL SampleProc2("Jwalamukhi",34); +SELECT @a; +CALL SampleProc3(); +CALL SampleProc4(); +SET @change=1; +SELECT @change; +UPDATE t2 SET id=22 WHERE name="Jwalamukhi"; +SELECT @change; +SET @del=1; +SELECT @del; +DELETE FROM t1 WHERE i=76; +SELECT @del; +SELECT wt_avg(1, 12, 1990, 1121990); +SELECT fac(5); +SELECT append("Bolly", "wood"); + +--echo # Event + +SET GLOBAL event_scheduler=ON; + +CREATE TABLE table_t(a INT); +DELIMITER |; +CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO +BEGIN + INSERT INTO table_t VALUES(1); +END| +DELIMITER ;| + +# Let e1 insert 1 record into the table table_t + +--let $wait_condition= select count(*) = 1 from table_t +--source include/wait_condition.inc +SELECT * FROM table_t; + +# Wait till the above one execution of event is instrumented. + +--let $wait_condition= select count(*) = 1 from performance_schema.events_statements_history_long where object_type='EVENT' +--source include/wait_condition.inc + +SET GLOBAL event_scheduler=OFF; +--source include/no_running_event_scheduler.inc + -- cgit v1.2.3