Bug #113694 | misleading error message comparing a spatial column with numeric using < or such | ||
---|---|---|---|
Submitted: | 20 Jan 2024 1:16 | Modified: | 22 Jan 2024 12:30 |
Reporter: | Mikhail Izioumtchenko | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.34 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[20 Jan 2024 1:16]
Mikhail Izioumtchenko
[22 Jan 2024 11:13]
MySQL Verification Team
Hi Mr. Izioumthchenko, Thank you for your bug report. We have repeated your bug report and your report is definitely not a bug. SQL standard strictly prohibits using different data types in any expressions, including the comparison expressions in the WHERE clause. In short, you are prohibited to compare integer to strings, polygon to strings , json type with varbinary or any CHAR-derived type. According to the SQL standard, the error should be returned. But, MySQL database tries to do more , when it can do it and in the manner when it can do it. Hence, it is our choice which common denominator would we use or which error messages we are going to return. What you saw in the output is our choice for MySQL and we do not see a necessity to change it. Not a bug.
[22 Jan 2024 12:30]
Mikhail Izioumtchenko
indeed there is nothing in the standard that says that error messages should make any sense