pt-query-digest : Data too long for column 'sample' at row

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

Show:

Aaditya Dubey November 6, 2024 at 12:26 PM
Edited

Hi

Thank you for the report. This report is now verified.

Test Case:

  1. Create the following table in any database, here I'm using test database:

  1. Make sure these values are set in my.cnf: slow_query_log = 1, long_query_time = 0

  2. Add random data:

  1. Run latest[3.6] pt-query-digest

  1. The following error will be seen:

Details

Assignee

Reporter

Priority

Affects versions

Needs QA

Yes

Smart Checklist

Created September 18, 2024 at 9:07 AM
Updated November 6, 2024 at 12:31 PM