Pt-upgrade - Should it be able to parse all queries? - Think we have one it can't

Hi,

Whilst looking and testing pt-upgrade we seem to have found a couple of queries it “can’t parse”. Should it be able to parse all queries from a slow.log on MySQL?

e.g. In the generated report - we can see it’s taken queries from the slow.log - and all bar a couple - they’ve been turned into templates, i.e.

insert into some_table ( field, field, field ) values ( ?, ?, ? )

But for a couple of the queries the ‘template’ version seems to include junk text from the actual query - I’ll try to give an example:

insert into some_table ( field, field, field ) values ( ?, ?groupmetric?local\n???sizemetric???’

As a result it thinks all these query classes are different. The original query includes text such as C:\Filepath\somewhere-dot-com (where dot-com really is dot and com - replaced here to stop the editor from creating it as a link).

It also has a text field that ends in blah\’ (so ‘blah’ + slash, slash single quote)

I’m just wondering if any of these things is likely to give it parsing the queries into classes?

Thanks,

-Karl

1 Like

Hello Karl, the tool should be able to parse any query from the slow log. I suggest you open a bug report in jira.percona.com as you might have run into an edge case.

1 Like

Hi,

Again - thanks for the quick reply. I’ve just looked at trying to isolate the query that fails to parse - but on it’s own, it seems to parse ok. It still gets ‘trashed’ as part of the mutl-gigabyte file though.

Is there any way of getting pt-upgrade to dump out queries as it’s parsing/classing them? (i.e. some kind of verbose/debug) - I can’t see if there’s an option for that.

At the risk of generating “lots more data” - using something like that I should be able to get a better idea of where it’s going astray - in order to narrow it down to a hopefully way smaller log set that reproduces the issue.

Thanks,

-Karl

1 Like

Hello Karl, you can the tool as follows for debug mode:

PTDEBUG=1 pt-upgrade ...
1 Like