Bug #113206 | BIT_OR returns erroneous values | ||
---|---|---|---|
Submitted: | 24 Nov 2023 3:57 | Modified: | 24 Nov 2023 7:11 |
Reporter: | Pinhan Zhao | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 8.0.27, 8.0.35 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[24 Nov 2023 3:57]
Pinhan Zhao
[24 Nov 2023 5:55]
MySQL Verification Team
Hello Pinhan Zhao, Thank you for the report and feedback. regards, Umesh
[24 Nov 2023 7:11]
Roy Lyseng
Posted by developer: Not a bug. From user manual: Numeric evaluation occurs otherwise, with argument value conversion to unsigned 64-bit integers as necessary. Note that there is no standard that covers the semantics of BIT_OR. Besides, MySQL has an unsigned data type that must be handled. If you need the result as a signed integer, wrap the expression as CAST(BIT_OR(x) AS SIGNED)