Skip to content

Commit aa23b1d

Browse files
dfcaobaloo
authored andcommitted
fix float problem about time fieldtype
1 parent 5068e51 commit aa23b1d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pymysqlreplication/row_event.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,8 @@ def __read_fsp(self, column):
208208
if read > 0:
209209
microsecond = self.packet.read_int_be_by_size(read)
210210
if column.fsp % 2:
211-
return int(microsecond / 10)
212-
else:
213-
return microsecond
214-
211+
microsecond = int(microsecond / 10)
212+
return microsecond * (10 ** (6-column.fsp))
215213
return 0
216214

217215
def __read_string(self, size, column):

0 commit comments

Comments
 (0)