如题, SQL如下:

select 
  t1.trx_mysql_thread_id,
  t1.trx_state,
  t1.trx_started,
  t1.trx_query,
  t2.PROCESSLIST_DB,
  t2.PROCESSLIST_USER,
  t2.PROCESSLIST_ID,
  t2.PROCESSLIST_HOST,
  t2.PROCESSLIST_STATE,
  t2.PROCESSLIST_COMMAND
from information_schema.innodb_trx t1
join performance_schema.threads t2 on t1.trx_mysql_thread_id = t2.PROCESSLIST_ID
;

 

相关文章:

  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
猜你喜欢
  • 2021-12-16
  • 2021-12-16
  • 2022-12-23
  • 2021-12-22
  • 2022-03-05
  • 2022-12-23
相关资源
相似解决方案