-
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
expressions: use integer for time in arithmetic op if FSP = 0 #133
Conversation
// if duration has no precision, return int64 | ||
v := x.ToNumber() | ||
if x.Fsp == 0 { | ||
// Integer number 111111 can not overflow int64. |
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.
Seems 111111 cannot overflow?
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.
111111 < math.Int64 of course
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.
Got it.
But if make sure the ret value is valid, this comment is not needed?
LGTM |
expressions: use integer for time in arithmetic op if FSP = 0
* flags: hidden not stable command flags * address comment
…ase 6.4` rate limit (pingcap#155) * merge pr#130,pingcap#133 into 6.4 Signed-off-by: zeminzhou <[email protected]> * fix start limit rate Signed-off-by: zeminzhou <[email protected]> * default config Signed-off-by: zeminzhou <[email protected]> * 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 <[email protected]> * update golang.org/x/text to 0.3.8 Signed-off-by: zeminzhou <[email protected]> * Fix error handle when loadKeyspace failed at startup (pingcap#143) Signed-off-by: yongman <[email protected]> Signed-off-by: yongman <[email protected]> * add keyspace-activate mode (pingcap#142) * fix loadkeyspace nil (pingcap#144) * fix loadkeyspace nil Signed-off-by: ystaticy <[email protected]> * retry load keyspace Signed-off-by: David <[email protected]> * address comments Signed-off-by: David <[email protected]> Signed-off-by: ystaticy <[email protected]> Signed-off-by: David <[email protected]> Co-authored-by: David <[email protected]> * Compatible with old pd Signed-off-by: zeminzhou <[email protected]> Signed-off-by: zeminzhou <[email protected]> Signed-off-by: yongman <[email protected]> Signed-off-by: ystaticy <[email protected]> Signed-off-by: David <[email protected]> Co-authored-by: yongman <[email protected]> Co-authored-by: better0332 <[email protected]> Co-authored-by: ystaticy <[email protected]> Co-authored-by: David <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> * fix confict Signed-off-by: zeminzhou <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> Signed-off-by: zeminzhou <[email protected]> Signed-off-by: yongman <[email protected]> Signed-off-by: ystaticy <[email protected]> Signed-off-by: David <[email protected]> Co-authored-by: yongman <[email protected]> Co-authored-by: better0332 <[email protected]> Co-authored-by: ystaticy <[email protected]> Co-authored-by: David <[email protected]>
No description provided.