Bug #109837 The representation of 0 in division function in computing string
Submitted: 30 Jan 2023 12:24 Modified: 30 Jan 2023 13:22
Reporter: Chenglin Tian Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0.31, 8.0.32, 5.7.41 OS:MacOS
Assigned to: CPU Architecture:x86

[30 Jan 2023 12:24] Chenglin Tian
Description:
When we use the division function to calculate, we find that if there is a negative number type string, the result will be inconsistent with the expectation

How to repeat:
The following is the test statement that we found the problem:
SELECT select 0/-4; -- expected: 0, actual: 0 
SELECT select '0'/-4; -- expected: 0, actual: -0   

Suggested fix:
This is a problem that we have detected that is inconsistent with the expected result. We believe that 0 and '0' can be regarded as the same during type conversion, but we get two results: 0 and - 0. I don't know whether this is an exception
[30 Jan 2023 13:22] MySQL Verification Team
Hello Chenglin Tian,

Thank you for the report.

regards,
Umesh