On 25/02/2011, at 3:40 AM, Ramsey Gurley wrote:

> Does a case sensitive fetch *really* work??  I believe the ci in 
> utf8_general_ci stands for 'case insensitive.'

<...>
> So it looks like you need to switch over to utf8_bin to get something 
> resembling case sensitivity. 
<...>
> As for a case insensitive search, by default all MySQL queries are case 
> insensitive. If you do a case insensitive query in WO, the plugin for MySQL 
> handles this by converting your query string using UPPER.

Which ain't the best idea for mysql as it bypasses your indexes.

Alternatively, you can provide a custom adaptor (or alter wonder's) to use the 
'binary' keyword.

I had this working in my own mysql adaptor (which I didn't at the time get 
around to rolling into Wonder prior to the current mysql adaptor turned up). 
Whoever's maintaining wonder's mysql adaptor atm can contact me... it's 
optionally switched on and essentially transforms (with the assumption that the 
columns are defined as non-bin collations) case-insensitive into 'like' and 
case-sensitive into 'binary like'. It handles 'order by' clauses also.

with regards,
-

Lachlan Deck

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to