MySQL Forums
Forum List  »  InnoDB

Re: Acquire queries executed in each transaction only from MySQL
Posted by: 知亮 大塚
Date: June 27, 2018 08:31PM

general_log can't distinguish each transaction.

For example, I execute 2 (T1, T2) transaction in parallel.

2018-06-28T11:15:50.211421+09:00 7 Query begin
2018-06-28T11:15:58.651335+09:00 7 Query select * from t1
2018-06-28T11:16:42.730192+09:00 7 Query insert into t1 (col1, col2) values (2,3)
2018-06-28T11:16:49.219737+09:00 6 Query begin
2018-06-28T11:16:58.259100+09:00 7 Query select * from t1
2018-06-28T11:17:26.683469+09:00 6 Query insert into t1 (col1, col2) values (3,4)
2018-06-28T11:17:41.795235+09:00 7 Query commit
2018-06-28T11:17:44.412252+09:00 6 Query commit

This is the output of general_log, and I can't find out which queries are T1 or T2.
For the same reason, slow_query_log(long_query_time=0) doesn't work.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.