Compare commits
123 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8af3de3e72 | |||
| 71ab8c305d | |||
| 24cff61405 | |||
| 06000f4f52 | |||
| 0dd9175acb | |||
| ac57c9526d | |||
| 1760545793 | |||
| 3d15040e10 | |||
| 1d23bf94b2 | |||
| d3d9f19fc8 | |||
| ba09d91e54 | |||
| 2517db0302 | |||
| cc0164b5df | |||
| c55c8dbf7f | |||
| 9f6dd025ba | |||
| c6952addf7 | |||
| 76729ed4be | |||
| 033564cca9 | |||
| e5a0cfa161 | |||
| d0d49b9ca3 | |||
| a87070a271 | |||
| 2e5c5052fd | |||
| 6650190891 | |||
| 57b60432ba | |||
| 1ad78c5791 | |||
| 61441c3493 | |||
| 8e16b2d3e6 | |||
| 975c800dd8 | |||
| 0a9428d0a7 | |||
| 7dd7d98bbf | |||
| f10122d535 | |||
| fb82820a38 | |||
| 4ef916e233 | |||
| 37ff4d4c77 | |||
| 2a1d1e452e | |||
| 24b6b81cb0 | |||
| 6ae3ab0036 | |||
| cbfe1101b3 | |||
| 783e778f38 | |||
| c9e75fb23a | |||
| 05a41ee9ec | |||
| fcc31545bc | |||
| 6a754dc767 | |||
| 7ca1ea16ff | |||
| 9ef5e7708a | |||
| da84dcae54 | |||
| 61ea610cd0 | |||
| e59be01072 | |||
| b39a5ac229 | |||
| 69c338263a | |||
| e7036202bc | |||
| 8c2b1fde58 | |||
| 0f832ddc06 | |||
| 460d38f15e | |||
| 3b96d1e2e4 | |||
| 242e038186 | |||
| 1bf4ca7c42 | |||
| 83a3d8f861 | |||
| 3b535f9fbc | |||
| 4f62e5466e | |||
| 6ff4627d5d | |||
| c73bd0a5cc | |||
| 93ca3933d1 | |||
| e104dd3cc3 | |||
| 922802c44e | |||
| f5dbe7f8d8 | |||
| 167fbbe195 | |||
| 765fecf010 | |||
| 701b68879c | |||
| d9fabbcc5b | |||
| c83db9e4e1 | |||
| 8d57d7af23 | |||
| ccf03677a3 | |||
| 882ef0b8c0 | |||
| e22c375659 | |||
| 6da466e4f4 | |||
| e099b67c20 | |||
| 43c1ce390f | |||
| 5360b55c6c | |||
| 0aafa9c89c | |||
| 70ae0e93ec | |||
| cc15313cc9 | |||
| dd545d3bf2 | |||
| c0d269e96c | |||
| a36e01a772 | |||
| c330887291 | |||
| 3dffcf911f | |||
| b7203cde29 | |||
| 914b7e4238 | |||
| 38b802dfd7 | |||
| 19eb77bbe0 | |||
| b0df540d7a | |||
| 4df049faec | |||
| d7d19b7137 | |||
| 8ef24b8deb | |||
| 32c83c8b9e | |||
| 19e76b2a7c | |||
| 11f69b879c | |||
| be56ad31b7 | |||
| d62c07d42e | |||
| 50972b71e1 | |||
| e363d50db8 | |||
| df27352e37 | |||
| fefe82876c | |||
| 99bbcc8287 | |||
| c08556844e | |||
| 2d45d7bfab | |||
| afe18262b4 | |||
| 85bd982ba0 | |||
| 78d5e02f99 | |||
| 177d0f0b47 | |||
| 44e95d4f02 | |||
| e37f7397c9 | |||
| 3a22fdab9a | |||
| c0bebc1dcf | |||
| 7c60b26691 | |||
| a121cc7c60 | |||
| 7617e4a8a4 | |||
| f27a80cf18 | |||
| fe0c0d2088 | |||
| 4194ff6598 | |||
| 52b1dbb5fc | |||
| 69def7ff2f |
@@ -558,7 +558,9 @@ TESTOPTS = --verbose=file --output=test-out.txt
|
||||
# Extra compiler options for various shell tools
|
||||
#
|
||||
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
|
||||
# SHELL_OPT += -DSQLITE_ENABLE_FTS5
|
||||
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
|
||||
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
|
||||
+133
-15
@@ -24,6 +24,20 @@ USE_AMALGAMATION = 1
|
||||
USE_FULLWARN = 0
|
||||
!ENDIF
|
||||
|
||||
# Set this non-0 to enable full runtime error checks (-RTC1, etc). This
|
||||
# has no effect if (any) optimizations are enabled.
|
||||
#
|
||||
!IFNDEF USE_RUNTIME_CHECKS
|
||||
USE_RUNTIME_CHECKS = 0
|
||||
!ENDIF
|
||||
|
||||
# Set this non-0 to create a SQLite amalgamation file that excludes the
|
||||
# various built-in extensions.
|
||||
#
|
||||
!IFNDEF MINIMAL_AMALGAMATION
|
||||
MINIMAL_AMALGAMATION = 0
|
||||
!ENDIF
|
||||
|
||||
# Set this non-0 to use "stdcall" calling convention for the core library
|
||||
# and shell executable.
|
||||
#
|
||||
@@ -263,12 +277,39 @@ SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# <<mark>>
|
||||
# These are the names of the customized Tcl header files used by various parts
|
||||
# of this makefile when the stdcall calling convention is in use. It is not
|
||||
# used for any other purpose.
|
||||
#
|
||||
!IFNDEF SQLITETCLH
|
||||
SQLITETCLH = sqlite_tcl.h
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF SQLITETCLDECLSH
|
||||
SQLITETCLDECLSH = sqlite_tclDecls.h
|
||||
!ENDIF
|
||||
|
||||
# These are the additional targets that the targets that integrate with the
|
||||
# Tcl library should depend on when compiling, etc.
|
||||
#
|
||||
!IFNDEF SQLITE_TCL_DEP
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
|
||||
!ELSE
|
||||
SQLITE_TCL_DEP =
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
# <</mark>>
|
||||
|
||||
# These are the "standard" SQLite compilation options used when compiling for
|
||||
# the Windows platform.
|
||||
#
|
||||
!IFNDEF OPT_FEATURE_FLAGS
|
||||
!IF $(MINIMAL_AMALGAMATION)==0
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
|
||||
!ENDIF
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
|
||||
!ENDIF
|
||||
|
||||
@@ -464,20 +505,32 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
|
||||
#
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
!IF "$(PLATFORM)"=="x86"
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
# <<mark>>
|
||||
TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
|
||||
# <</mark>>
|
||||
!ELSE
|
||||
!IFNDEF PLATFORM
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
# <<mark>>
|
||||
TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
|
||||
# <</mark>>
|
||||
!ELSE
|
||||
CORE_CCONV_OPTS =
|
||||
SHELL_CCONV_OPTS =
|
||||
# <<mark>>
|
||||
TEST_CCONV_OPTS =
|
||||
# <</mark>>
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
!ELSE
|
||||
CORE_CCONV_OPTS =
|
||||
SHELL_CCONV_OPTS =
|
||||
# <<mark>>
|
||||
TEST_CCONV_OPTS =
|
||||
# <</mark>>
|
||||
!ENDIF
|
||||
|
||||
# These are additional compiler options used for the core library.
|
||||
@@ -630,12 +683,35 @@ RCC = $(RCC) -I$(TOP)\ext\session
|
||||
# options are necessary in order to allow debugging symbols to
|
||||
# work correctly with Visual Studio when using the amalgamation.
|
||||
#
|
||||
!IFNDEF MKSQLITE3C_TOOL
|
||||
!IF $(MINIMAL_AMALGAMATION)!=0
|
||||
MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
|
||||
!ELSE
|
||||
MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF MKSQLITE3C_ARGS
|
||||
!IF $(DEBUG)>1
|
||||
MKSQLITE3C_ARGS = --linemacros
|
||||
!ELSE
|
||||
MKSQLITE3C_ARGS =
|
||||
!ENDIF
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# The mksqlite3h.tcl script accepts some options on the command line.
|
||||
# When compiling with stdcall support, some of these options are
|
||||
# necessary.
|
||||
#
|
||||
!IFNDEF MKSQLITE3H_ARGS
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
MKSQLITE3H_ARGS = --useapicall
|
||||
!ELSE
|
||||
MKSQLITE3H_ARGS =
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
# <</mark>>
|
||||
|
||||
@@ -835,6 +911,10 @@ RCC = $(RCC) -D_DEBUG
|
||||
!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
|
||||
TCC = $(TCC) -Od
|
||||
BCC = $(BCC) -Od
|
||||
!IF $(USE_RUNTIME_CHECKS)!=0
|
||||
TCC = $(TCC) -RTC1
|
||||
BCC = $(BCC) -RTC1
|
||||
!ENDIF
|
||||
!ELSEIF $(OPTIMIZATIONS)>=3
|
||||
TCC = $(TCC) -Ox
|
||||
BCC = $(BCC) -Ox
|
||||
@@ -1235,6 +1315,16 @@ SRC11 = \
|
||||
parse.h \
|
||||
$(SQLITE3H)
|
||||
|
||||
# Generated Tcl header files
|
||||
#
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
SRC12 = \
|
||||
$(SQLITETCLH) \
|
||||
$(SQLITETCLDECLSH)
|
||||
!ELSE
|
||||
SRC12 =
|
||||
!ENDIF
|
||||
|
||||
# All source code files.
|
||||
#
|
||||
SRC = $(SRC00) $(SRC01) $(SRC02) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
|
||||
@@ -1341,7 +1431,7 @@ HDR = \
|
||||
parse.h \
|
||||
$(TOP)\src\pragma.h \
|
||||
$(SQLITE3H) \
|
||||
$(TOP)\src\sqlite3ext.h \
|
||||
sqlite3ext.h \
|
||||
$(TOP)\src\sqliteInt.h \
|
||||
$(TOP)\src\sqliteLimit.h \
|
||||
$(TOP)\src\vdbe.h \
|
||||
@@ -1499,7 +1589,7 @@ mptest: mptester.exe
|
||||
# files are automatically generated. This target takes care of
|
||||
# all that automatic generation.
|
||||
#
|
||||
.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c
|
||||
.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
|
||||
-rmdir /Q/S tsrc 2>NUL
|
||||
-mkdir tsrc
|
||||
for %i in ($(SRC00)) do copy /Y %i tsrc
|
||||
@@ -1514,6 +1604,7 @@ mptest: mptester.exe
|
||||
for %i in ($(SRC09)) do copy /Y %i tsrc
|
||||
for %i in ($(SRC10)) do copy /Y %i tsrc
|
||||
for %i in ($(SRC11)) do copy /Y %i tsrc
|
||||
for %i in ($(SRC12)) do copy /Y %i tsrc
|
||||
copy /Y fts5.c tsrc
|
||||
copy /Y fts5.h tsrc
|
||||
del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
|
||||
@@ -1521,8 +1612,8 @@ mptest: mptester.exe
|
||||
move vdbe.new tsrc\vdbe.c
|
||||
echo > .target_source
|
||||
|
||||
sqlite3.c: .target_source sqlite3ext.h $(TOP)\tool\mksqlite3c.tcl
|
||||
$(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS)
|
||||
sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
|
||||
$(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
|
||||
copy tsrc\shell.c .
|
||||
copy $(TOP)\ext\session\sqlite3session.h .
|
||||
|
||||
@@ -1795,10 +1886,10 @@ wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
|
||||
whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
|
||||
$(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
|
||||
|
||||
tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
|
||||
tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
|
||||
$(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
|
||||
|
||||
tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
|
||||
tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
|
||||
$(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
|
||||
|
||||
tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
|
||||
@@ -1824,10 +1915,16 @@ parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
|
||||
$(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
|
||||
|
||||
$(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
|
||||
$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H)
|
||||
$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
|
||||
|
||||
sqlite3ext.h: .target_source
|
||||
copy tsrc\sqlite3ext.h .
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
|
||||
copy /Y sqlite3ext.h tsrc\sqlite3ext.h
|
||||
!ELSE
|
||||
copy /Y tsrc\sqlite3ext.h sqlite3ext.h
|
||||
!ENDIF
|
||||
|
||||
mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
|
||||
$(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
|
||||
@@ -1960,6 +2057,7 @@ TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
|
||||
TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
|
||||
TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
|
||||
TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
|
||||
TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
|
||||
|
||||
TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
|
||||
TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
|
||||
@@ -1969,7 +2067,27 @@ TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
|
||||
TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
|
||||
!ENDIF
|
||||
|
||||
testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR)
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
sqlite_tclDecls.h:
|
||||
echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
|
||||
echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
|
||||
echo #endif >> $(SQLITETCLDECLSH)
|
||||
type "$(TCLINCDIR)\tclDecls.h" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
|
||||
|
||||
sqlite_tcl.h:
|
||||
type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
|
||||
!ENDIF
|
||||
|
||||
testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
|
||||
$(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
|
||||
-DBUILD_sqlite -I$(TCLINCDIR) \
|
||||
$(TESTFIXTURE_SRC) \
|
||||
@@ -2018,7 +2136,7 @@ smoketest: $(TESTPROGS)
|
||||
@set PATH=$(LIBTCLPATH);$(PATH)
|
||||
.\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
|
||||
|
||||
sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
|
||||
sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(SQLITE_TCL_DEP)
|
||||
echo #define TCLSH 2 > $@
|
||||
echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
|
||||
copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
|
||||
@@ -2098,7 +2216,7 @@ clean:
|
||||
-rmdir /Q/S .libs 2>NUL
|
||||
-rmdir /Q/S tsrc 2>NUL
|
||||
del /Q .target_source 2>NUL
|
||||
del /Q tclsqlite3.exe 2>NUL
|
||||
del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
|
||||
del /Q testloadext.dll 2>NUL
|
||||
del /Q testfixture.exe test.db 2>NUL
|
||||
del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL
|
||||
|
||||
+25
-4
@@ -24,6 +24,20 @@ TOP = .
|
||||
USE_FULLWARN = 0
|
||||
!ENDIF
|
||||
|
||||
# Set this non-0 to enable full runtime error checks (-RTC1, etc). This
|
||||
# has no effect if (any) optimizations are enabled.
|
||||
#
|
||||
!IFNDEF USE_RUNTIME_CHECKS
|
||||
USE_RUNTIME_CHECKS = 0
|
||||
!ENDIF
|
||||
|
||||
# Set this non-0 to create a SQLite amalgamation file that excludes the
|
||||
# various built-in extensions.
|
||||
#
|
||||
!IFNDEF MINIMAL_AMALGAMATION
|
||||
MINIMAL_AMALGAMATION = 0
|
||||
!ENDIF
|
||||
|
||||
# Set this non-0 to use "stdcall" calling convention for the core library
|
||||
# and shell executable.
|
||||
#
|
||||
@@ -248,12 +262,15 @@ SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
# These are the "standard" SQLite compilation options used when compiling for
|
||||
# the Windows platform.
|
||||
#
|
||||
!IFNDEF OPT_FEATURE_FLAGS
|
||||
!IF $(MINIMAL_AMALGAMATION)==0
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
|
||||
!ENDIF
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
|
||||
!ENDIF
|
||||
|
||||
@@ -449,12 +466,12 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS)
|
||||
#
|
||||
!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
|
||||
!IF "$(PLATFORM)"=="x86"
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
!ELSE
|
||||
!IFNDEF PLATFORM
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
|
||||
CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
|
||||
!ELSE
|
||||
CORE_CCONV_OPTS =
|
||||
SHELL_CCONV_OPTS =
|
||||
@@ -740,6 +757,10 @@ RCC = $(RCC) -D_DEBUG
|
||||
!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
|
||||
TCC = $(TCC) -Od
|
||||
BCC = $(BCC) -Od
|
||||
!IF $(USE_RUNTIME_CHECKS)!=0
|
||||
TCC = $(TCC) -RTC1
|
||||
BCC = $(BCC) -RTC1
|
||||
!ENDIF
|
||||
!ELSEIF $(OPTIMIZATIONS)>=3
|
||||
TCC = $(TCC) -Ox
|
||||
BCC = $(BCC) -Ox
|
||||
|
||||
@@ -78,7 +78,6 @@ TEA_ADD_LIBS([])
|
||||
TEA_ADD_CFLAGS([-DSQLITE_ENABLE_FTS3=1])
|
||||
TEA_ADD_CFLAGS([-DSQLITE_3_SUFFIX_ONLY=1])
|
||||
TEA_ADD_CFLAGS([-DSQLITE_ENABLE_RTREE=1])
|
||||
TEA_ADD_CFLAGS([-DSQLITE_OMIT_DEPRECATED=1])
|
||||
TEA_ADD_STUB_SOURCES([])
|
||||
TEA_ADD_TCL_SOURCES([])
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.14.0.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.14.2.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -726,8 +726,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='sqlite'
|
||||
PACKAGE_TARNAME='sqlite'
|
||||
PACKAGE_VERSION='3.14.0'
|
||||
PACKAGE_STRING='sqlite 3.14.0'
|
||||
PACKAGE_VERSION='3.14.2'
|
||||
PACKAGE_STRING='sqlite 3.14.2'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1463,7 +1463,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures sqlite 3.14.0 to adapt to many kinds of systems.
|
||||
\`configure' configures sqlite 3.14.2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1528,7 +1528,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of sqlite 3.14.0:";;
|
||||
short | recursive ) echo "Configuration of sqlite 3.14.2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1652,7 +1652,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
sqlite configure 3.14.0
|
||||
sqlite configure 3.14.2
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2071,7 +2071,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by sqlite $as_me 3.14.0, which was
|
||||
It was created by sqlite $as_me 3.14.2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -12151,7 +12151,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by sqlite $as_me 3.14.0, which was
|
||||
This file was extended by sqlite $as_me 3.14.2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12217,7 +12217,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
sqlite config.status 3.14.0
|
||||
sqlite config.status 3.14.2
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -99,7 +99,11 @@ static void scalarFunc(
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
|
||||
+12
-5
@@ -18,7 +18,14 @@
|
||||
** that the sqlite3_tokenizer_module.xLanguage() method is invoked correctly.
|
||||
*/
|
||||
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -143,7 +150,7 @@ static int nm_match_count(
|
||||
/*
|
||||
** Tclcmd: fts3_near_match DOCUMENT EXPR ?OPTIONS?
|
||||
*/
|
||||
static int fts3_near_match_cmd(
|
||||
static int SQLITE_TCLAPI fts3_near_match_cmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -278,7 +285,7 @@ static int fts3_near_match_cmd(
|
||||
** # Restore initial incr-load settings:
|
||||
** eval fts3_configure_incr_load $cfg
|
||||
*/
|
||||
static int fts3_configure_incr_load_cmd(
|
||||
static int SQLITE_TCLAPI fts3_configure_incr_load_cmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -488,7 +495,7 @@ static int testTokenizerLanguage(
|
||||
}
|
||||
#endif
|
||||
|
||||
static int fts3_test_tokenizer_cmd(
|
||||
static int SQLITE_TCLAPI fts3_test_tokenizer_cmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -517,7 +524,7 @@ static int fts3_test_tokenizer_cmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int fts3_test_varint_cmd(
|
||||
static int SQLITE_TCLAPI fts3_test_varint_cmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
@@ -224,7 +224,11 @@ int sqlite3Fts3InitTokenizer(
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
|
||||
+1
-2
@@ -318,7 +318,7 @@ struct Fts5ExtensionApi {
|
||||
** behaviour. The structure methods are expected to function as follows:
|
||||
**
|
||||
** xCreate:
|
||||
** This function is used to allocate and inititalize a tokenizer instance.
|
||||
** This function is used to allocate and initialize a tokenizer instance.
|
||||
** A tokenizer instance is required to actually tokenize text.
|
||||
**
|
||||
** The first argument passed to this function is a copy of the (void*)
|
||||
@@ -577,4 +577,3 @@ struct fts5_api {
|
||||
#endif
|
||||
|
||||
#endif /* _FTS5_H */
|
||||
|
||||
|
||||
+20
-13
@@ -14,7 +14,14 @@
|
||||
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_ENABLE_FTS5
|
||||
|
||||
@@ -78,7 +85,7 @@ static int f5tResultToErrorCode(const char *zRes){
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
|
||||
static int f5tDbAndApi(
|
||||
static int SQLITE_TCLAPI f5tDbAndApi(
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *pObj,
|
||||
sqlite3 **ppDb,
|
||||
@@ -164,7 +171,7 @@ static int xTokenizeCb(
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int xF5tApi(void*, Tcl_Interp*, int, Tcl_Obj *CONST []);
|
||||
static int SQLITE_TCLAPI xF5tApi(void*, Tcl_Interp*, int, Tcl_Obj *CONST []);
|
||||
|
||||
static int xQueryPhraseCb(
|
||||
const Fts5ExtensionApi *pApi,
|
||||
@@ -209,7 +216,7 @@ static void xSetAuxdataDestructor(void *p){
|
||||
**
|
||||
** Description...
|
||||
*/
|
||||
static int xF5tApi(
|
||||
static int SQLITE_TCLAPI xF5tApi(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -602,7 +609,7 @@ static void xF5tDestroy(void *pCtx){
|
||||
**
|
||||
** Description...
|
||||
*/
|
||||
static int f5tCreateFunction(
|
||||
static int SQLITE_TCLAPI f5tCreateFunction(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -672,7 +679,7 @@ static int xTokenizeCb2(
|
||||
**
|
||||
** Description...
|
||||
*/
|
||||
static int f5tTokenize(
|
||||
static int SQLITE_TCLAPI f5tTokenize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -878,7 +885,7 @@ static int f5tTokenizerTokenize(
|
||||
/*
|
||||
** sqlite3_fts5_token ?-colocated? TEXT START END
|
||||
*/
|
||||
static int f5tTokenizerReturn(
|
||||
static int SQLITE_TCLAPI f5tTokenizerReturn(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -949,7 +956,7 @@ static void f5tDelTokenizer(void *pCtx){
|
||||
** SCRIPT2 should invoke the [sqlite3_fts5_token] command once for each
|
||||
** token within the tokenized text.
|
||||
*/
|
||||
static int f5tCreateTokenizer(
|
||||
static int SQLITE_TCLAPI f5tCreateTokenizer(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -992,7 +999,7 @@ static int f5tCreateTokenizer(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static void xF5tFree(ClientData clientData){
|
||||
static void SQLITE_TCLAPI xF5tFree(ClientData clientData){
|
||||
ckfree(clientData);
|
||||
}
|
||||
|
||||
@@ -1001,7 +1008,7 @@ static void xF5tFree(ClientData clientData){
|
||||
**
|
||||
** Set or clear the global "may-be-corrupt" flag. Return the old value.
|
||||
*/
|
||||
static int f5tMayBeCorrupt(
|
||||
static int SQLITE_TCLAPI f5tMayBeCorrupt(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1033,7 +1040,7 @@ static unsigned int f5t_fts5HashKey(int nSlot, const char *p, int n){
|
||||
return (h % nSlot);
|
||||
}
|
||||
|
||||
static int f5tTokenHash(
|
||||
static int SQLITE_TCLAPI f5tTokenHash(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1058,7 +1065,7 @@ static int f5tTokenHash(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int f5tRegisterMatchinfo(
|
||||
static int SQLITE_TCLAPI f5tRegisterMatchinfo(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1083,7 +1090,7 @@ static int f5tRegisterMatchinfo(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int f5tRegisterTok(
|
||||
static int SQLITE_TCLAPI f5tRegisterTok(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
@@ -1223,6 +1223,7 @@ static void jsonQuoteFunc(
|
||||
sqlite3_value **argv
|
||||
){
|
||||
JsonString jx;
|
||||
UNUSED_PARAM(argc);
|
||||
|
||||
jsonInit(&jx, ctx);
|
||||
jsonAppendValue(&jx, argv[0]);
|
||||
|
||||
@@ -167,7 +167,7 @@ static void percentStep(sqlite3_context *pCtx, int argc, sqlite3_value **argv){
|
||||
/*
|
||||
** Compare to doubles for sorting using qsort()
|
||||
*/
|
||||
static int doubleCmp(const void *pA, const void *pB){
|
||||
static int SQLITE_CDECL doubleCmp(const void *pA, const void *pB){
|
||||
double a = *(double*)pA;
|
||||
double b = *(double*)pB;
|
||||
if( a==b ) return 0;
|
||||
|
||||
+1
-1
@@ -2231,7 +2231,7 @@ static int spellfix1Score(int iDistance, int iRank){
|
||||
** Compare two spellfix1_row objects for sorting purposes in qsort() such
|
||||
** that they sort in order of increasing distance.
|
||||
*/
|
||||
static int spellfix1RowCompare(const void *A, const void *B){
|
||||
static int SQLITE_CDECL spellfix1RowCompare(const void *A, const void *B){
|
||||
const struct spellfix1_row *a = (const struct spellfix1_row*)A;
|
||||
const struct spellfix1_row *b = (const struct spellfix1_row*)B;
|
||||
return a->iScore - b->iScore;
|
||||
|
||||
+1
-1
@@ -809,7 +809,7 @@ int sqlite3_vfsstat_init(
|
||||
vstat_vfs.base.szOsFile = sizeof(VStatFile) + vstat_vfs.pVfs->szOsFile;
|
||||
rc = sqlite3_vfs_register(&vstat_vfs.base, 1);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_auto_extension((void(*)(void))vstatRegister);
|
||||
rc = sqlite3_auto_extension(vstatRegister);
|
||||
}
|
||||
if( rc==SQLITE_OK ) rc = SQLITE_OK_LOAD_PERMANENTLY;
|
||||
return rc;
|
||||
|
||||
+19
-8
@@ -17,7 +17,14 @@
|
||||
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
|
||||
|
||||
#include "sqlite3rbu.h"
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
/* From main.c */
|
||||
@@ -49,7 +56,7 @@ void test_rbu_delta(sqlite3_context *pCtx, int nArg, sqlite3_value **apVal){
|
||||
}
|
||||
|
||||
|
||||
static int test_sqlite3rbu_cmd(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu_cmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -192,7 +199,7 @@ static int test_sqlite3rbu_cmd(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu CMD <target-db> <rbu-db> ?<state-db>?
|
||||
*/
|
||||
static int test_sqlite3rbu(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -222,7 +229,7 @@ static int test_sqlite3rbu(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu_vacuum CMD <target-db> <state-db>
|
||||
*/
|
||||
static int test_sqlite3rbu_vacuum(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu_vacuum(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -250,7 +257,7 @@ static int test_sqlite3rbu_vacuum(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu_create_vfs ?-default? NAME PARENT
|
||||
*/
|
||||
static int test_sqlite3rbu_create_vfs(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu_create_vfs(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -285,7 +292,7 @@ static int test_sqlite3rbu_create_vfs(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu_destroy_vfs NAME
|
||||
*/
|
||||
static int test_sqlite3rbu_destroy_vfs(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu_destroy_vfs(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -306,7 +313,7 @@ static int test_sqlite3rbu_destroy_vfs(
|
||||
/*
|
||||
** Tclcmd: sqlite3rbu_internal_test
|
||||
*/
|
||||
static int test_sqlite3rbu_internal_test(
|
||||
static int SQLITE_TCLAPI test_sqlite3rbu_internal_test(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -347,7 +354,11 @@ int SqliteRbu_Init(Tcl_Interp *interp){
|
||||
}
|
||||
|
||||
#else
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
int SqliteRbu_Init(Tcl_Interp *interp){ return TCL_OK; }
|
||||
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */
|
||||
#endif /* defined(SQLITE_TEST) */
|
||||
|
||||
@@ -5,7 +5,14 @@
|
||||
#include "sqlite3session.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct TestSession TestSession;
|
||||
struct TestSession {
|
||||
@@ -107,7 +114,7 @@ static int testStreamOutput(
|
||||
** $session patchset
|
||||
** $session table_filter SCRIPT
|
||||
*/
|
||||
static int test_session_cmd(
|
||||
static int SQLITE_TCLAPI test_session_cmd(
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -240,7 +247,7 @@ static int test_session_cmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static void test_session_del(void *clientData){
|
||||
static void SQLITE_TCLAPI test_session_del(void *clientData){
|
||||
TestSession *p = (TestSession*)clientData;
|
||||
if( p->pFilterScript ) Tcl_DecrRefCount(p->pFilterScript);
|
||||
sqlite3session_delete(p->pSession);
|
||||
@@ -250,7 +257,7 @@ static void test_session_del(void *clientData){
|
||||
/*
|
||||
** Tclcmd: sqlite3session CMD DB-HANDLE DB-NAME
|
||||
*/
|
||||
static int test_sqlite3session(
|
||||
static int SQLITE_TCLAPI test_sqlite3session(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -606,7 +613,7 @@ static int testStreamInput(
|
||||
/*
|
||||
** sqlite3changeset_apply DB CHANGESET CONFLICT-SCRIPT ?FILTER-SCRIPT?
|
||||
*/
|
||||
static int test_sqlite3changeset_apply(
|
||||
static int SQLITE_TCLAPI test_sqlite3changeset_apply(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -661,7 +668,7 @@ static int test_sqlite3changeset_apply(
|
||||
/*
|
||||
** sqlite3changeset_apply_replace_all DB CHANGESET
|
||||
*/
|
||||
static int test_sqlite3changeset_apply_replace_all(
|
||||
static int SQLITE_TCLAPI test_sqlite3changeset_apply_replace_all(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -696,7 +703,7 @@ static int test_sqlite3changeset_apply_replace_all(
|
||||
/*
|
||||
** sqlite3changeset_invert CHANGESET
|
||||
*/
|
||||
static int test_sqlite3changeset_invert(
|
||||
static int SQLITE_TCLAPI test_sqlite3changeset_invert(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -735,7 +742,7 @@ static int test_sqlite3changeset_invert(
|
||||
/*
|
||||
** sqlite3changeset_concat LEFT RIGHT
|
||||
*/
|
||||
static int test_sqlite3changeset_concat(
|
||||
static int SQLITE_TCLAPI test_sqlite3changeset_concat(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -783,7 +790,7 @@ static int test_sqlite3changeset_concat(
|
||||
/*
|
||||
** sqlite3session_foreach VARNAME CHANGESET SCRIPT
|
||||
*/
|
||||
static int test_sqlite3session_foreach(
|
||||
static int SQLITE_TCLAPI test_sqlite3session_foreach(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
@@ -470,6 +470,8 @@ TESTOPTS = --verbose=file --output=test-out.txt
|
||||
# Extra compiler options for various shell tools
|
||||
#
|
||||
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
|
||||
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
|
||||
FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
C Disable\sthe\sauthorizer\scallback\swhen\sreparsing\sthe\sschema.\s\sThis\savoids\nundesirable\sauthorization\sfailures\sfollowing\san\sALTER\sTABLE.
|
||||
D 2016-07-28T18:38:13.187
|
||||
F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
|
||||
C Version\s3.14.2
|
||||
D 2016-09-12T18:50:49.277
|
||||
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
|
||||
F Makefile.msc 6fef1e10792656c94fe1393092de6c8ba6ea1c88
|
||||
F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
|
||||
F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e
|
||||
F VERSION 2ecb284dd086175be38bd4340a713df2a03ce5fe
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||
F autoconf/Makefile.am 1a47d071e3d5435f8f7ebff7eb6703848bbd65d4
|
||||
F autoconf/Makefile.msc 0eca137c12542bd76c253a2d24380f29ade59b95
|
||||
F autoconf/Makefile.msc b6d27f735911fd09a589d3c966936c47a5850c17
|
||||
F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
|
||||
F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1
|
||||
F autoconf/configure.ac cacf2616abf6e4a569bde2ef365c143caeec40bc
|
||||
F autoconf/tea/Makefile.in b438a7020446c8a8156e8d97c8914a04833da6fd
|
||||
F autoconf/tea/README 3e9a3c060f29a44344ab50aec506f4db903fb873
|
||||
F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
|
||||
F autoconf/tea/configure.ac 93d43c79e936fb16556e22498177d7e8571efa04
|
||||
F autoconf/tea/configure.ac 8aa16e3f0a5ca7959d4af198f46934ec187d395f
|
||||
F autoconf/tea/doc/sqlite3.n e1fe45d4f5286ee3d0ccc877aca2a0def488e9bb
|
||||
F autoconf/tea/license.terms 13bd403c9610fd2b76ece0ab50c4c5eda933d523
|
||||
F autoconf/tea/pkgIndex.tcl.in 3ef61715cf1c7bdcff56947ffadb26bc991ca39d
|
||||
@@ -30,7 +30,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
||||
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
|
||||
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
|
||||
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
|
||||
F configure 35ce04a15ca046262bf9baaa2ced9337708cc653 x
|
||||
F configure 90beebf7d1644eef7fffe1e476642d518db0e37b x
|
||||
F configure.ac b5d3df43161374f8dffd2e5f4b88fbb51685b975
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/lemon.html e2118945e5f07ed146b45c9cd2b2dd6eabb8ebf2
|
||||
@@ -62,7 +62,7 @@ F ext/fts2/fts2_hash.c 011a1d32de45bb1b519a1fd0048e857d6a843558
|
||||
F ext/fts2/fts2_hash.h 1824b99dfd8d0225facbdb26a2c87289b2e7dcf8
|
||||
F ext/fts2/fts2_icu.c 51c5cd3c04954badd329fa738c95fcdb717b5188
|
||||
F ext/fts2/fts2_porter.c 2cd4a507bf3c3085fe66f59b0f2a325f65aaacf5
|
||||
F ext/fts2/fts2_tokenizer.c 3dbe8058e97afb55fff3ea844120ce3208b114cc
|
||||
F ext/fts2/fts2_tokenizer.c b529493d55e55497213c37e1f31680a77746be26
|
||||
F ext/fts2/fts2_tokenizer.h 27a1a99ca2d615cf7e142839b8d79e8751b4529e
|
||||
F ext/fts2/fts2_tokenizer1.c 07e223eecb483d448313b5f1553a4f299a7fb7a1
|
||||
F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
|
||||
@@ -81,9 +81,9 @@ F ext/fts3/fts3_icu.c deb46f7020d87ea7a14a433fb7a7f4bef42a9652
|
||||
F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009
|
||||
F ext/fts3/fts3_snippet.c 68ae118b0f834ea53d2b89e4087fc0f0b8c4ee4e
|
||||
F ext/fts3/fts3_term.c 88c55a6fa1a51ab494e33dced0401a6c28791fd7
|
||||
F ext/fts3/fts3_test.c a940cf104d545ad1abf926956ce65db2aa5af0cf
|
||||
F ext/fts3/fts3_test.c 79f2a7fbb3f672fa032e5a432ca274ea3ee93c34
|
||||
F ext/fts3/fts3_tokenize_vtab.c a27593ab19657166f6fa5ec073b678cc29a75860
|
||||
F ext/fts3/fts3_tokenizer.c 3cf21cd2212db17a88d4ef7da0fd8a80275979a1
|
||||
F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7
|
||||
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
|
||||
F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
|
||||
F ext/fts3/fts3_unicode.c a93f5edc0aff44ef8b06d7cb55b52026541ca145
|
||||
@@ -97,7 +97,7 @@ F ext/fts3/unicode/UnicodeData.txt cd07314edb62d49fde34debdaf92fa2aa69011e7
|
||||
F ext/fts3/unicode/mkunicode.tcl 2debed3f582d77b3fdd0b8830880250021571fd8
|
||||
F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95
|
||||
F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0
|
||||
F ext/fts5/fts5.h b770c5e0a8d2ee071ddffc7ab722dbf3474a8abe
|
||||
F ext/fts5/fts5.h 62f3e33ceeb9a428db139f9c012186b371da1cc7
|
||||
F ext/fts5/fts5Int.h 9bd0c7c64285b5b368eca0ac63613185c5ad24ba
|
||||
F ext/fts5/fts5_aux.c daa57fb45216491814520bbb587e97bf81ced458
|
||||
F ext/fts5/fts5_buffer.c 4c1502d4c956cd092c89ce4480867f9d8bf325cd
|
||||
@@ -107,7 +107,7 @@ F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2
|
||||
F ext/fts5/fts5_index.c b429e23fabb57506f71e406997cc46b89190dc97
|
||||
F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2
|
||||
F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58
|
||||
F ext/fts5/fts5_tcl.c f8731e0508299bd43f1a2eff7dbeaac870768966
|
||||
F ext/fts5/fts5_tcl.c 4a901f00c8553740dba63511603f5527d741c26a
|
||||
F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc
|
||||
F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be
|
||||
F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8
|
||||
@@ -212,18 +212,18 @@ F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2
|
||||
F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f
|
||||
F ext/misc/fuzzer.c 7c64b8197bb77b7d64eff7cac7848870235d4c25
|
||||
F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c
|
||||
F ext/misc/json1.c d51a764ba43a49e191bc3536238bfab3def258ca
|
||||
F ext/misc/json1.c 9799e4252b305edcbe659329eec3ca80ed85f968
|
||||
F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
|
||||
F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63
|
||||
F ext/misc/percentile.c 92699c8cd7d517ff610e6037e56506f8904dae2e
|
||||
F ext/misc/regexp.c a68d25c659bd2d893cd1215667bbf75ecb9dc7d4
|
||||
F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a
|
||||
F ext/misc/scrub.c 1c5bfb8b0cd18b602fcb55755e84abf0023ac2fb
|
||||
F ext/misc/series.c e11e534ada797d5b816d7e7a93c022306563ca35
|
||||
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
|
||||
F ext/misc/spellfix.c bf1b922c2750698e9a3d4c50cce6974adb7e93be
|
||||
F ext/misc/spellfix.c a4723b6aff748a417b5091b68a46443265c40f0d
|
||||
F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512
|
||||
F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95
|
||||
F ext/misc/vfsstat.c 6110aeeaab2f1df17a923c8a8acef3c74f6dc515
|
||||
F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178
|
||||
F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e
|
||||
F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
|
||||
F ext/rbu/rbu.c b2c0b5e6ae1a89affc0edfc127ebfa5f637a0ce4
|
||||
@@ -255,7 +255,7 @@ F ext/rbu/rbuvacuum.test 4a977447c15c2581ab668781d9ef4294382530e0
|
||||
F ext/rbu/rbuvacuum2.test 45009e127c3fb385e5c0fd5a8a63fb922a79d0ab
|
||||
F ext/rbu/sqlite3rbu.c 948677ee0ec57da51148e6c5f64ac68afcf36ab2
|
||||
F ext/rbu/sqlite3rbu.h db8858120c9be14b60c9225f9da28221f5f6b945
|
||||
F ext/rbu/test_rbu.c 9f043b74c46c45b231f4313aed1fccb379a76fe6
|
||||
F ext/rbu/test_rbu.c 1a6bbc6982e32485a48df111d0bb1934d537eabd
|
||||
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
||||
F ext/rtree/rtree.c d26a815b0df1c412a6881dae8d7fd3c9c08cce68
|
||||
F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
|
||||
@@ -301,14 +301,14 @@ F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7
|
||||
F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0
|
||||
F ext/session/sqlite3session.c 37485891b4add26cf61495df193c419f36556a32
|
||||
F ext/session/sqlite3session.h 69bf73cfd71e58f2ae5d2aa935b2c1a541aee555
|
||||
F ext/session/test_session.c 464f2c8bf502795d95969387eb8e93f68c513c15
|
||||
F ext/session/test_session.c 2caed9a659586428c63ca46e4900347b374487d4
|
||||
F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220
|
||||
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
|
||||
F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e
|
||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
|
||||
F main.mk e9d66f1b1c4874221d12d940be3ce5f397c10741
|
||||
F main.mk 1883ecab643b136e8ab3fdc33785e6ea8b5ceb46
|
||||
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
|
||||
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
|
||||
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
|
||||
@@ -324,31 +324,31 @@ F src/alter.c cc28ab933ae615b22add0d609794ffb6596b42ea
|
||||
F src/analyze.c 37fedc80ac966ce1745811746e68e4d8fa64c7fe
|
||||
F src/attach.c 771153bd1f4ab0b97a44a13dde2c7e5e1efeba22
|
||||
F src/auth.c 5c8e0f37f785f935f589496801edd19840485853
|
||||
F src/backup.c 6df65fdd569c901a418887a1a76f82ec35044556
|
||||
F src/backup.c 17cd25a36d49330df2bacd2cadf2a61f3b525976
|
||||
F src/bitvec.c 3ee4c8b2c94ed3a7377256e18199e6ff5cf33f63
|
||||
F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
|
||||
F src/btree.c 6a42efa461cf3a0c33e8755e9d236371ac80d1b3
|
||||
F src/btree.c 2551bd3ecb8b8988fb8b23aabadfb214dbc38e46
|
||||
F src/btree.h 075c45707c0f8f8af118f739f36df8098a08b7da
|
||||
F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5
|
||||
F src/build.c d1fdfd7ab8f5447e494ef15825973bf0719527c6
|
||||
F src/build.c 7c3c780b703c09314032c8f6e4e7c1d80241a818
|
||||
F src/callback.c 2e76147783386374bf01b227f752c81ec872d730
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7
|
||||
F src/date.c 1cc9fb516ec9932c6fd4d2a0d2f8bc4480145c39
|
||||
F src/date.c 95c9a8d00767e7221a8e9a31f4e913fc8029bf6b
|
||||
F src/dbstat.c 4f6f7f52b49beb9636ffbd517cfe44a402ba4ad0
|
||||
F src/delete.c 4aba4214a377ce8ddde2d2e609777bcc8235200f
|
||||
F src/expr.c fbc17c717a80b5b61158ea8f25b5af6f8cad66f8
|
||||
F src/expr.c 9c5eca8602f6c496e8d4eefefe2aae3d831dd510
|
||||
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
||||
F src/fkey.c bc4145347595b7770f9a598cff1c848302cf5413
|
||||
F src/func.c 61a4114cf7004f10c542cfabbab9f2bcb9033045
|
||||
F src/func.c 29cc9acb170ec1387b9f63eb52cd85f8de96c771
|
||||
F src/global.c c45ea22aff29334f6a9ec549235ac3357c970015
|
||||
F src/hash.c 55b5fb474100cee0b901edaf203e26c970940f36
|
||||
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
||||
F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
|
||||
F src/insert.c 8f4e9fcbd8e95e85f15647ba8b413b18d556ec2b
|
||||
F src/insert.c bceb8351e80c357764ca0600a44696078cc17b3b
|
||||
F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e
|
||||
F src/loadext.c 5dd8b5a67d32a98bb75657c2a9e48b2cedbf13a4
|
||||
F src/main.c 16c1b2114eae8804caf3a8de8cb47bf2c6d83ad3
|
||||
F src/loadext.c dd7a2b77902cc66c22555aef02e1a682554b7aec
|
||||
F src/main.c b8c598bec5f4396e84b71444c92b58819e3a703b
|
||||
F src/malloc.c 1443d1ad95d67c21d77af7ae3f44678252f0efec
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c 6919bcf12f221868ea066eec27e579fed95ce98b
|
||||
@@ -370,76 +370,76 @@ F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c a9443cdab41d7f3cdf0df3a5aab62fd6e1c9b234
|
||||
F src/os_win.c 520f23475f1de530c435d30b67b7b15fe90874b0
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c c368634b888b1c8740aea83b36bfd266f2443e60
|
||||
F src/pager.h 031a87445e5e0afc85312d1c380e123ad6c7aeaf
|
||||
F src/pager.c 40928c450320da78bb4bd3ae82818f4239e19b7e
|
||||
F src/pager.h 966d2769e76ae347c8a32c4165faf6e6cb64546d
|
||||
F src/parse.y 99b676e6fc2f4e331ab93e76b3987cffdbd28efa
|
||||
F src/pcache.c 5583c8ade4b05075a60ba953ef471d1c1a9c05df
|
||||
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
|
||||
F src/pcache1.c 7f51d2b541aab57596adf62db2c4bb025d34f04d
|
||||
F src/pcache1.c 4bb7a6a5300c67d0b033d25adb509c120c03e812
|
||||
F src/pragma.c c8b499756658cb8b82cfdbb5845c22cf11f297aa
|
||||
F src/pragma.h 64c78a648751b9f4f297276c4eb7507b14b4628c
|
||||
F src/prepare.c 22df6171aec1d86904ed2ad30c2348a5748aa04e
|
||||
F src/printf.c a5f0ca08ddede803c241266abb46356ec748ded1
|
||||
F src/random.c ba2679f80ec82c4190062d756f22d0c358180696
|
||||
F src/resolve.c cca3aa77b95706df5d635a2141a4d1de60ae6598
|
||||
F src/resolve.c 0392c6686586b1d4dac9a4106959f03ddd70e9aa
|
||||
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
||||
F src/select.c f3c6e9065fb34f6a23af27ec7f1f717ffbfc2ee4
|
||||
F src/shell.c 9351fc6de11e1d908648c0a92d85627138e3dee5
|
||||
F src/sqlite.h.in c6e68a4a47610631822a4f8f83a44c9f75339331
|
||||
F src/shell.c de7c7e98846cacbfbe062cbd98bca899dfb720e3
|
||||
F src/sqlite.h.in 0f7580280d1b009b507d8beec1ff0f197ba0cc99
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 46f300b6e300e0fa916d7d58c44b53415b8471a9
|
||||
F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead
|
||||
F src/sqlite3ext.h 8648034aa702469afb553231677306cc6492a1ae
|
||||
F src/sqliteInt.h d6f221a5bd572df935140beda82f357c2185a77c
|
||||
F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
|
||||
F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab
|
||||
F src/status.c a9e66593dfb28a9e746cba7153f84d49c1ddc4b1
|
||||
F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
|
||||
F src/tclsqlite.c 5c213bf5fee084390f632df2328cf0821d483799
|
||||
F src/test1.c 186e3b53c402b7a73bcb4ade2b77709675c39fe3
|
||||
F src/test2.c 5586f43fcd9a1be0830793cf9d354082c261b25b
|
||||
F src/test3.c c75c8af0eadb335236c9e61b51044c58a8f7dd59
|
||||
F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e
|
||||
F src/test5.c 5a34feec76d9b3a86aab30fd4f6cc9c48cbab4c1
|
||||
F src/test6.c a684b7abd01352ab50cb79c0bf727e6b3f381a3d
|
||||
F src/test7.c 9c89a4f1ed6bb13af0ed805b8d782bd83fcd57e3
|
||||
F src/test8.c fa262391d3edea6490a71bfaa8fed477ccbbac75
|
||||
F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
|
||||
F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8
|
||||
F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12
|
||||
F src/test_backup.c 2e6e6a081870150f20c526a2e9d0d29cda47d803
|
||||
F src/test_bestindex.c f9e6807c52aa532e4775321ce3ed8e47c907ed45
|
||||
F src/test_blob.c b2551a9b5573232db5f66f292307c37067937239
|
||||
F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f
|
||||
F src/test_config.c 7003f6f35134de6f19c6588f44783e43390ea277
|
||||
F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852
|
||||
F src/tclsqlite.c bdae822f21e229b6daced15938b6343ce44ef454
|
||||
F src/test1.c 0a0909cf7962d2359db329c08d15b90b4b6e724f
|
||||
F src/test2.c b7174313e993754303a8b33c43df7c44b46857ab
|
||||
F src/test3.c 1339a40be39650ae83894b6578f971dc7f96ea8a
|
||||
F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6
|
||||
F src/test5.c 328aae2c010c57a9829d255dc099d6899311672d
|
||||
F src/test6.c 55aa2775c154415dcf4ed7cd1e19a193122b3a02
|
||||
F src/test7.c 5612e9aecf934d6df7bba6ce861fdf5ba5456010
|
||||
F src/test8.c 4f4904721167b32f7a4fa8c7b32a07a673d6cc86
|
||||
F src/test9.c 12e5ba554d2d1cbe0158f6ab3f7ffcd7a86ee4e5
|
||||
F src/test_async.c 195ab49da082053fdb0f949c114b806a49ca770a
|
||||
F src/test_autoext.c 915d245e736652a219a907909bb6710f0d587871
|
||||
F src/test_backup.c bf5da90c9926df0a4b941f2d92825a01bbe090a0
|
||||
F src/test_bestindex.c d23f80d334c59662af69191854c76b8d3d0c8c96
|
||||
F src/test_blob.c a0f7ad49a0c9d4b72f693fe2a71c58d7e507174d
|
||||
F src/test_btree.c 8b2dc8b8848cf3a4db93f11578f075e82252a274
|
||||
F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788
|
||||
F src/test_demovfs.c a0c3bdd45ed044115c2c9f7779e56eafff18741e
|
||||
F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58
|
||||
F src/test_fs.c f10f840ca4f8c72e4837908bd8347ac4bcab074b
|
||||
F src/test_func.c 37453d346cfcf118774efd5bf6187f7e6a7e3254
|
||||
F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd
|
||||
F src/test_init.c 66b33120ffe9cd853b5a905ec850d51151337b32
|
||||
F src/test_intarray.c 870124b95ec4c645d4eb84f15efb7133528fb1a5
|
||||
F src/test_fs.c e16cbe68d3b107e00a907c20a9a02629870eb69b
|
||||
F src/test_func.c a2b4993da973b0ea60dd5d51a7066238ede8c329
|
||||
F src/test_hexio.c 1d4469ca61ab202a1fcec6543f584d2407205e8d
|
||||
F src/test_init.c 4413c211a94b62157ca4c145b3f27c497f03c664
|
||||
F src/test_intarray.c 988fc61cb0ff539f4172c0d95f15287c92516f64
|
||||
F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c
|
||||
F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a
|
||||
F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
|
||||
F src/test_malloc.c 6b27e947eeeb70d11aa65406ed28d749e39b6356
|
||||
F src/test_multiplex.c eafc567ebe162e36f17b5062285dfe90461cf8e9
|
||||
F src/test_malloc.c c05f6c40bd6c8bfe5f1718212f81fd5687f91766
|
||||
F src/test_multiplex.c 7c5b218d855cd0505a43185d55283b3fc257c8da
|
||||
F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635
|
||||
F src/test_mutex.c dbdfaff8580071f2212a0deae3325a93a737819c
|
||||
F src/test_mutex.c 7f4337ba23ee6b1d2ec81c189653608cb069926a
|
||||
F src/test_onefile.c 416f87a28d6d673352d33fc4b1c7d39db878e50f
|
||||
F src/test_osinst.c ad0233b1dabb0390e25edded4ebd79a2a61538c6
|
||||
F src/test_osinst.c 98ef31ff03d55497829ca0f6c74a9f4e1aa48690
|
||||
F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00
|
||||
F src/test_quota.c 180813f43683be5725458fc1ff13ac455d8e722d
|
||||
F src/test_quota.c 6cb9297115b551f433a9ad1741817a9831abed99
|
||||
F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d
|
||||
F src/test_rtree.c 43fff4c5a01576d6d213f27472598801a247890c
|
||||
F src/test_schema.c 2bdba21b82f601da69793e1f1d11bf481a79b091
|
||||
F src/test_rtree.c 671f3fae50ff116ef2e32a3bf1fe21b5615b4b7b
|
||||
F src/test_schema.c f575932cb6274d12147a77e13ea4b49d52408513
|
||||
F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe
|
||||
F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b
|
||||
F src/test_superlock.c 06797157176eb7085027d9dd278c0d7a105e3ec9
|
||||
F src/test_syscall.c 268c072541162564a882c57f54a6fee12ef4a4d2
|
||||
F src/test_tclvar.c d86412527da65468ee6fa1b8607c65d0af736bc4
|
||||
F src/test_thread.c af391ec03d23486dffbcc250b7e58e073f172af9
|
||||
F src/test_vfs.c 4d02f38bfb8f7f273da7ba84bfe000f5babf206c
|
||||
F src/test_superlock.c 4839644b9201da822f181c5bc406c0b2385f672e
|
||||
F src/test_syscall.c 1073306ba2e9bfc886771871a13d3de281ed3939
|
||||
F src/test_tclvar.c df9fe1213c2634687a9ca0b0bec0d2119d359ae3
|
||||
F src/test_thread.c 911d15fb14e19c0c542bdc8aabf981c2f10a4858
|
||||
F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e
|
||||
F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698
|
||||
F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61
|
||||
F src/test_windirent.h b12055cab6227f7be10f5c19296f67c60cc5e2a5
|
||||
F src/test_windirent.c 600398db0198ca1c77ca183831bf456746b6f5c4
|
||||
F src/test_windirent.h 7edc57e2faa727026dbd5d010dd0e2e665d5aa01
|
||||
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||
F src/tokenize.c 3b29883b0ce4a6c6f643965b66b5ca6613178e59
|
||||
@@ -449,23 +449,23 @@ F src/update.c 4f05ea8cddfa367d045e03589756c02199e8f9bd
|
||||
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
|
||||
F src/util.c 810ec3f22e2d1b62e66c30fe3621ebdedd23584d
|
||||
F src/vacuum.c 9dd2f5d276bc6094d8f1d85ecd41b30c1a002a43
|
||||
F src/vdbe.c ea260b61e73b11a71e70b28a8e25866e2899e5da
|
||||
F src/vdbe.c 326034bf0a89ac31e7801480be29cb3a3b452308
|
||||
F src/vdbe.h 67bc551f7faf04c33493892e4b378aada823ed10
|
||||
F src/vdbeInt.h c59381049af5c7751a83456c39b80d1a6fde1f9d
|
||||
F src/vdbeapi.c c3f6715a99995c11748ecad91d25e93fd9fc390b
|
||||
F src/vdbeaux.c a32d79aeaa88dc2b97c261172d952d395254a055
|
||||
F src/vdbeaux.c 83458783d241cfd6691141c8a105832ee50258e5
|
||||
F src/vdbeblob.c 83d2d266383157b02e2b809350bb197e89d7895b
|
||||
F src/vdbemem.c 1ecaa5ee0caff07255f25d04e8dc88befb6f88d1
|
||||
F src/vdbesort.c 91fda3909326860382b0ca8aa251e609c6a9d62c
|
||||
F src/vdbetrace.c 41963d5376f0349842b5fc4aaaaacd7d9cdc0834
|
||||
F src/vtab.c 948d2d4984219eee37a7bf427d6667e21e6eb92e
|
||||
F src/vtab.c 6b3cfaff7e4397739d6b48511e777ca58c6d06d4
|
||||
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 02eeecc265f6ffd0597378f5d8ae9070b62a406a
|
||||
F src/wal.h 6dd221ed384afdc204bc61e25c23ef7fd5a511f2
|
||||
F src/walker.c 0f142b5bd3ed2041fc52d773880748b212e63354
|
||||
F src/where.c 8ccc01f9227d41bfaf09360f108583be4a36d3b1
|
||||
F src/where.c 4bbc3f1dcda64c96ed5f0ffe51be7c0d7adb6c62
|
||||
F src/whereInt.h e5b939701a7ceffc5a3a8188a37f9746416ebcd0
|
||||
F src/wherecode.c 99707d11907c71d289ee9553d2d1a22f1fd8ba41
|
||||
F src/wherecode.c 019a050e92526bd6734cca7ca7673c9eb8d0ec32
|
||||
F src/whereexpr.c d7dcbf14ce1b5876c1f76496162c30fcba669563
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
|
||||
@@ -624,7 +624,7 @@ F test/date.test 984ac1e3e5e031386866f034006148d3972b4a65
|
||||
F test/dbstatus.test 73149851b3aff14fc6db478e58f9083a66422cf5
|
||||
F test/dbstatus2.test e93ab03bfae6d62d4d935f20de928c19ca0ed0ab
|
||||
F test/default.test 0cb49b1c315a0d81c81d775e407f66906a2a604d
|
||||
F test/delete.test e1bcdf8926234e27aac24b346ad83d3329ec8b6f
|
||||
F test/delete.test acc38fca8ee4851467705b1c2cfea64cd26667e5
|
||||
F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
|
||||
F test/delete3.test 555e84a00a99230b7d049d477a324a631126a6ab
|
||||
F test/delete4.test 21d2113217eeaacac2d99defe14fe6611615ae86
|
||||
@@ -746,7 +746,7 @@ F test/fts3aux2.test 7ae2b2c13aefdf4169279a27a5f51780ce57f6ba
|
||||
F test/fts3b.test e93bbb653e52afde110ad53bbd793f14fe7a8984
|
||||
F test/fts3c.test fc723a9cf10b397fdfc2b32e73c53c8b1ec02958
|
||||
F test/fts3comp1.test a0f5b16a2df44dd0b15751787130af2183167c0c
|
||||
F test/fts3conf.test 1c8b8adb0ab28a41b68d1514df44380bd7353402
|
||||
F test/fts3conf.test 60317efd562080e198b5bdc9fcd222ce32cf01d7
|
||||
F test/fts3corrupt.test 2710b77983cc7789295ddbffea52c1d3b7506dbb
|
||||
F test/fts3corrupt2.test 6d96efae2f8a6af3eeaf283aba437e6d0e5447ba
|
||||
F test/fts3cov.test e0fb00d8b715ddae4a94c305992dfc3ef70353d7
|
||||
@@ -807,7 +807,7 @@ F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
|
||||
F test/fuzz3.test b47377143f0c80f91ed29d722861077ff34415d5
|
||||
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
|
||||
F test/fuzz_malloc.test 328f70aaca63adf29b4c6f06505ed0cf57ca7c26
|
||||
F test/fuzzcheck.c f01d432d001ba29e7916df8411be7d4e7cddc574
|
||||
F test/fuzzcheck.c f2e8102f7829f7b946ebdb6f1a16c6f942d9de66
|
||||
F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664
|
||||
F test/fuzzdata2.db f03a420d3b822cc82e4f894ca957618fbe9c4973
|
||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||
@@ -888,8 +888,8 @@ F test/like.test 81632c437a947bf1f7130b19537da6a1a844806a
|
||||
F test/like2.test 3b2ee13149ba4a8a60b59756f4e5d345573852da
|
||||
F test/like3.test 3608a2042b6f922f900fbfd5d3ce4e7eca57f7c4
|
||||
F test/limit.test 0c99a27a87b14c646a9d583c7c89fd06c352663e
|
||||
F test/limit2.test 55c9f4d08c89311e00afd75045ee1a2aca205cb4
|
||||
F test/loadext.test 42a3b8166dfcadcb0e0c8710dc520d97c31a8b98
|
||||
F test/limit2.test ac97b8d07060a0280162ba4159e4c0c765861127
|
||||
F test/loadext.test d077450695ddb5c1ea3ad7d48e5f5850fe732ad9
|
||||
F test/loadext2.test 0408380b57adca04004247179837a18e866a74f7
|
||||
F test/lock.test be4fe08118fb988fed741f429b7dd5d65e1c90db
|
||||
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
|
||||
@@ -1010,7 +1010,7 @@ F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
|
||||
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
|
||||
F test/regexp2.test aa7ffcc21350007a78361b82bcf3b74d12227144
|
||||
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
|
||||
F test/releasetest.tcl 3a66c7b8fbe55bcd97c907217c3d812d1d3c6b93
|
||||
F test/releasetest.tcl 53560b838b79c468ec9973e0dfa3d8892628887f
|
||||
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
|
||||
F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
|
||||
F test/rollback2.test 8435d6ff0f13f51d2a4181c232e706005fa90fc5
|
||||
@@ -1027,7 +1027,7 @@ F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
|
||||
F test/savepoint6.test f41279c5e137139fa5c21485773332c7adb98cd7
|
||||
F test/savepoint7.test cde525ea3075283eb950cdcdefe23ead4f700daa
|
||||
F test/savepointfault.test f044eac64b59f09746c7020ee261734de82bf9b2
|
||||
F test/scanstatus.test 030acbbdcea6a3fc676fee99edc84f6f16c0cf92
|
||||
F test/scanstatus.test 5253c219e331318a437f436268e0e82345700285
|
||||
F test/schema.test 8f7999be894260f151adf15c2c7540f1c6d6a481
|
||||
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
|
||||
F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
|
||||
@@ -1065,16 +1065,16 @@ F test/sharedA.test 0cdf1a76dfa00e6beee66af5b534b1e8df2720f5
|
||||
F test/sharedB.test 16cc7178e20965d75278f410943109b77b2e645e
|
||||
F test/shared_err.test 2f2aee20db294b9924e81f6ccbe60f19e21e8506
|
||||
F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
|
||||
F test/shell1.test 77896b65f1cde4ee79e38b2c0ed8578a8f4000e5
|
||||
F test/shell1.test 65b10cd8a90cda9b5af9100a45689a57dcc01a31
|
||||
F test/shell2.test e242a9912f44f4c23c3d1d802a83e934e84c853b
|
||||
F test/shell3.test da513d522ef6f01cee8475dcf8332bff8982b3dd
|
||||
F test/shell4.test 69995ee1cc278eb149aa8746ce1f935f4eaf98b9
|
||||
F test/shell4.test 89ad573879a745974ff2df20ff97c5d6ffffbd5d
|
||||
F test/shell5.test 50a732c1c2158b1cd62cf53975ce1ea7ce6b9dc9
|
||||
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
|
||||
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
|
||||
F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce
|
||||
F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329
|
||||
F test/skipscan1.test d37a75b4be4eb9dedeb69b4f38b1d0a74b5021d7
|
||||
F test/skipscan1.test f2d4482f195f018c3732374d3985fc34bcc3ae1a
|
||||
F test/skipscan2.test d1d1450952b7275f0b0a3a981f0230532743951a
|
||||
F test/skipscan3.test ec5bab3f81c7038b43450e7b3062e04a198bdbb5
|
||||
F test/skipscan5.test 67817a4b6857c47e0e33ba3e506da6f23ef68de2
|
||||
@@ -1093,7 +1093,7 @@ F test/speed1.test f2974a91d79f58507ada01864c0e323093065452
|
||||
F test/speed1p.explain d841e650a04728b39e6740296b852dccdca9b2cb
|
||||
F test/speed1p.test b180e98609c7677382cf618c0ec9b69f789033a8
|
||||
F test/speed2.test 53177056baf6556dcbdcf032bbdfc41c1aa74ded
|
||||
F test/speed3.test d32043614c08c53eafdc80f33191d5bd9b920523
|
||||
F test/speed3.test 694affeb9100526007436334cf7d08f3d74b85ef
|
||||
F test/speed4.test abc0ad3399dcf9703abed2fff8705e4f8e416715
|
||||
F test/speed4p.explain 6b5f104ebeb34a038b2f714150f51d01143e59aa
|
||||
F test/speed4p.test 0e51908951677de5a969b723e03a27a1c45db38b
|
||||
@@ -1104,7 +1104,7 @@ F test/spellfix3.test 0f9efaaa502a0e0a09848028518a6fb096c8ad33
|
||||
F test/sqldiff1.test 28cd737cf1b0078b1ec1bbf425e674c47785835e
|
||||
F test/sqllimits1.test a74ee2a3740b9f9c2437c246d8fb77354862a142
|
||||
F test/sqllog.test 6af6cb0b09f4e44e1917e06ce85be7670302517a
|
||||
F test/stat.test ab95d28503d0f6d98ffd8ce204643c9da090ebf1
|
||||
F test/stat.test f8f1279ffffabe6df825723af18cc6e0ae70a893
|
||||
F test/statfault.test f525a7bf633e50afd027700e9a486090684b1ac1
|
||||
F test/stmt.test 64844332db69cf1a735fcb3e11548557fc95392f
|
||||
F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
|
||||
@@ -1142,6 +1142,7 @@ F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b
|
||||
F test/threadtest2.c a70a8e94bef23339d34226eb9521015ef99f4df8
|
||||
F test/threadtest3.c 38a612ea62854349ed66372f330a40d73c5cf956
|
||||
F test/threadtest4.c c1e67136ceb6c7ec8184e56ac61db28f96bd2925
|
||||
F test/time-wordcount.sh 8e0b0f8109367827ad5d58f5cc849705731e4b90
|
||||
F test/tkt-02a8e81d44.test 6c80d9c7514e2a42d4918bf87bf6bc54f379110c
|
||||
F test/tkt-26ff0c2d1e.test 888324e751512972c6e0d1a09df740d8f5aaf660
|
||||
F test/tkt-2a5629202f.test 0521bd25658428baa26665aa53ffed9367d33af2
|
||||
@@ -1311,7 +1312,7 @@ F test/tt3_lookaside1.c 0377e202c3c2a50d688cb65ba203afeda6fafeb9
|
||||
F test/tt3_stress.c c57d804716165811d979d4a719e05baccd79277f
|
||||
F test/tt3_vacuum.c 1753f45917699c9c1f66b64c717a717c9379f776
|
||||
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
|
||||
F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
|
||||
F test/types2.test 1aeb81976841a91eef292723649b5c4fe3bc3cac
|
||||
F test/types3.test 99e009491a54f4dc02c06bdbc0c5eea56ae3e25a
|
||||
F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
|
||||
F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
|
||||
@@ -1343,8 +1344,8 @@ F test/vtabB.test 04df5dc531b9f44d9ca65b9c1b79f12b5922a796
|
||||
F test/vtabC.test 4528f459a13136f982e75614d120aef165f17292
|
||||
F test/vtabD.test 05b3f1d77117271671089e48719524b676842e96
|
||||
F test/vtabE.test d5024aa42754962f6bb0afd261681686488e7afe
|
||||
F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e
|
||||
F test/vtabH.test 5f5157a1501d9889ec35c1a1832f69612dd31444
|
||||
F test/vtabF.test 1918844c7c902f6a16c8dacf1ec8f84886d6e78b
|
||||
F test/vtabH.test 97f61b0253260831af6232163f7852e2653baed6
|
||||
F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f
|
||||
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
|
||||
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
|
||||
@@ -1374,7 +1375,7 @@ F test/walmode.test 4022fe03ae6e830583672caa101f046438a0473c
|
||||
F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
|
||||
F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03
|
||||
F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6
|
||||
F test/walprotocol.test 059cb75484a1ecf6357a2c1b3324b8156749221e
|
||||
F test/walprotocol.test 0b92feb132ccebd855494d917d3f6c2d717ace20
|
||||
F test/walro.test 4ab7ac01b77c2f894235c699d59e3e3c7f15a160
|
||||
F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
|
||||
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
|
||||
@@ -1416,7 +1417,7 @@ F test/without_rowid3.test aad4f9d383e199349b6c7e508a778f7dff5dff79
|
||||
F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
|
||||
F test/without_rowid5.test 89b1c587bd92a0590e440da33e7666bf4891572a
|
||||
F test/without_rowid6.test 1f99644e6508447fb050f73697350c7ceca3392e
|
||||
F test/wordcount.c 2a0a6c0d0e8e8bbbac1f06d72a6791828c37c0cf
|
||||
F test/wordcount.c 97856eec21fd00d77da720007b1888c383f63dcf
|
||||
F test/zeroblob.test 3857870fe681b8185654414a9bccfde80b62a0fa
|
||||
F test/zerodamage.test e59a56443d6298ecf7435f618f0b27654f0c849e
|
||||
F tool/GetFile.cs a15e08acb5dd7539b75ba23501581d7c2b462cb5
|
||||
@@ -1448,16 +1449,16 @@ F tool/mkopcodeh.tcl a01d2c1d8a6205b03fc635adf3735b4c523befd3
|
||||
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
|
||||
F tool/mkpragmatab.tcl f0d5bb266d1d388cf86fce5ba01a891e95d72d41
|
||||
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
|
||||
F tool/mksqlite3c-noext.tcl 87240b09c20042999b41d5fabe091b7111287835
|
||||
F tool/mksqlite3c.tcl 63af8429841f08552e6da1d93b3dee4a93ff8071
|
||||
F tool/mksqlite3h.tcl e7b106fc4f29fbc258e8ba9b88d9108332ea2ade
|
||||
F tool/mksqlite3c-noext.tcl fef88397668ae83166735c41af99d79f56afaabb
|
||||
F tool/mksqlite3c.tcl 06b2e6a0f21cc0a5d70fbbd136b3e0a96470645e
|
||||
F tool/mksqlite3h.tcl c006c4e5da57c649b24b689511dcd270dd7b0249
|
||||
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
|
||||
F tool/mkvsix.tcl 4abcaf3267171b2faadaf9b82a0dfbaa6e98f8b7
|
||||
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
|
||||
F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97
|
||||
F tool/opcodesum.tcl 740ed206ba8c5040018988129abbf3089a0ccf4a
|
||||
F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b
|
||||
F tool/replace.tcl 7727c60a04299b65a92f5e1590896fea0f25b9e0
|
||||
F tool/replace.tcl 60f91e8dd06ab81f74d213ecbd9c9945f32ac048
|
||||
F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
|
||||
F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
|
||||
F tool/run-speed-test.sh f95d19fd669b68c4c38b6b475242841d47c66076
|
||||
@@ -1475,7 +1476,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
|
||||
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
||||
F tool/sqldiff.c 4478f0d30230de6adde90bdb0bfe60f68c5ab782
|
||||
F tool/sqldiff.c c965d49bf2677db06103854b47e105484b5b1b84
|
||||
F tool/srcck1.c 371de5363b70154012955544f86fdee8f6e5326f
|
||||
F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
|
||||
F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
|
||||
@@ -1508,7 +1509,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 81f9cf86c48f3cd43755ded4dc97388ec650f8af
|
||||
R ae8bfc7314166cec8de9b44e7e9859e8
|
||||
P a04a21ad5aa1a56d50388d6cdb88bae754218a0a
|
||||
R 073817cadc2d2cf4f1a705c7b7ab3a16
|
||||
T +bgcolor * #d0c0ff
|
||||
T +sym-release *
|
||||
T +sym-version-3.14.2 *
|
||||
U drh
|
||||
Z 7b0f6930a62d02daa8f4147d6dafd3a6
|
||||
Z 3b9eb30be1058877308d90519a39b4b7
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
805d01cdabb48a69eb986a7f084e53eb25d76b7f
|
||||
29dbef4b8585f753861a36d6dd102ca634197bd6
|
||||
+4
-2
@@ -777,13 +777,15 @@ int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
|
||||
** sqlite3_backup_step(), we can guarantee that the copy finishes
|
||||
** within a single call (unless an error occurs). The assert() statement
|
||||
** checks this assumption - (p->rc) should be set to either SQLITE_DONE
|
||||
** or an error code.
|
||||
*/
|
||||
** or an error code. */
|
||||
sqlite3_backup_step(&b, 0x7FFFFFFF);
|
||||
assert( b.rc!=SQLITE_OK );
|
||||
|
||||
rc = sqlite3_backup_finish(&b);
|
||||
if( rc==SQLITE_OK ){
|
||||
pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
|
||||
}else{
|
||||
sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));
|
||||
}
|
||||
|
||||
assert( sqlite3BtreeIsInTrans(pTo)==0 );
|
||||
|
||||
+1
-1
@@ -6385,7 +6385,7 @@ static void insertCell(
|
||||
|
||||
/*
|
||||
** A CellArray object contains a cache of pointers and sizes for a
|
||||
** consecutive sequence of cells that might be held multiple pages.
|
||||
** consecutive sequence of cells that might be held on multiple pages.
|
||||
*/
|
||||
typedef struct CellArray CellArray;
|
||||
struct CellArray {
|
||||
|
||||
@@ -3037,6 +3037,13 @@ void sqlite3CreateIndex(
|
||||
if( zName==0 ){
|
||||
goto exit_create_index;
|
||||
}
|
||||
|
||||
/* Automatic index names generated from within sqlite3_declare_vtab()
|
||||
** must have names that are distinct from normal automatic index names.
|
||||
** The following statement converts "sqlite3_autoindex..." into
|
||||
** "sqlite3_butoindex..." in order to make the names distinct.
|
||||
** The "vtab_err.test" test demonstrates the need of this statement. */
|
||||
if( IN_DECLARE_VTAB ) zName[7]++;
|
||||
}
|
||||
|
||||
/* Check for authorization to create an index.
|
||||
|
||||
@@ -1112,7 +1112,6 @@ static void currentTimeFunc(
|
||||
){
|
||||
time_t t;
|
||||
char *zFormat = (char *)sqlite3_user_data(context);
|
||||
sqlite3 *db;
|
||||
sqlite3_int64 iT;
|
||||
struct tm *pTm;
|
||||
struct tm sNow;
|
||||
|
||||
@@ -2943,6 +2943,11 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
|
||||
assert( !ExprHasProperty(pExpr, EP_IntValue) );
|
||||
zId = pExpr->u.zToken;
|
||||
pDef = sqlite3FindFunction(db, zId, nFarg, enc, 0);
|
||||
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
if( pDef==0 && pParse->explain ){
|
||||
pDef = sqlite3FindFunction(db, "unknown", nFarg, enc, 0);
|
||||
}
|
||||
#endif
|
||||
if( pDef==0 || pDef->xFinalize!=0 ){
|
||||
sqlite3ErrorMsg(pParse, "unknown function: %s()", zId);
|
||||
break;
|
||||
|
||||
+26
-3
@@ -1316,6 +1316,26 @@ static void trimFunc(
|
||||
}
|
||||
|
||||
|
||||
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
/*
|
||||
** The "unknown" function is automatically substituted in place of
|
||||
** any unrecognized function name when doing an EXPLAIN or EXPLAIN QUERY PLAN
|
||||
** when the SQLITE_ENABLE_UNKNOWN_FUNCTION compile-time option is used.
|
||||
** When the "sqlite3" command-line shell is built using this functionality,
|
||||
** that allows an EXPLAIN or EXPLAIN QUERY PLAN for complex queries
|
||||
** involving application-defined functions to be examined in a generic
|
||||
** sqlite3 shell.
|
||||
*/
|
||||
static void unknownFunc(
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
/* no-op */
|
||||
}
|
||||
#endif /*SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION*/
|
||||
|
||||
|
||||
/* IMP: R-25361-16150 This function is omitted from SQLite by default. It
|
||||
** is only available if the SQLITE_SOUNDEX compile-time option is used
|
||||
** when SQLite is built.
|
||||
@@ -1786,13 +1806,16 @@ void sqlite3RegisterBuiltinFunctions(void){
|
||||
AGGREGATE(group_concat, 2, 0, 0, groupConcatStep, groupConcatFinalize),
|
||||
|
||||
LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
|
||||
#ifdef SQLITE_CASE_SENSITIVE_LIKE
|
||||
#ifdef SQLITE_CASE_SENSITIVE_LIKE
|
||||
LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
|
||||
LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
|
||||
#else
|
||||
#else
|
||||
LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE),
|
||||
LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE),
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
FUNCTION(unknown, -1, 0, 0, unknownFunc ),
|
||||
#endif
|
||||
FUNCTION(coalesce, 1, 0, 0, 0 ),
|
||||
FUNCTION(coalesce, 0, 0, 0, 0 ),
|
||||
FUNCTION2(coalesce, -1, 0, 0, noopFunc, SQLITE_FUNC_COALESCE),
|
||||
|
||||
+5
-5
@@ -1777,15 +1777,15 @@ int sqlite3OpenTableAndIndices(
|
||||
for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
|
||||
int iIdxCur = iBase++;
|
||||
assert( pIdx->pSchema==pTab->pSchema );
|
||||
if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
|
||||
if( piDataCur ) *piDataCur = iIdxCur;
|
||||
p5 = 0;
|
||||
}
|
||||
if( aToOpen==0 || aToOpen[i+1] ){
|
||||
sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);
|
||||
sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
|
||||
VdbeComment((v, "%s", pIdx->zName));
|
||||
}
|
||||
if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){
|
||||
if( piDataCur ) *piDataCur = iIdxCur;
|
||||
}else{
|
||||
sqlite3VdbeChangeP5(v, p5);
|
||||
VdbeComment((v, "%s", pIdx->zName));
|
||||
}
|
||||
}
|
||||
if( iBase>pParse->nTab ) pParse->nTab = iBase;
|
||||
|
||||
+19
-12
@@ -21,7 +21,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
||||
|
||||
/*
|
||||
** Some API routines are omitted when various features are
|
||||
** excluded from a build of SQLite. Substitute a NULL pointer
|
||||
@@ -111,6 +110,10 @@
|
||||
#define sqlite3_blob_reopen 0
|
||||
#endif
|
||||
|
||||
#if defined(SQLITE_OMIT_TRACE)
|
||||
# define sqlite3_trace_v2 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The following structure contains pointers to all SQLite API routines.
|
||||
** A pointer to this structure is passed into extensions when they are
|
||||
@@ -416,7 +419,10 @@ static const sqlite3_api_routines sqlite3Apis = {
|
||||
sqlite3_strlike,
|
||||
sqlite3_db_cacheflush,
|
||||
/* Version 3.12.0 and later */
|
||||
sqlite3_system_errno
|
||||
sqlite3_system_errno,
|
||||
/* Version 3.14.0 and later */
|
||||
sqlite3_trace_v2,
|
||||
sqlite3_expanded_sql
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -439,7 +445,7 @@ static int sqlite3LoadExtension(
|
||||
){
|
||||
sqlite3_vfs *pVfs = db->pVfs;
|
||||
void *handle;
|
||||
int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
sqlite3_loadext_entry xInit;
|
||||
char *zErrmsg = 0;
|
||||
const char *zEntry;
|
||||
char *zAltEntry = 0;
|
||||
@@ -498,8 +504,7 @@ static int sqlite3LoadExtension(
|
||||
}
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
|
||||
sqlite3OsDlSym(pVfs, handle, zEntry);
|
||||
xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry);
|
||||
|
||||
/* If no entry point was specified and the default legacy
|
||||
** entry point name "sqlite3_extension_init" was not found, then
|
||||
@@ -531,8 +536,7 @@ static int sqlite3LoadExtension(
|
||||
}
|
||||
memcpy(zAltEntry+iEntry, "_init", 6);
|
||||
zEntry = zAltEntry;
|
||||
xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
|
||||
sqlite3OsDlSym(pVfs, handle, zEntry);
|
||||
xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry);
|
||||
}
|
||||
if( xInit==0 ){
|
||||
if( pzErrMsg ){
|
||||
@@ -662,7 +666,9 @@ static SQLITE_WSD struct sqlite3AutoExtList {
|
||||
** Register a statically linked extension that is automatically
|
||||
** loaded by every new database connection.
|
||||
*/
|
||||
int sqlite3_auto_extension(void (*xInit)(void)){
|
||||
int sqlite3_auto_extension(
|
||||
void (*xInit)(void)
|
||||
){
|
||||
int rc = SQLITE_OK;
|
||||
#ifndef SQLITE_OMIT_AUTOINIT
|
||||
rc = sqlite3_initialize();
|
||||
@@ -707,7 +713,9 @@ int sqlite3_auto_extension(void (*xInit)(void)){
|
||||
** Return 1 if xInit was found on the list and removed. Return 0 if xInit
|
||||
** was not on the list.
|
||||
*/
|
||||
int sqlite3_cancel_auto_extension(void (*xInit)(void)){
|
||||
int sqlite3_cancel_auto_extension(
|
||||
void (*xInit)(void)
|
||||
){
|
||||
#if SQLITE_THREADSAFE
|
||||
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
|
||||
#endif
|
||||
@@ -756,7 +764,7 @@ void sqlite3AutoLoadExtensions(sqlite3 *db){
|
||||
u32 i;
|
||||
int go = 1;
|
||||
int rc;
|
||||
int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
sqlite3_loadext_entry xInit;
|
||||
|
||||
wsdAutoextInit;
|
||||
if( wsdAutoext.nExt==0 ){
|
||||
@@ -773,8 +781,7 @@ void sqlite3AutoLoadExtensions(sqlite3 *db){
|
||||
xInit = 0;
|
||||
go = 0;
|
||||
}else{
|
||||
xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
|
||||
wsdAutoext.aExt[i];
|
||||
xInit = (sqlite3_loadext_entry)wsdAutoext.aExt[i];
|
||||
}
|
||||
sqlite3_mutex_leave(mutex);
|
||||
zErrmsg = 0;
|
||||
|
||||
@@ -1838,6 +1838,8 @@ int sqlite3_trace_v2(
|
||||
}
|
||||
#endif
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
if( mTrace==0 ) xTrace = 0;
|
||||
if( xTrace==0 ) mTrace = 0;
|
||||
db->mTrace = mTrace;
|
||||
db->xTrace = xTrace;
|
||||
db->pTraceArg = pArg;
|
||||
|
||||
+11
-1
@@ -7157,6 +7157,17 @@ sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
|
||||
return &pPager->pBackup;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_VACUUM
|
||||
/*
|
||||
** Unless this is an in-memory or temporary database, clear the pager cache.
|
||||
*/
|
||||
void sqlite3PagerClearCache(Pager *pPager){
|
||||
assert( MEMDB==0 || pPager->tempFile );
|
||||
if( pPager->tempFile==0 ) pager_reset(pPager);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SQLITE_OMIT_WAL
|
||||
/*
|
||||
** This function is called when the user invokes "PRAGMA wal_checkpoint",
|
||||
@@ -7382,5 +7393,4 @@ int sqlite3PagerWalFramesize(Pager *pPager){
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* SQLITE_OMIT_DISKIO */
|
||||
|
||||
@@ -203,6 +203,7 @@ const char *sqlite3PagerJournalname(Pager*);
|
||||
void *sqlite3PagerTempSpace(Pager*);
|
||||
int sqlite3PagerIsMemdb(Pager*);
|
||||
void sqlite3PagerCacheStat(Pager *, int, int, int *);
|
||||
void sqlite3PagerClearCache(Pager*);
|
||||
int sqlite3SectorSize(sqlite3_file *);
|
||||
|
||||
/* Functions used to truncate the database file. */
|
||||
|
||||
+27
-7
@@ -632,12 +632,30 @@ static void pcache1TruncateUnsafe(
|
||||
PCache1 *pCache, /* The cache to truncate */
|
||||
unsigned int iLimit /* Drop pages with this pgno or larger */
|
||||
){
|
||||
TESTONLY( unsigned int nPage = 0; ) /* To assert pCache->nPage is correct */
|
||||
unsigned int h;
|
||||
TESTONLY( int nPage = 0; ) /* To assert pCache->nPage is correct */
|
||||
unsigned int h, iStop;
|
||||
assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
|
||||
for(h=0; h<pCache->nHash; h++){
|
||||
PgHdr1 **pp = &pCache->apHash[h];
|
||||
assert( pCache->iMaxKey >= iLimit );
|
||||
assert( pCache->nHash > 0 );
|
||||
if( pCache->iMaxKey - iLimit < pCache->nHash ){
|
||||
/* If we are just shaving the last few pages off the end of the
|
||||
** cache, then there is no point in scanning the entire hash table.
|
||||
** Only scan those hash slots that might contain pages that need to
|
||||
** be removed. */
|
||||
h = iLimit % pCache->nHash;
|
||||
iStop = pCache->iMaxKey % pCache->nHash;
|
||||
TESTONLY( nPage = -10; ) /* Disable the pCache->nPage validity check */
|
||||
}else{
|
||||
/* This is the general case where many pages are being removed.
|
||||
** It is necessary to scan the entire hash table */
|
||||
h = pCache->nHash/2;
|
||||
iStop = h - 1;
|
||||
}
|
||||
for(;;){
|
||||
PgHdr1 **pp;
|
||||
PgHdr1 *pPage;
|
||||
assert( h<pCache->nHash );
|
||||
pp = &pCache->apHash[h];
|
||||
while( (pPage = *pp)!=0 ){
|
||||
if( pPage->iKey>=iLimit ){
|
||||
pCache->nPage--;
|
||||
@@ -646,11 +664,13 @@ static void pcache1TruncateUnsafe(
|
||||
pcache1FreePage(pPage);
|
||||
}else{
|
||||
pp = &pPage->pNext;
|
||||
TESTONLY( nPage++; )
|
||||
TESTONLY( if( nPage>=0 ) nPage++; )
|
||||
}
|
||||
}
|
||||
if( h==iStop ) break;
|
||||
h = (h+1) % pCache->nHash;
|
||||
}
|
||||
assert( pCache->nPage==nPage );
|
||||
assert( nPage<0 || pCache->nPage==(unsigned)nPage );
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@@ -1127,7 +1147,7 @@ static void pcache1Destroy(sqlite3_pcache *p){
|
||||
PGroup *pGroup = pCache->pGroup;
|
||||
assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );
|
||||
pcache1EnterMutex(pGroup);
|
||||
pcache1TruncateUnsafe(pCache, 0);
|
||||
if( pCache->nPage ) pcache1TruncateUnsafe(pCache, 0);
|
||||
assert( pGroup->nMaxPage >= pCache->nMax );
|
||||
pGroup->nMaxPage -= pCache->nMax;
|
||||
assert( pGroup->nMinPage >= pCache->nMin );
|
||||
|
||||
+5
-1
@@ -718,7 +718,11 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
|
||||
pNC->nErr++;
|
||||
is_agg = 0;
|
||||
}else if( no_such_func && pParse->db->init.busy==0 ){
|
||||
}else if( no_such_func && pParse->db->init.busy==0
|
||||
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||
&& pParse->explain==0
|
||||
#endif
|
||||
){
|
||||
sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
|
||||
pNC->nErr++;
|
||||
}else if( wrong_num_args ){
|
||||
|
||||
+4
-2
@@ -524,7 +524,7 @@ static char *local_getline(char *zLine, FILE *in){
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
/* For interactive input on Windows systems, translate the
|
||||
** multi-byte characterset characters into UTF-8. */
|
||||
if( stdin_is_interactive ){
|
||||
if( stdin_is_interactive && in==stdin ){
|
||||
char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0);
|
||||
if( zTrans ){
|
||||
int nTrans = strlen30(zTrans)+1;
|
||||
@@ -2550,6 +2550,8 @@ static int sql_trace_callback(
|
||||
void *pX
|
||||
){
|
||||
FILE *f = (FILE*)pArg;
|
||||
UNUSED_PARAMETER(mType);
|
||||
UNUSED_PARAMETER(pP);
|
||||
if( f ){
|
||||
const char *z = (const char*)pX;
|
||||
int i = (int)strlen(z);
|
||||
@@ -4903,7 +4905,7 @@ static int process_input(ShellState *p, FILE *in){
|
||||
zLine = one_input_line(in, zLine, nSql>0);
|
||||
if( zLine==0 ){
|
||||
/* End of input */
|
||||
if( stdin_is_interactive ) printf("\n");
|
||||
if( in==0 && stdin_is_interactive ) printf("\n");
|
||||
break;
|
||||
}
|
||||
if( seenInterrupt ){
|
||||
|
||||
+36
-16
@@ -54,8 +54,17 @@ extern "C" {
|
||||
#ifndef SQLITE_CDECL
|
||||
# define SQLITE_CDECL
|
||||
#endif
|
||||
#ifndef SQLITE_APICALL
|
||||
# define SQLITE_APICALL
|
||||
#endif
|
||||
#ifndef SQLITE_STDCALL
|
||||
# define SQLITE_STDCALL
|
||||
# define SQLITE_STDCALL SQLITE_APICALL
|
||||
#endif
|
||||
#ifndef SQLITE_CALLBACK
|
||||
# define SQLITE_CALLBACK
|
||||
#endif
|
||||
#ifndef SQLITE_SYSAPI
|
||||
# define SQLITE_SYSAPI
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -1036,6 +1045,16 @@ struct sqlite3_io_methods {
|
||||
*/
|
||||
typedef struct sqlite3_mutex sqlite3_mutex;
|
||||
|
||||
/*
|
||||
** CAPI3REF: Loadable Extension Thunk
|
||||
**
|
||||
** A pointer to the opaque sqlite3_api_routines structure is passed as
|
||||
** the third parameter to entry points of [loadable extensions]. This
|
||||
** structure must be typedefed in order to work around compiler warnings
|
||||
** on some platforms.
|
||||
*/
|
||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
||||
|
||||
/*
|
||||
** CAPI3REF: OS Interface Object
|
||||
**
|
||||
@@ -1940,7 +1959,7 @@ struct sqlite3_mem_methods {
|
||||
** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
|
||||
** There should be two additional arguments.
|
||||
** When the first argument to this interface is 1, then only the C-API is
|
||||
** enabled and the SQL function remains disabled. If the first argment to
|
||||
** enabled and the SQL function remains disabled. If the first argument to
|
||||
** this interface is 0, then both the C-API and the SQL function are disabled.
|
||||
** If the first argument is -1, then no changes are made to state of either the
|
||||
** C-API or the SQL function.
|
||||
@@ -2233,7 +2252,7 @@ int sqlite3_complete16(const void *sql);
|
||||
** A busy handler must not close the database connection
|
||||
** or [prepared statement] that invoked the busy handler.
|
||||
*/
|
||||
int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
|
||||
int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Set A Busy Timeout
|
||||
@@ -4685,12 +4704,13 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
||||
** SQLite will invoke the destructor function X with parameter P exactly
|
||||
** once, when the metadata is discarded.
|
||||
** SQLite is free to discard the metadata at any time, including: <ul>
|
||||
** <li> when the corresponding function parameter changes, or
|
||||
** <li> when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
|
||||
** SQL statement, or
|
||||
** <li> when sqlite3_set_auxdata() is invoked again on the same parameter, or
|
||||
** <li> during the original sqlite3_set_auxdata() call when a memory
|
||||
** allocation error occurs. </ul>)^
|
||||
** <li> ^(when the corresponding function parameter changes)^, or
|
||||
** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
|
||||
** SQL statement)^, or
|
||||
** <li> ^(when sqlite3_set_auxdata() is invoked again on the same
|
||||
** parameter)^, or
|
||||
** <li> ^(during the original sqlite3_set_auxdata() call when a memory
|
||||
** allocation error occurs.)^ </ul>
|
||||
**
|
||||
** Note the last bullet in particular. The destructor X in
|
||||
** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
|
||||
@@ -5517,7 +5537,7 @@ SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
|
||||
** column exists. ^The sqlite3_table_column_metadata() interface returns
|
||||
** SQLITE_ERROR and if the specified column does not exist.
|
||||
** ^If the column-name parameter to sqlite3_table_column_metadata() is a
|
||||
** NULL pointer, then this routine simply checks for the existance of the
|
||||
** NULL pointer, then this routine simply checks for the existence of the
|
||||
** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
|
||||
** does not.
|
||||
**
|
||||
@@ -5651,8 +5671,8 @@ int sqlite3_load_extension(
|
||||
**
|
||||
** ^This interface enables or disables both the C-API
|
||||
** [sqlite3_load_extension()] and the SQL function [load_extension()].
|
||||
** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
|
||||
** to enable or disable only the C-API.
|
||||
** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
|
||||
** to enable or disable only the C-API.)^
|
||||
**
|
||||
** <b>Security warning:</b> It is recommended that extension loading
|
||||
** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
|
||||
@@ -5672,7 +5692,7 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
|
||||
**
|
||||
** ^(Even though the function prototype shows that xEntryPoint() takes
|
||||
** no arguments and returns void, SQLite invokes xEntryPoint() with three
|
||||
** arguments and expects and integer result as if the signature of the
|
||||
** arguments and expects an integer result as if the signature of the
|
||||
** entry point where as follows:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
@@ -5698,7 +5718,7 @@ int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
|
||||
** See also: [sqlite3_reset_auto_extension()]
|
||||
** and [sqlite3_cancel_auto_extension()]
|
||||
*/
|
||||
int sqlite3_auto_extension(void (*xEntryPoint)(void));
|
||||
int sqlite3_auto_extension(void(*xEntryPoint)(void));
|
||||
|
||||
/*
|
||||
** CAPI3REF: Cancel Automatic Extension Loading
|
||||
@@ -5710,7 +5730,7 @@ int sqlite3_auto_extension(void (*xEntryPoint)(void));
|
||||
** unregistered and it returns 0 if X was not on the list of initialization
|
||||
** routines.
|
||||
*/
|
||||
int sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
|
||||
int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
|
||||
|
||||
/*
|
||||
** CAPI3REF: Reset Automatic Extension Loading
|
||||
@@ -8112,7 +8132,7 @@ int sqlite3_db_cacheflush(sqlite3*);
|
||||
** ^The second parameter to the preupdate callback is a pointer to
|
||||
** the [database connection] that registered the preupdate hook.
|
||||
** ^The third parameter to the preupdate callback is one of the constants
|
||||
** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the
|
||||
** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
|
||||
** kind of update operation that is about to occur.
|
||||
** ^(The fourth parameter to the preupdate callback is the name of the
|
||||
** database within the database connection that is being modified. This
|
||||
|
||||
+10
-2
@@ -19,8 +19,6 @@
|
||||
#define SQLITE3EXT_H
|
||||
#include "sqlite3.h"
|
||||
|
||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
||||
|
||||
/*
|
||||
** The following structure holds pointers to all of the SQLite API
|
||||
** routines.
|
||||
@@ -286,6 +284,16 @@ struct sqlite3_api_routines {
|
||||
char *(*expanded_sql)(sqlite3_stmt*);
|
||||
};
|
||||
|
||||
/*
|
||||
** This is the function signature used for all extension entry points. It
|
||||
** is also defined in the file "loadext.c".
|
||||
*/
|
||||
typedef int (*sqlite3_loadext_entry)(
|
||||
sqlite3 *db, /* Handle to the database. */
|
||||
char **pzErrMsg, /* Used to set error string on failure. */
|
||||
const sqlite3_api_routines *pThunk /* Extension API function pointers. */
|
||||
);
|
||||
|
||||
/*
|
||||
** The following macros redefine the API routines so that they are
|
||||
** redirected through the global sqlite3_api structure.
|
||||
|
||||
+9
-1
@@ -42,6 +42,14 @@
|
||||
** asterisks and the comment text.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Make sure the Tcl calling convention macro is defined. This macro is
|
||||
** only used by test code and Tcl integration code.
|
||||
*/
|
||||
#ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Make sure that rand_s() is available on Windows systems with MSVC 2005
|
||||
** or higher.
|
||||
@@ -226,7 +234,7 @@
|
||||
** the SQLITE_DISABLE_INTRINSIC define.
|
||||
*/
|
||||
#if !defined(SQLITE_DISABLE_INTRINSIC)
|
||||
# if defined(_MSC_VER) && _MSC_VER>=1300
|
||||
# if defined(_MSC_VER) && _MSC_VER>=1400
|
||||
# if !defined(_WIN32_WCE)
|
||||
# include <intrin.h>
|
||||
# pragma intrinsic(_byteswap_ushort)
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ int sqlite3_status64(
|
||||
return SQLITE_OK;
|
||||
}
|
||||
int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
|
||||
sqlite3_int64 iCur, iHwtr;
|
||||
sqlite3_int64 iCur = 0, iHwtr = 0;
|
||||
int rc;
|
||||
#ifdef SQLITE_ENABLE_API_ARMOR
|
||||
if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
|
||||
|
||||
+63
-22
@@ -30,10 +30,17 @@
|
||||
** If requested, include the SQLite compiler options file for MSVC.
|
||||
*/
|
||||
#if defined(INCLUDE_MSVC_H)
|
||||
#include "msvc.h"
|
||||
# include "msvc.h"
|
||||
#endif
|
||||
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
@@ -204,7 +211,10 @@ static void closeIncrblobChannels(SqliteDb *pDb){
|
||||
/*
|
||||
** Close an incremental blob channel.
|
||||
*/
|
||||
static int incrblobClose(ClientData instanceData, Tcl_Interp *interp){
|
||||
static int SQLITE_TCLAPI incrblobClose(
|
||||
ClientData instanceData,
|
||||
Tcl_Interp *interp
|
||||
){
|
||||
IncrblobChannel *p = (IncrblobChannel *)instanceData;
|
||||
int rc = sqlite3_blob_close(p->pBlob);
|
||||
sqlite3 *db = p->pDb->db;
|
||||
@@ -233,7 +243,7 @@ static int incrblobClose(ClientData instanceData, Tcl_Interp *interp){
|
||||
/*
|
||||
** Read data from an incremental blob channel.
|
||||
*/
|
||||
static int incrblobInput(
|
||||
static int SQLITE_TCLAPI incrblobInput(
|
||||
ClientData instanceData,
|
||||
char *buf,
|
||||
int bufSize,
|
||||
@@ -265,7 +275,7 @@ static int incrblobInput(
|
||||
/*
|
||||
** Write data to an incremental blob channel.
|
||||
*/
|
||||
static int incrblobOutput(
|
||||
static int SQLITE_TCLAPI incrblobOutput(
|
||||
ClientData instanceData,
|
||||
CONST char *buf,
|
||||
int toWrite,
|
||||
@@ -298,7 +308,7 @@ static int incrblobOutput(
|
||||
/*
|
||||
** Seek an incremental blob channel.
|
||||
*/
|
||||
static int incrblobSeek(
|
||||
static int SQLITE_TCLAPI incrblobSeek(
|
||||
ClientData instanceData,
|
||||
long offset,
|
||||
int seekMode,
|
||||
@@ -324,10 +334,17 @@ static int incrblobSeek(
|
||||
}
|
||||
|
||||
|
||||
static void incrblobWatch(ClientData instanceData, int mode){
|
||||
static void SQLITE_TCLAPI incrblobWatch(
|
||||
ClientData instanceData,
|
||||
int mode
|
||||
){
|
||||
/* NO-OP */
|
||||
}
|
||||
static int incrblobHandle(ClientData instanceData, int dir, ClientData *hPtr){
|
||||
static int SQLITE_TCLAPI incrblobHandle(
|
||||
ClientData instanceData,
|
||||
int dir,
|
||||
ClientData *hPtr
|
||||
){
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -486,7 +503,7 @@ static void flushStmtCache(SqliteDb *pDb){
|
||||
** TCL calls this procedure when an sqlite3 database command is
|
||||
** deleted.
|
||||
*/
|
||||
static void DbDeleteCmd(void *db){
|
||||
static void SQLITE_TCLAPI DbDeleteCmd(void *db){
|
||||
SqliteDb *pDb = (SqliteDb*)db;
|
||||
flushStmtCache(pDb);
|
||||
closeIncrblobChannels(pDb);
|
||||
@@ -1134,7 +1151,7 @@ static char *local_getline(char *zPrompt, FILE *in){
|
||||
** It is invoked after evaluating the script SCRIPT to commit or rollback
|
||||
** the transaction or savepoint opened by the [transaction] command.
|
||||
*/
|
||||
static int DbTransPostCmd(
|
||||
static int SQLITE_TCLAPI DbTransPostCmd(
|
||||
ClientData data[], /* data[0] is the Sqlite3Db* for $db */
|
||||
Tcl_Interp *interp, /* Tcl interpreter */
|
||||
int result /* Result of evaluating SCRIPT */
|
||||
@@ -1681,7 +1698,7 @@ static int DbUseNre(void){
|
||||
**
|
||||
** $db eval SQL ?ARRAYNAME? SCRIPT
|
||||
*/
|
||||
static int DbEvalNextCmd(
|
||||
static int SQLITE_TCLAPI DbEvalNextCmd(
|
||||
ClientData data[], /* data[0] is the (DbEvalContext*) */
|
||||
Tcl_Interp *interp, /* Tcl interpreter */
|
||||
int result /* Result so far */
|
||||
@@ -1791,7 +1808,12 @@ static void DbHookCmd(
|
||||
** and calls that connection "db1". The second command causes this
|
||||
** subroutine to be invoked.
|
||||
*/
|
||||
static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
static int SQLITE_TCLAPI DbObjCmd(
|
||||
void *cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const*objv
|
||||
){
|
||||
SqliteDb *pDb = (SqliteDb*)cd;
|
||||
int choice;
|
||||
int rc = TCL_OK;
|
||||
@@ -3234,7 +3256,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
** Adaptor that provides an objCmd interface to the NRE-enabled
|
||||
** interface implementation.
|
||||
*/
|
||||
static int DbObjCmdAdaptor(
|
||||
static int SQLITE_TCLAPI DbObjCmdAdaptor(
|
||||
void *cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -3259,7 +3281,12 @@ static int DbObjCmdAdaptor(
|
||||
** The second argument is the name of the database file.
|
||||
**
|
||||
*/
|
||||
static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
static int SQLITE_TCLAPI DbMain(
|
||||
void *cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const*objv
|
||||
){
|
||||
SqliteDb *p;
|
||||
const char *zArg;
|
||||
char *zErrMsg;
|
||||
@@ -3779,7 +3806,12 @@ static void MD5DigestToBase10x8(unsigned char digest[16], char zDigest[50]){
|
||||
** A TCL command for md5. The argument is the text to be hashed. The
|
||||
** Result is the hash in base64.
|
||||
*/
|
||||
static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
|
||||
static int SQLITE_TCLAPI md5_cmd(
|
||||
void*cd,
|
||||
Tcl_Interp *interp,
|
||||
int argc,
|
||||
const char **argv
|
||||
){
|
||||
MD5Context ctx;
|
||||
unsigned char digest[16];
|
||||
char zBuf[50];
|
||||
@@ -3803,7 +3835,12 @@ static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
|
||||
** A TCL command to take the md5 hash of a file. The argument is the
|
||||
** name of the file.
|
||||
*/
|
||||
static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){
|
||||
static int SQLITE_TCLAPI md5file_cmd(
|
||||
void*cd,
|
||||
Tcl_Interp *interp,
|
||||
int argc,
|
||||
const char **argv
|
||||
){
|
||||
FILE *in;
|
||||
MD5Context ctx;
|
||||
void (*converter)(unsigned char*, char*);
|
||||
@@ -3883,7 +3920,11 @@ static void md5finalize(sqlite3_context *context){
|
||||
MD5DigestToBase16(digest, zBuf);
|
||||
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
int Md5_Register(sqlite3 *db){
|
||||
int Md5_Register(
|
||||
sqlite3 *db,
|
||||
char **pzErrMsg,
|
||||
const sqlite3_api_routines *pThunk
|
||||
){
|
||||
int rc = sqlite3_create_function(db, "md5sum", -1, SQLITE_UTF8, 0, 0,
|
||||
md5step, md5finalize);
|
||||
sqlite3_overload_function(db, "md5sum", -1); /* To exercise this API */
|
||||
@@ -3931,7 +3972,7 @@ static const char *tclsh_main_loop(void);
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
static void init_all(Tcl_Interp *);
|
||||
static int init_all_cmd(
|
||||
static int SQLITE_TCLAPI init_all_cmd(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -3961,7 +4002,7 @@ static int init_all_cmd(
|
||||
** to use the sqlite3_prepare_v2() function to prepare statements. If it
|
||||
** is false, sqlite3_prepare().
|
||||
*/
|
||||
static int db_use_legacy_prepare_cmd(
|
||||
static int SQLITE_TCLAPI db_use_legacy_prepare_cmd(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -3998,7 +4039,7 @@ static int db_use_legacy_prepare_cmd(
|
||||
** return the text representation of the most recently used statement
|
||||
** handle.
|
||||
*/
|
||||
static int db_last_stmt_ptr(
|
||||
static int SQLITE_TCLAPI db_last_stmt_ptr(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -4123,7 +4164,7 @@ static void init_all(Tcl_Interp *interp){
|
||||
Sqlitetesttclvar_Init(interp);
|
||||
Sqlitetestfs_Init(interp);
|
||||
SqlitetestThread_Init(interp);
|
||||
SqlitetestOnefile_Init(interp);
|
||||
SqlitetestOnefile_Init();
|
||||
SqlitetestOsinst_Init(interp);
|
||||
Sqlitetestbackup_Init(interp);
|
||||
Sqlitetestintarray_Init(interp);
|
||||
@@ -4167,7 +4208,7 @@ static void init_all(Tcl_Interp *interp){
|
||||
#endif
|
||||
|
||||
#define TCLSH_MAIN main /* Needed to fake out mktclapp */
|
||||
int TCLSH_MAIN(int argc, char **argv){
|
||||
int SQLITE_CDECL TCLSH_MAIN(int argc, char **argv){
|
||||
Tcl_Interp *interp;
|
||||
|
||||
#if !defined(_WIN32_WCE)
|
||||
|
||||
+186
-183
File diff suppressed because it is too large
Load Diff
+25
-21
@@ -14,7 +14,11 @@
|
||||
** testing of the SQLite library.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -38,7 +42,7 @@ static void pager_test_reiniter(DbPage *pNotUsed){
|
||||
**
|
||||
** Open a new pager
|
||||
*/
|
||||
static int pager_open(
|
||||
static int SQLITE_TCLAPI pager_open(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -75,7 +79,7 @@ static int pager_open(
|
||||
**
|
||||
** Close the given pager.
|
||||
*/
|
||||
static int pager_close(
|
||||
static int SQLITE_TCLAPI pager_close(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -102,7 +106,7 @@ static int pager_close(
|
||||
**
|
||||
** Rollback changes
|
||||
*/
|
||||
static int pager_rollback(
|
||||
static int SQLITE_TCLAPI pager_rollback(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -129,7 +133,7 @@ static int pager_rollback(
|
||||
**
|
||||
** Commit all changes
|
||||
*/
|
||||
static int pager_commit(
|
||||
static int SQLITE_TCLAPI pager_commit(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -161,7 +165,7 @@ static int pager_commit(
|
||||
**
|
||||
** Start a new checkpoint.
|
||||
*/
|
||||
static int pager_stmt_begin(
|
||||
static int SQLITE_TCLAPI pager_stmt_begin(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -188,7 +192,7 @@ static int pager_stmt_begin(
|
||||
**
|
||||
** Rollback changes to a checkpoint
|
||||
*/
|
||||
static int pager_stmt_rollback(
|
||||
static int SQLITE_TCLAPI pager_stmt_rollback(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -216,7 +220,7 @@ static int pager_stmt_rollback(
|
||||
**
|
||||
** Commit changes to a checkpoint
|
||||
*/
|
||||
static int pager_stmt_commit(
|
||||
static int SQLITE_TCLAPI pager_stmt_commit(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -243,7 +247,7 @@ static int pager_stmt_commit(
|
||||
**
|
||||
** Return pager statistics.
|
||||
*/
|
||||
static int pager_stats(
|
||||
static int SQLITE_TCLAPI pager_stats(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -276,7 +280,7 @@ static int pager_stats(
|
||||
**
|
||||
** Return the size of the database file.
|
||||
*/
|
||||
static int pager_pagecount(
|
||||
static int SQLITE_TCLAPI pager_pagecount(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -302,7 +306,7 @@ static int pager_pagecount(
|
||||
**
|
||||
** Return a pointer to a page from the database.
|
||||
*/
|
||||
static int page_get(
|
||||
static int SQLITE_TCLAPI page_get(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -339,7 +343,7 @@ static int page_get(
|
||||
** Return a pointer to a page if the page is already in cache.
|
||||
** If not in cache, return an empty string.
|
||||
*/
|
||||
static int page_lookup(
|
||||
static int SQLITE_TCLAPI page_lookup(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -367,7 +371,7 @@ static int page_lookup(
|
||||
/*
|
||||
** Usage: pager_truncate ID PGNO
|
||||
*/
|
||||
static int pager_truncate(
|
||||
static int SQLITE_TCLAPI pager_truncate(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -392,7 +396,7 @@ static int pager_truncate(
|
||||
**
|
||||
** Drop a pointer to a page.
|
||||
*/
|
||||
static int page_unref(
|
||||
static int SQLITE_TCLAPI page_unref(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -414,7 +418,7 @@ static int page_unref(
|
||||
**
|
||||
** Return the content of a page
|
||||
*/
|
||||
static int page_read(
|
||||
static int SQLITE_TCLAPI page_read(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -438,7 +442,7 @@ static int page_read(
|
||||
**
|
||||
** Return the page number for a page.
|
||||
*/
|
||||
static int page_number(
|
||||
static int SQLITE_TCLAPI page_number(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -462,7 +466,7 @@ static int page_number(
|
||||
**
|
||||
** Write something into a page.
|
||||
*/
|
||||
static int page_write(
|
||||
static int SQLITE_TCLAPI page_write(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -498,7 +502,7 @@ static int page_write(
|
||||
** new pages after N. If N is 2096 or bigger, this will test the
|
||||
** ability of SQLite to write to large files.
|
||||
*/
|
||||
static int fake_big_file(
|
||||
static int SQLITE_TCLAPI fake_big_file(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -551,7 +555,7 @@ static int fake_big_file(
|
||||
**
|
||||
** Set the PENDING_BYTE using the sqlite3_test_control() interface.
|
||||
*/
|
||||
static int testPendingByte(
|
||||
static int SQLITE_TCLAPI testPendingByte(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -616,7 +620,7 @@ static int faultSimCallback(int x){
|
||||
** appended, whenever sqlite3FaultSim() is called. Or, if SCRIPT is the
|
||||
** empty string, cancel the sqlite3FaultSim() callback.
|
||||
*/
|
||||
static int faultInstallCmd(
|
||||
static int SQLITE_TCLAPI faultInstallCmd(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -659,7 +663,7 @@ static int faultInstallCmd(
|
||||
** Invoke the SQLITE_TESTCTRL_BITVEC_TEST operator on test_control.
|
||||
** See comments on sqlite3BitvecBuiltinTest() for additional information.
|
||||
*/
|
||||
static int testBitvecBuiltinTest(
|
||||
static int SQLITE_TCLAPI testBitvecBuiltinTest(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
|
||||
+20
-16
@@ -15,7 +15,11 @@
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "btreeInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -33,7 +37,7 @@ static int nRefSqlite3 = 0;
|
||||
**
|
||||
** Open a new database
|
||||
*/
|
||||
static int btree_open(
|
||||
static int SQLITE_TCLAPI btree_open(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -79,7 +83,7 @@ static int btree_open(
|
||||
**
|
||||
** Close the given database.
|
||||
*/
|
||||
static int btree_close(
|
||||
static int SQLITE_TCLAPI btree_close(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -114,7 +118,7 @@ static int btree_close(
|
||||
**
|
||||
** Start a new transaction
|
||||
*/
|
||||
static int btree_begin_transaction(
|
||||
static int SQLITE_TCLAPI btree_begin_transaction(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -143,7 +147,7 @@ static int btree_begin_transaction(
|
||||
**
|
||||
** Returns pager statistics
|
||||
*/
|
||||
static int btree_pager_stats(
|
||||
static int SQLITE_TCLAPI btree_pager_stats(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -193,7 +197,7 @@ static int btree_pager_stats(
|
||||
**
|
||||
** Create a new cursor. Return the ID for the cursor.
|
||||
*/
|
||||
static int btree_cursor(
|
||||
static int SQLITE_TCLAPI btree_cursor(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -242,7 +246,7 @@ static int btree_cursor(
|
||||
**
|
||||
** Close a cursor opened using btree_cursor.
|
||||
*/
|
||||
static int btree_close_cursor(
|
||||
static int SQLITE_TCLAPI btree_close_cursor(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -279,7 +283,7 @@ static int btree_close_cursor(
|
||||
** or 1 if the cursor was already on the last entry in the table or if
|
||||
** the table is empty.
|
||||
*/
|
||||
static int btree_next(
|
||||
static int SQLITE_TCLAPI btree_next(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -314,7 +318,7 @@ static int btree_next(
|
||||
** Move the cursor to the first entry in the table. Return 0 if the
|
||||
** cursor was left point to something and 1 if the table is empty.
|
||||
*/
|
||||
static int btree_first(
|
||||
static int SQLITE_TCLAPI btree_first(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -349,7 +353,7 @@ static int btree_first(
|
||||
** Return TRUE if the given cursor is not pointing at a valid entry.
|
||||
** Return FALSE if the cursor does point to a valid entry.
|
||||
*/
|
||||
static int btree_eof(
|
||||
static int SQLITE_TCLAPI btree_eof(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -378,7 +382,7 @@ static int btree_eof(
|
||||
**
|
||||
** Return the number of bytes of payload
|
||||
*/
|
||||
static int btree_payload_size(
|
||||
static int SQLITE_TCLAPI btree_payload_size(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -416,7 +420,7 @@ static int btree_payload_size(
|
||||
** This command returns nothing if it works. It returns an error message
|
||||
** if something goes wrong.
|
||||
*/
|
||||
static int btree_varint_test(
|
||||
static int SQLITE_TCLAPI btree_varint_test(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -500,7 +504,7 @@ static int btree_varint_test(
|
||||
** sqlite3 db test.db
|
||||
** set bt [btree_from_db db]
|
||||
*/
|
||||
static int btree_from_db(
|
||||
static int SQLITE_TCLAPI btree_from_db(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -540,7 +544,7 @@ static int btree_from_db(
|
||||
**
|
||||
** Return true if the B-Tree is currently stored entirely in memory.
|
||||
*/
|
||||
static int btree_ismemdb(
|
||||
static int SQLITE_TCLAPI btree_ismemdb(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -571,7 +575,7 @@ static int btree_ismemdb(
|
||||
**
|
||||
** Set the size of the cache used by btree $ID.
|
||||
*/
|
||||
static int btree_set_cache_size(
|
||||
static int SQLITE_TCLAPI btree_set_cache_size(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -601,7 +605,7 @@ static int btree_set_cache_size(
|
||||
**
|
||||
** Set the size of the cache used by btree $ID.
|
||||
*/
|
||||
static int btree_insert(
|
||||
static int SQLITE_TCLAPI btree_insert(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+20
-16
@@ -12,7 +12,11 @@
|
||||
** Code for testing the SQLite library in a multithreaded environment.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#if SQLITE_OS_UNIX && SQLITE_THREADSAFE
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -121,7 +125,7 @@ static int parse_thread_id(Tcl_Interp *interp, const char *zArg){
|
||||
** NAME should be an upper case letter. Start the thread running with
|
||||
** an open connection to the given database.
|
||||
*/
|
||||
static int tcl_thread_create(
|
||||
static int SQLITE_TCLAPI tcl_thread_create(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -170,7 +174,7 @@ static void thread_wait(Thread *p){
|
||||
**
|
||||
** Wait on thread ID to reach its idle state.
|
||||
*/
|
||||
static int tcl_thread_wait(
|
||||
static int SQLITE_TCLAPI tcl_thread_wait(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -214,7 +218,7 @@ static void stop_thread(Thread *p){
|
||||
** Cause a thread to shut itself down. Wait for the shutdown to be
|
||||
** completed. If ID is "*" then stop all threads.
|
||||
*/
|
||||
static int tcl_thread_halt(
|
||||
static int SQLITE_TCLAPI tcl_thread_halt(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -249,7 +253,7 @@ static int tcl_thread_halt(
|
||||
** Wait on the most recent thread_step to complete, then return the
|
||||
** number of columns in the result set.
|
||||
*/
|
||||
static int tcl_thread_argc(
|
||||
static int SQLITE_TCLAPI tcl_thread_argc(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -281,7 +285,7 @@ static int tcl_thread_argc(
|
||||
** Wait on the most recent thread_step to complete, then return the
|
||||
** value of the N-th columns in the result set.
|
||||
*/
|
||||
static int tcl_thread_argv(
|
||||
static int SQLITE_TCLAPI tcl_thread_argv(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -317,7 +321,7 @@ static int tcl_thread_argv(
|
||||
** Wait on the most recent thread_step to complete, then return the
|
||||
** name of the N-th columns in the result set.
|
||||
*/
|
||||
static int tcl_thread_colname(
|
||||
static int SQLITE_TCLAPI tcl_thread_colname(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -353,7 +357,7 @@ static int tcl_thread_colname(
|
||||
** Wait on the most recent operation to complete, then return the
|
||||
** result code from that operation.
|
||||
*/
|
||||
static int tcl_thread_result(
|
||||
static int SQLITE_TCLAPI tcl_thread_result(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -385,7 +389,7 @@ static int tcl_thread_result(
|
||||
** Wait on the most recent operation to complete, then return the
|
||||
** error string.
|
||||
*/
|
||||
static int tcl_thread_error(
|
||||
static int SQLITE_TCLAPI tcl_thread_error(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -430,7 +434,7 @@ static void do_compile(Thread *p){
|
||||
**
|
||||
** Compile a new virtual machine.
|
||||
*/
|
||||
static int tcl_thread_compile(
|
||||
static int SQLITE_TCLAPI tcl_thread_compile(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -483,7 +487,7 @@ static void do_step(Thread *p){
|
||||
**
|
||||
** Advance the virtual machine by one step
|
||||
*/
|
||||
static int tcl_thread_step(
|
||||
static int SQLITE_TCLAPI tcl_thread_step(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -525,7 +529,7 @@ static void do_finalize(Thread *p){
|
||||
**
|
||||
** Finalize the virtual machine.
|
||||
*/
|
||||
static int tcl_thread_finalize(
|
||||
static int SQLITE_TCLAPI tcl_thread_finalize(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -556,7 +560,7 @@ static int tcl_thread_finalize(
|
||||
**
|
||||
** Interchange the sqlite* pointer between two threads.
|
||||
*/
|
||||
static int tcl_thread_swap(
|
||||
static int SQLITE_TCLAPI tcl_thread_swap(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -596,7 +600,7 @@ static int tcl_thread_swap(
|
||||
** remove the pointer from the thread itself. Afterwards, the thread
|
||||
** can be stopped and the connection can be used by the main thread.
|
||||
*/
|
||||
static int tcl_thread_db_get(
|
||||
static int SQLITE_TCLAPI tcl_thread_db_get(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -627,7 +631,7 @@ static int tcl_thread_db_get(
|
||||
** Usage: thread_db_put ID DB
|
||||
**
|
||||
*/
|
||||
static int tcl_thread_db_put(
|
||||
static int SQLITE_TCLAPI tcl_thread_db_put(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -659,7 +663,7 @@ static int tcl_thread_db_put(
|
||||
** Return the database stmt pointer for the given thread. Then
|
||||
** remove the pointer from the thread itself.
|
||||
*/
|
||||
static int tcl_thread_stmt_get(
|
||||
static int SQLITE_TCLAPI tcl_thread_stmt_get(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
|
||||
+9
-5
@@ -17,7 +17,11 @@
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -26,7 +30,7 @@
|
||||
** object with the encoded representation of the string, including
|
||||
** the NULL terminator.
|
||||
*/
|
||||
static int binarize(
|
||||
static int SQLITE_TCLAPI binarize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -54,7 +58,7 @@ static int binarize(
|
||||
** If <do-calls> is 0, then the calls to sqlite3_value_text() are not
|
||||
** actually made.
|
||||
*/
|
||||
static int test_value_overhead(
|
||||
static int SQLITE_TCLAPI test_value_overhead(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -118,7 +122,7 @@ static u8 name_to_enc(Tcl_Interp *interp, Tcl_Obj *pObj){
|
||||
** Usage: test_translate <string/blob> <from enc> <to enc> ?<transient>?
|
||||
**
|
||||
*/
|
||||
static int test_translate(
|
||||
static int SQLITE_TCLAPI test_translate(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -182,7 +186,7 @@ static int test_translate(
|
||||
** translation. If there is a problem an assert() will fail.
|
||||
**/
|
||||
void sqlite3UtfSelfTest(void);
|
||||
static int test_translate_selftest(
|
||||
static int SQLITE_TCLAPI test_translate_selftest(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+12
-8
@@ -16,7 +16,11 @@
|
||||
*/
|
||||
#if SQLITE_TEST /* This file is used for testing only */
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_OMIT_DISKIO /* This file is a no-op if disk I/O is disabled */
|
||||
|
||||
@@ -807,7 +811,7 @@ static int processDevSymArgs(
|
||||
** Simulate a crash immediately. This function does not return
|
||||
** (writeListSync() calls exit(-1)).
|
||||
*/
|
||||
static int crashNowCmd(
|
||||
static int SQLITE_TCLAPI crashNowCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -828,7 +832,7 @@ static int crashNowCmd(
|
||||
** Parameter ENABLE must be a boolean value. If true, then the "crash"
|
||||
** vfs is added to the system. If false, it is removed.
|
||||
*/
|
||||
static int crashEnableCmd(
|
||||
static int SQLITE_TCLAPI crashEnableCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -903,7 +907,7 @@ static int crashEnableCmd(
|
||||
** sqlite_crashparams -sect 1024 -char {atomic sequential} ./test.db 1
|
||||
**
|
||||
*/
|
||||
static int crashParamsObjCmd(
|
||||
static int SQLITE_TCLAPI crashParamsObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -950,7 +954,7 @@ error:
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
static int devSymObjCmd(
|
||||
static int SQLITE_TCLAPI devSymObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -973,7 +977,7 @@ static int devSymObjCmd(
|
||||
/*
|
||||
** tclcmd: unregister_devsim
|
||||
*/
|
||||
static int dsUnregisterObjCmd(
|
||||
static int SQLITE_TCLAPI dsUnregisterObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -993,7 +997,7 @@ static int dsUnregisterObjCmd(
|
||||
/*
|
||||
** tclcmd: register_jt_vfs ?-default? PARENT-VFS
|
||||
*/
|
||||
static int jtObjCmd(
|
||||
static int SQLITE_TCLAPI jtObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1031,7 +1035,7 @@ static int jtObjCmd(
|
||||
/*
|
||||
** tclcmd: unregister_jt_vfs
|
||||
*/
|
||||
static int jtUnregisterObjCmd(
|
||||
static int SQLITE_TCLAPI jtUnregisterObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+18
-14
@@ -13,7 +13,11 @@
|
||||
** Derived from test4.c.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
** This test only works on UNIX with a SQLITE_THREADSAFE build that includes
|
||||
@@ -149,7 +153,7 @@ static int parse_client_id(Tcl_Interp *interp, const char *zArg){
|
||||
** NAME should be an upper case letter. Start the thread running with
|
||||
** an open connection to the given database.
|
||||
*/
|
||||
static int tcl_client_create(
|
||||
static int SQLITE_TCLAPI tcl_client_create(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -202,7 +206,7 @@ static void client_wait(Thread *p){
|
||||
**
|
||||
** Wait on thread ID to reach its idle state.
|
||||
*/
|
||||
static int tcl_client_wait(
|
||||
static int SQLITE_TCLAPI tcl_client_wait(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -246,7 +250,7 @@ static void stop_thread(Thread *p){
|
||||
** Cause a client thread to shut itself down. Wait for the shutdown to be
|
||||
** completed. If ID is "*" then stop all client threads.
|
||||
*/
|
||||
static int tcl_client_halt(
|
||||
static int SQLITE_TCLAPI tcl_client_halt(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -294,7 +298,7 @@ static int tcl_client_halt(
|
||||
** Wait on the most recent client_step to complete, then return the
|
||||
** number of columns in the result set.
|
||||
*/
|
||||
static int tcl_client_argc(
|
||||
static int SQLITE_TCLAPI tcl_client_argc(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -326,7 +330,7 @@ static int tcl_client_argc(
|
||||
** Wait on the most recent client_step to complete, then return the
|
||||
** value of the N-th columns in the result set.
|
||||
*/
|
||||
static int tcl_client_argv(
|
||||
static int SQLITE_TCLAPI tcl_client_argv(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -362,7 +366,7 @@ static int tcl_client_argv(
|
||||
** Wait on the most recent client_step to complete, then return the
|
||||
** name of the N-th columns in the result set.
|
||||
*/
|
||||
static int tcl_client_colname(
|
||||
static int SQLITE_TCLAPI tcl_client_colname(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -400,7 +404,7 @@ extern const char *sqlite3ErrName(int);
|
||||
** Wait on the most recent operation to complete, then return the
|
||||
** result code from that operation.
|
||||
*/
|
||||
static int tcl_client_result(
|
||||
static int SQLITE_TCLAPI tcl_client_result(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -432,7 +436,7 @@ static int tcl_client_result(
|
||||
** Wait on the most recent operation to complete, then return the
|
||||
** error string.
|
||||
*/
|
||||
static int tcl_client_error(
|
||||
static int SQLITE_TCLAPI tcl_client_error(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -477,7 +481,7 @@ static void do_compile(Thread *p){
|
||||
**
|
||||
** Compile a new virtual machine.
|
||||
*/
|
||||
static int tcl_client_compile(
|
||||
static int SQLITE_TCLAPI tcl_client_compile(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -530,7 +534,7 @@ static void do_step(Thread *p){
|
||||
**
|
||||
** Advance the virtual machine by one step
|
||||
*/
|
||||
static int tcl_client_step(
|
||||
static int SQLITE_TCLAPI tcl_client_step(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -572,7 +576,7 @@ static void do_finalize(Thread *p){
|
||||
**
|
||||
** Finalize the virtual machine.
|
||||
*/
|
||||
static int tcl_client_finalize(
|
||||
static int SQLITE_TCLAPI tcl_client_finalize(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -616,7 +620,7 @@ static void do_reset(Thread *p){
|
||||
**
|
||||
** Finalize the virtual machine.
|
||||
*/
|
||||
static int tcl_client_reset(
|
||||
static int SQLITE_TCLAPI tcl_client_reset(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
@@ -647,7 +651,7 @@ static int tcl_client_reset(
|
||||
**
|
||||
** Interchange the sqlite* pointer between two threads.
|
||||
*/
|
||||
static int tcl_client_swap(
|
||||
static int SQLITE_TCLAPI tcl_client_swap(
|
||||
void *NotUsed,
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int argc, /* Number of arguments */
|
||||
|
||||
+7
-3
@@ -14,7 +14,11 @@
|
||||
** testing of the SQLite library.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -1353,7 +1357,7 @@ static void moduleDestroy(void *p){
|
||||
/*
|
||||
** Register the echo virtual table module.
|
||||
*/
|
||||
static int register_echo_module(
|
||||
static int SQLITE_TCLAPI register_echo_module(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -1393,7 +1397,7 @@ static int register_echo_module(
|
||||
**
|
||||
** sqlite3_declare_vtab DB SQL
|
||||
*/
|
||||
static int declare_vtab(
|
||||
static int SQLITE_TCLAPI declare_vtab(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+8
-4
@@ -15,14 +15,18 @@
|
||||
** as there is not much point in binding to Tcl.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
** c_collation_test
|
||||
*/
|
||||
static int c_collation_test(
|
||||
static int SQLITE_TCLAPI c_collation_test(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -63,7 +67,7 @@ error_out:
|
||||
/*
|
||||
** c_realloc_test
|
||||
*/
|
||||
static int c_realloc_test(
|
||||
static int SQLITE_TCLAPI c_realloc_test(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -104,7 +108,7 @@ error_out:
|
||||
/*
|
||||
** c_misuse_test
|
||||
*/
|
||||
static int c_misuse_test(
|
||||
static int SQLITE_TCLAPI c_misuse_test(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+13
-6
@@ -15,7 +15,14 @@
|
||||
*/
|
||||
|
||||
#define TCL_THREADS
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_ENABLE_ASYNCIO
|
||||
|
||||
@@ -36,7 +43,7 @@ TCL_DECLARE_MUTEX(testasync_g_writerMutex);
|
||||
/*
|
||||
** sqlite3async_initialize PARENT-VFS ISDEFAULT
|
||||
*/
|
||||
static int testAsyncInit(
|
||||
static int SQLITE_TCLAPI testAsyncInit(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -69,7 +76,7 @@ static int testAsyncInit(
|
||||
/*
|
||||
** sqlite3async_shutdown
|
||||
*/
|
||||
static int testAsyncShutdown(
|
||||
static int SQLITE_TCLAPI testAsyncShutdown(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -93,7 +100,7 @@ static Tcl_ThreadCreateType tclWriterThread(ClientData pIsStarted){
|
||||
**
|
||||
** Start a new writer thread.
|
||||
*/
|
||||
static int testAsyncStart(
|
||||
static int SQLITE_TCLAPI testAsyncStart(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -125,7 +132,7 @@ static int testAsyncStart(
|
||||
** If the current writer thread is set to run forever then this
|
||||
** command would block forever. To prevent that, an error is returned.
|
||||
*/
|
||||
static int testAsyncWait(
|
||||
static int SQLITE_TCLAPI testAsyncWait(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -151,7 +158,7 @@ static int testAsyncWait(
|
||||
/*
|
||||
** sqlite3async_control OPTION ?VALUE?
|
||||
*/
|
||||
static int testAsyncControl(
|
||||
static int SQLITE_TCLAPI testAsyncControl(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+21
-14
@@ -11,7 +11,14 @@
|
||||
*************************************************************************
|
||||
** Test extension for testing the sqlite3_auto_extension() function.
|
||||
*/
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
#include "sqlite3ext.h"
|
||||
|
||||
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
||||
@@ -87,13 +94,13 @@ static int broken_init(
|
||||
**
|
||||
** Register the "sqr" extension to be loaded automatically.
|
||||
*/
|
||||
static int autoExtSqrObjCmd(
|
||||
static int SQLITE_TCLAPI autoExtSqrObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
int rc = sqlite3_auto_extension((void*)sqr_init);
|
||||
int rc = sqlite3_auto_extension((void(*)(void))sqr_init);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -103,13 +110,13 @@ static int autoExtSqrObjCmd(
|
||||
**
|
||||
** Unregister the "sqr" extension.
|
||||
*/
|
||||
static int cancelAutoExtSqrObjCmd(
|
||||
static int SQLITE_TCLAPI cancelAutoExtSqrObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
int rc = sqlite3_cancel_auto_extension((void*)sqr_init);
|
||||
int rc = sqlite3_cancel_auto_extension((void(*)(void))sqr_init);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -119,13 +126,13 @@ static int cancelAutoExtSqrObjCmd(
|
||||
**
|
||||
** Register the "cube" extension to be loaded automatically.
|
||||
*/
|
||||
static int autoExtCubeObjCmd(
|
||||
static int SQLITE_TCLAPI autoExtCubeObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
int rc = sqlite3_auto_extension((void*)cube_init);
|
||||
int rc = sqlite3_auto_extension((void(*)(void))cube_init);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -135,13 +142,13 @@ static int autoExtCubeObjCmd(
|
||||
**
|
||||
** Unregister the "cube" extension.
|
||||
*/
|
||||
static int cancelAutoExtCubeObjCmd(
|
||||
static int SQLITE_TCLAPI cancelAutoExtCubeObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
int rc = sqlite3_cancel_auto_extension((void*)cube_init);
|
||||
int rc = sqlite3_cancel_auto_extension((void(*)(void))cube_init);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -151,13 +158,13 @@ static int cancelAutoExtCubeObjCmd(
|
||||
**
|
||||
** Register the broken extension to be loaded automatically.
|
||||
*/
|
||||
static int autoExtBrokenObjCmd(
|
||||
static int SQLITE_TCLAPI autoExtBrokenObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
int rc = sqlite3_auto_extension((void*)broken_init);
|
||||
int rc = sqlite3_auto_extension((void(*)(void))broken_init);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -167,13 +174,13 @@ static int autoExtBrokenObjCmd(
|
||||
**
|
||||
** Unregister the broken extension.
|
||||
*/
|
||||
static int cancelAutoExtBrokenObjCmd(
|
||||
static int SQLITE_TCLAPI cancelAutoExtBrokenObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
int rc = sqlite3_cancel_auto_extension((void*)broken_init);
|
||||
int rc = sqlite3_cancel_auto_extension((void(*)(void))broken_init);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -186,7 +193,7 @@ static int cancelAutoExtBrokenObjCmd(
|
||||
**
|
||||
** Reset all auto-extensions
|
||||
*/
|
||||
static int resetAutoExtObjCmd(
|
||||
static int SQLITE_TCLAPI resetAutoExtObjCmd(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+11
-4
@@ -13,7 +13,14 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
#include "sqlite3.h"
|
||||
#include <assert.h>
|
||||
|
||||
@@ -23,7 +30,7 @@ extern const char *sqlite3ErrName(int);
|
||||
/* These functions are implemented in test1.c. */
|
||||
extern int getDbPointer(Tcl_Interp *, const char *, sqlite3 **);
|
||||
|
||||
static int backupTestCmd(
|
||||
static int SQLITE_TCLAPI backupTestCmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -98,7 +105,7 @@ static int backupTestCmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static void backupTestFinish(ClientData clientData){
|
||||
static void SQLITE_TCLAPI backupTestFinish(ClientData clientData){
|
||||
sqlite3_backup *pBackup = (sqlite3_backup *)clientData;
|
||||
sqlite3_backup_finish(pBackup);
|
||||
}
|
||||
@@ -107,7 +114,7 @@ static void backupTestFinish(ClientData clientData){
|
||||
** sqlite3_backup CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME
|
||||
**
|
||||
*/
|
||||
static int backupTestInit(
|
||||
static int SQLITE_TCLAPI backupTestInit(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
@@ -93,7 +93,11 @@
|
||||
|
||||
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
|
||||
@@ -563,7 +567,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
||||
/*
|
||||
** Register the echo virtual table module.
|
||||
*/
|
||||
static int register_tcl_module(
|
||||
static int SQLITE_TCLAPI register_tcl_module(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+10
-6
@@ -12,7 +12,11 @@
|
||||
**
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@@ -95,7 +99,7 @@ static char *blobStringFromObj(Tcl_Obj *pObj){
|
||||
**
|
||||
** Tcl test harness for the sqlite3_blob_open() function.
|
||||
*/
|
||||
static int test_blob_open(
|
||||
static int SQLITE_TCLAPI test_blob_open(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* Calling TCL interpreter */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -146,7 +150,7 @@ static int test_blob_open(
|
||||
/*
|
||||
** sqlite3_blob_close HANDLE
|
||||
*/
|
||||
static int test_blob_close(
|
||||
static int SQLITE_TCLAPI test_blob_close(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -174,7 +178,7 @@ static int test_blob_close(
|
||||
/*
|
||||
** sqlite3_blob_bytes HANDLE
|
||||
*/
|
||||
static int test_blob_bytes(
|
||||
static int SQLITE_TCLAPI test_blob_bytes(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -210,7 +214,7 @@ static int test_blob_bytes(
|
||||
** text representation of the returned error code (i.e. "SQLITE_NOMEM")
|
||||
** and a Tcl exception is thrown.
|
||||
*/
|
||||
static int test_blob_read(
|
||||
static int SQLITE_TCLAPI test_blob_read(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -262,7 +266,7 @@ static int test_blob_read(
|
||||
** result is set to the text representation of the returned error code
|
||||
** (i.e. "SQLITE_NOMEM") and a Tcl exception is thrown.
|
||||
*/
|
||||
static int test_blob_write(
|
||||
static int SQLITE_TCLAPI test_blob_write(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+6
-2
@@ -14,7 +14,11 @@
|
||||
** testing of the SQLite library.
|
||||
*/
|
||||
#include "btreeInt.h"
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Usage: sqlite3_shared_cache_report
|
||||
@@ -22,7 +26,7 @@
|
||||
** Return a list of file that are shared and the number of
|
||||
** references to each file.
|
||||
*/
|
||||
int sqlite3BtreeSharedCacheReport(
|
||||
int SQLITE_TCLAPI sqlite3BtreeSharedCacheReport(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@
|
||||
# include "os_win.h"
|
||||
#endif
|
||||
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
+10
-3
@@ -641,10 +641,17 @@ sqlite3_vfs *sqlite3_demovfs(void){
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if SQLITE_OS_UNIX
|
||||
static int register_demovfs(
|
||||
static int SQLITE_TCLAPI register_demovfs(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -653,7 +660,7 @@ static int register_demovfs(
|
||||
sqlite3_vfs_register(sqlite3_demovfs(), 1);
|
||||
return TCL_OK;
|
||||
}
|
||||
static int unregister_demovfs(
|
||||
static int SQLITE_TCLAPI unregister_demovfs(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+12
-4
@@ -62,7 +62,11 @@
|
||||
** SELECT * FROM fstree WHERE path LIKE '/home/dan/sqlite/%'
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -495,9 +499,13 @@ static int fstreeFilter(
|
||||
char aWild[2] = { '\0', '\0' };
|
||||
|
||||
#if SQLITE_OS_WIN
|
||||
zRoot = sqlite3_mprintf("%s%c", getenv("SystemDrive"), '/');
|
||||
const char *zDrive = windirent_getenv("fstreeDrive");
|
||||
if( zDrive==0 ){
|
||||
zDrive = windirent_getenv("SystemDrive");
|
||||
}
|
||||
zRoot = sqlite3_mprintf("%s%c", zDrive, '/');
|
||||
nRoot = sqlite3Strlen30(zRoot);
|
||||
zPrefix = sqlite3_mprintf("%s", getenv("SystemDrive"));
|
||||
zPrefix = sqlite3_mprintf("%s", zDrive);
|
||||
nPrefix = sqlite3Strlen30(zPrefix);
|
||||
#else
|
||||
zRoot = "/";
|
||||
@@ -871,7 +879,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
||||
/*
|
||||
** Register the echo virtual table module.
|
||||
*/
|
||||
static int register_fs_module(
|
||||
static int SQLITE_TCLAPI register_fs_module(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+19
-11
@@ -13,7 +13,11 @@
|
||||
** implements new SQL functions used by the test scripts.
|
||||
*/
|
||||
#include "sqlite3.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@@ -21,7 +25,6 @@
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
|
||||
|
||||
/*
|
||||
** Allocate nByte bytes of space using sqlite3_malloc(). If the
|
||||
** allocation fails, call sqlite3_result_error_nomem() to notify
|
||||
@@ -640,7 +643,11 @@ static void test_setsubtype(
|
||||
sqlite3_result_subtype(context, (unsigned int)sqlite3_value_int(argv[1]));
|
||||
}
|
||||
|
||||
static int registerTestFunctions(sqlite3 *db){
|
||||
static int registerTestFunctions(
|
||||
sqlite3 *db,
|
||||
char **pzErrMsg,
|
||||
const sqlite3_api_routines *pThunk
|
||||
){
|
||||
static const struct {
|
||||
char *zName;
|
||||
signed char nArg;
|
||||
@@ -689,16 +696,16 @@ static int registerTestFunctions(sqlite3 *db){
|
||||
** the standard set of test functions to be loaded into each new
|
||||
** database connection.
|
||||
*/
|
||||
static int autoinstall_test_funcs(
|
||||
static int SQLITE_TCLAPI autoinstall_test_funcs(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
extern int Md5_Register(sqlite3*);
|
||||
int rc = sqlite3_auto_extension((void*)registerTestFunctions);
|
||||
extern int Md5_Register(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
int rc = sqlite3_auto_extension((void(*)(void))registerTestFunctions);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_auto_extension((void*)Md5_Register);
|
||||
rc = sqlite3_auto_extension((void(*)(void))Md5_Register);
|
||||
}
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return TCL_OK;
|
||||
@@ -717,7 +724,7 @@ static void tFinal(sqlite3_context *a){}
|
||||
** Make various calls to sqlite3_create_function that do not have valid
|
||||
** parameters. Verify that the error condition is detected and reported.
|
||||
*/
|
||||
static int abuse_create_function(
|
||||
static int SQLITE_TCLAPI abuse_create_function(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -783,6 +790,7 @@ abuse_err:
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Register commands with the TCL interpreter.
|
||||
*/
|
||||
@@ -795,13 +803,13 @@ int Sqlitetest_func_Init(Tcl_Interp *interp){
|
||||
{ "abuse_create_function", abuse_create_function },
|
||||
};
|
||||
int i;
|
||||
extern int Md5_Register(sqlite3*);
|
||||
extern int Md5_Register(sqlite3 *, char **, const sqlite3_api_routines *);
|
||||
|
||||
for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){
|
||||
Tcl_CreateObjCommand(interp, aObjCmd[i].zName, aObjCmd[i].xProc, 0, 0);
|
||||
}
|
||||
sqlite3_initialize();
|
||||
sqlite3_auto_extension((void*)registerTestFunctions);
|
||||
sqlite3_auto_extension((void*)Md5_Register);
|
||||
sqlite3_auto_extension((void(*)(void))registerTestFunctions);
|
||||
sqlite3_auto_extension((void(*)(void))Md5_Register);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
+12
-8
@@ -18,7 +18,11 @@
|
||||
** easier and safer to build our own mechanism.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@@ -94,7 +98,7 @@ int sqlite3TestHexToBin(const unsigned char *zIn, int N, unsigned char *aOut){
|
||||
** beginning of the file. Convert that information to hexadecimal
|
||||
** and return the resulting HEX string.
|
||||
*/
|
||||
static int hexio_read(
|
||||
static int SQLITE_TCLAPI hexio_read(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -144,7 +148,7 @@ static int hexio_read(
|
||||
** Write DATA into file FILENAME beginning at OFFSET from the
|
||||
** beginning of the file. DATA is expressed in hexadecimal.
|
||||
*/
|
||||
static int hexio_write(
|
||||
static int SQLITE_TCLAPI hexio_write(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -192,7 +196,7 @@ static int hexio_write(
|
||||
** the value of that integer. HEXDATA can contain between 2 and 8
|
||||
** hexadecimal digits.
|
||||
*/
|
||||
static int hexio_get_int(
|
||||
static int SQLITE_TCLAPI hexio_get_int(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -232,7 +236,7 @@ static int hexio_get_int(
|
||||
**
|
||||
** Render INTEGER has a 16-bit big-endian integer in hexadecimal.
|
||||
*/
|
||||
static int hexio_render_int16(
|
||||
static int SQLITE_TCLAPI hexio_render_int16(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -259,7 +263,7 @@ static int hexio_render_int16(
|
||||
**
|
||||
** Render INTEGER has a 32-bit big-endian integer in hexadecimal.
|
||||
*/
|
||||
static int hexio_render_int32(
|
||||
static int SQLITE_TCLAPI hexio_render_int32(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -289,7 +293,7 @@ static int hexio_render_int32(
|
||||
** The UTF8 might not be well-formed. Run this string through
|
||||
** sqlite3Utf8to8() convert it back to hex and return the result.
|
||||
*/
|
||||
static int utf8_to_utf8(
|
||||
static int SQLITE_TCLAPI utf8_to_utf8(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -340,7 +344,7 @@ static int getFts3Varint(const char *p, sqlite_int64 *v){
|
||||
** Read a varint from the start of BLOB. Set variable VARNAME to contain
|
||||
** the interpreted value. Return the number of bytes of BLOB consumed.
|
||||
*/
|
||||
static int read_fts3varint(
|
||||
static int SQLITE_TCLAPI read_fts3varint(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+9
-5
@@ -27,7 +27,11 @@
|
||||
|
||||
#include "sqliteInt.h"
|
||||
#include <string.h>
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
static struct Wrapped {
|
||||
sqlite3_pcache_methods2 pcache;
|
||||
@@ -184,7 +188,7 @@ static void installInitWrappers(void){
|
||||
sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcachemethods);
|
||||
}
|
||||
|
||||
static int init_wrapper_install(
|
||||
static int SQLITE_TCLAPI init_wrapper_install(
|
||||
ClientData clientData, /* Unused */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -208,7 +212,7 @@ static int init_wrapper_install(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int init_wrapper_uninstall(
|
||||
static int SQLITE_TCLAPI init_wrapper_uninstall(
|
||||
ClientData clientData, /* Unused */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -226,7 +230,7 @@ static int init_wrapper_uninstall(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int init_wrapper_clear(
|
||||
static int SQLITE_TCLAPI init_wrapper_clear(
|
||||
ClientData clientData, /* Unused */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -243,7 +247,7 @@ static int init_wrapper_clear(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int init_wrapper_query(
|
||||
static int SQLITE_TCLAPI init_wrapper_query(
|
||||
ClientData clientData, /* Unused */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+10
-3
@@ -270,7 +270,14 @@ SQLITE_API int sqlite3_intarray_bind(
|
||||
** Everything below is interface for testing this module.
|
||||
*/
|
||||
#ifdef SQLITE_TEST
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Routines to encode and decode pointers
|
||||
@@ -286,7 +293,7 @@ extern const char *sqlite3ErrName(int);
|
||||
** Invoke the sqlite3_intarray_create interface. A string that becomes
|
||||
** the first parameter to sqlite3_intarray_bind.
|
||||
*/
|
||||
static int test_intarray_create(
|
||||
static int SQLITE_TCLAPI test_intarray_create(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
@@ -322,7 +329,7 @@ static int test_intarray_create(
|
||||
**
|
||||
** Invoke the sqlite3_intarray_bind interface on the given array of integers.
|
||||
*/
|
||||
static int test_intarray_bind(
|
||||
static int SQLITE_TCLAPI test_intarray_bind(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+37
-33
@@ -14,7 +14,11 @@
|
||||
** memory allocation subsystem.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@@ -306,7 +310,7 @@ static int textToPointer(const char *z, void **pp){
|
||||
**
|
||||
** Raw test interface for sqlite3_malloc().
|
||||
*/
|
||||
static int test_malloc(
|
||||
static int SQLITE_TCLAPI test_malloc(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -331,7 +335,7 @@ static int test_malloc(
|
||||
**
|
||||
** Raw test interface for sqlite3_realloc().
|
||||
*/
|
||||
static int test_realloc(
|
||||
static int SQLITE_TCLAPI test_realloc(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -360,7 +364,7 @@ static int test_realloc(
|
||||
**
|
||||
** Raw test interface for sqlite3_free().
|
||||
*/
|
||||
static int test_free(
|
||||
static int SQLITE_TCLAPI test_free(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -391,7 +395,7 @@ int sqlite3TestBinToHex(char*,int);
|
||||
** Set a chunk of memory (obtained from malloc, probably) to a
|
||||
** specified hex pattern.
|
||||
*/
|
||||
static int test_memset(
|
||||
static int SQLITE_TCLAPI test_memset(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -437,7 +441,7 @@ static int test_memset(
|
||||
**
|
||||
** Return memory as hexadecimal text.
|
||||
*/
|
||||
static int test_memget(
|
||||
static int SQLITE_TCLAPI test_memget(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -484,7 +488,7 @@ static int test_memget(
|
||||
**
|
||||
** Raw test interface for sqlite3_memory_used().
|
||||
*/
|
||||
static int test_memory_used(
|
||||
static int SQLITE_TCLAPI test_memory_used(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -499,7 +503,7 @@ static int test_memory_used(
|
||||
**
|
||||
** Raw test interface for sqlite3_memory_highwater().
|
||||
*/
|
||||
static int test_memory_highwater(
|
||||
static int SQLITE_TCLAPI test_memory_highwater(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -524,7 +528,7 @@ static int test_memory_highwater(
|
||||
** Set the depth of backtracing. If SQLITE_MEMDEBUG is not defined
|
||||
** then this routine is a no-op.
|
||||
*/
|
||||
static int test_memdebug_backtrace(
|
||||
static int SQLITE_TCLAPI test_memdebug_backtrace(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -550,7 +554,7 @@ static int test_memdebug_backtrace(
|
||||
**
|
||||
** Write a summary of unfreed memory to FILENAME.
|
||||
*/
|
||||
static int test_memdebug_dump(
|
||||
static int SQLITE_TCLAPI test_memdebug_dump(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -575,7 +579,7 @@ static int test_memdebug_dump(
|
||||
**
|
||||
** Return the total number of times malloc() has been called.
|
||||
*/
|
||||
static int test_memdebug_malloc_count(
|
||||
static int SQLITE_TCLAPI test_memdebug_malloc_count(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -615,7 +619,7 @@ static int test_memdebug_malloc_count(
|
||||
**
|
||||
** To disable simulated failures, use a COUNTER of -1.
|
||||
*/
|
||||
static int test_memdebug_fail(
|
||||
static int SQLITE_TCLAPI test_memdebug_fail(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -681,7 +685,7 @@ static int test_memdebug_fail(
|
||||
** simulated failure occurs. A negative return value indicates that
|
||||
** no malloc() failure is scheduled.
|
||||
*/
|
||||
static int test_memdebug_pending(
|
||||
static int SQLITE_TCLAPI test_memdebug_pending(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -714,7 +718,7 @@ static int sqlite3_memdebug_title_count = 0;
|
||||
**
|
||||
** Each title overwrite the previous.
|
||||
*/
|
||||
static int test_memdebug_settitle(
|
||||
static int SQLITE_TCLAPI test_memdebug_settitle(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -795,7 +799,7 @@ static void test_memdebug_log_clear(void){
|
||||
Tcl_InitHashTable(&aMallocLog, MALLOC_LOG_KEYINTS);
|
||||
}
|
||||
|
||||
static int test_memdebug_log(
|
||||
static int SQLITE_TCLAPI test_memdebug_log(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -893,7 +897,7 @@ static int test_memdebug_log(
|
||||
**
|
||||
** A negative SIZE causes the buffer pointer to be NULL.
|
||||
*/
|
||||
static int test_config_scratch(
|
||||
static int SQLITE_TCLAPI test_config_scratch(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -933,7 +937,7 @@ static int test_config_scratch(
|
||||
**
|
||||
** A negative SIZE causes the buffer pointer to be NULL.
|
||||
*/
|
||||
static int test_config_pagecache(
|
||||
static int SQLITE_TCLAPI test_config_pagecache(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -976,7 +980,7 @@ static int test_config_pagecache(
|
||||
** is certainty. 0 is never. PRNG_SEED is the pseudo-random number generator
|
||||
** seed.
|
||||
*/
|
||||
static int test_alt_pcache(
|
||||
static int SQLITE_TCLAPI test_alt_pcache(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1017,7 +1021,7 @@ static int test_alt_pcache(
|
||||
**
|
||||
** Enable or disable memory status reporting using SQLITE_CONFIG_MEMSTATUS.
|
||||
*/
|
||||
static int test_config_memstatus(
|
||||
static int SQLITE_TCLAPI test_config_memstatus(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1038,7 +1042,7 @@ static int test_config_memstatus(
|
||||
** Usage: sqlite3_config_lookaside SIZE COUNT
|
||||
**
|
||||
*/
|
||||
static int test_config_lookaside(
|
||||
static int SQLITE_TCLAPI test_config_lookaside(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1072,7 +1076,7 @@ static int test_config_lookaside(
|
||||
** is 10KB in size. A BUFID of 0 indicates that the buffer should be NULL
|
||||
** which will cause sqlite3_db_config() to allocate space on its own.
|
||||
*/
|
||||
static int test_db_config_lookaside(
|
||||
static int SQLITE_TCLAPI test_db_config_lookaside(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1107,7 +1111,7 @@ static int test_db_config_lookaside(
|
||||
/*
|
||||
** Usage: sqlite3_config_heap NBYTE NMINALLOC
|
||||
*/
|
||||
static int test_config_heap(
|
||||
static int SQLITE_TCLAPI test_config_heap(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1144,7 +1148,7 @@ static int test_config_heap(
|
||||
/*
|
||||
** Usage: sqlite3_config_heap_size NBYTE
|
||||
*/
|
||||
static int test_config_heap_size(
|
||||
static int SQLITE_TCLAPI test_config_heap_size(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1174,7 +1178,7 @@ static int test_config_heap_size(
|
||||
** Invoke sqlite3_config() or sqlite3_db_config() with invalid
|
||||
** opcodes and verify that they return errors.
|
||||
*/
|
||||
static int test_config_error(
|
||||
static int SQLITE_TCLAPI test_config_error(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1212,7 +1216,7 @@ static int test_config_error(
|
||||
** Enables or disables interpretation of URI parameters by default using
|
||||
** SQLITE_CONFIG_URI.
|
||||
*/
|
||||
static int test_config_uri(
|
||||
static int SQLITE_TCLAPI test_config_uri(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1241,7 +1245,7 @@ static int test_config_uri(
|
||||
** Enables or disables the use of the covering-index scan optimization.
|
||||
** SQLITE_CONFIG_COVERING_INDEX_SCAN.
|
||||
*/
|
||||
static int test_config_cis(
|
||||
static int SQLITE_TCLAPI test_config_cis(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1269,7 +1273,7 @@ static int test_config_cis(
|
||||
**
|
||||
** Set the minimum PMA size.
|
||||
*/
|
||||
static int test_config_pmasz(
|
||||
static int SQLITE_TCLAPI test_config_pmasz(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1299,7 +1303,7 @@ static int test_config_pmasz(
|
||||
**
|
||||
** Write a summary of unfreed memsys3 allocations to FILENAME.
|
||||
*/
|
||||
static int test_dump_memsys3(
|
||||
static int SQLITE_TCLAPI test_dump_memsys3(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1335,7 +1339,7 @@ static int test_dump_memsys3(
|
||||
** Return a list of three elements which are the sqlite3_status() return
|
||||
** code, the current value, and the high-water mark value.
|
||||
*/
|
||||
static int test_status(
|
||||
static int SQLITE_TCLAPI test_status(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1392,7 +1396,7 @@ static int test_status(
|
||||
** Return a list of three elements which are the sqlite3_db_status() return
|
||||
** code, the current value, and the high-water mark value.
|
||||
*/
|
||||
static int test_db_status(
|
||||
static int SQLITE_TCLAPI test_db_status(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1453,7 +1457,7 @@ static int test_db_status(
|
||||
/*
|
||||
** install_malloc_faultsim BOOLEAN
|
||||
*/
|
||||
static int test_install_malloc_faultsim(
|
||||
static int SQLITE_TCLAPI test_install_malloc_faultsim(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1477,7 +1481,7 @@ static int test_install_malloc_faultsim(
|
||||
/*
|
||||
** sqlite3_install_memsys3
|
||||
*/
|
||||
static int test_install_memsys3(
|
||||
static int SQLITE_TCLAPI test_install_memsys3(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1492,7 +1496,7 @@ static int test_install_memsys3(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_vfs_oom_test(
|
||||
static int SQLITE_TCLAPI test_vfs_oom_test(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+13
-6
@@ -1197,7 +1197,7 @@ int sqlite3_multiplex_initialize(const char *zOrigVfsName, int makeDefault){
|
||||
gMultiplex.sIoMethodsV2.xShmUnmap = multiplexShmUnmap;
|
||||
sqlite3_vfs_register(&gMultiplex.sThisVfs, makeDefault);
|
||||
|
||||
sqlite3_auto_extension((void*)multiplexFuncInit);
|
||||
sqlite3_auto_extension((void(*)(void))multiplexFuncInit);
|
||||
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -1229,14 +1229,21 @@ int sqlite3_multiplex_shutdown(int eForce){
|
||||
|
||||
/***************************** Test Code ***********************************/
|
||||
#ifdef SQLITE_TEST
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
extern const char *sqlite3ErrName(int);
|
||||
|
||||
|
||||
/*
|
||||
** tclcmd: sqlite3_multiplex_initialize NAME MAKEDEFAULT
|
||||
*/
|
||||
static int test_multiplex_initialize(
|
||||
static int SQLITE_TCLAPI test_multiplex_initialize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1267,7 +1274,7 @@ static int test_multiplex_initialize(
|
||||
/*
|
||||
** tclcmd: sqlite3_multiplex_shutdown
|
||||
*/
|
||||
static int test_multiplex_shutdown(
|
||||
static int SQLITE_TCLAPI test_multiplex_shutdown(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1295,7 +1302,7 @@ static int test_multiplex_shutdown(
|
||||
/*
|
||||
** tclcmd: sqlite3_multiplex_dump
|
||||
*/
|
||||
static int test_multiplex_dump(
|
||||
static int SQLITE_TCLAPI test_multiplex_dump(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1350,7 +1357,7 @@ static int test_multiplex_dump(
|
||||
/*
|
||||
** Tclcmd: test_multiplex_control HANDLE DBNAME SUB-COMMAND ?INT-VALUE?
|
||||
*/
|
||||
static int test_multiplex_control(
|
||||
static int SQLITE_TCLAPI test_multiplex_control(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+16
-12
@@ -12,7 +12,11 @@
|
||||
** This file contains test logic for the sqlite3_mutex interfaces.
|
||||
*/
|
||||
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include "sqlite3.h"
|
||||
#include "sqliteInt.h"
|
||||
#include <stdlib.h>
|
||||
@@ -152,7 +156,7 @@ static void counterMutexLeave(sqlite3_mutex *p){
|
||||
/*
|
||||
** sqlite3_shutdown
|
||||
*/
|
||||
static int test_shutdown(
|
||||
static int SQLITE_TCLAPI test_shutdown(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -173,7 +177,7 @@ static int test_shutdown(
|
||||
/*
|
||||
** sqlite3_initialize
|
||||
*/
|
||||
static int test_initialize(
|
||||
static int SQLITE_TCLAPI test_initialize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -194,7 +198,7 @@ static int test_initialize(
|
||||
/*
|
||||
** install_mutex_counters BOOLEAN
|
||||
*/
|
||||
static int test_install_mutex_counters(
|
||||
static int SQLITE_TCLAPI test_install_mutex_counters(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -255,7 +259,7 @@ static int test_install_mutex_counters(
|
||||
/*
|
||||
** read_mutex_counters
|
||||
*/
|
||||
static int test_read_mutex_counters(
|
||||
static int SQLITE_TCLAPI test_read_mutex_counters(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -284,7 +288,7 @@ static int test_read_mutex_counters(
|
||||
/*
|
||||
** clear_mutex_counters
|
||||
*/
|
||||
static int test_clear_mutex_counters(
|
||||
static int SQLITE_TCLAPI test_clear_mutex_counters(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -308,7 +312,7 @@ static int test_clear_mutex_counters(
|
||||
** will be invalid since the mutex has already been freed. The
|
||||
** return pointer just checks to see if the mutex really was allocated.
|
||||
*/
|
||||
static int test_alloc_mutex(
|
||||
static int SQLITE_TCLAPI test_alloc_mutex(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -335,7 +339,7 @@ static int test_alloc_mutex(
|
||||
**
|
||||
** Or OPTION can be an raw integer.
|
||||
*/
|
||||
static int test_config(
|
||||
static int SQLITE_TCLAPI test_config(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -397,7 +401,7 @@ static sqlite3_mutex *getStaticMutexPointer(
|
||||
return counterMutexAlloc(iMutex);
|
||||
}
|
||||
|
||||
static int test_enter_static_mutex(
|
||||
static int SQLITE_TCLAPI test_enter_static_mutex(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -416,7 +420,7 @@ static int test_enter_static_mutex(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_leave_static_mutex(
|
||||
static int SQLITE_TCLAPI test_leave_static_mutex(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -435,7 +439,7 @@ static int test_leave_static_mutex(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_enter_db_mutex(
|
||||
static int SQLITE_TCLAPI test_enter_db_mutex(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -454,7 +458,7 @@ static int test_enter_db_mutex(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_leave_db_mutex(
|
||||
static int SQLITE_TCLAPI test_leave_db_mutex(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+9
-2
@@ -1104,9 +1104,16 @@ int sqlite3_vfslog_register(sqlite3 *db){
|
||||
|
||||
#if defined(SQLITE_TEST) || defined(TCLSH)
|
||||
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static int test_vfslog(
|
||||
static int SQLITE_TCLAPI test_vfslog(
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+43
-36
@@ -111,7 +111,7 @@ struct quotaFile {
|
||||
|
||||
/*
|
||||
** An instance of the following object represents each open connection
|
||||
** to a file that participates in quota tracking. This object is a
|
||||
** to a file that participates in quota tracking. This object is a
|
||||
** subclass of sqlite3_file. The sqlite3_file object for the underlying
|
||||
** VFS is appended to this structure.
|
||||
*/
|
||||
@@ -154,11 +154,11 @@ static struct {
|
||||
*/
|
||||
sqlite3_vfs sThisVfs;
|
||||
|
||||
/* The sIoMethods defines the methods used by sqlite3_file objects
|
||||
/* The sIoMethods defines the methods used by sqlite3_file objects
|
||||
** associated with this shim. It is initialized at start-time and does
|
||||
** not require a mutex.
|
||||
**
|
||||
** When the underlying VFS is called to open a file, it might return
|
||||
** When the underlying VFS is called to open a file, it might return
|
||||
** either a version 1 or a version 2 sqlite3_file object. This shim
|
||||
** has to create a wrapper sqlite3_file of the same version. Hence
|
||||
** there are two I/O method structures, one for version 1 and the other
|
||||
@@ -190,7 +190,7 @@ static struct {
|
||||
static void quotaEnter(void){ sqlite3_mutex_enter(gQuota.pMutex); }
|
||||
static void quotaLeave(void){ sqlite3_mutex_leave(gQuota.pMutex); }
|
||||
|
||||
/* Count the number of open files in a quotaGroup
|
||||
/* Count the number of open files in a quotaGroup
|
||||
*/
|
||||
static int quotaGroupOpenFileCount(quotaGroup *pGroup){
|
||||
int N = 0;
|
||||
@@ -399,7 +399,7 @@ static char *quota_utf8_to_mbcs(const char *zUtf8){
|
||||
return zMbcs;
|
||||
#else
|
||||
return (char*)zUtf8; /* No-op on unix */
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -410,7 +410,7 @@ static void quota_mbcs_free(char *zOld){
|
||||
sqlite3_free(zOld);
|
||||
#else
|
||||
/* No-op on unix */
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/************************* VFS Method Wrappers *****************************/
|
||||
@@ -428,7 +428,7 @@ static int quotaOpen(
|
||||
int flags, /* Flags to control the opening */
|
||||
int *pOutFlags /* Flags showing results of opening */
|
||||
){
|
||||
int rc; /* Result code */
|
||||
int rc; /* Result code */
|
||||
quotaConn *pQuotaOpen; /* The new quota file descriptor */
|
||||
quotaFile *pFile; /* Corresponding quotaFile obj */
|
||||
quotaGroup *pGroup; /* The group file belongs to */
|
||||
@@ -488,7 +488,7 @@ static int quotaDelete(
|
||||
const char *zName, /* Name of file to be deleted */
|
||||
int syncDir /* Do a directory sync after deleting */
|
||||
){
|
||||
int rc; /* Result code */
|
||||
int rc; /* Result code */
|
||||
quotaFile *pFile; /* Files in the quota */
|
||||
quotaGroup *pGroup; /* The group file belongs to */
|
||||
sqlite3_vfs *pOrigVfs = gQuota.pOrigVfs; /* Real VFS */
|
||||
@@ -581,7 +581,7 @@ static int quotaWrite(
|
||||
szNew = pGroup->iSize - pFile->iSize + iEnd;
|
||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
||||
if( pGroup->xCallback ){
|
||||
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
||||
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
||||
pGroup->pArg);
|
||||
}
|
||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
||||
@@ -738,7 +738,7 @@ static int quotaShmUnmap(sqlite3_file *pConn, int deleteFlag){
|
||||
/*
|
||||
** Initialize the quota VFS shim. Use the VFS named zOrigVfsName
|
||||
** as the VFS that does the actual work. Use the default if
|
||||
** zOrigVfsName==NULL.
|
||||
** zOrigVfsName==NULL.
|
||||
**
|
||||
** The quota VFS shim is named "quota". It will become the default
|
||||
** VFS if makeDefault is non-zero.
|
||||
@@ -908,7 +908,7 @@ int sqlite3_quota_file(const char *zFilename){
|
||||
|
||||
if( rc==SQLITE_OK ){
|
||||
zFull[strlen(zFull)+1] = '\0';
|
||||
rc = quotaOpen(&gQuota.sThisVfs, zFull, fd,
|
||||
rc = quotaOpen(&gQuota.sThisVfs, zFull, fd,
|
||||
SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_DB, &outFlags);
|
||||
if( rc==SQLITE_OK ){
|
||||
fd->pMethods->xFileSize(fd, &iSize);
|
||||
@@ -1016,7 +1016,7 @@ size_t sqlite3_quota_fwrite(
|
||||
szNew = pGroup->iSize - pFile->iSize + iEnd;
|
||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
||||
if( pGroup->xCallback ){
|
||||
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
||||
pGroup->xCallback(pFile->zFilename, &pGroup->iLimit, szNew,
|
||||
pGroup->pArg);
|
||||
}
|
||||
if( szNew>pGroup->iLimit && pGroup->iLimit>0 ){
|
||||
@@ -1203,7 +1203,7 @@ sqlite3_int64 sqlite3_quota_file_truesize(quota_FILE *p){
|
||||
sqlite3_int64 sqlite3_quota_file_size(quota_FILE *p){
|
||||
return p->pFile ? p->pFile->iSize : -1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Determine the amount of data in bytes available for reading
|
||||
** in the given file.
|
||||
@@ -1275,10 +1275,17 @@ int sqlite3_quota_remove(const char *zFilename){
|
||||
sqlite3_free(zFull);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/***************************** Test Code ***********************************/
|
||||
#ifdef SQLITE_TEST
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Argument passed to a TCL quota-over-limit callback.
|
||||
@@ -1350,7 +1357,7 @@ static void tclCallbackDestructor(void *pObj){
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_initialize NAME MAKEDEFAULT
|
||||
*/
|
||||
static int test_quota_initialize(
|
||||
static int SQLITE_TCLAPI test_quota_initialize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1379,7 +1386,7 @@ static int test_quota_initialize(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_shutdown
|
||||
*/
|
||||
static int test_quota_shutdown(
|
||||
static int SQLITE_TCLAPI test_quota_shutdown(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1402,7 +1409,7 @@ static int test_quota_shutdown(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_set PATTERN LIMIT SCRIPT
|
||||
*/
|
||||
static int test_quota_set(
|
||||
static int SQLITE_TCLAPI test_quota_set(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1456,7 +1463,7 @@ static int test_quota_set(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_file FILENAME
|
||||
*/
|
||||
static int test_quota_file(
|
||||
static int SQLITE_TCLAPI test_quota_file(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1482,7 +1489,7 @@ static int test_quota_file(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_dump
|
||||
*/
|
||||
static int test_quota_dump(
|
||||
static int SQLITE_TCLAPI test_quota_dump(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1530,7 +1537,7 @@ static int test_quota_dump(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_fopen FILENAME MODE
|
||||
*/
|
||||
static int test_quota_fopen(
|
||||
static int SQLITE_TCLAPI test_quota_fopen(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1560,7 +1567,7 @@ extern void *sqlite3TestTextToPtr(const char*);
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_fread HANDLE SIZE NELEM
|
||||
*/
|
||||
static int test_quota_fread(
|
||||
static int SQLITE_TCLAPI test_quota_fread(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1594,7 +1601,7 @@ static int test_quota_fread(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_fwrite HANDLE SIZE NELEM CONTENT
|
||||
*/
|
||||
static int test_quota_fwrite(
|
||||
static int SQLITE_TCLAPI test_quota_fwrite(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1622,7 +1629,7 @@ static int test_quota_fwrite(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_fclose HANDLE
|
||||
*/
|
||||
static int test_quota_fclose(
|
||||
static int SQLITE_TCLAPI test_quota_fclose(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1644,7 +1651,7 @@ static int test_quota_fclose(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_fflush HANDLE ?HARDSYNC?
|
||||
*/
|
||||
static int test_quota_fflush(
|
||||
static int SQLITE_TCLAPI test_quota_fflush(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1670,7 +1677,7 @@ static int test_quota_fflush(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_fseek HANDLE OFFSET WHENCE
|
||||
*/
|
||||
static int test_quota_fseek(
|
||||
static int SQLITE_TCLAPI test_quota_fseek(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1708,7 +1715,7 @@ static int test_quota_fseek(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_rewind HANDLE
|
||||
*/
|
||||
static int test_quota_rewind(
|
||||
static int SQLITE_TCLAPI test_quota_rewind(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1727,7 +1734,7 @@ static int test_quota_rewind(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_ftell HANDLE
|
||||
*/
|
||||
static int test_quota_ftell(
|
||||
static int SQLITE_TCLAPI test_quota_ftell(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1748,7 +1755,7 @@ static int test_quota_ftell(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_ftruncate HANDLE SIZE
|
||||
*/
|
||||
static int test_quota_ftruncate(
|
||||
static int SQLITE_TCLAPI test_quota_ftruncate(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1773,7 +1780,7 @@ static int test_quota_ftruncate(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_file_size HANDLE
|
||||
*/
|
||||
static int test_quota_file_size(
|
||||
static int SQLITE_TCLAPI test_quota_file_size(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1794,7 +1801,7 @@ static int test_quota_file_size(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_file_truesize HANDLE
|
||||
*/
|
||||
static int test_quota_file_truesize(
|
||||
static int SQLITE_TCLAPI test_quota_file_truesize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1815,7 +1822,7 @@ static int test_quota_file_truesize(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_file_mtime HANDLE
|
||||
*/
|
||||
static int test_quota_file_mtime(
|
||||
static int SQLITE_TCLAPI test_quota_file_mtime(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1838,7 +1845,7 @@ static int test_quota_file_mtime(
|
||||
/*
|
||||
** tclcmd: sqlite3_quota_remove FILENAME
|
||||
*/
|
||||
static int test_quota_remove(
|
||||
static int SQLITE_TCLAPI test_quota_remove(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1862,7 +1869,7 @@ static int test_quota_remove(
|
||||
** Test the glob pattern matching. Return 1 if TEXT matches PATTERN
|
||||
** and return 0 if it does not.
|
||||
*/
|
||||
static int test_quota_glob(
|
||||
static int SQLITE_TCLAPI test_quota_glob(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1888,7 +1895,7 @@ static int test_quota_glob(
|
||||
** Return the number of bytes from the current file point to the end of
|
||||
** the file.
|
||||
*/
|
||||
static int test_quota_file_available(
|
||||
static int SQLITE_TCLAPI test_quota_file_available(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1911,7 +1918,7 @@ static int test_quota_file_available(
|
||||
**
|
||||
** Return true if the file handle is in the error state.
|
||||
*/
|
||||
static int test_quota_ferror(
|
||||
static int SQLITE_TCLAPI test_quota_ferror(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+12
-4
@@ -14,7 +14,11 @@
|
||||
*/
|
||||
|
||||
#include "sqlite3.h"
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
/* Solely for the UNUSED_PARAMETER() macro. */
|
||||
#include "sqliteInt.h"
|
||||
@@ -353,7 +357,11 @@ static int bfs_query_func(sqlite3_rtree_query_info *p){
|
||||
*************************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
typedef struct Cube Cube;
|
||||
struct Cube {
|
||||
@@ -432,7 +440,7 @@ static int cube_geom(
|
||||
}
|
||||
#endif /* SQLITE_ENABLE_RTREE */
|
||||
|
||||
static int register_cube_geom(
|
||||
static int SQLITE_TCLAPI register_cube_geom(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -460,7 +468,7 @@ static int register_cube_geom(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int register_circle_geom(
|
||||
static int SQLITE_TCLAPI register_circle_geom(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+8
-4
@@ -35,10 +35,14 @@
|
||||
** to be compiled into an sqlite dynamic extension.
|
||||
*/
|
||||
#ifdef SQLITE_TEST
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
# include "sqliteInt.h"
|
||||
# if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
# else
|
||||
# include "tcl.h"
|
||||
# endif
|
||||
#else
|
||||
#include "sqlite3ext.h"
|
||||
# include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#endif
|
||||
|
||||
@@ -302,7 +306,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
||||
/*
|
||||
** Register the schema virtual table module.
|
||||
*/
|
||||
static int register_schema_module(
|
||||
static int SQLITE_TCLAPI register_schema_module(
|
||||
ClientData clientData, /* Not used */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+11
-4
@@ -256,7 +256,14 @@ int sqlite3demo_superlock(
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
# ifndef SQLITE_TCLAPI
|
||||
# define SQLITE_TCLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct InterpAndScript {
|
||||
Tcl_Interp *interp;
|
||||
@@ -264,11 +271,11 @@ struct InterpAndScript {
|
||||
};
|
||||
typedef struct InterpAndScript InterpAndScript;
|
||||
|
||||
static void superunlock_del(ClientData cd){
|
||||
static void SQLITE_TCLAPI superunlock_del(ClientData cd){
|
||||
sqlite3demo_superunlock((void *)cd);
|
||||
}
|
||||
|
||||
static int superunlock_cmd(
|
||||
static int SQLITE_TCLAPI superunlock_cmd(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -300,7 +307,7 @@ static int superlock_busy(void *pCtx, int nBusy){
|
||||
/*
|
||||
** Tclcmd: sqlite3demo_superlock CMDNAME PATH VFS BUSY-HANDLER-SCRIPT
|
||||
*/
|
||||
static int superlock_cmd(
|
||||
static int SQLITE_TCLAPI superlock_cmd(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+15
-11
@@ -76,7 +76,11 @@
|
||||
|
||||
#include "sqliteInt.h"
|
||||
#include "sqlite3.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@@ -418,7 +422,7 @@ static void *ts_mremap(void *a, size_t b, size_t c, int d, ...){
|
||||
return orig_mremap(a, b, c, d, pArg);
|
||||
}
|
||||
|
||||
static int test_syscall_install(
|
||||
static int SQLITE_TCLAPI test_syscall_install(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -454,7 +458,7 @@ static int test_syscall_install(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_uninstall(
|
||||
static int SQLITE_TCLAPI test_syscall_uninstall(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -478,7 +482,7 @@ static int test_syscall_uninstall(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_reset(
|
||||
static int SQLITE_TCLAPI test_syscall_reset(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -516,7 +520,7 @@ static int test_syscall_reset(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_exists(
|
||||
static int SQLITE_TCLAPI test_syscall_exists(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -537,7 +541,7 @@ static int test_syscall_exists(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_fault(
|
||||
static int SQLITE_TCLAPI test_syscall_fault(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -566,7 +570,7 @@ static int test_syscall_fault(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_errno(
|
||||
static int SQLITE_TCLAPI test_syscall_errno(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -612,7 +616,7 @@ static int test_syscall_errno(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_list(
|
||||
static int SQLITE_TCLAPI test_syscall_list(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -642,7 +646,7 @@ static int test_syscall_list(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall_defaultvfs(
|
||||
static int SQLITE_TCLAPI test_syscall_defaultvfs(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -664,7 +668,7 @@ static int ts_getpagesize(void){
|
||||
return gSyscall.pgsz;
|
||||
}
|
||||
|
||||
static int test_syscall_pagesize(
|
||||
static int SQLITE_TCLAPI test_syscall_pagesize(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -699,7 +703,7 @@ static int test_syscall_pagesize(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int test_syscall(
|
||||
static int SQLITE_TCLAPI test_syscall(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+6
-2
@@ -17,7 +17,11 @@
|
||||
** access to TCL variables.
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -407,7 +411,7 @@ extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
|
||||
/*
|
||||
** Register the echo virtual table module.
|
||||
*/
|
||||
static int register_tclvar_module(
|
||||
static int SQLITE_TCLAPI register_tclvar_module(
|
||||
ClientData clientData, /* Pointer to sqlite3_enable_XXX function */
|
||||
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
|
||||
int objc, /* Number of arguments */
|
||||
|
||||
+16
-12
@@ -16,7 +16,11 @@
|
||||
*/
|
||||
|
||||
#include "sqliteInt.h"
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
#if SQLITE_THREADSAFE
|
||||
|
||||
@@ -72,7 +76,7 @@ extern int sqlite3TestErrCode(Tcl_Interp *, sqlite3 *, int);
|
||||
/*
|
||||
** Handler for events of type EvalEvent.
|
||||
*/
|
||||
static int tclScriptEvent(Tcl_Event *evPtr, int flags){
|
||||
static int SQLITE_TCLAPI tclScriptEvent(Tcl_Event *evPtr, int flags){
|
||||
int rc;
|
||||
EvalEvent *p = (EvalEvent *)evPtr;
|
||||
rc = Tcl_Eval(p->interp, p->zScript);
|
||||
@@ -167,7 +171,7 @@ static Tcl_ThreadCreateType tclScriptThread(ClientData pSqlThread){
|
||||
**
|
||||
** The caller can wait for the script to terminate using [vwait VARNAME].
|
||||
*/
|
||||
static int sqlthread_spawn(
|
||||
static int SQLITE_TCLAPI sqlthread_spawn(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -220,7 +224,7 @@ static int sqlthread_spawn(
|
||||
**
|
||||
** NOTE: At the moment, this doesn't work. FIXME.
|
||||
*/
|
||||
static int sqlthread_parent(
|
||||
static int SQLITE_TCLAPI sqlthread_parent(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -265,7 +269,7 @@ static int xBusy(void *pArg, int nBusy){
|
||||
** Open a database handle and return the string representation of
|
||||
** the pointer value.
|
||||
*/
|
||||
static int sqlthread_open(
|
||||
static int SQLITE_TCLAPI sqlthread_open(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -276,7 +280,7 @@ static int sqlthread_open(
|
||||
const char *zFilename;
|
||||
sqlite3 *db;
|
||||
char zBuf[100];
|
||||
extern void Md5_Register(sqlite3*);
|
||||
extern int Md5_Register(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
|
||||
UNUSED_PARAMETER(clientData);
|
||||
UNUSED_PARAMETER(objc);
|
||||
@@ -299,7 +303,7 @@ static int sqlthread_open(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Md5_Register(db);
|
||||
Md5_Register(db, 0, 0);
|
||||
sqlite3_busy_handler(db, xBusy, 0);
|
||||
|
||||
if( sqlite3TestMakePointerStr(interp, zBuf, db) ) return TCL_ERROR;
|
||||
@@ -315,7 +319,7 @@ static int sqlthread_open(
|
||||
** Return the current thread-id (Tcl_GetCurrentThread()) cast to
|
||||
** an integer.
|
||||
*/
|
||||
static int sqlthread_id(
|
||||
static int SQLITE_TCLAPI sqlthread_id(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -333,7 +337,7 @@ static int sqlthread_id(
|
||||
/*
|
||||
** Dispatch routine for the sub-commands of [sqlthread].
|
||||
*/
|
||||
static int sqlthread_proc(
|
||||
static int SQLITE_TCLAPI sqlthread_proc(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -381,7 +385,7 @@ static int sqlthread_proc(
|
||||
** implemented as a script in Tcl 8.5, it is not usually available to
|
||||
** testfixture.
|
||||
*/
|
||||
static int clock_seconds_proc(
|
||||
static int SQLITE_TCLAPI clock_seconds_proc(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -543,7 +547,7 @@ int sqlite3_blocking_prepare_v2(
|
||||
**
|
||||
** Advance the statement to the next row.
|
||||
*/
|
||||
static int blocking_step_proc(
|
||||
static int SQLITE_TCLAPI blocking_step_proc(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -569,7 +573,7 @@ static int blocking_step_proc(
|
||||
** Usage: sqlite3_blocking_prepare_v2 DB sql bytes ?tailvar?
|
||||
** Usage: sqlite3_nonblocking_prepare_v2 DB sql bytes ?tailvar?
|
||||
*/
|
||||
static int blocking_prepare_v2_proc(
|
||||
static int SQLITE_TCLAPI blocking_prepare_v2_proc(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+8
-4
@@ -28,7 +28,11 @@
|
||||
|
||||
#include "sqlite3.h"
|
||||
#include "sqliteInt.h"
|
||||
#include <tcl.h>
|
||||
#if defined(INCLUDE_SQLITE_TCL_H)
|
||||
# include "sqlite_tcl.h"
|
||||
#else
|
||||
# include "tcl.h"
|
||||
#endif
|
||||
|
||||
typedef struct Testvfs Testvfs;
|
||||
typedef struct TestvfsShm TestvfsShm;
|
||||
@@ -1036,7 +1040,7 @@ static int tvfsUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *p){
|
||||
return sqlite3OsUnfetch(pFd->pReal, iOfst, p);
|
||||
}
|
||||
|
||||
static int testvfs_obj_cmd(
|
||||
static int SQLITE_TCLAPI testvfs_obj_cmd(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
@@ -1348,7 +1352,7 @@ static int testvfs_obj_cmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static void testvfs_obj_del(ClientData cd){
|
||||
static void SQLITE_TCLAPI testvfs_obj_del(ClientData cd){
|
||||
Testvfs *p = (Testvfs *)cd;
|
||||
if( p->pScript ) Tcl_DecrRefCount(p->pScript);
|
||||
sqlite3_vfs_unregister(p->pVfs);
|
||||
@@ -1391,7 +1395,7 @@ static void testvfs_obj_del(ClientData cd){
|
||||
**
|
||||
** where LOCK is of the form "OFFSET NBYTE lock/unlock shared/exclusive"
|
||||
*/
|
||||
static int testvfs_cmd(
|
||||
static int SQLITE_TCLAPI testvfs_cmd(
|
||||
ClientData cd,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
|
||||
+29
-1
@@ -17,6 +17,34 @@
|
||||
|
||||
#include "test_windirent.h"
|
||||
|
||||
/*
|
||||
** Implementation of the POSIX getenv() function using the Win32 API.
|
||||
** This function is not thread-safe.
|
||||
*/
|
||||
const char *windirent_getenv(
|
||||
const char *name
|
||||
){
|
||||
static char value[32768]; /* Maximum length, per MSDN */
|
||||
DWORD dwSize = sizeof(value) / sizeof(char); /* Size in chars */
|
||||
DWORD dwRet; /* Value returned by GetEnvironmentVariableA() */
|
||||
|
||||
memset(value, 0, sizeof(value));
|
||||
dwRet = GetEnvironmentVariableA(name, value, dwSize);
|
||||
if( dwRet==0 || dwRet>dwSize ){
|
||||
/*
|
||||
** The function call to GetEnvironmentVariableA() failed -OR-
|
||||
** the buffer is not large enough. Either way, return NULL.
|
||||
*/
|
||||
return 0;
|
||||
}else{
|
||||
/*
|
||||
** The function call to GetEnvironmentVariableA() succeeded
|
||||
** -AND- the buffer contains the entire value.
|
||||
*/
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Implementation of the POSIX opendir() function using the MSVCRT.
|
||||
*/
|
||||
@@ -32,7 +60,7 @@ LPDIR opendir(
|
||||
|
||||
/* TODO: Remove this if Unix-style root paths are not used. */
|
||||
if( sqlite3_stricmp(dirname, "/")==0 ){
|
||||
dirname = getenv("SystemDrive");
|
||||
dirname = windirent_getenv("SystemDrive");
|
||||
}
|
||||
|
||||
_snprintf(data.name, namesize, "%s\\*", dirname);
|
||||
|
||||
@@ -92,6 +92,13 @@ struct DIR {
|
||||
DIRENT d_next; /* DIRENT constructed based on "_findnext". */
|
||||
};
|
||||
|
||||
/*
|
||||
** Provide the function prototype for the POSIX compatiable getenv()
|
||||
** function. This function is not thread-safe.
|
||||
*/
|
||||
|
||||
extern const char *windirent_getenv(const char *name);
|
||||
|
||||
/*
|
||||
** Finally, we can provide the function prototypes for the opendir(),
|
||||
** readdir(), readdir_r(), and closedir() POSIX functions.
|
||||
|
||||
+6
-6
@@ -1881,7 +1881,7 @@ case OP_Cast: { /* in1 */
|
||||
#endif /* SQLITE_OMIT_CAST */
|
||||
|
||||
/* Opcode: Lt P1 P2 P3 P4 P5
|
||||
** Synopsis: if r[P1]<r[P3] goto P2
|
||||
** Synopsis: IF r[P3]<r[P1]
|
||||
**
|
||||
** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
|
||||
** jump to address P2.
|
||||
@@ -1916,7 +1916,7 @@ case OP_Cast: { /* in1 */
|
||||
** bit set.
|
||||
*/
|
||||
/* Opcode: Ne P1 P2 P3 P4 P5
|
||||
** Synopsis: if r[P1]!=r[P3] goto P2
|
||||
** Synopsis: IF r[P3]!=r[P1]
|
||||
**
|
||||
** This works just like the Lt opcode except that the jump is taken if
|
||||
** the operands in registers P1 and P3 are not equal. See the Lt opcode for
|
||||
@@ -1929,7 +1929,7 @@ case OP_Cast: { /* in1 */
|
||||
** the SQLITE_NULLEQ flag were omitted from P5.
|
||||
*/
|
||||
/* Opcode: Eq P1 P2 P3 P4 P5
|
||||
** Synopsis: if r[P1]==r[P3] goto P2
|
||||
** Synopsis: IF r[P3]==r[P1]
|
||||
**
|
||||
** This works just like the Lt opcode except that the jump is taken if
|
||||
** the operands in registers P1 and P3 are equal.
|
||||
@@ -1942,21 +1942,21 @@ case OP_Cast: { /* in1 */
|
||||
** the SQLITE_NULLEQ flag were omitted from P5.
|
||||
*/
|
||||
/* Opcode: Le P1 P2 P3 P4 P5
|
||||
** Synopsis: if r[P1]<=r[P3] goto P2
|
||||
** Synopsis: IF r[P3]<=r[P1]
|
||||
**
|
||||
** This works just like the Lt opcode except that the jump is taken if
|
||||
** the content of register P3 is less than or equal to the content of
|
||||
** register P1. See the Lt opcode for additional information.
|
||||
*/
|
||||
/* Opcode: Gt P1 P2 P3 P4 P5
|
||||
** Synopsis: if r[P1]>r[P3] goto P2
|
||||
** Synopsis: IF r[P3]>r[P1]
|
||||
**
|
||||
** This works just like the Lt opcode except that the jump is taken if
|
||||
** the content of register P3 is greater than the content of
|
||||
** register P1. See the Lt opcode for additional information.
|
||||
*/
|
||||
/* Opcode: Ge P1 P2 P3 P4 P5
|
||||
** Synopsis: if r[P1]>=r[P3] goto P2
|
||||
** Synopsis: IF r[P3]>=r[P1]
|
||||
**
|
||||
** This works just like the Lt opcode except that the jump is taken if
|
||||
** the content of register P3 is greater than or equal to the content of
|
||||
|
||||
@@ -1094,12 +1094,21 @@ static int displayComment(
|
||||
const char *zSynopsis;
|
||||
int nOpName;
|
||||
int ii, jj;
|
||||
char zAlt[50];
|
||||
zOpName = sqlite3OpcodeName(pOp->opcode);
|
||||
nOpName = sqlite3Strlen30(zOpName);
|
||||
if( zOpName[nOpName+1] ){
|
||||
int seenCom = 0;
|
||||
char c;
|
||||
zSynopsis = zOpName += nOpName + 1;
|
||||
if( strncmp(zSynopsis,"IF ",3)==0 ){
|
||||
if( pOp->p5 & SQLITE_STOREP2 ){
|
||||
sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3);
|
||||
}else{
|
||||
sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3);
|
||||
}
|
||||
zSynopsis = zAlt;
|
||||
}
|
||||
for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
|
||||
if( c=='P' ){
|
||||
c = zSynopsis[++ii];
|
||||
|
||||
+5
-2
@@ -807,7 +807,7 @@ int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
|
||||
Table *pTab;
|
||||
|
||||
pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
|
||||
if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
|
||||
if( pTab!=0 && ALWAYS(pTab->pVTable!=0) ){
|
||||
VTable *p;
|
||||
int (*xDestroy)(sqlite3_vtab *);
|
||||
for(p=pTab->pVTable; p; p=p->pNext){
|
||||
@@ -947,7 +947,10 @@ int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
|
||||
if( rc==SQLITE_OK ){
|
||||
int iSvpt = db->nStatement + db->nSavepoint;
|
||||
addToVTrans(db, pVTab);
|
||||
if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1);
|
||||
if( iSvpt && pModule->xSavepoint ){
|
||||
pVTab->iSavepoint = iSvpt;
|
||||
rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-6
@@ -2478,11 +2478,11 @@ static int whereLoopAddBtreeIndex(
|
||||
pNew->nSkip++;
|
||||
pNew->aLTerm[pNew->nLTerm++] = 0;
|
||||
pNew->wsFlags |= WHERE_SKIPSCAN;
|
||||
nIter = pProbe->aiRowLogEst[saved_nEq]+1 - pProbe->aiRowLogEst[saved_nEq+1];
|
||||
nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];
|
||||
pNew->nOut -= nIter;
|
||||
/* TUNING: Because uncertainties in the estimates for skip-scan queries,
|
||||
** add a 1.375 fudge factor to make skip-scan slightly less likely. */
|
||||
nIter += 4;
|
||||
nIter += 5;
|
||||
whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);
|
||||
pNew->nOut = saved_nOut;
|
||||
pNew->u.btree.nEq = saved_nEq;
|
||||
@@ -2786,9 +2786,9 @@ static int whereLoopAddBtree(
|
||||
LogEst nLookup = rSize + 16; /* Base cost: N*3 */
|
||||
int ii;
|
||||
int iCur = pSrc->iCursor;
|
||||
WhereClause *pWC = &pWInfo->sWC;
|
||||
for(ii=0; ii<pWC->nTerm; ii++){
|
||||
WhereTerm *pTerm = &pWC->a[ii];
|
||||
WhereClause *pWC2 = &pWInfo->sWC;
|
||||
for(ii=0; ii<pWC2->nTerm; ii++){
|
||||
WhereTerm *pTerm = &pWC2->a[ii];
|
||||
if( !sqlite3ExprCoveredByIndex(pTerm->pExpr, iCur, pProbe) ){
|
||||
break;
|
||||
}
|
||||
@@ -3401,6 +3401,14 @@ static i8 wherePathSatisfiesOrderBy(
|
||||
pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
|
||||
~ready, eqOpMask, 0);
|
||||
if( pTerm==0 ) continue;
|
||||
if( pTerm->eOperator==WO_IN ){
|
||||
/* IN terms are only valid for sorting in the ORDER BY LIMIT
|
||||
** optimization, and then only if they are actually used
|
||||
** by the query plan */
|
||||
assert( wctrlFlags & WHERE_ORDERBY_LIMIT );
|
||||
for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
|
||||
if( j>=pLoop->nLTerm ) continue;
|
||||
}
|
||||
if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
|
||||
const char *z1, *z2;
|
||||
pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
|
||||
@@ -3971,7 +3979,7 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
|
||||
pWInfo->revMask = pFrom->revLoop;
|
||||
if( pWInfo->nOBSat<=0 ){
|
||||
pWInfo->nOBSat = 0;
|
||||
if( nLoop>0 ){
|
||||
if( nLoop>0 && (pFrom->aLoop[nLoop-1]->wsFlags & WHERE_ONEROW)==0 ){
|
||||
Bitmask m = 0;
|
||||
int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom,
|
||||
WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m);
|
||||
|
||||
+9
-3
@@ -536,9 +536,15 @@ static int codeAllEqualityTerms(
|
||||
sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
|
||||
}
|
||||
}
|
||||
testcase( pTerm->eOperator & WO_ISNULL );
|
||||
testcase( pTerm->eOperator & WO_IN );
|
||||
if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
|
||||
if( (pTerm->eOperator & WO_IN)!=0 ){
|
||||
if( pTerm->pExpr->flags & EP_xIsSelect ){
|
||||
/* No affinity ever needs to be (or should be) applied to a value
|
||||
** from the RHS of an "? IN (SELECT ...)" expression. The
|
||||
** sqlite3FindInIndex() routine has already ensured that the
|
||||
** affinity of the comparison has been applied to the value. */
|
||||
if( zAff ) zAff[j] = SQLITE_AFF_BLOB;
|
||||
}
|
||||
}else if( (pTerm->eOperator & WO_ISNULL)==0 ){
|
||||
Expr *pRight = pTerm->pExpr->pRight;
|
||||
if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
|
||||
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
|
||||
|
||||
@@ -389,5 +389,19 @@ do_test delete-9.5 {
|
||||
set res
|
||||
} {1 a b 1 c d 2 a b 2 c d}
|
||||
|
||||
do_execsql_test delete-10.0 {
|
||||
CREATE TABLE t1(a INT UNIQUE, b INT);
|
||||
INSERT INTO t1(a,b) VALUES('1','2');
|
||||
SELECT * FROM t1 WHERE a='1' AND b='2';
|
||||
} {1 2}
|
||||
|
||||
do_execsql_test delete-10.1 {
|
||||
DELETE FROM t1 WHERE a='1' AND b='2';
|
||||
}
|
||||
|
||||
do_execsql_test delete-10.2 {
|
||||
SELECT * FROM t1 WHERE a='1' AND b='2';
|
||||
}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -211,4 +211,42 @@ do_execsql_test 4.2.2 {
|
||||
INSERT INTO t01(t01) VALUES('integrity-check');
|
||||
} {}
|
||||
|
||||
do_execsql_test 4.3.1 {
|
||||
CREATE VIRTUAL TABLE t02 USING fts4;
|
||||
INSERT INTO t01 VALUES('1 1 1');
|
||||
INSERT INTO t02 VALUES('2 2 2');
|
||||
BEGIN;
|
||||
SAVEPOINT abc;
|
||||
INSERT INTO t01 VALUES('a b c');
|
||||
INSERT INTO t02 VALUES('a b c');
|
||||
ROLLBACK TO abc;
|
||||
COMMIT;
|
||||
}
|
||||
do_execsql_test 4.3.2 {
|
||||
SELECT * FROM t01 WHERE t01 MATCH 'b';
|
||||
INSERT INTO t01(t01) VALUES('integrity-check');
|
||||
} {}
|
||||
|
||||
do_execsql_test 4.4.1 {
|
||||
CREATE TABLE A(ID INTEGER PRIMARY KEY, AnotherID INTEGER, Notes TEXT);
|
||||
CREATE VIRTUAL TABLE AFTS USING FTS4 (Notes);
|
||||
CREATE TRIGGER A_DeleteTrigger AFTER DELETE ON A FOR EACH ROW BEGIN
|
||||
DELETE FROM AFTS WHERE rowid=OLD.ID;
|
||||
END;
|
||||
CREATE TABLE B(ID INTEGER PRIMARY KEY,Notes TEXT);
|
||||
CREATE VIRTUAL TABLE BFTS USING FTS3 (Notes);
|
||||
CREATE TRIGGER B_DeleteTrigger AFTER DELETE ON B FOR EACH ROW BEGIN
|
||||
DELETE FROM BFTS WHERE rowid=OLD.ID;
|
||||
END;
|
||||
}
|
||||
|
||||
do_execsql_test 4.4.2 {
|
||||
BEGIN TRANSACTION;
|
||||
DELETE FROM A WHERE AnotherID=1;
|
||||
DELETE FROM B WHERE ID=1;
|
||||
COMMIT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
+17
-17
@@ -782,23 +782,23 @@ static void showHelp(void){
|
||||
"Read databases and SQL scripts from SOURCE-DB and execute each script against\n"
|
||||
"each database, checking for crashes and memory leaks.\n"
|
||||
"Options:\n"
|
||||
" --cell-size-check Set the PRAGMA cell_size_check=ON\n"
|
||||
" --dbid N Use only the database where dbid=N\n"
|
||||
" --export-db DIR Write databases to files(s) in DIR. Works with --dbid\n"
|
||||
" --export-sql DIR Write SQL to file(s) in DIR. Also works with --sqlid\n"
|
||||
" --help Show this help text\n"
|
||||
" -q|--quiet Reduced output\n"
|
||||
" --limit-mem N Limit memory used by test SQLite instance to N bytes\n"
|
||||
" --limit-vdbe Panic if an sync SQL runs for more than 100,000 cycles\n"
|
||||
" --load-sql ARGS... Load SQL scripts fro files into SOURCE-DB\n"
|
||||
" --load-db ARGS... Load template databases from files into SOURCE_DB\n"
|
||||
" -m TEXT Add a description to the database\n"
|
||||
" --native-vfs Use the native VFS for initially empty database files\n"
|
||||
" --rebuild Rebuild and vacuum the database file\n"
|
||||
" --result-trace Show the results of each SQL command\n"
|
||||
" --sqlid N Use only SQL where sqlid=N\n"
|
||||
" --timeout N Abort if any single test case needs more than N seconds\n"
|
||||
" -v|--verbose Increased output. Repeat for more output.\n"
|
||||
" --cell-size-check Set the PRAGMA cell_size_check=ON\n"
|
||||
" --dbid N Use only the database where dbid=N\n"
|
||||
" --export-db DIR Write databases to files(s) in DIR. Works with --dbid\n"
|
||||
" --export-sql DIR Write SQL to file(s) in DIR. Also works with --sqlid\n"
|
||||
" --help Show this help text\n"
|
||||
" -q|--quiet Reduced output\n"
|
||||
" --limit-mem N Limit memory used by test SQLite instance to N bytes\n"
|
||||
" --limit-vdbe Panic if any test runs for more than 100,000 cycles\n"
|
||||
" --load-sql ARGS... Load SQL scripts fro files into SOURCE-DB\n"
|
||||
" --load-db ARGS... Load template databases from files into SOURCE_DB\n"
|
||||
" -m TEXT Add a description to the database\n"
|
||||
" --native-vfs Use the native VFS for initially empty database files\n"
|
||||
" --rebuild Rebuild and vacuum the database file\n"
|
||||
" --result-trace Show the results of each SQL command\n"
|
||||
" --sqlid N Use only SQL where sqlid=N\n"
|
||||
" --timeout N Abort if any single test needs more than N seconds\n"
|
||||
" -v|--verbose Increased output. Repeat for more output.\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,39 @@ do_test limit2-120.3 {
|
||||
expr {$fast_count < 0.02*$slow_count}
|
||||
} {1}
|
||||
|
||||
# Bug report against the new ORDER BY LIMIT optimization just prior to
|
||||
# release. (Unreleased so there is no ticket).
|
||||
#
|
||||
# Make sure the optimization is not applied if the inner loop can only
|
||||
# provide a single row of output.
|
||||
#
|
||||
do_execsql_test limit2-200 {
|
||||
CREATE TABLE t200(a, b);
|
||||
WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<1000)
|
||||
INSERT INTO t200(a,b) SELECT x, x FROM c;
|
||||
CREATE TABLE t201(x INTEGER PRIMARY KEY, y);
|
||||
INSERT INTO t201(x,y) VALUES(2,12345);
|
||||
|
||||
SELECT *, '|' FROM t200, t201 WHERE x=b ORDER BY y LIMIT 3;
|
||||
} {2 2 2 12345 |}
|
||||
do_execsql_test limit2-210 {
|
||||
SELECT *, '|' FROM t200 LEFT JOIN t201 ON x=b ORDER BY y LIMIT 3;
|
||||
} {1 1 {} {} | 3 3 {} {} | 4 4 {} {} |}
|
||||
|
||||
# Bug in the ORDER BY LIMIT optimization reported on 2016-09-06.
|
||||
# Ticket https://www.sqlite.org/src/info/559733b09e96
|
||||
#
|
||||
do_execsql_test limit2-300 {
|
||||
CREATE TABLE t300(a,b,c);
|
||||
CREATE INDEX t300x ON t300(a,b,c);
|
||||
INSERT INTO t300 VALUES(0,1,99),(0,1,0),(0,0,0);
|
||||
SELECT *,'.' FROM t300 WHERE a=0 AND (c=0 OR c=99) ORDER BY c DESC;
|
||||
} {0 1 99 . 0 0 0 . 0 1 0 .}
|
||||
do_execsql_test limit2-310 {
|
||||
SELECT *,'.' FROM t300 WHERE a=0 AND (c=0 OR c=99) ORDER BY c DESC LIMIT 1;
|
||||
} {0 1 99 .}
|
||||
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ if {![file exists $testextension]} {
|
||||
set testextsrc $srcdir/test_loadext.c
|
||||
|
||||
set cmdline [concat exec gcc $gcc_shared]
|
||||
lappend cmdline -Wall -I$srcdir -I. -g $testextsrc -o $testextension
|
||||
lappend cmdline -Wall -I$srcdir -I. -I.. -g $testextsrc -o $testextension
|
||||
|
||||
if {[catch $cmdline msg]} {
|
||||
puts "Skipping loadext tests: Test extension not built..."
|
||||
|
||||
@@ -58,6 +58,10 @@ array set ::Configs [strip_comments {
|
||||
-DSQLITE_ENABLE_STAT4
|
||||
--enable-session
|
||||
}
|
||||
"Stdcall" {
|
||||
-DUSE_STDCALL=1
|
||||
-O2
|
||||
}
|
||||
"Have-Not" {
|
||||
# The "Have-Not" configuration sets all possible -UHAVE_feature options
|
||||
# in order to verify that the code works even on platforms that lack
|
||||
@@ -298,10 +302,12 @@ array set ::Platforms [strip_comments {
|
||||
"Apple" "threadtest fulltest"
|
||||
}
|
||||
"Windows NT-intel" {
|
||||
"Stdcall" test
|
||||
"Have-Not" test
|
||||
"Default" "mptest fulltestonly"
|
||||
}
|
||||
"Windows NT-amd64" {
|
||||
"Stdcall" test
|
||||
"Have-Not" test
|
||||
"Default" "mptest fulltestonly"
|
||||
}
|
||||
@@ -725,6 +731,9 @@ proc makeCommand { targets makeOpts cflags opts } {
|
||||
set nmakeDir [file nativename $::SRCDIR]
|
||||
set nmakeFile [file nativename [file join $nmakeDir Makefile.msc]]
|
||||
lappend result nmake /f $nmakeFile TOP=$nmakeDir
|
||||
if {[regexp {USE_STDCALL=1} $cflags]} {
|
||||
lappend result USE_STDCALL=1
|
||||
}
|
||||
} else {
|
||||
lappend result make
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ do_execsql_test 5.3.2 {
|
||||
SELECT count(*) FROM t2 WHERE y = 'j';
|
||||
} {19}
|
||||
do_scanstatus_test 5.3.3 {
|
||||
nLoop 1 nVisit 19 nEst 52.0 zName t2xy zExplain
|
||||
nLoop 1 nVisit 19 nEst 56.0 zName t2xy zExplain
|
||||
{SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ do_execsql_test 5.4.2 {
|
||||
do_scanstatus_test 5.4.3 {
|
||||
nLoop 1 nVisit 10 nEst 10.0 zName t1bc
|
||||
zExplain {SCAN TABLE t1 USING COVERING INDEX t1bc}
|
||||
nLoop 10 nVisit 200 nEst 52.0 zName t2xy
|
||||
nLoop 10 nVisit 200 nEst 56.0 zName t2xy
|
||||
zExplain {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
|
||||
}
|
||||
|
||||
|
||||
@@ -871,6 +871,7 @@ do_test shell1-5.0 {
|
||||
continue
|
||||
}
|
||||
if {$i>=0xE0 && $tcl_platform(os)=="OpenBSD"} continue
|
||||
if {$i>=0xE0 && $i<=0xEF && $tcl_platform(os)=="Linux"} continue
|
||||
set hex [format %02X $i]
|
||||
set char [subst \\x$hex]; set oldChar $char
|
||||
set escapes [list]
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#
|
||||
# shell4-1.*: Basic tests specific to the "stats" command.
|
||||
# shell4-2.*: Basic tests for ".trace"
|
||||
# shell4-3.*: The ".read" command takes the shell out of interactive mode
|
||||
#
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -124,5 +125,17 @@ do_test shell4-2.5 {
|
||||
} {0 {SELECT * FROM t1;}}
|
||||
}
|
||||
|
||||
do_test shell4-3.1 {
|
||||
set fd [open t1.txt wb]
|
||||
puts $fd "SELECT 'squirrel';"
|
||||
close $fd
|
||||
exec $::CLI :memory: --interactive ".read t1.txt"
|
||||
} {squirrel}
|
||||
do_test shell4-3.2 {
|
||||
set fd [open t1.txt wb]
|
||||
puts $fd "SELECT 'pound: \302\243';"
|
||||
close $fd
|
||||
exec $::CLI :memory: --interactive ".read t1.txt"
|
||||
} {pound: £}
|
||||
|
||||
finish_test
|
||||
|
||||
+8
-8
@@ -43,23 +43,23 @@ do_execsql_test skipscan1-1.2 {
|
||||
} {abc 345 7 8 | def 345 9 10 |}
|
||||
do_execsql_test skipscan1-1.2eqp {
|
||||
EXPLAIN QUERY PLAN
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a;
|
||||
} {/* USING INDEX t1abc (ANY(a) AND b=?)*/}
|
||||
do_execsql_test skipscan1-1.2sort {
|
||||
EXPLAIN QUERY PLAN
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a;
|
||||
} {~/*ORDER BY*/}
|
||||
|
||||
do_execsql_test skipscan1-1.3 {
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a DESC;
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a DESC;
|
||||
} {def 345 9 10 | abc 345 7 8 |}
|
||||
do_execsql_test skipscan1-1.3eqp {
|
||||
EXPLAIN QUERY PLAN
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a DESC;
|
||||
} {/* USING INDEX t1abc (ANY(a) AND b=?)*/}
|
||||
do_execsql_test skipscan1-1.3sort {
|
||||
EXPLAIN QUERY PLAN
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t1 WHERE d<>99 AND b=345 ORDER BY a DESC;
|
||||
} {~/*ORDER BY*/}
|
||||
|
||||
do_execsql_test skipscan1-1.4 {
|
||||
@@ -150,15 +150,15 @@ do_execsql_test skipscan1-2.1 {
|
||||
} {}
|
||||
|
||||
do_execsql_test skipscan1-2.2 {
|
||||
SELECT a,b,c,d,'|' FROM t2 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t2 WHERE d<>99 AND b=345 ORDER BY a;
|
||||
} {abc 345 7 8 | def 345 9 10 |}
|
||||
do_execsql_test skipscan1-2.2eqp {
|
||||
EXPLAIN QUERY PLAN
|
||||
SELECT a,b,c,d,'|' FROM t2 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t2 WHERE d<>99 AND b=345 ORDER BY a;
|
||||
} {/* USING INDEX sqlite_autoindex_t2_1 (ANY(a) AND b=?)*/}
|
||||
do_execsql_test skipscan1-2.2sort {
|
||||
EXPLAIN QUERY PLAN
|
||||
SELECT a,b,c,d,'|' FROM t2 WHERE b=345 ORDER BY a;
|
||||
SELECT a,b,c,d,'|' FROM t2 WHERE d<>99 AND b=345 ORDER BY a;
|
||||
} {~/*ORDER BY*/}
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -105,7 +105,7 @@ proc io_log {db} {
|
||||
puts "Normal : Read $stats2(read), wrote $stats2(write)"
|
||||
}
|
||||
|
||||
proc reset_db {} {
|
||||
proc speed3_reset_db {} {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
db eval {
|
||||
@@ -117,7 +117,7 @@ proc reset_db {} {
|
||||
}
|
||||
|
||||
forcedelete test2.db test2.db-journal
|
||||
reset_db
|
||||
speed3_reset_db
|
||||
|
||||
# Set up a database in auto-vacuum mode and create a database schema.
|
||||
#
|
||||
@@ -154,7 +154,7 @@ do_test speed3-0.4 {
|
||||
# Delete all content in a table, one row at a time.
|
||||
#
|
||||
#io_log db
|
||||
reset_db
|
||||
speed3_reset_db
|
||||
speed_trial speed3-1.incrvacuum $::NROW row {DELETE FROM main.t1 WHERE 1}
|
||||
speed_trial speed3-1.normal $::NROW row {DELETE FROM aux.t1 WHERE 1}
|
||||
io_log db
|
||||
@@ -164,7 +164,7 @@ io_log db
|
||||
#
|
||||
#db eval {PRAGMA incremental_vacuum(500000)}
|
||||
populate_t1 db
|
||||
reset_db
|
||||
speed3_reset_db
|
||||
speed_trial speed3-2.incrvacuum $::NROW row {SELECT c FROM main.t1}
|
||||
speed_trial speed3-2.normal $::NROW row {SELECT c FROM aux.t1}
|
||||
io_log db
|
||||
|
||||
@@ -34,12 +34,25 @@ register_dbstat_vtab db
|
||||
do_execsql_test stat-0.0 {
|
||||
PRAGMA table_info(dbstat);
|
||||
} {/0 name TEXT .* 1 path TEXT .* 9 pgsize INTEGER/}
|
||||
|
||||
# Attempts to drop an eponymous virtual table are a no-op.
|
||||
do_execsql_test stat-0.1 {
|
||||
DROP TABLE dbstat;
|
||||
PRAGMA table_info=dbstat;
|
||||
} {/0 name TEXT .* 1 path TEXT .* 9 pgsize INTEGER/}
|
||||
|
||||
db close
|
||||
forcedelete test.db
|
||||
sqlite3 db test.db
|
||||
db func a_string a_string
|
||||
register_dbstat_vtab db
|
||||
do_execsql_test stat-0.2 {
|
||||
PRAGMA auto_vacuum = OFF;
|
||||
CREATE VIRTUAL TABLE temp.stat USING dbstat;
|
||||
SELECT * FROM stat;
|
||||
} {}
|
||||
|
||||
|
||||
if {[wal_is_capable]} {
|
||||
do_execsql_test stat-0.1 {
|
||||
PRAGMA journal_mode = WAL;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script runs the wordcount program in different ways and generates
|
||||
# an output useful for performance comparisons.
|
||||
#
|
||||
|
||||
# Select the source text to be analyzed.
|
||||
#
|
||||
if test "x$1" = "x";
|
||||
then echo "Usage: $0 FILENAME [ARGS...]"; exit 1;
|
||||
fi
|
||||
|
||||
# Do test runs
|
||||
#
|
||||
rm -f wcdb1.db
|
||||
./wordcount --tag A: --timer --summary wcdb1.db $* --insert
|
||||
rm -f wcdb2.db
|
||||
./wordcount --tag B: --timer --summary wcdb2.db $* --insert --without-rowid
|
||||
rm -f wcdb1.db
|
||||
./wordcount --tag C: --timer --summary wcdb1.db $* --replace
|
||||
rm -f wcdb2.db
|
||||
./wordcount --tag D: --timer --summary wcdb2.db $* --replace --without-rowid
|
||||
rm -f wcdb1.db
|
||||
./wordcount --tag E: --timer --summary wcdb1.db $* --select
|
||||
rm -f wcdb2.db
|
||||
./wordcount --tag F: --timer --summary wcdb2.db $* --select --without-rowid
|
||||
./wordcount --tag G: --timer --summary wcdb1.db $* --query
|
||||
./wordcount --tag H: --timer --summary wcdb1.db $* --query --without-rowid
|
||||
./wordcount --tag I: --timer --summary wcdb1.db $* --delete
|
||||
./wordcount --tag J: --timer --summary wcdb2.db $* --delete --without-rowid
|
||||
|
||||
# Clean up temporary files created.
|
||||
#
|
||||
rm -f wcdb1.db wcdb2.db
|
||||
+1
-1
@@ -333,7 +333,7 @@ ifcapable subquery {
|
||||
test_boolset types2-8.8 {o IN (SELECT t FROM t4)} {7}
|
||||
test_boolset types2-8.9 {i IN (SELECT o FROM t4)} {9 10 11 12}
|
||||
test_boolset types2-8.6 {n IN (SELECT o FROM t4)} {9 10 11 12}
|
||||
test_boolset types2-8.7 {t IN (SELECT o FROM t4)} {9 11}
|
||||
test_boolset types2-8.7 {t IN (SELECT o FROM t4)} {}
|
||||
test_boolset types2-8.8 {o IN (SELECT o FROM t4)} {9 10}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ ifcapable !vtab||!schema_pragmas { finish_test ; return }
|
||||
# Register the echo module
|
||||
register_echo_module [sqlite3_connection_pointer db]
|
||||
|
||||
do_test vtabE-1.1 {
|
||||
do_test vtabF-1.1 {
|
||||
execsql {
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE INDEX i1 ON t1(a);
|
||||
@@ -37,7 +37,7 @@ do_test vtabE-1.1 {
|
||||
SELECT b FROM t1 WHERE a IS NOT NULL;
|
||||
}
|
||||
} {110 111 112 113}
|
||||
do_test vtabE-1.2 {
|
||||
do_test vtabF-1.2 {
|
||||
execsql {SELECT b FROM tv1 WHERE a IS NOT NULL}
|
||||
} {110 111 112 113}
|
||||
|
||||
|
||||
+26
-2
@@ -108,7 +108,12 @@ foreach ::tclvar_set_omit {0 1} {
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
if {1} {
|
||||
if {$tcl_platform(platform)=="windows"} {
|
||||
set drive [string range [pwd] 0 1]
|
||||
set ::env(fstreeDrive) $drive
|
||||
}
|
||||
if {$tcl_platform(platform)!="windows" || \
|
||||
[regexp -nocase -- {^[A-Z]:} $drive]} {
|
||||
reset_db
|
||||
register_fs_module db
|
||||
do_execsql_test 3.0 {
|
||||
@@ -119,7 +124,7 @@ if {1} {
|
||||
proc list_root_files {} {
|
||||
if {$::tcl_platform(platform) eq "windows"} {
|
||||
set res [list]
|
||||
foreach name [glob -directory $::env(SystemDrive)/ -- *] {
|
||||
foreach name [glob -directory $::env(fstreeDrive)/ -- *] {
|
||||
if {[string index [file tail $name] 0] eq "."} continue
|
||||
lappend res $name
|
||||
}
|
||||
@@ -142,6 +147,25 @@ if {1} {
|
||||
}
|
||||
}
|
||||
|
||||
# Read the first 5 entries from the root directory. Except, ignore
|
||||
# files that contain the "$" character in their names as these are
|
||||
# special files on some Windows platforms.
|
||||
#
|
||||
set res [list]
|
||||
set root_files [list_root_files]
|
||||
set num_root_files [llength $root_files]
|
||||
set lim_root_files [expr {$num_root_files > 5 ? 5 : $num_root_files}]
|
||||
foreach p [lrange $root_files 0 [expr {$lim_root_files - 1}]] {
|
||||
if {$::tcl_platform(platform) eq "windows"} {
|
||||
if {[regexp {\$} $p]} {incr lim_root_files -1} else {lappend res $p}
|
||||
} else {
|
||||
lappend res "/$p"
|
||||
}
|
||||
}
|
||||
do_execsql_test 3.1 [subst {
|
||||
SELECT path FROM fstree WHERE path NOT GLOB '*\$*' LIMIT $lim_root_files;
|
||||
}] $res
|
||||
|
||||
# Read all entries in the current directory.
|
||||
#
|
||||
proc contents {pattern} {
|
||||
|
||||
@@ -69,7 +69,7 @@ proc lock_callback {method filename handle lock} {
|
||||
if {$lock == "1 7 lock exclusive"} { return SQLITE_BUSY }
|
||||
return SQLITE_OK
|
||||
}
|
||||
puts "# Warning: This next test case causes SQLite to call xSlee(1) 100 times."
|
||||
puts "# Warning: This next test case causes SQLite to call xSleep(1) 100 times."
|
||||
puts "# Normally this equates to a delay of roughly 10 seconds, but if SQLite"
|
||||
puts "# is built on unix without HAVE_USLEEP defined, it may be much longer."
|
||||
do_test 1.3 {
|
||||
|
||||
+31
-23
@@ -30,6 +30,7 @@
|
||||
** --nosync Use PRAGMA synchronous=OFF
|
||||
** --journal MMMM Use PRAGMA journal_mode=MMMM
|
||||
** --timer Time the operation of this program
|
||||
** --tag NAME Tag all output using NAME. Use only stdout.
|
||||
**
|
||||
** Modes:
|
||||
**
|
||||
@@ -82,6 +83,9 @@
|
||||
#include "sqlite3.h"
|
||||
#define ISALPHA(X) isalpha((unsigned char)(X))
|
||||
|
||||
/* Output tag */
|
||||
char *zTag = "--";
|
||||
|
||||
/* Return the current wall-clock time */
|
||||
static sqlite3_int64 realTime(void){
|
||||
static sqlite3_vfs *clockVfs = 0;
|
||||
@@ -115,7 +119,7 @@ static void traceCallback(void *NotUsed, const char *zSql){
|
||||
** each column separated by a single space. */
|
||||
static int printResult(void *NotUsed, int nArg, char **azArg, char **azNm){
|
||||
int i;
|
||||
printf("--");
|
||||
printf("%s", zTag);
|
||||
for(i=0; i<nArg; i++){
|
||||
printf(" %s", azArg[i] ? azArg[i] : "(null)");
|
||||
}
|
||||
@@ -220,6 +224,7 @@ int main(int argc, char **argv){
|
||||
FILE *in; /* The open input file */
|
||||
int rc; /* Return code from an SQLite interface */
|
||||
int iCur, iHiwtr; /* Statistics values, current and "highwater" */
|
||||
FILE *pTimer = stderr; /* Output channel for the timer */
|
||||
sqlite3_int64 sumCnt = 0; /* Sum in QUERY mode */
|
||||
sqlite3_int64 startTime;
|
||||
char zInput[2000]; /* A single line of input */
|
||||
@@ -266,6 +271,9 @@ int main(int argc, char **argv){
|
||||
commitInterval = atoi(argv[i]);
|
||||
}else if( strcmp(z,"journal")==0 && i<argc-1 ){
|
||||
zJMode = argv[++i];
|
||||
}else if( strcmp(z,"tag")==0 && i<argc-1 ){
|
||||
zTag = argv[++i];
|
||||
pTimer = stdout;
|
||||
}else{
|
||||
fatal_error("unknown option: %s\n", argv[i]);
|
||||
}
|
||||
@@ -462,11 +470,11 @@ int main(int argc, char **argv){
|
||||
sqlite3_finalize(pDelete);
|
||||
|
||||
if( iMode==MODE_QUERY ){
|
||||
printf("sum of cnt: %lld\n", sumCnt);
|
||||
printf("%s sum of cnt: %lld\n", zTag, sumCnt);
|
||||
rc = sqlite3_prepare_v2(db,"SELECT sum(cnt*cnt) FROM wordcount", -1,
|
||||
&pSelect, 0);
|
||||
if( rc==SQLITE_OK && sqlite3_step(pSelect)==SQLITE_ROW ){
|
||||
printf("double-check: %lld\n", sqlite3_column_int64(pSelect, 0));
|
||||
printf("%s double-check: %lld\n", zTag, sqlite3_column_int64(pSelect, 0));
|
||||
}
|
||||
sqlite3_finalize(pSelect);
|
||||
}
|
||||
@@ -474,10 +482,10 @@ int main(int argc, char **argv){
|
||||
|
||||
if( showTimer ){
|
||||
sqlite3_int64 elapseTime = realTime() - startTime;
|
||||
fprintf(stderr, "%3d.%03d wordcount", (int)(elapseTime/1000),
|
||||
fprintf(pTimer, "%3d.%03d wordcount", (int)(elapseTime/1000),
|
||||
(int)(elapseTime%1000));
|
||||
for(i=1; i<argc; i++) if( i!=showTimer ) fprintf(stderr, " %s", argv[i]);
|
||||
fprintf(stderr, "\n");
|
||||
for(i=1; i<argc; i++) if( i!=showTimer ) fprintf(pTimer, " %s", argv[i]);
|
||||
fprintf(pTimer, "\n");
|
||||
}
|
||||
|
||||
if( showSummary ){
|
||||
@@ -501,25 +509,25 @@ int main(int argc, char **argv){
|
||||
** have been finalized */
|
||||
if( showStats ){
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_USED, &iCur, &iHiwtr, 0);
|
||||
printf("-- Lookaside Slots Used: %d (max %d)\n", iCur,iHiwtr);
|
||||
printf("%s Lookaside Slots Used: %d (max %d)\n", zTag, iCur,iHiwtr);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_HIT, &iCur, &iHiwtr, 0);
|
||||
printf("-- Successful lookasides: %d\n", iHiwtr);
|
||||
printf("%s Successful lookasides: %d\n", zTag, iHiwtr);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, &iCur,&iHiwtr,0);
|
||||
printf("-- Lookaside size faults: %d\n", iHiwtr);
|
||||
printf("%s Lookaside size faults: %d\n", zTag, iHiwtr);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, &iCur,&iHiwtr,0);
|
||||
printf("-- Lookaside OOM faults: %d\n", iHiwtr);
|
||||
printf("%s Lookaside OOM faults: %d\n", zTag, iHiwtr);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_USED, &iCur, &iHiwtr, 0);
|
||||
printf("-- Pager Heap Usage: %d bytes\n", iCur);
|
||||
printf("%s Pager Heap Usage: %d bytes\n", zTag, iCur);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_HIT, &iCur, &iHiwtr, 1);
|
||||
printf("-- Page cache hits: %d\n", iCur);
|
||||
printf("%s Page cache hits: %d\n", zTag, iCur);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_MISS, &iCur, &iHiwtr, 1);
|
||||
printf("-- Page cache misses: %d\n", iCur);
|
||||
printf("%s Page cache misses: %d\n", zTag, iCur);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_WRITE, &iCur, &iHiwtr, 1);
|
||||
printf("-- Page cache writes: %d\n", iCur);
|
||||
printf("%s Page cache writes: %d\n", zTag, iCur);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_SCHEMA_USED, &iCur, &iHiwtr, 0);
|
||||
printf("-- Schema Heap Usage: %d bytes\n", iCur);
|
||||
printf("%s Schema Heap Usage: %d bytes\n", zTag, iCur);
|
||||
sqlite3_db_status(db, SQLITE_DBSTATUS_STMT_USED, &iCur, &iHiwtr, 0);
|
||||
printf("-- Statement Heap Usage: %d bytes\n", iCur);
|
||||
printf("%s Statement Heap Usage: %d bytes\n", zTag, iCur);
|
||||
}
|
||||
|
||||
sqlite3_close(db);
|
||||
@@ -528,19 +536,19 @@ int main(int argc, char **argv){
|
||||
** has closed. Memory usage should be zero at this point. */
|
||||
if( showStats ){
|
||||
sqlite3_status(SQLITE_STATUS_MEMORY_USED, &iCur, &iHiwtr, 0);
|
||||
printf("-- Memory Used (bytes): %d (max %d)\n", iCur,iHiwtr);
|
||||
printf("%s Memory Used (bytes): %d (max %d)\n", zTag,iCur,iHiwtr);
|
||||
sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHiwtr, 0);
|
||||
printf("-- Outstanding Allocations: %d (max %d)\n", iCur,iHiwtr);
|
||||
printf("%s Outstanding Allocations: %d (max %d)\n",zTag,iCur,iHiwtr);
|
||||
sqlite3_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, &iCur, &iHiwtr, 0);
|
||||
printf("-- Pcache Overflow Bytes: %d (max %d)\n", iCur,iHiwtr);
|
||||
printf("%s Pcache Overflow Bytes: %d (max %d)\n",zTag,iCur,iHiwtr);
|
||||
sqlite3_status(SQLITE_STATUS_SCRATCH_OVERFLOW, &iCur, &iHiwtr, 0);
|
||||
printf("-- Scratch Overflow Bytes: %d (max %d)\n", iCur,iHiwtr);
|
||||
printf("%s Scratch Overflow Bytes: %d (max %d)\n",zTag,iCur,iHiwtr);
|
||||
sqlite3_status(SQLITE_STATUS_MALLOC_SIZE, &iCur, &iHiwtr, 0);
|
||||
printf("-- Largest Allocation: %d bytes\n",iHiwtr);
|
||||
printf("%s Largest Allocation: %d bytes\n",zTag,iHiwtr);
|
||||
sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, &iCur, &iHiwtr, 0);
|
||||
printf("-- Largest Pcache Allocation: %d bytes\n",iHiwtr);
|
||||
printf("%s Largest Pcache Allocation: %d bytes\n",zTag,iHiwtr);
|
||||
sqlite3_status(SQLITE_STATUS_SCRATCH_SIZE, &iCur, &iHiwtr, 0);
|
||||
printf("-- Largest Scratch Allocation: %d bytes\n", iHiwtr);
|
||||
printf("%s Largest Scratch Allocation: %d bytes\n",zTag,iHiwtr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
+35
-24
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/tclsh
|
||||
#
|
||||
# To build a single huge source file holding all of SQLite (or at
|
||||
# least the core components - the test harness, shell, and TCL
|
||||
# least the core components - the test harness, shell, and TCL
|
||||
# interface are omitted.) first do
|
||||
#
|
||||
# make target_source
|
||||
@@ -11,7 +11,7 @@
|
||||
# there and will not work if they are not found.) There are a few
|
||||
# generated C code files that are also added to the tsrc directory.
|
||||
# For example, the "parse.c" and "parse.h" files to implement the
|
||||
# the parser are derived from "parse.y" using lemon. And the
|
||||
# the parser are derived from "parse.y" using lemon. And the
|
||||
# "keywordhash.h" files is generated by a program named "mkkeywordhash".
|
||||
#
|
||||
# After the "tsrc" directory has been created and populated, run
|
||||
@@ -26,15 +26,20 @@
|
||||
# from in this file. The version number is needed to generate the header
|
||||
# comment of the amalgamation.
|
||||
#
|
||||
if {[lsearch $argv --nostatic]>=0} {
|
||||
set addstatic 0
|
||||
} else {
|
||||
set addstatic 1
|
||||
}
|
||||
if {[lsearch $argv --linemacros]>=0} {
|
||||
set linemacros 1
|
||||
} else {
|
||||
set linemacros 0
|
||||
set addstatic 1
|
||||
set linemacros 0
|
||||
set useapicall 0
|
||||
for {set i 0} {$i<[llength $argv]} {incr i} {
|
||||
set x [lindex $argv $i]
|
||||
if {[regexp {^-+nostatic$} $x]} {
|
||||
set addstatic 0
|
||||
} elseif {[regexp {^-+linemacros} $x]} {
|
||||
set linemacros 1
|
||||
} elseif {[regexp {^-+useapicall} $x]} {
|
||||
set useapicall 1
|
||||
} else {
|
||||
error "unknown command-line option: $x"
|
||||
}
|
||||
}
|
||||
set in [open tsrc/sqlite3.h]
|
||||
set cnt 0
|
||||
@@ -57,7 +62,7 @@ set today [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S UTC" -gmt 1]
|
||||
puts $out [subst \
|
||||
{/******************************************************************************
|
||||
** This file is an amalgamation of many separate C source files from SQLite
|
||||
** version $VERSION. By combining all the individual C code files into this
|
||||
** version $VERSION. By combining all the individual C code files into this
|
||||
** single large file, the entire code can be compiled as a single translation
|
||||
** unit. This allows many compilers to do optimizations that would not be
|
||||
** possible if the files were compiled separately. Performance improvements
|
||||
@@ -66,7 +71,7 @@ puts $out [subst \
|
||||
**
|
||||
** This file is all you need to compile SQLite. To use SQLite in other
|
||||
** programs, you need this file and the "sqlite3.h" header file that defines
|
||||
** the programming interface to the SQLite library. (If you do not have
|
||||
** the programming interface to the SQLite library. (If you do not have
|
||||
** the "sqlite3.h" header file at hand, you will find a copy embedded within
|
||||
** the text of this file. Search for "Begin file sqlite3.h" to find the start
|
||||
** of the embedded sqlite3.h header file.) Additional code files may be needed
|
||||
@@ -83,7 +88,7 @@ if {$addstatic} {
|
||||
#endif}
|
||||
}
|
||||
|
||||
# These are the header files used by SQLite. The first time any of these
|
||||
# These are the header files used by SQLite. The first time any of these
|
||||
# files are seen in a #include statement in the C code, include the complete
|
||||
# text of the file in-line. The file only needs to be included once.
|
||||
#
|
||||
@@ -104,8 +109,8 @@ foreach hdr {
|
||||
parse.h
|
||||
pcache.h
|
||||
pragma.h
|
||||
sqlite3ext.h
|
||||
sqlite3.h
|
||||
sqlite3ext.h
|
||||
sqliteicu.h
|
||||
sqliteInt.h
|
||||
sqliteLimit.h
|
||||
@@ -155,7 +160,8 @@ proc section_comment {text} {
|
||||
# process them appropriately.
|
||||
#
|
||||
proc copy_file {filename} {
|
||||
global seen_hdr available_hdr varonly_hdr cdecllist out addstatic linemacros
|
||||
global seen_hdr available_hdr varonly_hdr cdecllist out
|
||||
global addstatic linemacros useapicall
|
||||
set ln 0
|
||||
set tail [file tail $filename]
|
||||
section_comment "Begin file $tail"
|
||||
@@ -203,7 +209,8 @@ proc copy_file {filename} {
|
||||
puts $out "#if 0"
|
||||
} elseif {!$linemacros && [regexp {^#line} $line]} {
|
||||
# Skip #line directives.
|
||||
} elseif {$addstatic && ![regexp {^(static|typedef)} $line]} {
|
||||
} elseif {$addstatic
|
||||
&& ![regexp {^(static|typedef|SQLITE_PRIVATE)} $line]} {
|
||||
# Skip adding the SQLITE_PRIVATE or SQLITE_API keyword before
|
||||
# functions if this header file does not need it.
|
||||
if {![info exists varonly_hdr($tail)]
|
||||
@@ -211,18 +218,20 @@ proc copy_file {filename} {
|
||||
regsub {^SQLITE_API } $line {} line
|
||||
# Add the SQLITE_PRIVATE or SQLITE_API keyword before functions.
|
||||
# so that linkage can be modified at compile-time.
|
||||
if {[regexp {^sqlite3_} $funcname]} {
|
||||
if {[regexp {^sqlite3[a-z]*_} $funcname]} {
|
||||
set line SQLITE_API
|
||||
append line " " [string trim $rettype]
|
||||
if {[string index $rettype end] ne "*"} {
|
||||
append line " "
|
||||
}
|
||||
if {[lsearch -exact $cdecllist $funcname] >= 0} {
|
||||
append line SQLITE_CDECL
|
||||
} else {
|
||||
append line SQLITE_STDCALL
|
||||
if {$useapicall} {
|
||||
if {[lsearch -exact $cdecllist $funcname] >= 0} {
|
||||
append line SQLITE_CDECL " "
|
||||
} else {
|
||||
append line SQLITE_APICALL " "
|
||||
}
|
||||
}
|
||||
append line " " $funcname $rest
|
||||
append line $funcname $rest
|
||||
puts $out $line
|
||||
} else {
|
||||
puts $out "SQLITE_PRIVATE $line"
|
||||
@@ -285,6 +294,7 @@ foreach file {
|
||||
mutex_w32.c
|
||||
malloc.c
|
||||
printf.c
|
||||
treeview.c
|
||||
random.c
|
||||
threads.c
|
||||
utf.c
|
||||
@@ -313,7 +323,6 @@ foreach file {
|
||||
vdbe.c
|
||||
vdbeblob.c
|
||||
vdbesort.c
|
||||
journal.c
|
||||
memjournal.c
|
||||
|
||||
walker.c
|
||||
@@ -339,6 +348,8 @@ foreach file {
|
||||
update.c
|
||||
vacuum.c
|
||||
vtab.c
|
||||
wherecode.c
|
||||
whereexpr.c
|
||||
where.c
|
||||
|
||||
parse.c
|
||||
|
||||
+17
-12
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/tclsh
|
||||
#
|
||||
# To build a single huge source file holding all of SQLite (or at
|
||||
# least the core components - the test harness, shell, and TCL
|
||||
# least the core components - the test harness, shell, and TCL
|
||||
# interface are omitted.) first do
|
||||
#
|
||||
# make target_source
|
||||
@@ -11,7 +11,7 @@
|
||||
# there and will not work if they are not found.) There are a few
|
||||
# generated C code files that are also added to the tsrc directory.
|
||||
# For example, the "parse.c" and "parse.h" files to implement the
|
||||
# the parser are derived from "parse.y" using lemon. And the
|
||||
# the parser are derived from "parse.y" using lemon. And the
|
||||
# "keywordhash.h" files is generated by a program named "mkkeywordhash".
|
||||
#
|
||||
# After the "tsrc" directory has been created and populated, run
|
||||
@@ -28,12 +28,15 @@
|
||||
#
|
||||
set addstatic 1
|
||||
set linemacros 0
|
||||
set useapicall 0
|
||||
for {set i 0} {$i<[llength $argv]} {incr i} {
|
||||
set x [lindex $argv $i]
|
||||
if {[regexp {^-+nostatic$} $x]} {
|
||||
set addstatic 0
|
||||
} elseif {[regexp {^-+linemacros} $x]} {
|
||||
set linemacros 1
|
||||
} elseif {[regexp {^-+useapicall} $x]} {
|
||||
set useapicall 1
|
||||
} else {
|
||||
error "unknown command-line option: $x"
|
||||
}
|
||||
@@ -59,7 +62,7 @@ set today [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S UTC" -gmt 1]
|
||||
puts $out [subst \
|
||||
{/******************************************************************************
|
||||
** This file is an amalgamation of many separate C source files from SQLite
|
||||
** version $VERSION. By combining all the individual C code files into this
|
||||
** version $VERSION. By combining all the individual C code files into this
|
||||
** single large file, the entire code can be compiled as a single translation
|
||||
** unit. This allows many compilers to do optimizations that would not be
|
||||
** possible if the files were compiled separately. Performance improvements
|
||||
@@ -68,7 +71,7 @@ puts $out [subst \
|
||||
**
|
||||
** This file is all you need to compile SQLite. To use SQLite in other
|
||||
** programs, you need this file and the "sqlite3.h" header file that defines
|
||||
** the programming interface to the SQLite library. (If you do not have
|
||||
** the programming interface to the SQLite library. (If you do not have
|
||||
** the "sqlite3.h" header file at hand, you will find a copy embedded within
|
||||
** the text of this file. Search for "Begin file sqlite3.h" to find the start
|
||||
** of the embedded sqlite3.h header file.) Additional code files may be needed
|
||||
@@ -85,7 +88,7 @@ if {$addstatic} {
|
||||
#endif}
|
||||
}
|
||||
|
||||
# These are the header files used by SQLite. The first time any of these
|
||||
# These are the header files used by SQLite. The first time any of these
|
||||
# files are seen in a #include statement in the C code, include the complete
|
||||
# text of the file in-line. The file only needs to be included once.
|
||||
#
|
||||
@@ -112,7 +115,6 @@ foreach hdr {
|
||||
pragma.h
|
||||
rtree.h
|
||||
sqlite3session.h
|
||||
sqlite3ext.h
|
||||
sqlite3.h
|
||||
sqlite3ext.h
|
||||
sqlite3rbu.h
|
||||
@@ -166,7 +168,8 @@ proc section_comment {text} {
|
||||
# process them appropriately.
|
||||
#
|
||||
proc copy_file {filename} {
|
||||
global seen_hdr available_hdr varonly_hdr cdecllist out addstatic linemacros
|
||||
global seen_hdr available_hdr varonly_hdr cdecllist out
|
||||
global addstatic linemacros useapicall
|
||||
set ln 0
|
||||
set tail [file tail $filename]
|
||||
section_comment "Begin file $tail"
|
||||
@@ -229,12 +232,14 @@ proc copy_file {filename} {
|
||||
if {[string index $rettype end] ne "*"} {
|
||||
append line " "
|
||||
}
|
||||
if {[lsearch -exact $cdecllist $funcname] >= 0} {
|
||||
append line SQLITE_CDECL
|
||||
} else {
|
||||
append line SQLITE_STDCALL
|
||||
if {$useapicall} {
|
||||
if {[lsearch -exact $cdecllist $funcname] >= 0} {
|
||||
append line SQLITE_CDECL " "
|
||||
} else {
|
||||
append line SQLITE_APICALL " "
|
||||
}
|
||||
}
|
||||
append line " " $funcname $rest
|
||||
append line $funcname $rest
|
||||
puts $out $line
|
||||
} else {
|
||||
puts $out "SQLITE_PRIVATE $line"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user