| 1 |
DROP TABLE IF EXISTS t1; |
| 2 |
DROP TEMPORARY TABLE IF EXISTS t2; |
| 3 |
CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM; |
| 4 |
CREATE TEMPORARY TABLE t2 AS |
| 5 |
SELECT thread_id FROM performance_schema.threads WHERE 1 = 2; |
| 6 |
SELECT COUNT(*) = 0 AS expect_1 FROM performance_schema.threads |
| 7 |
WHERE name = 'thread/sql/delayed_insert'; |
| 8 |
expect_1 |
| 9 |
1 |
| 10 |
INSERT INTO t2 SELECT thread_id |
| 11 |
FROM performance_schema.threads; |
| 12 |
INSERT DELAYED INTO t1 SET f1 = SLEEP(3); |
| 13 |
SELECT name, type, instrumented, processlist_user, processlist_host |
| 14 |
FROM performance_schema.threads |
| 15 |
WHERE thread_id NOT IN (SELECT thread_id FROM t2); |
| 16 |
name type instrumented processlist_user processlist_host |
| 17 |
thread/sql/delayed_insert FOREGROUND YES root localhost |
| 18 |
DROP TABLE t1; |
| 19 |
DROP TEMPORARY TABLE t2; |