Comment 2 for bug 978432

Revision history for this message
Dave Juntgen (djuntgen) wrote :

Additional information regarding invalid index selection. Different error but similar problem:

04-13T05:08:37 Error checksumming table wc_dow.patient_pdups: Possible infinite loop detected! The lower boundary for chunk 2 is <9> and the lower boundary for chunk 3 is also <9>. This usually happens when using a non-unique single column index. The current chunk index for table wc_dow.patient_pdups is idx3 which is not unique and covers 1 column.

Indexes on table:

+---------------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+---------------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
| patient_pdups | 0 | idx1 | 1 | pat_id | A | 110893 | NULL | NULL | | BTREE | |
| patient_pdups | 0 | idx1 | 2 | pat_id_match | A | 443575 | NULL | NULL | | BTREE | |
| patient_pdups | 0 | idx2 | 1 | pat_id_match | A | 147858 | NULL | NULL | | BTREE | |
| patient_pdups | 0 | idx2 | 2 | pat_id | A | 443575 | NULL | NULL | | BTREE | |
| patient_pdups | 1 | idx3 | 1 | rating | A | 13 | NULL | NULL | | BTREE | |
+---------------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+

As you can see, idx1 and idx2 are unique indexes, but pt-table-checksum is using idx3, a non unique index, for its chucking.