pt-table-checksum SELECT MIN MAX for char chunking is wrong

Bug #821688 reported by Daniel Nichter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
High
Daniel Nichter

Bug Description

Imported from http://code.google.com/p/maatkit/issues/detail?id=1251

The code does "SELECT MIN(id), MAX(id) FROM `db`.`table` ORDER BY `id`" but Baron says:

The query doesn't really make sense. MIN() and MAX() will return a single row, so the query is really a GROUP BY over the whole table; therefore ORDER BY is not needed (you can't order a single row). Is that ORDER BY what's causing the problem? Otherwise, MIN and MAX from an index should be really fast -- we should see "SELECT tables optimized away" in the Extra column of EXPLAIN.

Changed in percona-toolkit:
milestone: none → 1.0.1
assignee: nobody → Daniel Nichter (daniel-nichter)
Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

Daniel,

I think we should simply remove the chunking code and change the tool to using Nibble. I'll post my ideas about this elsewhere.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

This is no longer an issue because the fix for bug 821673 removed this query from _chunk_char().

Changed in percona-toolkit:
status: New → Fix Committed
Changed in percona-toolkit:
status: Fix Committed → Fix Released
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-274

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.