pt-query-digest --embedded-attributes doesn't check cardinality

Bug #885382 reported by Baron Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Brian Fraser
2.0
Fix Released
Medium
Brian Fraser
2.1
Fix Released
Medium
Brian Fraser

Bug Description

When I execute the tool without two comma-separated elements in the --embedded-attributes array, I get:

Use of uninitialized value in regexp compilation at /home/baron/repos/pt/bin/pt-query-digest line 12284.

That's because of this:

12282 if ( my $patterns = $o->get('embedded-attributes') ) {
12283 $misc->{embed} = qr/$patterns->[0]/o;
12284 $misc->{capture} = qr/$patterns->[1]/o;
12285 MKDEBUG && _d('Patterns for embedded attributes:', $misc->{embed},
12286 $misc->{capture});
12287 }

The tool needs to check that there are two elements in the array.

Related branches

tags: added: crash pt-query-digest
Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-431

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.