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

*: fix type of maxint64 #9834

Merged
merged 2 commits into from
Mar 25, 2019
Merged

Conversation

wjhuang2016
Copy link
Member

What problem does this PR solve?

For #9823

What is changed and how it works?

In parser:

	case n < math.MaxInt64:
		lval.item = int64(n)

In fact, we need:

	case n <= math.MaxInt64:
		lval.item = int64(n)

Check List

Tests

  • Manual test (add detailed scripts or steps below)
mysql> SELECT 9223372036854775807+1;
ERROR 1690 (22003): BIGINT value is out of range in '(9223372036854775807 + 1)'

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

@qw4990 qw4990 added contribution This PR is from a community contributor. type/bugfix This PR fixes a bug. labels Mar 21, 2019
@qw4990 qw4990 requested a review from eurekaka March 21, 2019 02:53
@eurekaka
Copy link
Contributor

Add the link of PR in parser here for reference: pingcap/parser#251

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

LGTM, Please update go.mod.

@codecov
Copy link

codecov bot commented Mar 25, 2019

Codecov Report

Merging #9834 into master will increase coverage by 0.0099%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             master      #9834        +/-   ##
================================================
+ Coverage   67.3446%   67.3545%   +0.0099%     
================================================
  Files           383        383                
  Lines         80437      80437                
================================================
+ Hits          54170      54178         +8     
+ Misses        21421      21417         -4     
+ Partials       4846       4842         -4

@wjhuang2016 wjhuang2016 force-pushed the fix_intmax64_add_overflow branch from b2cc647 to 5ad7b46 Compare March 25, 2019 04:38
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

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka
Copy link
Contributor

/run-all-tests

@eurekaka eurekaka added the status/LGT2 Indicates that a PR has LGTM 2. label Mar 25, 2019
@zz-jason
Copy link
Member

/run-unit-test

@zz-jason zz-jason merged commit d39053d into pingcap:master Mar 25, 2019
@wjhuang2016 wjhuang2016 deleted the fix_intmax64_add_overflow branch March 25, 2019 06:55
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. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants