LP #899034: pt-query-digest create-review-table fails to create table

Description

**Reported in Launchpad by Kingsquare last update 16-12-2011 16:13:20

After an installation via the .deb (on an Ubuntu 8.04.4 Ubuntu box) I've placed an configuration file in
/etc/percona-toolkit/percona-toolkit.conf as follows:
A=utf8
h=localhost
p=percona
u=percona

Bug: Adding a D configuration parameter (and value) fails every call to 'pt-query-digest' with an 'Unknown option: D'
documentation bug: the DSN port / password are both lowercased in the documentation

Moving all parameters into the comandline like:

pt-query-digest --create-review-table A=utf8,h=localhost,p=percona,u=percona,D=percona-toolkit,t=review

fails. (or seems to wait for input)

Adding a slow log to the call:
pt-query-digest --create-review-table A=utf8,h=localhost,p=percona,u=percona,D=percona-toolkit,t=review ./slowlog.log

doesnt create a table (even if the user does have the correct rights in the database)

The same goes for the history-variant of the --review option.

Also i feel that the documentation is lacking in the usage of the --review and --review-history options of the query-digest. I have a feeling that this could very well be very usefull (allowing monitoring of query optimization progress due to schema changes etc) but for now i have no clue as to apply these techniques to good use...

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 6:10 PM

**Comment from Launchpad by: Daniel Nichter on: 16-12-2011 16:12:44

The documentation does include an example in the SYNOPSIS of using --review:

Review a slow log, saving results to the test.query_review table in a MySQL
server running on host1. See L<"--review"> for more on reviewing queries:

pt-query-digest --review h=host1,D=test,t=query_review /path/to/slow.log

The --review option is type DSN which means it takes a DSN, whereas --create-review-table has no type; it simple creates the table specified by --review (as the docu for --create-review-table says).

So the command line you need is:

pt-query-digest --review A=utf8,h=localhost,p=percona,u=percona,D=percona-toolkit,t=review --create-review-table ./slowlog.log

Also, you need to create the percona database before running that.

If you still have problems getting this feature to work, ask on the mailing list (http://groups.google.com/group/percona-discussion) or the project's Q&A (https://answers.launchpad.net/percona-toolkit).

Not a Bug

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 6:09 PM
Updated February 4, 2018 at 1:54 AM
Resolved January 24, 2018 at 6:10 PM