-
Notifications
You must be signed in to change notification settings - Fork 355
Added option to log queries to database #424
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
base: 3.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution.
Please add a test case. You will find examples in the directory t.
query => $query, | ||
proclist => $pl, | ||
columns => \@processlist_columns, | ||
eval_error => $EVAL_ERROR, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EVAL_ERROR makes sense only after pt-kill tried to kill the query.
if ( $o->get('logdb') ) { | ||
if ( $log ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if someone specifies option --logdb and not --log?
@@ -8382,6 +8393,17 @@ This option makes pt-kill kill matching queries. This requires MySQL 5.0 or | |||
newer. Unlike L<"--kill"> which kills the connection for matching queries, | |||
this option only kills the query, not its connection. | |||
|
|||
=item --logdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very intuitive name for the option.
Added option to log potential victims to the database specified in the dsn that is specified for logging killed queries.
This to get a central place to store the logged potential victims, instead of just locally on the file system of the target database.