Getting MySQL Error 1064 when trying to show Explain Plan in PMM 2.33.0

Hello,
When trying to show explain plan I get error:

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

The same for Classic and JSON explain plan.

PMM versoin: Current version: 2.33.0 (December 06, 2022)

Please consult how to troubleshoot and solve issue.

Thank you

Best regards,
Marko

1 Like

Hello @msutic,
Look at the ‘Examples’ tab. Do you see the entire query in this tab? If not, I suspect you are using performance_schema as the source of your queries and MySQL has truncated your extremely long query. PMM can only see what MySQL gives it and if MySQL truncates your query then PMM sees it truncated as well. The solution is to increase performance_schema_max_sql_text_length and restart MySQL.

2 Likes

Hello @matthewb,
Thank you for comment.
I see entire query in example tab with database name prefix for tables. The same error is displayed for short and long queries.

Also, there is nothing in “Tables” tab:
image

Is it possible that I have issues with privileges?

If you had a permissions issue, you would have received a permission error. I recommend you first upgrade to the latest PMM and if you issue persists, you can open a bug report or contact our Support department for more direct assistance.

OK!
Thank you for the help.

1 Like

Hi, I have the same error.
I changed the sql_text_lengh to 2048 and I can see the entire query, but same error is raised in explain.
Mysql 5.7.31
pmm : 2.35

Hi Marcel,
I raised question to Percona support. They confirmed bug. Fix is planned in 2.37.

Best regards,
Marko