File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package canal
2
2
3
3
import (
4
4
"fmt"
5
+
5
6
"github.com/siddontang/go-mysql/replication"
6
7
"github.com/siddontang/go-mysql/schema"
7
8
)
@@ -58,15 +59,14 @@ func (r *RowsEvent) handleUnsigned() {
58
59
case int16 :
59
60
r.Rows [i ][index ] = uint16 (t )
60
61
case int32 :
61
- if r .Table .Columns [i ].Type == schema .TYPE_MEDIUM_INT {
62
+ if r .Table .Columns [index ].Type == schema .TYPE_MEDIUM_INT {
62
63
// problem with mediumint is that it's a 3-byte type. There is no compatible golang type to match that.
63
64
// So to convert from negative to positive we'd need to convert the value manually
64
- if i >= 0 {
65
+ if t >= 0 {
65
66
r.Rows [i ][index ] = uint32 (t )
66
67
} else {
67
68
r.Rows [i ][index ] = uint32 (maxMediumintUnsigned + t + 1 )
68
69
}
69
- return
70
70
} else {
71
71
r.Rows [i ][index ] = uint32 (t )
72
72
}
You can’t perform that action at this time.
0 commit comments