Thomas Fischer wrote:
[...]
UPPER()). When testing this, I was astonished to see that mysql by default does case insensitive comparisons by default.

It's worse. The case sensitivity in MySQL depends on the collation setting of the database/table/column and may be different for each and every column (although I believe that comparing different collations may lead to errors).

- Of course this different behaviour is not good for compatibility between databases. One can force mysql to make case sensitive comparisons by adding the keyword BINARY to the comparison. The manual says this can have the following side effects
1) trailing spaces are important (so obviously, they are not important in
   usual comparisons, which sounds also strange to me)
2) it may happen that indices are not used efficiently.

I'd rather avoid this because of the settings mentioned above.

good idea in my opinion. However, what we could do is the following:
- use a Boolean instead of a boolean for ignoreCase in Criteria and
[...]

I would suggest to detect this at runtime if possible. Something like "select 'A' = 'a'" comes to my mind. But this needs deeper thinking than I can spare at the moment.

Bye, Thomas.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to