1CREATE USER event_runner1@localhost; 2GRANT ALL ON *.* TO event_runner1@localhost; 3CREATE USER event_runner2@localhost; 4GRANT ALL ON *.* TO event_runner2@localhost; 5SET @saved_event_scheduler = @@GLOBAL.event_scheduler; 6SET GLOBAL event_scheduler = ON; 7CREATE DEFINER=event_runner1@localhost EVENT query_temp_tables ON SCHEDULE AT CURRENT_TIMESTAMP 8ON COMPLETION PRESERVE 9DO 10WHILE TRUE DO 11SELECT * FROM INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES; 12END WHILE| 13CREATE DEFINER=event_runner2@localhost EVENT query_tables ON SCHEDULE AT CURRENT_TIMESTAMP 14ON COMPLETION PRESERVE 15DO 16WHILE TRUE DO 17SELECT * FROM INFORMATION_SCHEMA.TABLES; 18END WHILE| 19# Creating 400 temp tables with each of MyISAM, InnoDB, MEMORY 20SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES; 21COUNT(*) 221200 23# Dropping the temp tables 24KILL CONNECTION $ev_thread1_id 25KILL CONNECTION $ev_thread2_id 26SET GLOBAL event_scheduler = @saved_event_scheduler; 27DROP EVENT query_temp_tables; 28DROP EVENT query_tables; 29DROP USER event_runner1@localhost; 30DROP USER event_runner2@localhost; 31