mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-24 09:53:10 +03:00
Add the SQLITE_CASE_SENSITIVE_LIKE compile-time option. (CVS 2539)
FossilOrigin-Name: b72bff81f9937378417a0af0610d8558279b67a7
This commit is contained in:
12
src/func.c
12
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.100 2005/06/25 18:42:14 drh Exp $
|
||||
** $Id: func.c,v 1.101 2005/07/08 13:53:22 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -309,7 +309,15 @@ struct compareInfo {
|
||||
u8 noCase;
|
||||
};
|
||||
static const struct compareInfo globInfo = { '*', '?', '[', 0 };
|
||||
static const struct compareInfo likeInfo = { '%', '_', 0, 1 };
|
||||
#ifndef SQLITE_CASE_SENSITIVE_LIKE
|
||||
/* The correct SQL-92 behavior is for the LIKE operator to ignore
|
||||
** case. Thus 'a' LIKE 'A' would be true. */
|
||||
static const struct compareInfo likeInfo = { '%', '_', 0, 1 };
|
||||
#else
|
||||
/* If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator
|
||||
** is case sensitive causing 'a' LIKE 'A' to be false */
|
||||
static const struct compareInfo likeInfo = { '%', '_', 0, 0 };
|
||||
#endif
|
||||
|
||||
/*
|
||||
** X is a pointer to the first byte of a UTF-8 character. Increment
|
||||
|
||||
Reference in New Issue
Block a user