This project is archived and is in readonly mode.

#1759 ✓duplicate
nerd

validate_uniqueness_of and case insensitive columns ...

Reported by nerd | January 14th, 2009 @ 12:42 PM | in 2.x

As far as I've seen, the case_sensitive_equality_operator is in rails 2.2 bound to the connection adapter. But why is the more expensive case insensitve case not handled in a connection adapter bound way? On mysql an complete table-scan will run if someone compares by using lower() = . The result would be the same, if not using lower... in my freezed checkout of rails 1.x there was a comment, that this is anyway only needed by sqlite.. so why don't write a adapter specific method here as well? I had a lot of trouble on my project, searching for the bottleneck, until I found this out...

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages