[MDEV-7044] prepareStatement does not convert characterSet for where clause Created: 2014-11-07 Updated: 2022-11-17 Resolved: 2022-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.0.12, 10.0.14 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Marcel Schneider | Assignee: | Alexander Barkov |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 7, 64 bit |
||
| Description |
|
I posted a description of this bug here because I thought this was a driver issue. It seems that it is a MariaDB server issue: |
| Comments |
| Comment by Elena Stepanova [ 2014-11-07 ] | |||
|
Quote from wlad's comment to
Since we have a charset expert in the house, I'll leave it to bar to say whether it's really a bug. | |||
| Comment by Vladislav Vaintroub [ 2014-11-08 ] | |||
|
Marcel was able to insert non-latin1into latin1 column, mostly likely due in non-strict sql mode, in which server replaces unknown byte sequences with question marks. So it is well possible to "insert" string into a column (at least there is no exception, so it kinda succeeds ), but impossble to query for it afterwards -there is an exception | |||
| Comment by Marcel Schneider [ 2014-11-10 ] | |||
|
> There is another part of the bug, Marcel states he was able to insert non-latin1 into latin1 column, but I was not able to reproduce it . Just to clarify this: I do not consider (the insert) this a bug: In fact I think this is expected behaviour. I've seen the same behaviour (replacing unknown chars to question marks) on oracle. | |||
| Comment by Sergei Golubchik [ 2022-11-09 ] | |||
|
Doesn't seem to be a bug. When collations are incompatible, the server cannot return an empty set, because it does not know how to compare two values. May be they match. May be they don't. The server cannot perform a comparison. | |||
| Comment by Vladislav Vaintroub [ 2022-11-09 ] | |||
|
I'm do not completely follow the argumentation. logically, comparing strings does not seem a big deal. so, one string is cp850, another string is ascii, cp850 includes all ascii, thus one can convert ascii to cp850, which is a nop-conversion, and compare them using cp850_general_ci rules. | |||
| Comment by Sergei Golubchik [ 2022-11-17 ] | |||
|
yes, it's a slightly different issue. |