以下の内容はhttps://ryuichi1208.hateblo.jp/entry/2023/01/24/213102より取得しました。


【MySQL】トランザクションの過去のクエリを見たい

現在実行中のトランザクションからtrx_mysql_thread_idをメモする

SELECT trx_id,trx_query,trx_mysql_thread_id FROM information_schema.innodb_trx ORDER BY trx_started;

PROCESSLIST_IDに先ほどのtrx_mysql_thread_idを指定する

SELECT THREAD_ID FROM performance_schema.threads WHERE PROCESSLIST_ID =;

THREAD_IDを使ってperformance_schema.events_statements_historyを見ればよい

SELECT * FROM performance_schema.events_statements_history WHERE thread_id = ? ORDER BY TIMER_START



以上の内容はhttps://ryuichi1208.hateblo.jp/entry/2023/01/24/213102より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14