查看未提交事务或sleep session最后执行的sql语句
SELECT *
FROM performance_schema.threads t1
JOIN performance_schema.events_statements_current t2 ON t1.THREAD_ID = t2.THREAD_ID
JOIN information_schema.processlist t3 ON t3.ID = t1.PROCESSLIST_ID
WHERE t3.ID = 21150079;
21150079为show processlist中的Id