Skip to content

Commit b46e48e

Browse files
committed
Fix primary key case bug
1 parent 9de3ea0 commit b46e48e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/client/driver/mysql/dumper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func (d *dumper) getChunkData() (nRows int64, err error) {
297297
// lastVals must not be nil if len(data) > 0
298298
for i, col := range d.table.UseUniqueKey.Columns.Columns {
299299
// TODO save the idx
300-
idx := d.table.OriginalTableColumns.Ordinals[col.Name]
300+
idx := d.table.OriginalTableColumns.Ordinals[strings.ToLower(col.Name)]
301301
if idx > len(lastVals) {
302302
return entry.RowsCount, fmt.Errorf("getChunkData. GetLastMaxVal: column index %v > n_column %v", idx, len(lastVals))
303303
} else {

0 commit comments

Comments
 (0)