pt-query-digest : Data too long for column 'sample' at row
General
Escalation
General
Escalation
Description
Environment
None
AFFECTED CS IDs
CS0049494
Activity
Show:

Aaditya Dubey November 6, 2024 at 12:26 PMEdited
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
Add random data:
Run latest[3.6]
pt-query-digest
The following error will be seen:
Details
Details
Assignee
Unassigned
UnassignedReporter

Priority
Labels
Needs QA
Yes
Smart Checklist
Open Smart Checklist
Smart Checklist

Open Smart Checklist
Created September 18, 2024 at 9:07 AM
Updated November 6, 2024 at 12:31 PM
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.