Bug #109836 | Decimal retention of results in string type data calculation | ||
---|---|---|---|
Submitted: | 30 Jan 2023 12:11 | Modified: | 31 Jan 2023 7:44 |
Reporter: | Chenglin Tian | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
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:11]
Chenglin Tian
[30 Jan 2023 13:21]
MySQL Verification Team
Hello Chenglin Tian, Thank you for the report. regards, Umesh
[31 Jan 2023 7:44]
Roy Lyseng
Posted by developer: This is not a bug. The returned data type for a division between two integers is decimal. The returned data type for a division between a string and an integer is double precision. The semantics for decimal and double types are different, and this is what causes the difference in results.