Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: fix large float64 to bigint #5247

Merged
merged 6 commits into from Nov 29, 2017
Merged

types: fix large float64 to bigint #5247

merged 6 commits into from Nov 29, 2017

Conversation

mccxj
Copy link
Contributor

@mccxj mccxj commented Nov 28, 2017

fix #4287.

Direct conversion has a bit diff. eg.

int64(math.Pow(2,63)-1) => -9223372036854775808

Here is the code from mysql.
https://github.com/mysql/mysql-server/blob/0138556a55168da12eaf0bc3038947148d6b0863/sql/field.cc#L4335

@sre-bot
Copy link
Contributor

sre-bot commented Nov 28, 2017

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@mccxj
Copy link
Contributor Author

mccxj commented Nov 28, 2017

oh, gofmt check failed. I will fix it.
codes are edited with my phone.:(

@jackysp
Copy link
Member

jackysp commented Nov 28, 2017

I was curious how you could push your code through the yellow cloud. Now I get the answer.
@mccxj

@coocood coocood added the contribution This PR is from a community contributor. label Nov 28, 2017
@mccxj
Copy link
Contributor Author

mccxj commented Nov 28, 2017

@XuHuaiyu PTAL

@shenli
Copy link
Member

shenli commented Nov 28, 2017

/ok-to-test

@shenli
Copy link
Member

shenli commented Nov 28, 2017

/run-all-tests

@shenli
Copy link
Member

shenli commented Nov 28, 2017

LGTM

@shenli
Copy link
Member

shenli commented Nov 29, 2017

@jackysp PTAL

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@winoros winoros merged commit c790b50 into pingcap:master Nov 29, 2017
@mccxj mccxj deleted the patch-1 branch November 29, 2017 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error on large number with type bigint
6 participants