-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
arithmetic overflow #143
Merged
Merged
arithmetic overflow #143
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
siddontang
commented
Sep 14, 2015
- check integer divide overflow
- the unsigned/signed return type for MOD depends on first operand.
@@ -151,3 +151,39 @@ func MulInteger(a uint64, b int64) (uint64, error) { | |||
|
|||
return MulUint64(a, uint64(b)) | |||
} | |||
|
|||
// DivInt64 divide int64 a with b, returns int64 if no overflow error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
divides
} | ||
|
||
for _, t := range tblInt2 { | ||
c.Log(t.lsh, t.rsh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this line be removed?
LGTM |
1 similar comment
LGTM |
YuJuncen
pushed a commit
to YuJuncen/tidb
that referenced
this pull request
Apr 23, 2021
Signed-off-by: Neil Shen <overvenus@gmail.com>
xhebox
pushed a commit
to xhebox/tidb
that referenced
this pull request
Sep 28, 2021
…, WindowSpec and WindowFuncExpr (pingcap#143)
xhebox
pushed a commit
to xhebox/tidb
that referenced
this pull request
Oct 8, 2021
…, WindowSpec and WindowFuncExpr (pingcap#143)
ti-chi-bot
pushed a commit
that referenced
this pull request
Oct 9, 2021
…, WindowSpec and WindowFuncExpr (#143)
nolouch
pushed a commit
to tidblabs/tidb
that referenced
this pull request
Jan 6, 2023
…ase 6.4` rate limit (pingcap#155) * merge pr#130,pingcap#133 into 6.4 Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * fix start limit rate Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * default config Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * keyspace: use `user_storage_size` instead of `storage_size` for ratelimit (pingcap#145) * use user_storage_size instead of storage_size for ratelimit Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * update golang.org/x/text to 0.3.8 Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * Fix error handle when loadKeyspace failed at startup (pingcap#143) Signed-off-by: yongman <yming0221@gmail.com> Signed-off-by: yongman <yming0221@gmail.com> * add keyspace-activate mode (pingcap#142) * fix loadkeyspace nil (pingcap#144) * fix loadkeyspace nil Signed-off-by: ystaticy <y_static_y@sina.com> * retry load keyspace Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> * address comments Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Signed-off-by: ystaticy <y_static_y@sina.com> Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> * Compatible with old pd Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: yongman <yming0221@gmail.com> Signed-off-by: ystaticy <y_static_y@sina.com> Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Co-authored-by: yongman <yming0221@gmail.com> Co-authored-by: better0332 <better0332@163.com> Co-authored-by: ystaticy <y_static_y@sina.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * fix confict Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: yongman <yming0221@gmail.com> Signed-off-by: ystaticy <y_static_y@sina.com> Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Co-authored-by: yongman <yming0221@gmail.com> Co-authored-by: better0332 <better0332@163.com> Co-authored-by: ystaticy <y_static_y@sina.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.