[MDEV-30042] The use of string types in the IN keyword Created: 2022-11-20 Updated: 2022-11-20 Resolved: 2022-11-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.9.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | 王瑞丰 | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
mariadb docker |
||
| Description |
|
Consider the following statements: SELECT "1gbnn" IN (1) – expected: 0, actual: 1 for keyword IN, We expect that strings should not be converted to numeric values. however, in actual execution, string is converted to a numeric type. database version: 10.9.4-MariaDB-1:10.9.4+maria~ubu2204 |
| Comments |
| Comment by Sergei Golubchik [ 2022-11-20 ] |
|
See https://mariadb.com/kb/en/type-conversion/#rules-for-conversion-on-comparison |