Add ReadDecimal helper

This commit is contained in:
2018-11-30 11:17:59 +01:00
parent 57d2b30132
commit 2f12207dbe
2 changed files with 13 additions and 3 deletions
+1 -3
View File
@@ -174,9 +174,7 @@ func (e *RowsEvent) decodeValue(buf *buffer.Buffer, ct mysql.ColumnType, meta ui
case mysql.ColumnTypeNewDecimal:
precision := int(meta >> 8)
decimals := int(meta & 0xFF)
dec, n := mysql.DecodeDecimal(buf.Cur(), precision, decimals)
buf.Skip(n)
return dec
return buf.ReadDecimal(precision, decimals)
// Date and Time
case mysql.ColumnTypeYear: