Skip to content

Commit

Permalink
获取长事务的SQL语句info字段添加排序 (#2763)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: 王飞 <fei.wang@xgo.one>
  • Loading branch information
feiazifeiazi and 王飞 authored Aug 16, 2024
1 parent e1fc3f6 commit 033d3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/engines/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ def get_long_transaction(self, thread_time=3):
TO_SECONDS(NOW()) - TO_SECONDS(trx.trx_started) trx_idle_time,
p.time thread_time,
IFNULL((SELECT
GROUP_CONCAT(t1.sql_text SEPARATOR ';
GROUP_CONCAT(t1.sql_text order by t1.TIMER_START desc SEPARATOR ';
')
FROM performance_schema.events_statements_history t1
INNER JOIN performance_schema.threads t2
Expand Down

0 comments on commit 033d3e7

Please sign in to comment.