Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want to record the committer of sql #6673

Closed
linquan92 opened this issue May 29, 2018 · 6 comments
Closed

want to record the committer of sql #6673

linquan92 opened this issue May 29, 2018 · 6 comments

Comments

@linquan92
Copy link

Now,we can set @@tidb_general_log=1 and record all the SQL statements in the log. But the committer of SQL is not recorded in the log. We want to make analysis on the details of the SQL.
Can tidb support to the committer of every SQL?The demo of log can add the committer of SQL based on the tidb_slow_query.log
Like this:
[info] cost_time:582.76183ms succ:true connection_id:457 txn_start_ts:399880415363465346 database:a table_ids:[] index_ids:[] committer:xxx sql:select count(1) from a.b;

@XuHuaiyu
Copy link
Contributor

Hi, @powqabc , thank you for your feedback.
The committer you mentioned here is the user with which the session login?

@linquan92
Copy link
Author

Yes.
There is an other question.Is each record a complete statement without carriage return?
Thank you.

@shenli
Copy link
Member

shenli commented May 29, 2018

@powqabc Good suggestion!

@melin
Copy link

melin commented May 29, 2018

Json format is recommended to facilitate parsing

@lysu
Copy link
Contributor

lysu commented May 30, 2018

Should we add src-ip/src-port of sql emitter at the same time? or make user easy found that though connid?
@coocood @shenli

@coocood
Copy link
Member

coocood commented Jun 4, 2018

@lysu the host is included in the user string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants