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: 216 Registered: January 2012 Location: Kajaani, Finland
|
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: Thu Apr 24 19:10:03 CEST 2025
Total time taken to generate the page: 0.01770 seconds
|