Skip to content

Fix for uint64 value bigger than 1<<63#8

Merged
aarondl merged 1 commit intoaarondl:masterfrom
dsheshnev:bugfix/uint64
Jan 8, 2021
Merged

Fix for uint64 value bigger than 1<<63#8
aarondl merged 1 commit intoaarondl:masterfrom
dsheshnev:bugfix/uint64

Conversation

@dsheshnev
Copy link

@dsheshnev dsheshnev commented May 20, 2019

Hi, uint64 bigger than 1<<63 - 1 overflows int64

@maku693
Copy link

maku693 commented Jan 8, 2021

Hi @aarondl, can you merge this PR?
This is necessary when we use nullable BIGINT UNSIGNED type on MySQL.

The problem is, when inserting/updating a column with a null.Uint64 of current implementation, if the value overflows int64 value range, MySQL Driver try to insert/update negative int64 number (with - sign), so MySQL can't insert that to UNSIGNED column (Error 1264: Out of range value for column occurs).

@aarondl
Copy link
Owner

aarondl commented Jan 8, 2021

Ah. Thanks for the ping. I previously wasn't watching this repository properly so many of these PRs got accidentally ignored. Will merge and bump in sqlboiler.

@aarondl aarondl merged commit c1106c4 into aarondl:master Jan 8, 2021
@aarondl
Copy link
Owner

aarondl commented Jan 8, 2021

This has been bumped in the sqlboiler repo (dev branch), but the more important part is to bump it to v8.1.1 in your own go.mod

@maku693
Copy link

maku693 commented Jan 9, 2021

Thanks! I’ll update my go.mod at the beginning of the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants