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

**URL:** <https://forums.percona.com/t/pt-upgrade-should-it-be-able-to-parse-all-queries-think-we-have-one-it-cant/15191>\
**Category:** Percona Toolkit\
**Created:** [April 11, 2022, 2:43pm UTC](https://forums.percona.com/t/pt-upgrade-should-it-be-able-to-parse-all-queries-think-we-have-one-it-cant/15191 "2022-04-11T14:43:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpielorz](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kpielorz](https://forums.percona.com/u/kpielorz)\
**Post date:** [April 11, 2022, 2:43pm UTC](https://forums.percona.com/t/pt-upgrade-should-it-be-able-to-parse-all-queries-think-we-have-one-it-cant/15191/1 "2022-04-11T14:43:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [April 11, 2022, 2:58pm UTC](https://forums.percona.com/t/pt-upgrade-should-it-be-able-to-parse-all-queries-think-we-have-one-it-cant/15191/2 "2022-04-11T14:58:42Z")

</div>

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](http://jira.percona.com) as you might have run into an edge case.

---

<div class="post-metadata">

**Author:** ![kpielorz](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kpielorz](https://forums.percona.com/u/kpielorz)\
**Post date:** [April 11, 2022, 3:42pm UTC](https://forums.percona.com/t/pt-upgrade-should-it-be-able-to-parse-all-queries-think-we-have-one-it-cant/15191/3 "2022-04-11T15:42:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [April 20, 2022, 11:01am UTC](https://forums.percona.com/t/pt-upgrade-should-it-be-able-to-parse-all-queries-think-we-have-one-it-cant/15191/4 "2022-04-20T11:01:31Z")

</div>

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

```auto
PTDEBUG=1 pt-upgrade ...

```
