Sorry if this isn't the proper channel, but I couldn't figure out where to 
submit a patch.  See below for a patch to src/func.c that alters LIKE such 
that it has a default escape character of '\'.  That is, LIKE behaves by 
default as if ESCAPE '\' were appended.  Both MySQL and PostgreSQL behave 
this way.  The current default behavior (no escape) can be done by using 
ESCAPE ''.

--Jeff Mitchell

I have never submitted anything to SQLite before, so here is my copyright 
statement.

The author or authors of this code dedicate any and all copyright interest 
in this code to the public domain. We make this dedication for the benefit 
of the public at large and to the detriment of our heirs and successors. 
We intend this dedication to be an overt act of relinquishment in 
perpetuity of all present and future rights this code under copyright law.

520c520
<   int escape = 0;
---
>   int escape = sqlite3ReadUtf8("\\");   /* default to '\' */
522c522,523
<     /* The escape character string must consist of a single UTF-8 
character.
---
>     /* The escape character string must be either the empty string 
(disabling
>     ** escaping) or a single UTF-8 character.
526c527
<     if( sqlite3utf8CharLen((char*)zEsc, -1)!=1 ){
---
>     if( sqlite3utf8CharLen((char*)zEsc, -1) > 1 ){
528c529
<           "ESCAPE expression must be a single character", -1);
---
>         "ESCAPE expression must be the empty string or a single 
character", -1);

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to