Bug #100213 | wrong result when filter decimal column by digit string in IN-predicate | ||
---|---|---|---|
Submitted: | 14 Jul 2020 9:15 | Modified: | 20 Jul 2020 13:47 |
Reporter: | Kang Xia (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S3 (Non-critical) |
Version: | 5.7.21,5.7.27,8.0.20 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | decimal, IN |
[14 Jul 2020 9:15]
Kang Xia
[14 Jul 2020 13:05]
MySQL Verification Team
Hi Mr. Xia, I have run your test case on 8.0.20, exactly as you have sent us. I got this output: --------------- col 171887878719799005 col 171887878719799005 col 171887878719799005 col 171887878719799005 --------------- I have interspersed each SQL command with SHOW WARNINGS and there were none. The only change that I have made is that I wrote numeric data as numeric and not as a string. Can't repeat.
[20 Jul 2020 1:10]
Kang Xia
Hi: Try with string please. If MySQL don't support cast string to decimal implicitly when assign a string value to a decimal volumn, maybe here could send a warning or error. Anyway, the query result in my case is counterintuitive.
[20 Jul 2020 13:47]
MySQL Verification Team
Hi Mr. Xia, Numeric data should never be entered as strings. Rules on converting from string types to numerical types are explained in our manul. That is why we have all these casting functions. This is asol fully described in our Reference Manual. Not a bug.