pt-table-sync char-chunking works despite docs

Reported by snowave on 2013-09-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Undecided
Unassigned

Bug Description

the document says

Note that this algorithm will not work if chunking a char column where all the values start with the same character. In that case, the tool will exit and suggest picking a different algorithm.

i have a try,

mysql> desc za;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| id | char(20) | YES | UNI | NULL | |
+-------+----------+------+-----+---------+-------+
1 row in set (0.00 sec)

mysql> select * from za limit 5;
+------------+
| id |
+------------+
| abc008LV |
| abc00tpYxz |
| abc00tQz |
| abc00uUaSp |
| abc01cFv |
+------------+
5 rows in set (0.00 sec)

so, can found the prefix of a row ,begins with abc,oppose to the document says, i think the tool will use nibble ALGORITHM,

# TableSyncer:5807 8903 Getting best plugin
# TableSyncer:5809 8903 Trying plugin Chunk
# TableChunker:3703 8903 Possible chunk indexes in order: un_id
# TableChunker:3723 8903 Exact chunkable: id on un_id
# TableChunker:3727 8903 Ordering columns by order in tbl, PK first
# TableChunker:3740 8903 Chunkable columns: id on un_id
# TableChunker:3741 8903 Can chunk exactly: 1
# TableSyncChunk:5028 8903 Can chunk on column id using index un_id
# TableSyncer:5812 8903 Can sync with Chunk $VAR1 = {
# chunk_col => 'id',
# chunk_index => 'un_id'
# };

you can see, it used chunk algorithm , could explain ?

tags: added: chunking pt-table-sync
summary: - choose a ALGORITHM about table sync
+ pt-table-sync char-chunking works despite docs
Changed in percona-toolkit:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers