diff options
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c index 5927e8ba0..2affd8480 100644 --- a/src/func.c +++ b/src/func.c @@ -16,7 +16,7 @@ ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.128 2006/05/11 13:25:39 drh Exp $ +** $Id: func.c,v 1.129 2006/06/13 17:39:00 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -548,6 +548,19 @@ static void versionFunc( sqlite3_result_text(context, sqlite3_version, -1, SQLITE_STATIC); } +/* +** The MATCH() function is unimplemented. If anybody tries to use it, +** return an error. +*/ +static void matchStub( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + static const char zErr[] = "MATCH is not implemented"; + sqlite3_result_error(context, zErr, sizeof(zErr)-1); +} + /* ** EXPERIMENTAL - This is not an official function. The interface may @@ -1003,6 +1016,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){ { "last_insert_rowid", 0, 1, SQLITE_UTF8, 0, last_insert_rowid }, { "changes", 0, 1, SQLITE_UTF8, 0, changes }, { "total_changes", 0, 1, SQLITE_UTF8, 0, total_changes }, + { "match", 2, 0, SQLITE_UTF8, 0, matchStub }, #ifdef SQLITE_SOUNDEX { "soundex", 1, 0, SQLITE_UTF8, 0, soundexFunc}, #endif |