aboutsummaryrefslogtreecommitdiff
path: root/src/test1.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2005-08-14 01:20:37 +0000
committerdrh <drh@noemail.net>2005-08-14 01:20:37 +0000
commit55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7 (patch)
tree8f59d79014cb49e92d37a1ebe548537b6bdbadf1 /src/test1.c
parent3d94662a062a5da6340568b5ad656c3057f053c5 (diff)
downloadsqlite-55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7.tar.gz
sqlite-55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7.zip
The case_sensitive_like pragma added.
Test cases added for the LIKE optimization. (CVS 2592) FossilOrigin-Name: 72ee21c05e618b6f46f5460f8c85779c72fe32d7
Diffstat (limited to 'src/test1.c')
-rw-r--r--src/test1.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/test1.c b/src/test1.c
index aaa391041..b08333eef 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test1.c,v 1.153 2005/08/11 02:10:19 drh Exp $
+** $Id: test1.c,v 1.154 2005/08/14 01:20:39 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -2797,6 +2797,12 @@ static void set_options(Tcl_Interp *interp){
Tcl_SetVar2(interp,"sqlite_options","default_autovacuum","1",TCL_GLOBAL_ONLY);
#endif
+#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION
+ Tcl_SetVar2(interp, "sqlite_options", "between_opt", "0", TCL_GLOBAL_ONLY);
+#else
+ Tcl_SetVar2(interp, "sqlite_options", "between_opt", "1", TCL_GLOBAL_ONLY);
+#endif
+
#ifdef SQLITE_OMIT_BLOB_LITERAL
Tcl_SetVar2(interp, "sqlite_options", "bloblit", "0", TCL_GLOBAL_ONLY);
#else
@@ -2869,12 +2875,24 @@ static void set_options(Tcl_Interp *interp){
Tcl_SetVar2(interp, "sqlite_options", "integrityck", "1", TCL_GLOBAL_ONLY);
#endif
+#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION
+ Tcl_SetVar2(interp, "sqlite_options", "like_opt", "0", TCL_GLOBAL_ONLY);
+#else
+ Tcl_SetVar2(interp, "sqlite_options", "like_opt", "1", TCL_GLOBAL_ONLY);
+#endif
+
#ifdef SQLITE_OMIT_MEMORYDB
Tcl_SetVar2(interp, "sqlite_options", "memorydb", "0", TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp, "sqlite_options", "memorydb", "1", TCL_GLOBAL_ONLY);
#endif
+#ifdef SQLITE_OMIT_OR_OPTIMIZATION
+ Tcl_SetVar2(interp, "sqlite_options", "or_opt", "0", TCL_GLOBAL_ONLY);
+#else
+ Tcl_SetVar2(interp, "sqlite_options", "or_opt", "1", TCL_GLOBAL_ONLY);
+#endif
+
#ifdef SQLITE_OMIT_PAGER_PRAGMAS
Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "0", TCL_GLOBAL_ONLY);
#else
@@ -3094,6 +3112,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
extern int sqlite3_memUsed;
extern int sqlite3_memMax;
extern char sqlite3_query_plan[];
+ extern int sqlite3_like_count;
static char *query_plan = sqlite3_query_plan;
for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){
@@ -3107,6 +3126,8 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
(char*)&sqlite3_search_count, TCL_LINK_INT);
Tcl_LinkVar(interp, "sqlite_sort_count",
(char*)&sqlite3_sort_count, TCL_LINK_INT);
+ Tcl_LinkVar(interp, "sqlite_like_count",
+ (char*)&sqlite3_like_count, TCL_LINK_INT);
Tcl_LinkVar(interp, "sqlite_interrupt_count",
(char*)&sqlite3_interrupt_count, TCL_LINK_INT);
Tcl_LinkVar(interp, "sqlite_open_file_count",