Home » U++ Library support » U++ SQL » [BUG?]Like() always case sensitive on MySql
[BUG?]Like() always case sensitive on MySql [message #39707] |
Fri, 19 April 2013 01:23 |
|
Alboni
Messages: 214 Registered: January 2012 Location: Deventer, Netherlands
|
Experienced Member |
|
|
The Like() function always generates "like binary" on MySql regardless of whether I specify case sensitive (bool cs) or not.
This looks like a bug to me. I can't think of a reason to ignore the cs parameter on MySql.
SqlBool Like(const SqlVal& a, const SqlVal& b, bool cs) {
return SqlBool(a, SqlCase
(MY_SQL, " like binary ")
(PGSQL, cs ? " like " : " ilike ")
(" like "), b, SqlS::COMP);
}
I solved it in my program like this:
SqlBool iLike(const SqlVal& a, const SqlVal& b, bool cs) {
return SqlBool(a, SqlCase
(MY_SQL, cs ? " like binary " : " like ")
(PGSQL, cs ? " like " : " ilike ")
(" like "), b, SqlS::COMP);
}
(Release 5485)
[Updated on: Fri, 19 April 2013 15:52] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 05:32:57 CEST 2024
Total time taken to generate the page: 0.04888 seconds
|