You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[P2] In round_floating_to_uint64, the checks for rounded <= INT64_MIN_AS_DOUBLE and rounded >= UINT64_UPPER_BOUND_AS_DOUBLE are handled before checking is_column_convert. In non-strict mode, OB_DATA_OUT_OF_RANGE is downgraded to a warning, but the current out_val is still persisted. This leads to incorrect results for extreme values in unsigned columns: a DOUBLE value of -2e28 gets written as 2^63 (MySQL should clamp it to 0), and a DOUBLE value of +2e28 gets written as INT64_MAX (MySQL should clamp it to UINT64_MAX; the FLOAT path writes it as 2^63). MySQL's Field_longlong::store(double) handles negative numbers and upper bounds according to unsigned column semantics first: https://github.com/mysql/mysql-server/blob/8.0/sql/field.cc. It is suggested to move the column-convert branch earlier, so negative numbers uniformly output 0 and values reaching 2^64 output UINT64_MAX. The non-column-convert branch should retain the existing differences between FLOAT/DOUBLE CAST AS UNSIGNED. Also, add test cases for FLOAT/DOUBLE ±2e28 -> BIGINT UNSIGNED column conversion, as the current unit tests do not cover these two boundaries.
This file contains hidden or 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
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.
Task Description
Static cast long long overflow.
Solution Description
Enhance range checking.
Passed Regressions
core-test
Upgrade Compatibility
Other Information
Release Note