pt-query-digest : Data too long for column 'sample' at row
General
Escalation
General
Escalation
Description
Team,
Our current query review history tables have a sample column data type of TEXT, which is insufficient to store LONGTEXT query samples. Once the pt-query-digest tool finds such a long query and tries to insert it into the history tables, it gets the error [Data too long for column 'sample' at row].
To solve this, we need to alter the history table sample column to LONGTEXT manually. But it is good to have if the pt-query-digest tool creates the history table sample’s column with LONGTEXT data type.
Environment
None
AFFECTED CS IDs
CS0049494
Activity
Aaditya Dubey
November 6, 2024 at 12:26 PM
(edited)
Hi
Thank you for the report. This report is now verified.
Test Case:
Create the following table in any database, here I'm using test database:
Make sure these values are set in my.cnf: slow_query_log = 1, long_query_time = 0
Team,
Our current query review history tables have a sample column data type of TEXT, which is insufficient to store LONGTEXT query samples. Once the pt-query-digest tool finds such a long query and tries to insert it into the history tables, it gets the error [
Data too long for column 'sample' at row
].To solve this, we need to alter the history table sample column to LONGTEXT manually. But it is good to have if the pt-query-digest tool creates the history table sample’s column with LONGTEXT data type.