mirror of
https://github.com/sqlite/sqlite.git
synced 2026-10-28 10:57:26 +03:00
Merge version 3.31.0
FossilOrigin-Name: 0eae87ad11107f420b00958fa5a9b8037b775f0586e9fb1e2d5f6c04d7ae4afc
This commit is contained in:
@@ -19,7 +19,7 @@ dnl to configure the system for the local environment.
|
||||
# so you can encode the package version directly into the source files.
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
AC_INIT([sqlite], [3.7.4])
|
||||
AC_INIT([sqlite], [3.31.0])
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
|
||||
|
||||
@@ -153,7 +153,7 @@ Please `cd` to its location first.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
PROJECT = sqlite3
|
||||
PROJECT = tclsqlite3
|
||||
!include "rules.vc"
|
||||
|
||||
# nmakehelp -V <file> <tag> will search the file for tag, skips until a
|
||||
@@ -162,18 +162,15 @@ PROJECT = sqlite3
|
||||
|
||||
!if [echo REM = This file is generated from Makefile.vc > versions.vc]
|
||||
!endif
|
||||
# get project version from row "AC_INIT([sqlite], [3.7.14])"
|
||||
# get project version from row "AC_INIT([sqlite], [3.x.y])"
|
||||
!if [echo DOTVERSION = \>> versions.vc] \
|
||||
&& [nmakehlp -V ..\configure.in AC_INIT >> versions.vc]
|
||||
&& [nmakehlp -V ..\configure.ac AC_INIT >> versions.vc]
|
||||
!endif
|
||||
!include "versions.vc"
|
||||
|
||||
VERSION = $(DOTVERSION:.=)
|
||||
STUBPREFIX = $(PROJECT)stub
|
||||
|
||||
DLLOBJS = \
|
||||
$(TMP_DIR)\tclsqlite3.obj
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Target names and paths ( shouldn't need changing )
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -182,7 +179,7 @@ BINROOT = .
|
||||
ROOT = ..
|
||||
|
||||
PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
|
||||
PRJLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
|
||||
PRJLIBNAME = $(PROJECT).$(EXT)
|
||||
PRJLIB = $(OUT_DIR)\$(PRJLIBNAME)
|
||||
|
||||
PRJSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
|
||||
@@ -204,6 +201,17 @@ DOCDIR = $(ROOT)\doc
|
||||
TOOLSDIR = $(ROOT)\tools
|
||||
COMPATDIR = $(ROOT)\compat
|
||||
|
||||
### Figure out where the primary source code file(s) is/are.
|
||||
!if exist("$(ROOT)\..\..\sqlite3.c") && exist("$(ROOT)\..\..\src\tclsqlite.c")
|
||||
SQL_INCLUDES = -I"$(ROOT)\..\.."
|
||||
SQLITE_SRCDIR = $(ROOT)\..\..
|
||||
TCLSQLITE_SRCDIR = $(ROOT)\..\..\src
|
||||
DLLOBJS = $(TMP_DIR)\sqlite3.obj $(TMP_DIR)\tclsqlite.obj
|
||||
!else
|
||||
TCLSQLITE_SRCDIR = $(ROOT)\generic
|
||||
DLLOBJS = $(TMP_DIR)\tclsqlite3.obj
|
||||
!endif
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Compile flags
|
||||
#---------------------------------------------------------------------
|
||||
@@ -223,7 +231,7 @@ cdebug = -Z7 -WX -Od -GZ
|
||||
!endif
|
||||
|
||||
### Declarations common to all compiler options
|
||||
cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\
|
||||
cflags = -nologo -c -W3 -D_CRT_SECURE_NO_WARNINGS -YX -Fp$(TMP_DIR)^\
|
||||
|
||||
!if $(MSVCRT)
|
||||
!if $(DEBUG)
|
||||
@@ -239,8 +247,8 @@ crt = -MT
|
||||
!endif
|
||||
!endif
|
||||
|
||||
INCLUDES = $(TCL_INCLUDES) -I"$(WINDIR)" -I"$(GENERICDIR)" \
|
||||
-I"$(ROOT)\.."
|
||||
INCLUDES = $(SQL_INCLUDES) $(TCL_INCLUDES) -I"$(WINDIR)" \
|
||||
-I"$(GENERICDIR)" -I"$(ROOT)\.."
|
||||
BASE_CLFAGS = $(cflags) $(cdebug) $(crt) $(INCLUDES) \
|
||||
-DSQLITE_3_SUFFIX_ONLY=1 -DSQLITE_ENABLE_RTREE=1 \
|
||||
-DSQLITE_ENABLE_FTS3=1 -DSQLITE_OMIT_DEPRECATED=1
|
||||
@@ -341,20 +349,17 @@ $(PRJSTUBLIB): $(PRJSTUBOBJS)
|
||||
# Implicit rules
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
{$(WINDIR)}.c{$(TMP_DIR)}.obj::
|
||||
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
|
||||
$<
|
||||
<<
|
||||
$(TMP_DIR)\sqlite3.obj: $(SQLITE_SRCDIR)\sqlite3.c
|
||||
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ \
|
||||
-c $(SQLITE_SRCDIR)\sqlite3.c
|
||||
|
||||
{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
|
||||
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
|
||||
$<
|
||||
<<
|
||||
$(TMP_DIR)\tclsqlite.obj: $(TCLSQLITE_SRCDIR)\tclsqlite.c
|
||||
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ \
|
||||
-c $(TCLSQLITE_SRCDIR)\tclsqlite.c
|
||||
|
||||
{$(COMPATDIR)}.c{$(TMP_DIR)}.obj::
|
||||
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
|
||||
$<
|
||||
<<
|
||||
$(TMP_DIR)\tclsqlite3.obj: $(TCLSQLITE_SRCDIR)\tclsqlite3.c
|
||||
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ \
|
||||
-c $(TCLSQLITE_SRCDIR)\tclsqlite3.c
|
||||
|
||||
{$(WINDIR)}.rc{$(TMP_DIR)}.res:
|
||||
$(rc32) -fo $@ -r -i "$(GENERICDIR)" -D__WIN32__ \
|
||||
|
||||
@@ -120,7 +120,7 @@ int sqlite3_compress_init(
|
||||
SQLITE_EXTENSION_INIT2(pApi);
|
||||
(void)pzErrMsg; /* Unused parameter */
|
||||
rc = sqlite3_create_function(db, "compress", 1,
|
||||
SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
|
||||
SQLITE_UTF8 | SQLITE_INNOCUOUS,
|
||||
0, compressFunc, 0, 0);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_create_function(db, "uncompress", 1,
|
||||
|
||||
@@ -126,7 +126,7 @@ static int seriesConnect(
|
||||
pNew = *ppVtab = sqlite3_malloc( sizeof(*pNew) );
|
||||
if( pNew==0 ) return SQLITE_NOMEM;
|
||||
memset(pNew, 0, sizeof(*pNew));
|
||||
sqlite3_vtab_config(db, SQLITE_INNOCUOUS);
|
||||
sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -2069,7 +2069,7 @@ static int spellfix1Init(
|
||||
if( pNew->zTableName==0 ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
sqlite3_vtab_config(db, SQLITE_INNOCUOUS);
|
||||
sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);
|
||||
rc = sqlite3_declare_vtab(db,
|
||||
"CREATE TABLE x(word,rank,distance,langid, "
|
||||
"score, matchlen, phonehash HIDDEN, "
|
||||
|
||||
@@ -40,7 +40,7 @@ static sqlite3_stmt *sqlite3UserAuthPrepare(
|
||||
char *zSql;
|
||||
int rc;
|
||||
va_list ap;
|
||||
int savedFlags = db->flags;
|
||||
u64 savedFlags = db->flags;
|
||||
|
||||
va_start(ap, zFormat);
|
||||
zSql = sqlite3_vmprintf(zFormat, ap);
|
||||
|
||||
84
manifest
84
manifest
@@ -1,5 +1,5 @@
|
||||
C Merge\sall\srecent\senhancements\sand\sfixes\sfrom\strunk\sinto\sthe\sapple-osx\sbranch.
|
||||
D 2020-01-15T12:49:49.240
|
||||
C Merge\sversion\s3.31.0
|
||||
D 2020-01-22T20:36:33.266
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -22,13 +22,13 @@ F autoconf/configure.ac 3cd933b959fe514eebd1ca1717dfddbf2c9b825b6bc2c5f744deaf5d
|
||||
F autoconf/tea/Makefile.in b438a7020446c8a8156e8d97c8914a04833da6fd
|
||||
F autoconf/tea/README 3e9a3c060f29a44344ab50aec506f4db903fb873
|
||||
F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
|
||||
F autoconf/tea/configure.ac 8aa16e3f0a5ca7959d4af198f46934ec187d395f
|
||||
F autoconf/tea/configure.ac 6f379dfd46ace5caa97791acae07675eff62cada9800fc7bb36c789ecb7f17ac
|
||||
F autoconf/tea/doc/sqlite3.n e1fe45d4f5286ee3d0ccc877aca2a0def488e9bb
|
||||
F autoconf/tea/license.terms 13bd403c9610fd2b76ece0ab50c4c5eda933d523
|
||||
F autoconf/tea/pkgIndex.tcl.in 3ef61715cf1c7bdcff56947ffadb26bc991ca39d
|
||||
F autoconf/tea/tclconfig/install-sh bdd5e293591621ae60d9824d86a4b1c5f22c3d00
|
||||
F autoconf/tea/tclconfig/tcl.m4 66ddf0a5d5e4b1d29bff472c0985fd7fa89d0fb5
|
||||
F autoconf/tea/win/makefile.vc f89d0184d0eee5f7e356ea407964dcd139939928
|
||||
F autoconf/tea/win/makefile.vc 71915591c07cd5137711dc40ba3e127deb3f4531b9aad220b724cf5b451362bd
|
||||
F autoconf/tea/win/nmakehlp.c 247538ad8e8c508f33c03ec1fbd67d3a07ef6291
|
||||
F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
||||
F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
|
||||
@@ -287,7 +287,7 @@ F ext/misc/btreeinfo.c 4f0ebf278f46e68e6306c667917766cebc5550fd35d5de17847988e22
|
||||
F ext/misc/carray.c 91e9a7f512fda934894bed30464552fffa7d3073b5be04189ae0bd0c59f26bfd
|
||||
F ext/misc/closure.c dbfd8543b2a017ae6b1a5843986b22ddf99ff126ec9634a2f4047cd14c85c243
|
||||
F ext/misc/completion.c a0efe03edfdc4f717c61e6c9b0bfe2708ff7878010dae3174980a68fdf76aabc
|
||||
F ext/misc/compress.c 3ed77691a3ce9e50921ae2b133dc176bb4d5587fdb57bde5872c4e5c348ce0bc
|
||||
F ext/misc/compress.c 3354c77a7c8e86e07d849916000cdac451ed96500bfb5bd83b20eb61eee012c9
|
||||
F ext/misc/csv.c 3ed979c1eb35e35a98b30ef545a2facf62994594217681d9138b4b75faf6b0d7
|
||||
F ext/misc/dbdata.c e316fba936571584e55abd5b974a32a191727a6b746053a0c9d439bd2cf93940
|
||||
F ext/misc/dbdump.c baf6e37447c9d6968417b1cd34cbedb0b0ab3f91b5329501d8a8d5be3287c336
|
||||
@@ -311,11 +311,11 @@ F ext/misc/regexp.c 246244c714267f303df76acf73dcf110cf2eaf076896aaaba8db6d6d21a1
|
||||
F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c
|
||||
F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d38556c
|
||||
F ext/misc/scrub.c db9fff56fed322ca587d73727c6021b11ae79ce3f31b389e1d82891d144f22ad
|
||||
F ext/misc/series.c a733a77d152983cc5d337c9df7b358ad17cfb44965476843cd03e2f571054914
|
||||
F ext/misc/series.c 4057dda3579b38ff88b2d3b13b4dd92dbd9d6f90dac2b55c19b0a8ed87ee4959
|
||||
F ext/misc/sha1.c 1190aec0d9d886d9f5ffdf891142a626812327d11472c0cade3489db3b7b140a
|
||||
F ext/misc/shathree.c 135b7c145db4a09b1650c3e7aff9cb538763a9a361e834c015dd1aaf8d5c9a00
|
||||
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
|
||||
F ext/misc/spellfix.c 5cb7e1876925508aeef0e5ecd5ec8dab6089e09fa44cbf4322d5cb7a821a53f9
|
||||
F ext/misc/spellfix.c 94df9bbfa514a563c1484f684a2df3d128a2f7209a84ca3ca100c68a0163e29f
|
||||
F ext/misc/sqlar.c c9e5d58544e1506135806a1e0f525f92d4bb6bb125348dce469d778fb334fbce
|
||||
F ext/misc/stmt.c 8a8dc4675042e4551e4afe99b8d0cc7a4a2fc1a8dacc0a9ce1b1bbff145da93d
|
||||
F ext/misc/templatevtab.c 8a16a91a5ceaccfcbd6aaaa56d46828806e460dd194965b3f77bf38f14b942c4
|
||||
@@ -452,7 +452,7 @@ F ext/sqlrr/sqlrr.c 8d1e6571cd6a6beabdb5bcdfe3a0e723b914db41
|
||||
F ext/sqlrr/sqlrr.h 09e4f8929ad9bc2638732c0cc0db5eef8c417824
|
||||
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
|
||||
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
|
||||
F ext/userauth/userauth.c f81aa5a3ecacf406f170c62a144405858f6f6de51dbdc0920134e629edbe2648
|
||||
F ext/userauth/userauth.c 7f00cded7dcaa5d47f54539b290a43d2e59f4b1eb5f447545fa865f002fc80cb
|
||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
|
||||
@@ -478,27 +478,27 @@ F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c 87013de9def71fea06e6209ca2d3d42c1de3206437862f36eb34426e8e2fbcfb
|
||||
F src/btree.h 6111552f19ed7a40f029cf4b33badc6fef9880314fffd80a945f0b7f43ab7471
|
||||
F src/btreeInt.h 498e93dc99e2144f843c9b787b8ab995af10f8a20f42bbf535630e5560970bab
|
||||
F src/build.c bd2f382562b08f14748d54402220be1082c2f8ff8973fad47e45a381c438f9bf
|
||||
F src/build.c 2394d2c853088106dfc1cf485d609f20e6421d7c84892b795824e454f78e50ad
|
||||
F src/callback.c c547d00963ae28100117b4fb1f0f32242109b5804374ee3bfe01138a54da7f76
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 1b0724e66f95f33b160b1af85caaf9cceb325d22abf39bd24df4f54a73982251
|
||||
F src/date.c e1d8ac7102f3f283e63e13867acb0efa33861cf34f0faf4cdbaf9fa7a1eb7041
|
||||
F src/date.c 6c408fdd2e9ddf6e8431aba76315a2d061bea2cec8fbb75e25d7c1ba08274712
|
||||
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
|
||||
F src/dbstat.c 0f55297469d4244ab7df395849e1af98eb5e95816af7c661e7d2d8402dea23da
|
||||
F src/delete.c a5c59b9c0251cf7682bc52af0d64f09b1aefc6781a63592c8f1136f7b73c66e4
|
||||
F src/expr.c 003c59158b33d7f3b198122cb0d1e13c06517cc3932e56b42283eb0e96696d66
|
||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c 92a248ec0fa4ed8ab60c98d9b188ce173aaf218f32e7737ba77deb2a684f9847
|
||||
F src/func.c 259496e4856bd0a3215d16804992f3339f3e8db29f129a5a7285c341488bbe9c
|
||||
F src/func.c 92249abc3fd7e52b249ca8eb2d15a617f70819d2fa4c777a4a33552b89bfb322
|
||||
F src/global.c 59601d885a0dbbfbd22ed2d030424a5e7f1b9809a17ca46686058bbc4a55e980
|
||||
F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
|
||||
F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
|
||||
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
|
||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c 5ba8fd376f539240939ae76b5bc9fa7ad9a0d86e9914ecd11eb7002204138c11
|
||||
F src/insert.c 2fe4d7f67078a68650f16e4efe73207899e21702e6b9d2e8ad1894c76dcad352
|
||||
F src/legacy.c f69590f141eabd2dc787710264ccfa4374fac991ea1ca2120a2550c0ffe32afd
|
||||
F src/loadext.c 8cd803f1747c03a50b32fe87ebfb5851998d0cdafefe02737daa95e0616b42bb
|
||||
F src/main.c 394d7e69ece3927918f6363cbc5f6ec3a2cd143bfcf68153d5f1bb4835a980bc
|
||||
F src/main.c 33f6f5f0d3fe200f766173c0dbe1fefe440bc9a3be274f6813479d938dc75962
|
||||
F src/malloc.c eaa4dc9602ce28b077f7de2eb275db2be270c5cc56d7fec5466301bd9b80e2f5
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||
@@ -521,22 +521,22 @@ F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c a796deff42a187cc7820dc7b2d9d07426196e558e49f40d0f7b0b1f4e3e3ff73
|
||||
F src/os_win.c b393ae2303d051684f4bdaec3984c9c9594f10adc629689108ed9aa5ab219d17
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c a54c544141cee1556a8445af7c2aae335d65a3b0d33066f31c28b441133f25cc
|
||||
F src/pager.c 4c74d95cb72b9c4dd01788f48347059225221aa2f5b4a93984f53aab15d20d05
|
||||
F src/pager.h 02f34df97a166ee5096560dc00d2acec4d7cf7c63e95ba21cd00ad60fd5d95d3
|
||||
F src/parse.y c8d2de64db469fd56e0fa24da46cd8ec8523eb98626567d2708df371b47fdc3f
|
||||
F src/pcache.c 385ff064bca69789d199a98e2169445dc16e4291fa807babd61d4890c3b34177
|
||||
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
||||
F src/pcache1.c 33a0577ec7241397244369aa4874b41970fbad41190847243797a350331cb6d1
|
||||
F src/pragma.c a2bc2d320c9d208f38b3b27ce2b9c2e70cc5ee95849de12231f35f4ac6f2bd06
|
||||
F src/pragma.c bd149305f0d16d3dfda3ad41a4dd51ac6a75921931c38f6e36b94ac67889ae85
|
||||
F src/pragma.h 9f86a3a3a0099e651189521c8ad03768df598974e7bbdc21c7f9bb6125592fbd
|
||||
F src/prepare.c 852827aab652c9a25c6a599a021e1d24e27321ebde0591e48eac5a5e21585b0b
|
||||
F src/printf.c 9be6945837c839ba57837b4bc3af349eba630920fa5532aa518816defe42a7d4
|
||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||
F src/resolve.c 1139e3157c710c6e6f04fe726f4e0d8bdb1ae89a276d3b0ca4975af163141c9c
|
||||
F src/resolve.c f0781c9e180028b279bc4ff079ad54f4727223d470c8d2343643fcaf79b67740
|
||||
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
|
||||
F src/select.c 924b61cef57033a8ca1ed3dcffd02445a7dd0c837cc849b2e4117251cac831f5
|
||||
F src/shell.c.in 1b2a636ba5b676f844a2af2a5f719b5c4ace7c6825d56270e2ae912b2a5fc840
|
||||
F src/sqlite.h.in 34711888550dcd8bca400621d17e6f1177dfea0cbfd35d026dfbc63aadf33eda
|
||||
F src/select.c 3f7aecf64b08b018b89e4fe16ea621cc9a0e3f3801e9e5638cfe1a6035fa1581
|
||||
F src/shell.c.in c2e20c43a44fb5588a6c27ce60589538fbf4794fd7686f5b2598eca22eaae1fa
|
||||
F src/sqlite.h.in ae9513f9bfc331acdac8a108486ea3b6d91447e5c2e948f6c8862f1b10f4e284
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3_private.h aee73ebaea1963e528b61408c01ba82f49fdf3dca9cbe940f3b0f3d9cec25942
|
||||
F src/sqlite3ext.h b0f776a0d042b23b6bcbb6b0943e8a3768c7f0b438a275e7168f0204e223a4db
|
||||
@@ -544,7 +544,7 @@ F src/sqliteInt.h 7fbd095709d25a70e6ff5f31e422f21b34001f91a74dde43ba01ad577c0adf
|
||||
F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
|
||||
F src/status.c 9ff2210207c6c3b4d9631a8241a7d45ab1b26a0e9c84cb07a9b5ce2de9a3b278
|
||||
F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
|
||||
F src/tclsqlite.c f2dae14bfe7a35c94b6d515df88071014678ec39dafebdcf8e6bde91d62516c1
|
||||
F src/tclsqlite.c 97590069efaba5a4928ecffb606e3771dd93ee8e6bf248a62a6507c37a2b2e46
|
||||
F src/test1.c 8157589a22f1be5eadb8e5218a0ab2e98716822098532ac2368c470fb8d6fc79
|
||||
F src/test2.c 3efb99ab7f1fc8d154933e02ae1378bac9637da5
|
||||
F src/test3.c 61798bb0d38b915067a8c8e03f5a534b431181f802659a6616f9b4ff7d872644
|
||||
@@ -605,24 +605,24 @@ F src/trigger.c a40d50e88bd3355f1d2a73f0a3b2d6b42eae26ca4219001b82ef0d064439badc
|
||||
F src/update.c 9ad19af96aff95dc02a923a99f97c1bc0b909009a29a2914b796f786b9ac0c60
|
||||
F src/upsert.c 2920de71b20f04fe25eb00b655d086f0ba60ea133c59d7fa3325c49838818e78
|
||||
F src/utf.c 736ff76753236ffbc8b5b939f5e0607f28aeaa7c780b3a56b419228f0a81c87b
|
||||
F src/util.c e5f3971160154e5c9b660fd119b02ec4890e87cd18a5bc4d45ee60cddbb9e6a2
|
||||
F src/util.c d035b09df9cecbc0e8f07c34b815acbf0d43c8adc8d2c540e3dc92eecb27855a
|
||||
F src/vacuum.c 82dcec9e7b1afa980288718ad11bc499651c722d7b9f32933c4d694d91cb6ebf
|
||||
F src/vdbe.c bb6cc5fb76c25369c88b1c4e152bedefa182ddf0d0ac71fdaa53872998add38e
|
||||
F src/vdbe.c e9f71d25acc9a367fba8e2688891f978530a5d3e44f63275d496752ef6e29d19
|
||||
F src/vdbe.h defd693289c7bb8d325f109be9490c77138061211a116827da7244b6015a4934
|
||||
F src/vdbeInt.h 30d3e8b991547cdf39025e416a0a737b0416d46747af70ae058f60e2e0466fe7
|
||||
F src/vdbeapi.c 0ae0004c43d54219d1446c04c6bdd91fa2f50de9ddf9612f05b76ecf735c5c66
|
||||
F src/vdbeaux.c ff690e6c9314ef281de7c06f8c8c33393f0afca80aabb1fe69836dcf2d60b0bf
|
||||
F src/vdbeblob.c 253ed82894924c362a7fa3079551d3554cd1cdace39aa833da77d3bc67e7c1b1
|
||||
F src/vdbemem.c ad9e6217635f2b04df98bc57b12c98cefc9c0a1745cca47f4e8109119213253d
|
||||
F src/vdbemem.c 6200af702c87105d5b00d8ac5f5fa2c6d8f796aa974dbe2d15dcd95379ba1fa7
|
||||
F src/vdbesort.c a3be032cc3fee0e3af31773af4a7a6f931b7230a34f53282ccf1d9a2a72343be
|
||||
F src/vdbetrace.c fa3bf238002f0bbbdfb66cc8afb0cea284ff9f148d6439bc1f6f2b4c3b7143f0
|
||||
F src/vtab.c 7b704a90515a239c6cdba6a66b1bb3a385e62326cceb5ecb05ec7a091d6b8515
|
||||
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 48ace3d10f878f4ae0877c03c71e23050e47e5d00707c38d8c131fd56c8027fe
|
||||
F src/wal.c 11c073cc7f970dc5f5856caa75ba3df2e8a481ba4a99795ed37af441fb8dad4b
|
||||
F src/wal.h bc4bdd9ee970c9d62197fa4139d7782f4d96d75152d1e6d4ead4d45dd684187d
|
||||
F src/walker.c a137468bf36c92e64d2275caa80c83902e3a0fc59273591b96c6416d3253d05d
|
||||
F src/where.c df2bea0e0122e853d9f1a8ec68920744166d2a524e338eba92e5470538ecd1f9
|
||||
F src/whereInt.h e1d1db6bbec0ba4f345acc338f956c8237a6f06413afa68c6414e82fb5b06745
|
||||
F src/where.c 2005d0511e05e5f7b6fb3be514b44f264f23d45f3b0cc5e150c63e3006a003e5
|
||||
F src/whereInt.h 9157228db086f436a574589f8cc5749bd971e94017c552305ad9ec472ed2e098
|
||||
F src/wherecode.c ec8870d6fe79668dd12d7edc65ae9771828d6cdfe478348c8abd872a89fdbadd
|
||||
F src/whereexpr.c 4b34be1434183e7bb8a05d4bf42bd53ea53021b0b060936fbd12062b4ff6b396
|
||||
F src/window.c f8ba2ee12a19b51d3ba42c16277c74185ee9215306bc0d5a03974ade8b5bc98f
|
||||
@@ -852,13 +852,13 @@ F test/e_walckpt.test 9f20ab843538484c57069074b126699266ee5521
|
||||
F test/e_walhook.test 01b494287ba9e60b70f6ebf3c6c62e0ffe01788e344a4846b08e5de0b344cb66
|
||||
F test/emptytable.test a38110becbdfa6325cd65cb588dca658cd885f62
|
||||
F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
|
||||
F test/enc2.test 83437a79ba1545a55fb549309175c683fb334473
|
||||
F test/enc2.test 848bf05f15b011719f478dddb7b5e9aea35e39e457493cba4c4eef75d849a5ec
|
||||
F test/enc3.test 6807f7a7740a00361ca8d0ccd66bc60c8dc5f2b6
|
||||
F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
|
||||
F test/eqp.test 84879b63e3110552bf8ce648a3507dc3ceb72109ecec83c2aef0db37a27f6382
|
||||
F test/errmsg.test eae9f091eb39ce7e20305de45d8e5d115b68fa856fba4ea6757b6ca3705ff7f9
|
||||
F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
|
||||
F test/exclusive.test 23484cc4ef52e8930c33934440e027da7bc894d3826476da85ffd362fbbfbcf9
|
||||
F test/exclusive.test a9ee8221ee937574264c7ab068a0f52ea72d50e06e8cb2206a3eecf92b58ad9a
|
||||
F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
|
||||
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
|
||||
F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
|
||||
@@ -937,7 +937,7 @@ F test/fts3am.test 218aa6ba0dfc50c7c16b2022aac5c6be593d08d8
|
||||
F test/fts3an.test a49ccadc07a2f7d646ec1b81bc09da2d85a85b18
|
||||
F test/fts3ao.test 266989148fec6d9f1bb6c5382f7aa3dcea0e9cd444576e28dd2b9287ac7dd220
|
||||
F test/fts3atoken.test dc2078ce464914efe3a8dfc545dd034a0fc14f2ab425c240471d5a5f1c721400
|
||||
F test/fts3auto.test bfe0857bd0b69d68dd685a931b58486411a69f5794a7f6d6fe808bfa31a99614
|
||||
F test/fts3auto.test 649aa4c198d7acc5cd6355e19ee073d051c40d9e88a43fc3d88af46bdf3e99d5
|
||||
F test/fts3aux1.test 7a170e172afdbceb67f5baa05941fd4fbf56af42f61daa3d140f4b4bf4cb68f6
|
||||
F test/fts3aux2.test 2459e7fa3e22734aed237d1e2ae192f5541c4d8b218956ad2d90754977bf907f
|
||||
F test/fts3b.test c15c4a9d04e210d0be67e54ce6a87b927168fbf9c1e3faec8c1a732c366fd491
|
||||
@@ -1015,9 +1015,9 @@ F test/fuzz.test 96083052bf5765e4518c1ba686ce2bab785670d1
|
||||
F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
|
||||
F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c31
|
||||
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
|
||||
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
|
||||
F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830
|
||||
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
|
||||
F test/fuzzcheck.c 0df68e0df3b93a8c8fc24c9873127c7d78024b51444193545f985dbc90ac024e
|
||||
F test/fuzzcheck.c a9746aa49843827f960bc875cc70e04b0cfcd3e10e6676e3abc402ad190e165f
|
||||
F test/fuzzdata1.db d36e88741b4f23bcbaaf55b006290669d03c6c891cf13c7b3a53bc1b097b693f
|
||||
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
|
||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||
@@ -1078,7 +1078,7 @@ F test/insert4.test fb9e0f752c75f453555990250b449f6d123ae6a3ebf054d14e4470de4498
|
||||
F test/insert5.test 394f96728d1258f406fe5f5aeb0aaf29487c39a6
|
||||
F test/insertfault.test ac63d14ea3b49c573673a572f4014b9117383a03e497c58f308b5c776e4a7f74
|
||||
F test/instr.test 107df2b9b74a4b59315916b575590a08f2a714de0754abe541f10a0971d0a2a4
|
||||
F test/instrfault.test 0f870b218ea17cd477bb19ed330eecdb460dd53a
|
||||
F test/instrfault.test 95e28efade652e6d51ae11b377088fe523a581a07ec428009e152a4dd0e0f44c
|
||||
F test/intarray.test bb976b0b3df0ebb6a2eddfb61768280440e672beba5460ed49679ea984ccf440
|
||||
F test/interrupt.test 16ea879ec728cb76414c148c5f24afd5d1f91054
|
||||
F test/interrupt2.test e4408ca770a6feafbadb0801e54a0dcd1a8d108d
|
||||
@@ -1092,7 +1092,7 @@ F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c
|
||||
F test/ioerr5.test 2edfa4fb0f896f733071303b42224df8bedd9da4
|
||||
F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b
|
||||
F test/istrue.test 75327829744e65cc8700e69340b8e6c192e10e39dfae7ccb0e970d3c4f49090a
|
||||
F test/join.test 413ffda0d51f98583aacf36b41764b1d87f754bfdee2dd88e5821fd126ccaf55
|
||||
F test/join.test 06b2855f16ed0630afbeb51605f5b31e9d86fc2e596f5c7ada232cf99e39710c
|
||||
F test/join2.test 659bc6193f5c3fe20fa444dd2c91713db8c33e376b098b860644e175e87b8dbc
|
||||
F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
|
||||
F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
|
||||
@@ -1283,7 +1283,7 @@ F test/rowvalue7.test c1cbdbf407029db01f87764097c6ac02a1c5a37efd2776eff32a9cdfdf
|
||||
F test/rowvalue8.test 5900eddad9e2c3c2e26f1a95f74aafc1232ee5e0
|
||||
F test/rowvalue9.test d8dd2c6ecac432dadaa79e41dc2434f007be1b6b
|
||||
F test/rowvaluefault.test 7cd9ccc6c2fbdd881672984087aad0491bb75504
|
||||
F test/rowvaluevtab.test d166df5b666662de1ebf40d6f3849f8a76b34e17183a6cc7f81b420c462ce447
|
||||
F test/rowvaluevtab.test cd9747bb3f308086944c07968f547ad6b05022e698d80b9ffbdfe09ce0b8da6f
|
||||
F test/rtree.test 0c8d9dd458d6824e59683c19ab2ffa9ef946f798
|
||||
F test/run-wordcount.sh 891e89c4c2d16e629cd45951d4ed899ad12afc09
|
||||
F test/savepoint.test 1f8a6b1aea9a0d05837adc463d4bf47bd9d0f1c842f1c2a9caccd639baf34bf9
|
||||
@@ -1409,7 +1409,7 @@ F test/tabfunc01.test 5ca6d004157a3e886a55a9387b960cc0db41acd88753eb597ff409ec6c
|
||||
F test/table.test eb3463b7add9f16a5bb836badf118cf391b809d09fdccd1f79684600d07ec132
|
||||
F test/tableapi.test ecbcc29c4ab62c1912c3717c48ea5c5e59f7d64e4a91034e6148bd2b82f177f4
|
||||
F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
|
||||
F test/tclsqlite.test 6f8705d09377e2f2ff482ab181a1388773953a280623fff2ccab0e87d2bc10a2
|
||||
F test/tclsqlite.test 79a473f5797e317c08f2c4f8192edb3eea6a67329b1087453328b66a7cb31070
|
||||
F test/tempdb.test 8d0c2ee1cc2286629ca1d7e4e470a8ecf3951b65fb93c6bb7e27fee8ed9f8055
|
||||
F test/tempdb2.test 353864e96fd3ae2f70773d0ffbf8b1fe48589b02c2ec05013b540879410c3440
|
||||
F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
|
||||
@@ -1598,7 +1598,7 @@ F test/triggerC.test 29f5a28d0fe39e6e2c01f6e1f53f08c0955170ae10a63ad023e33cb0a16
|
||||
F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
|
||||
F test/triggerE.test ede2e4bce4ba802337bd69d39447fa04a938e06d84a8bfc53c76850fc36ed86d
|
||||
F test/triggerF.test 5d76f0a8c428ff87a4d5ed52da06f6096a2c787a1e21b846111dfac4123de3ad
|
||||
F test/triggerG.test d5caeef6144ede2426dd13211fd72248241ff2ebc68e12a4c0bf30f5faa21499
|
||||
F test/triggerG.test 2b816093c91ba73c733cfa8aedcc210ad819d72a98b1da30768a3c56505233e9
|
||||
F test/trustschema1.test 4e970aef0bfe0cee139703cc7209d0e0f07725d999b180ba50770f49edef1494
|
||||
F test/tt3_checkpoint.c 9e75cf7c1c364f52e1c47fd0f14c4340a9db0fe1
|
||||
F test/tt3_index.c 39eec10a35f57672225be4d182862152896dee4a
|
||||
@@ -1742,9 +1742,9 @@ F test/windowB.test 7a983ea1cc1cf72be7f378e4b32f6cb2d73014c5cd8b25aaee825164cd42
|
||||
F test/windowerr.tcl f5acd6fbc210d7b5546c0e879d157888455cd4a17a1d3f28f07c1c8a387019e0
|
||||
F test/windowerr.test a8b752402109c15aa1c5efe1b93ccb0ce1ef84fa964ae1cd6684dd0b3cc1819b
|
||||
F test/windowfault.test 8e3b69abe0eea9595ba3940afd9c63644e11966ed8815734b67f1479a8e9891a
|
||||
F test/with1.test 386d1c1763a9d369fd08ea03145869b6313ba263e1a102df5a275007000d1b47
|
||||
F test/with1.test 584580a5ae79868a91873863f8cb2d00040006dc1e4c332ef1d8642f2815dc6e
|
||||
F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1ab
|
||||
F test/with3.test 7de8dff2891aca0f9453463e4a2d6eb995baf137827d5596116fee53e22a4e29
|
||||
F test/with3.test 13b3336739da648a9e4dfa11bb04e73a920c97620041007c5f75d5d14084c346
|
||||
F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
|
||||
F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
|
||||
F test/without_rowid1.test 9cfb83705c506e3849fa7efc88a3c9a15f9a50bf9b1516b41757a7cef9bba8c3
|
||||
@@ -1805,7 +1805,7 @@ F tool/mksqlite3h.tcl 080873e3856eceb9d289a08a00c4b30f875ea3feadcbece796bd509b15
|
||||
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
|
||||
F tool/mkvsix.tcl b9e0777a213c23156b6542842c238479e496ebf5
|
||||
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
|
||||
F tool/omittest.tcl 27f9413c3343bac200a28d81e8234adb0f5e141c4771893cb19b40235a91f1e0
|
||||
F tool/omittest.tcl 6616fbf384f0f630113eab27d41d4530435dd94e2883307759988b45f0604a3b
|
||||
F tool/opcodesum.tcl 740ed206ba8c5040018988129abbf3089a0ccf4a
|
||||
F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b
|
||||
F tool/replace.tcl 60f91e8dd06ab81f74d213ecbd9c9945f32ac048
|
||||
@@ -1862,7 +1862,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 0a988ce3405f2fdfe8d80db2893bf675a41ba6ef5c6e29f6a80cfc307d83bfab 3d7434a9d85dae9135473d1c58c22ac01a282e654807aa10be9b39f127291594
|
||||
R c61df8cb71b4cf29e42cb6ed48c0a787
|
||||
P dadedf41c7cced0cea5c69584ff11405c2fc53518c7ddbea2e4e51cc44b4cd0a f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824
|
||||
R 94ecb94552bc20bc10f60600fda897cb
|
||||
U drh
|
||||
Z 4063aeda5b0324dd58fef8e47f1f5cb3
|
||||
Z 47e099c161019264a14f4b1792d480bf
|
||||
|
||||
@@ -1 +1 @@
|
||||
dadedf41c7cced0cea5c69584ff11405c2fc53518c7ddbea2e4e51cc44b4cd0a
|
||||
0eae87ad11107f420b00958fa5a9b8037b775f0586e9fb1e2d5f6c04d7ae4afc
|
||||
@@ -2268,8 +2268,8 @@ void sqlite3EndTable(
|
||||
** expression to a NULL. This prevents code generators that operate
|
||||
** on the expression from inserting extra parts into the expression
|
||||
** tree that have been allocated from lookaside memory, which is
|
||||
** illegal in a schema and will lead to errors heap corruption when
|
||||
** the database connection closes. */
|
||||
** illegal in a schema and will lead to errors or heap corruption
|
||||
** when the database connection closes. */
|
||||
sqlite3ExprDelete(db, pX);
|
||||
p->aCol[ii].pDflt = sqlite3ExprAlloc(db, TK_NULL, 0, 0);
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ static int parseModifier(
|
||||
r = p->s*1000.0 + 210866760000000.0;
|
||||
if( r>=0.0 && r<464269060800000.0 ){
|
||||
clearYMD_HMS_TZ(p);
|
||||
p->iJD = (sqlite3_int64)r;
|
||||
p->iJD = (sqlite3_int64)(r + 0.5);
|
||||
p->validJD = 1;
|
||||
p->rawS = 0;
|
||||
rc = 0;
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
#include "sqliteInt.h"
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#ifndef SQLITE_OMIT_FLOATING_POINT
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include "vdbeInt.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -1640,6 +1640,7 @@ void sqlite3GenerateConstraintChecks(
|
||||
}
|
||||
if( b2ndPass ) break; /* Never need more than 2 passes */
|
||||
b2ndPass = 1;
|
||||
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
|
||||
if( nSeenReplace>0 && (pTab->tabFlags & TF_HasGenerated)!=0 ){
|
||||
/* If any NOT NULL ON CONFLICT REPLACE constraints fired on the
|
||||
** first pass, recomputed values for all generated columns, as
|
||||
@@ -1647,6 +1648,7 @@ void sqlite3GenerateConstraintChecks(
|
||||
*/
|
||||
sqlite3ComputeGeneratedColumns(pParse, regNewData+1, pTab);
|
||||
}
|
||||
#endif
|
||||
} /* end of 2-pass loop */
|
||||
} /* end if( has-not-null-constraints ) */
|
||||
|
||||
|
||||
@@ -4033,6 +4033,7 @@ int sqlite3_test_control(int op, ...){
|
||||
** This test-control also resets the PRNG so that the new seed will
|
||||
** be used for the next call to sqlite3_randomness().
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_WSD
|
||||
case SQLITE_TESTCTRL_PRNG_SEED: {
|
||||
int x = va_arg(ap, int);
|
||||
int y;
|
||||
@@ -4043,6 +4044,7 @@ int sqlite3_test_control(int op, ...){
|
||||
sqlite3_randomness(0,0);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** sqlite3_test_control(BITVEC_TEST, size, program)
|
||||
|
||||
14
src/pager.c
14
src/pager.c
@@ -4923,11 +4923,13 @@ int sqlite3PagerOpen(
|
||||
/* Fill in the Pager.zFilename and pPager.zQueryParam fields */
|
||||
pPtr[0] = '\003'; pPtr[1] = 0; pPtr += 2;
|
||||
pPager->zFilename = (char*)pPtr;
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1;
|
||||
if( zUri ){
|
||||
memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */
|
||||
if( nPathname>0 ){
|
||||
memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1;
|
||||
if( zUri ){
|
||||
memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */
|
||||
}
|
||||
/* Double-zero terminator implied by the sqlite3MallocZero */
|
||||
}
|
||||
/* Double-zero terminator implied by the sqlite3MallocZero */
|
||||
|
||||
if( nPathname ) sqlite3DbFree(0, zPathname);
|
||||
pPager->pVfs = pVfs;
|
||||
@@ -7059,8 +7061,8 @@ int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
|
||||
** sqlite3_uri_parameter() and sqlite3_filename_database() and friends.
|
||||
*/
|
||||
const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){
|
||||
static const char zFake[] = { 0x01, 0x00, 0x00, 0x00 };
|
||||
return (nullIfMemDb && pPager->memDb) ? &zFake[2] : pPager->zFilename;
|
||||
static const char zFake[] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
|
||||
return (nullIfMemDb && pPager->memDb) ? &zFake[3] : pPager->zFilename;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
15
src/pragma.c
15
src/pragma.c
@@ -1824,10 +1824,17 @@ void sqlite3Pragma(
|
||||
** will be overwritten when the schema is next loaded. If it does not
|
||||
** already exists, it will be created to use the new encoding value.
|
||||
*/
|
||||
if(
|
||||
!(DbHasProperty(db, 0, DB_SchemaLoaded)) ||
|
||||
DbHasProperty(db, 0, DB_Empty)
|
||||
){
|
||||
int canChangeEnc = 1; /* True if allowed to change the encoding */
|
||||
int i; /* For looping over all attached databases */
|
||||
for(i=0; i<db->nDb; i++){
|
||||
if( db->aDb[i].pBt!=0
|
||||
&& DbHasProperty(db,i,DB_SchemaLoaded)
|
||||
&& !DbHasProperty(db,i,DB_Empty)
|
||||
){
|
||||
canChangeEnc = 0;
|
||||
}
|
||||
}
|
||||
if( canChangeEnc ){
|
||||
for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
|
||||
if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
|
||||
SCHEMA_ENC(db) = ENC(db) =
|
||||
|
||||
@@ -868,11 +868,14 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
ExprSetProperty(pExpr,EP_ConstFunc);
|
||||
}
|
||||
if( (pDef->funcFlags & SQLITE_FUNC_CONSTANT)==0 ){
|
||||
/* Date/time functions that use 'now', and other functions like
|
||||
/* Clearly non-deterministic functions like random(), but also
|
||||
** date/time functions that use 'now', and other functions like
|
||||
** sqlite_version() that might change over time cannot be used
|
||||
** in an index. */
|
||||
** in an index or generated column. Curiously, they can be used
|
||||
** in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all
|
||||
** all this. */
|
||||
sqlite3ResolveNotValid(pParse, pNC, "non-deterministic functions",
|
||||
NC_SelfRef, 0);
|
||||
NC_IdxExpr|NC_PartIdx|NC_GenCol, 0);
|
||||
}else{
|
||||
assert( (NC_SelfRef & 0xff)==NC_SelfRef ); /* Must fit in 8 bits */
|
||||
pExpr->op2 = pNC->ncFlags & NC_SelfRef;
|
||||
|
||||
18
src/select.c
18
src/select.c
@@ -2496,7 +2496,9 @@ static int multiSelectValues(
|
||||
assert( p->selFlags & SF_Values );
|
||||
assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) );
|
||||
assert( p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr );
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( p->pWin ) return -1;
|
||||
#endif
|
||||
if( p->pPrior==0 ) break;
|
||||
assert( p->pPrior->pNext==p );
|
||||
p = p->pPrior;
|
||||
@@ -3859,7 +3861,9 @@ static int flattenSubquery(
|
||||
if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0 /* (17b) */
|
||||
|| (pSub1->pPrior && pSub1->op!=TK_ALL) /* (17a) */
|
||||
|| pSub1->pSrc->nSrc<1 /* (17c) */
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
|| pSub1->pWin /* (17e) */
|
||||
#endif
|
||||
){
|
||||
return 0;
|
||||
}
|
||||
@@ -4233,7 +4237,11 @@ static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){
|
||||
int i;
|
||||
WhereConst *pConst;
|
||||
if( pExpr->op!=TK_COLUMN ) return WRC_Continue;
|
||||
if( ExprHasProperty(pExpr, EP_FixedCol) ) return WRC_Continue;
|
||||
if( ExprHasProperty(pExpr, EP_FixedCol|EP_FromJoin) ){
|
||||
testcase( ExprHasProperty(pExpr, EP_FixedCol) );
|
||||
testcase( ExprHasProperty(pExpr, EP_FromJoin) );
|
||||
return WRC_Continue;
|
||||
}
|
||||
pConst = pWalker->u.pConst;
|
||||
for(i=0; i<pConst->nConst; i++){
|
||||
Expr *pColumn = pConst->apExpr[i*2];
|
||||
@@ -4831,7 +4839,7 @@ static void selectPopWith(Walker *pWalker, Select *p){
|
||||
if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){
|
||||
With *pWith = findRightmost(p)->pWith;
|
||||
if( pWith!=0 ){
|
||||
assert( pParse->pWith==pWith );
|
||||
assert( pParse->pWith==pWith || pParse->nErr );
|
||||
pParse->pWith = pWith->pOuter;
|
||||
}
|
||||
}
|
||||
@@ -4962,7 +4970,7 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
if( !IsVirtual(pTab) && cannotBeFunction(pParse, pFrom) ){
|
||||
return WRC_Abort;
|
||||
}
|
||||
#if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
|
||||
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
|
||||
if( IsVirtual(pTab) || pTab->pSelect ){
|
||||
i16 nCol;
|
||||
u8 eCodeOrig = pWalker->eCode;
|
||||
@@ -4972,6 +4980,7 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
sqlite3ErrorMsg(pParse, "access to view \"%s\" prohibited",
|
||||
pTab->zName);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
if( IsVirtual(pTab)
|
||||
&& pFrom->fg.fromDDL
|
||||
&& ALWAYS(pTab->pVTable!=0)
|
||||
@@ -4980,6 +4989,7 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
sqlite3ErrorMsg(pParse, "unsafe use of virtual table \"%s\"",
|
||||
pTab->zName);
|
||||
}
|
||||
#endif
|
||||
pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
|
||||
nCol = pTab->nCol;
|
||||
pTab->nCol = -1;
|
||||
@@ -6114,7 +6124,9 @@ int sqlite3Select(
|
||||
*/
|
||||
if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct
|
||||
&& sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
&& p->pWin==0
|
||||
#endif
|
||||
){
|
||||
p->selFlags &= ~SF_Distinct;
|
||||
pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0);
|
||||
|
||||
@@ -2761,6 +2761,9 @@ static void restore_debug_trace_modes(void){
|
||||
/* Create the TEMP table used to store parameter bindings */
|
||||
static void bind_table_init(ShellState *p){
|
||||
int wrSchema = 0;
|
||||
int defensiveMode = 0;
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_DEFENSIVE, -1, &defensiveMode);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_DEFENSIVE, 0, 0);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, -1, &wrSchema);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, 1, 0);
|
||||
sqlite3_exec(p->db,
|
||||
@@ -2770,6 +2773,7 @@ static void bind_table_init(ShellState *p){
|
||||
") WITHOUT ROWID;",
|
||||
0, 0, 0);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, wrSchema, 0);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_DEFENSIVE, defensiveMode, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1112,6 +1112,12 @@ struct sqlite3_io_methods {
|
||||
** called. This file control is the only mechanism to detect changes that
|
||||
** happen either internally or externally and that are associated with
|
||||
** a particular attached database.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_CKPT_DONE]]
|
||||
** The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint
|
||||
** in wal mode after the client has finished copying pages from the wal
|
||||
** file to the database file, but before the *-shm file is updated to
|
||||
** record the fact that the pages have been checkpointed.
|
||||
** </ul>
|
||||
*/
|
||||
#define SQLITE_FCNTL_LOCKSTATE 1
|
||||
@@ -1149,6 +1155,7 @@ struct sqlite3_io_methods {
|
||||
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
|
||||
#define SQLITE_FCNTL_DATA_VERSION 35
|
||||
#define SQLITE_FCNTL_SIZE_LIMIT 36
|
||||
#define SQLITE_FCNTL_CKPT_DONE 37
|
||||
|
||||
/* deprecated names */
|
||||
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
||||
@@ -4967,9 +4974,20 @@ int sqlite3_reset(sqlite3_stmt *pStmt);
|
||||
**
|
||||
** ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY]
|
||||
** flag, which if present prevents the function from being invoked from
|
||||
** within VIEWs or TRIGGERs. For security reasons, the [SQLITE_DIRECTONLY]
|
||||
** flag is recommended for any application-defined SQL function that has
|
||||
** side-effects.
|
||||
** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions,
|
||||
** index expressions, or the WHERE clause of partial indexes.
|
||||
**
|
||||
** <span style="background-color:#ffff90;">
|
||||
** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
|
||||
** all application-defined SQL functions that do not need to be
|
||||
** used inside of triggers, view, CHECK constraints, or other elements of
|
||||
** the database schema. This flags is especially recommended for SQL
|
||||
** functions that have side effects or reveal internal application state.
|
||||
** Without this flag, an attacker might be able to modify the schema of
|
||||
** a database file to include invocations of the function with parameters
|
||||
** chosen by the attacker, which the application will then execute when
|
||||
** the database file is opened and read.
|
||||
** </span>
|
||||
**
|
||||
** ^(The fifth parameter is an arbitrary pointer. The implementation of the
|
||||
** function can gain access to this pointer using [sqlite3_user_data()].)^
|
||||
@@ -5095,18 +5113,20 @@ int sqlite3_create_window_function(
|
||||
** The [abs|abs() function] is deterministic, for example, but
|
||||
** [randomblob|randomblob()] is not. Functions must
|
||||
** be deterministic in order to be used in certain contexts such as
|
||||
** [CHECK constraints] or [generated columns]. SQLite might also optimize
|
||||
** deterministic functions by factoring them out of inner loops.
|
||||
** with the WHERE clause of [partial indexes] or in [generated columns].
|
||||
** SQLite might also optimize deterministic functions by factoring them
|
||||
** out of inner loops.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DIRECTONLY]] <dt>SQLITE_DIRECTONLY</dt><dd>
|
||||
** The SQLITE_DIRECTONLY flag means that the function may only be invoked
|
||||
** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in
|
||||
** schema structures such as [CHECK constraints], [DEFAULT clauses],
|
||||
** [expression indexes], [partial indexes], or [generated columns]. This is
|
||||
** a security feature which is recommended for all
|
||||
** [application-defined SQL functions] that have side-effects or that
|
||||
** could potentially leak sensitive information.
|
||||
** [expression indexes], [partial indexes], or [generated columns].
|
||||
** The SQLITE_DIRECTONLY flags is a security feature which is recommended
|
||||
** for all [application-defined SQL functions], and especially for functions
|
||||
** that have side-effects or that could potentially leak sensitive
|
||||
** information.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_INNOCUOUS]] <dt>SQLITE_INNOCUOUS</dt><dd>
|
||||
@@ -8991,14 +9011,20 @@ int sqlite3_wal_checkpoint_v2(
|
||||
** If this interface is invoked outside the context of an xConnect or
|
||||
** xCreate virtual table method then the behavior is undefined.
|
||||
**
|
||||
** At present, there is only one option that may be configured using
|
||||
** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
|
||||
** may be added in the future.
|
||||
** In the call sqlite3_vtab_config(D,C,...) the D parameter is the
|
||||
** [database connection] in which the virtual table is being created and
|
||||
** which is passed in as the first argument to the [xConnect] or [xCreate]
|
||||
** method that is invoking sqlite3_vtab_config(). The C parameter is one
|
||||
** of the [virtual table configuration options]. The presence and meaning
|
||||
** of parameters after C depend on which [virtual table configuration option]
|
||||
** is used.
|
||||
*/
|
||||
int sqlite3_vtab_config(sqlite3*, int op, ...);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Virtual Table Configuration Options
|
||||
** KEYWORDS: {virtual table configuration options}
|
||||
** KEYWORDS: {virtual table configuration option}
|
||||
**
|
||||
** These macros define the various options to the
|
||||
** [sqlite3_vtab_config()] interface that [virtual table] implementations
|
||||
|
||||
@@ -2341,20 +2341,22 @@ static int SQLITE_TCLAPI DbObjCmd(
|
||||
const char *zName;
|
||||
int op;
|
||||
} aDbConfig[] = {
|
||||
{ "defensive", SQLITE_DBCONFIG_DEFENSIVE },
|
||||
{ "dqs_ddl", SQLITE_DBCONFIG_DQS_DDL },
|
||||
{ "dqs_dml", SQLITE_DBCONFIG_DQS_DML },
|
||||
{ "enable_fkey", SQLITE_DBCONFIG_ENABLE_FKEY },
|
||||
{ "enable_qpsg", SQLITE_DBCONFIG_ENABLE_QPSG },
|
||||
{ "enable_trigger", SQLITE_DBCONFIG_ENABLE_TRIGGER },
|
||||
{ "enable_view", SQLITE_DBCONFIG_ENABLE_VIEW },
|
||||
{ "fts3_tokenizer", SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER },
|
||||
{ "legacy_alter_table", SQLITE_DBCONFIG_LEGACY_ALTER_TABLE },
|
||||
{ "legacy_file_format", SQLITE_DBCONFIG_LEGACY_FILE_FORMAT },
|
||||
{ "load_extension", SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION },
|
||||
{ "no_ckpt_on_close", SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE },
|
||||
{ "enable_qpsg", SQLITE_DBCONFIG_ENABLE_QPSG },
|
||||
{ "trigger_eqp", SQLITE_DBCONFIG_TRIGGER_EQP },
|
||||
{ "reset_database", SQLITE_DBCONFIG_RESET_DATABASE },
|
||||
{ "defensive", SQLITE_DBCONFIG_DEFENSIVE },
|
||||
{ "trigger_eqp", SQLITE_DBCONFIG_TRIGGER_EQP },
|
||||
{ "trusted_schema", SQLITE_DBCONFIG_TRUSTED_SCHEMA },
|
||||
{ "writable_schema", SQLITE_DBCONFIG_WRITABLE_SCHEMA },
|
||||
{ "legacy_alter_table", SQLITE_DBCONFIG_LEGACY_ALTER_TABLE },
|
||||
{ "dqs_dml", SQLITE_DBCONFIG_DQS_DML },
|
||||
{ "dqs_ddl", SQLITE_DBCONFIG_DQS_DDL },
|
||||
};
|
||||
Tcl_Obj *pResult;
|
||||
int ii;
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdarg.h>
|
||||
#ifndef SQLITE_OMIT_FLOATING_POINT
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Routine needed to support the testcase() macro.
|
||||
|
||||
10
src/vdbe.c
10
src/vdbe.c
@@ -514,7 +514,7 @@ void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr){
|
||||
}
|
||||
}else if( f & MEM_Str ){
|
||||
int j;
|
||||
int c;
|
||||
u8 c;
|
||||
if( f & MEM_Dyn ){
|
||||
c = 'z';
|
||||
assert( (f & (MEM_Static|MEM_Ephem))==0 );
|
||||
@@ -529,7 +529,7 @@ void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr){
|
||||
}
|
||||
sqlite3_str_appendf(pStr, " %c%d[", c, pMem->n);
|
||||
for(j=0; j<25 && j<pMem->n; j++){
|
||||
u8 c = pMem->z[j];
|
||||
c = pMem->z[j];
|
||||
sqlite3_str_appendchar(pStr, 1, (c>=0x20&&c<=0x7f) ? c : '.');
|
||||
}
|
||||
sqlite3_str_appendf(pStr, "]%s", encnames[pMem->enc]);
|
||||
@@ -3918,15 +3918,13 @@ case OP_OpenEphemeral: {
|
||||
assert( pOp->p1>=0 );
|
||||
assert( pOp->p2>=0 );
|
||||
pCx = p->apCsr[pOp->p1];
|
||||
if( pCx ){
|
||||
if( pCx && pCx->pBtx ){
|
||||
/* If the ephermeral table is already open, erase all existing content
|
||||
** so that the table is empty again, rather than creating a new table. */
|
||||
assert( pCx->isEphemeral );
|
||||
pCx->seqCount = 0;
|
||||
pCx->cacheStatus = CACHE_STALE;
|
||||
if( pCx->pBtx ){
|
||||
rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
|
||||
}
|
||||
rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
|
||||
}else{
|
||||
pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, CURTYPE_BTREE);
|
||||
if( pCx==0 ) goto no_mem;
|
||||
|
||||
@@ -1559,7 +1559,11 @@ static int valueFromExpr(
|
||||
if( pVal->flags & MEM_Real ){
|
||||
pVal->u.r = -pVal->u.r;
|
||||
}else if( pVal->u.i==SMALLEST_INT64 ){
|
||||
#ifndef SQLITE_OMIT_FLOATING_POINT
|
||||
pVal->u.r = -(double)SMALLEST_INT64;
|
||||
#else
|
||||
pVal->u.r = LARGEST_INT64;
|
||||
#endif
|
||||
MemSetTypeFlag(pVal, MEM_Real);
|
||||
}else{
|
||||
pVal->u.i = -pVal->u.i;
|
||||
|
||||
@@ -1918,6 +1918,10 @@ static int walCheckpoint(
|
||||
rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));
|
||||
}
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_DONE, 0);
|
||||
if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
pInfo->nBackfill = mxSafeFrame;
|
||||
}
|
||||
|
||||
@@ -4908,14 +4908,14 @@ WhereInfo *sqlite3WhereBegin(
|
||||
** then table t2 can be omitted from the following:
|
||||
**
|
||||
** SELECT v1, v3 FROM t1
|
||||
** LEFT JOIN t2 USING (t1.ipk=t2.ipk)
|
||||
** LEFT JOIN t3 USING (t1.ipk=t3.ipk)
|
||||
** LEFT JOIN t2 ON (t1.ipk=t2.ipk)
|
||||
** LEFT JOIN t3 ON (t1.ipk=t3.ipk)
|
||||
**
|
||||
** or from:
|
||||
**
|
||||
** SELECT DISTINCT v1, v3 FROM t1
|
||||
** LEFT JOIN t2
|
||||
** LEFT JOIN t3 USING (t1.ipk=t3.ipk)
|
||||
** LEFT JOIN t3 ON (t1.ipk=t3.ipk)
|
||||
*/
|
||||
notReady = ~(Bitmask)0;
|
||||
if( pWInfo->nLevel>=2
|
||||
|
||||
@@ -274,22 +274,22 @@ struct WhereTerm {
|
||||
/*
|
||||
** Allowed values of WhereTerm.wtFlags
|
||||
*/
|
||||
#define TERM_DYNAMIC 0x01 /* Need to call sqlite3ExprDelete(db, pExpr) */
|
||||
#define TERM_VIRTUAL 0x02 /* Added by the optimizer. Do not code */
|
||||
#define TERM_CODED 0x04 /* This term is already coded */
|
||||
#define TERM_COPIED 0x08 /* Has a child */
|
||||
#define TERM_ORINFO 0x10 /* Need to free the WhereTerm.u.pOrInfo object */
|
||||
#define TERM_ANDINFO 0x20 /* Need to free the WhereTerm.u.pAndInfo obj */
|
||||
#define TERM_OR_OK 0x40 /* Used during OR-clause processing */
|
||||
#define TERM_DYNAMIC 0x0001 /* Need to call sqlite3ExprDelete(db, pExpr) */
|
||||
#define TERM_VIRTUAL 0x0002 /* Added by the optimizer. Do not code */
|
||||
#define TERM_CODED 0x0004 /* This term is already coded */
|
||||
#define TERM_COPIED 0x0008 /* Has a child */
|
||||
#define TERM_ORINFO 0x0010 /* Need to free the WhereTerm.u.pOrInfo object */
|
||||
#define TERM_ANDINFO 0x0020 /* Need to free the WhereTerm.u.pAndInfo obj */
|
||||
#define TERM_OR_OK 0x0040 /* Used during OR-clause processing */
|
||||
#ifdef SQLITE_ENABLE_STAT4
|
||||
# define TERM_VNULL 0x80 /* Manufactured x>NULL or x<=NULL term */
|
||||
# define TERM_VNULL 0x0080 /* Manufactured x>NULL or x<=NULL term */
|
||||
#else
|
||||
# define TERM_VNULL 0x00 /* Disabled if not using stat4 */
|
||||
# define TERM_VNULL 0x0000 /* Disabled if not using stat4 */
|
||||
#endif
|
||||
#define TERM_LIKEOPT 0x100 /* Virtual terms from the LIKE optimization */
|
||||
#define TERM_LIKECOND 0x200 /* Conditionally this LIKE operator term */
|
||||
#define TERM_LIKE 0x400 /* The original LIKE operator */
|
||||
#define TERM_IS 0x800 /* Term.pExpr is an IS operator */
|
||||
#define TERM_LIKEOPT 0x0100 /* Virtual terms from the LIKE optimization */
|
||||
#define TERM_LIKECOND 0x0200 /* Conditionally this LIKE operator term */
|
||||
#define TERM_LIKE 0x0400 /* The original LIKE operator */
|
||||
#define TERM_IS 0x0800 /* Term.pExpr is an IS operator */
|
||||
#define TERM_VARSELECT 0x1000 /* Term.pExpr contains a correlated sub-query */
|
||||
|
||||
/*
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# various suported unicode encodings (UTF-8, UTF-16, UTF-16le and
|
||||
# UTF-16be).
|
||||
#
|
||||
# $Id: enc2.test,v 1.29 2007/10/09 08:29:32 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -552,4 +551,17 @@ do_test enc2-10.1 {
|
||||
}
|
||||
} {t1 t2}
|
||||
|
||||
# 2020-01-15 ticket a08879a4a476eea9
|
||||
# Do not allow a database connection encoding change unless *all*
|
||||
# attached databases are empty.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test enc2-11.10 {
|
||||
PRAGMA encoding=UTF8;
|
||||
CREATE TEMP TABLE t1(x);
|
||||
INSERT INTO t1 VALUES('this is a test');
|
||||
PRAGMA encoding=UTF16;
|
||||
SELECT * FROM t1;
|
||||
} {{this is a test}}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -508,21 +508,27 @@ do_execsql_test exclusive-6.5 {
|
||||
} {exclusive}
|
||||
|
||||
# 2019-12-26 ticket fb3b3024ea238d5c
|
||||
do_test exclusive-7.1 {
|
||||
db close
|
||||
forcedelete test.db test.db-journal test.db-wal
|
||||
sqlite3 db test.db
|
||||
# The following sequence of pragmas would trigger an assert()
|
||||
# associated with Pager.changeCountDone inside of assert_pager_state(),
|
||||
# prior to the fix.
|
||||
db eval {
|
||||
PRAGMA locking_mode = EXCLUSIVE;
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA locking_mode = NORMAL;
|
||||
PRAGMA user_version;
|
||||
PRAGMA journal_mode = DELETE;
|
||||
}
|
||||
} {exclusive wal normal 0 delete}
|
||||
if {[permutation]!="journaltest"} {
|
||||
# The custom VFS used by the "journaltest" permutation cannot open the
|
||||
# shared-memory file. So, while it is able to switch the db file to
|
||||
# journal_mode=WAL when locking_mode=EXCLUSIVE, it can no longer access
|
||||
# it once the locking_mode is changed back to NORMAL.
|
||||
do_test exclusive-7.1 {
|
||||
db close
|
||||
forcedelete test.db test.db-journal test.db-wal
|
||||
sqlite3 db test.db
|
||||
# The following sequence of pragmas would trigger an assert()
|
||||
# associated with Pager.changeCountDone inside of assert_pager_state(),
|
||||
# prior to the fix.
|
||||
db eval {
|
||||
PRAGMA locking_mode = EXCLUSIVE;
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA locking_mode = NORMAL;
|
||||
PRAGMA user_version;
|
||||
PRAGMA journal_mode = DELETE;
|
||||
}
|
||||
} {exclusive wal normal 0 delete}
|
||||
}
|
||||
|
||||
|
||||
} ;# atomic_batch_write==0
|
||||
|
||||
@@ -571,10 +571,12 @@ foreach {tn create} {
|
||||
do_fts3query_test 4.$tn.4.4 -deferred fi* t1 {on* NEAR/2 fi*}
|
||||
do_fts3query_test 4.$tn.4.5 -deferred fi* t1 {on* NEAR/3 fi*}
|
||||
|
||||
db eval {UPDATE t1_stat SET value=x'' WHERE id=0}
|
||||
do_catchsql_test 4.$tn.4.6 {
|
||||
SELECT docid FROM t1 WHERE t1 MATCH 'on* NEAR/3 fi*'
|
||||
} {1 {database disk image is malformed}}
|
||||
ifcapable fts4_deferred {
|
||||
db eval {UPDATE t1_stat SET value=x'' WHERE id=0}
|
||||
do_catchsql_test 4.$tn.4.6 {
|
||||
SELECT docid FROM t1 WHERE t1 MATCH 'on* NEAR/3 fi*'
|
||||
} {1 {database disk image is malformed}}
|
||||
}
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
@@ -363,6 +363,7 @@ proc do_fuzzy_test {testname args} {
|
||||
lappend ::fuzzyopts(-errorlist) {ORDER BY}
|
||||
lappend ::fuzzyopts(-errorlist) {GROUP BY}
|
||||
lappend ::fuzzyopts(-errorlist) {datatype mismatch}
|
||||
lappend ::fuzzyopts(-errorlist) {non-deterministic functions prohibited}
|
||||
|
||||
for {set ii 0} {$ii < $::fuzzyopts(-repeats)} {incr ii} {
|
||||
do_test ${testname}.$ii {
|
||||
|
||||
@@ -462,6 +462,9 @@ static unsigned int mxProgressCb = 2000;
|
||||
/* Maximum string length in SQLite */
|
||||
static int lengthLimit = 1000000;
|
||||
|
||||
/* Maximum expression depth */
|
||||
static int depthLimit = 500;
|
||||
|
||||
/* Limit on the amount of heap memory that can be used */
|
||||
static sqlite3_int64 heapLimit = 1000000000;
|
||||
|
||||
@@ -789,6 +792,9 @@ int runCombinedDbSqlInput(const uint8_t *aData, size_t nByte){
|
||||
if( lengthLimit>0 ){
|
||||
sqlite3_limit(cx.db, SQLITE_LIMIT_LENGTH, lengthLimit);
|
||||
}
|
||||
if( depthLimit>0 ){
|
||||
sqlite3_limit(cx.db, SQLITE_LIMIT_EXPR_DEPTH, depthLimit);
|
||||
}
|
||||
sqlite3_hard_heap_limit64(heapLimit);
|
||||
|
||||
if( nDb>=20 && aDb[18]==2 && aDb[19]==2 ){
|
||||
@@ -1304,6 +1310,7 @@ static void showHelp(void){
|
||||
" --export-sql DIR Write SQL to file(s) in DIR. Also works with --sqlid\n"
|
||||
" --help Show this help text\n"
|
||||
" --info Show information about SOURCE-DB w/o running tests\n"
|
||||
" --limit-depth N Limit expression depth to N\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 fron files into SOURCE-DB\n"
|
||||
@@ -1406,6 +1413,10 @@ int main(int argc, char **argv){
|
||||
if( strcmp(z,"info")==0 ){
|
||||
infoFlag = 1;
|
||||
}else
|
||||
if( strcmp(z,"limit-depth")==0 ){
|
||||
if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
|
||||
depthLimit = integerValue(argv[++i]);
|
||||
}else
|
||||
if( strcmp(z,"limit-mem")==0 ){
|
||||
if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
|
||||
nMem = integerValue(argv[++i]);
|
||||
|
||||
@@ -69,7 +69,7 @@ foreach {enc} {
|
||||
do_faultsim_test 1.$enc.4 -faults oom-t* -prep {
|
||||
set ::stmt [sqlite3_prepare_v2 db "SELECT instr(?, ?)" -1 dummy]
|
||||
sqlite3_bind_blob $::stmt 1 $::HAYSTACK [string length $::HAYSTACK]
|
||||
sqlite3_bind_text $::stmt 2 $::NEEDLE [string length $::NEEDLE]
|
||||
sqlite3_bind_blob $::stmt 2 $::NEEDLE [string length $::NEEDLE]
|
||||
} -body {
|
||||
set rc [sqlite3_step $::stmt]
|
||||
if {$rc=="SQLITE_NOMEM"} { error "out of memory" }
|
||||
|
||||
@@ -1012,6 +1012,7 @@ do_execsql_test join-22.10 {
|
||||
# 2019-12-22 ticket 7929c1efb2d67e98
|
||||
#
|
||||
reset_db
|
||||
ifcapable vtab {
|
||||
do_execsql_test join-23.10 {
|
||||
CREATE TABLE t0(c0);
|
||||
INSERT INTO t0(c0) VALUES(123);
|
||||
@@ -1021,6 +1022,7 @@ do_execsql_test join-23.10 {
|
||||
ON vt0.name LIKE 'c0'
|
||||
WHERE v0.c0 == 0;
|
||||
} {123 0 c0}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
|
||||
@@ -15,6 +15,11 @@ set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set ::testprefix rowvaluevtab
|
||||
|
||||
ifcapable !vtab {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
register_echo_module db
|
||||
|
||||
do_execsql_test 1.0 {
|
||||
|
||||
@@ -371,9 +371,10 @@ ifcapable tclvar {
|
||||
db function r1 userfunc_r1
|
||||
execsql {SELECT r1(10)}
|
||||
} {55}
|
||||
do_test tcl-9.11 {
|
||||
execsql {SELECT r1(100)}
|
||||
} {5050}
|
||||
# Fails under -fsanitize=address,undefined due to stack overflow
|
||||
# do_test tcl-9.11 {
|
||||
# execsql {SELECT r1(100)}
|
||||
# } {5050}
|
||||
}
|
||||
|
||||
# Tests for the new transaction method
|
||||
|
||||
@@ -75,4 +75,20 @@ do_catchsql_test 310 {
|
||||
INSERT INTO t4 VALUES(1);
|
||||
} {1 {hex literal too big: 0x2147483648e0e0099}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
do_execsql_test 400 {
|
||||
CREATE VIEW v0(a) AS SELECT 1234;
|
||||
CREATE TRIGGER t0001 INSTEAD OF DELETE ON v0 BEGIN
|
||||
SELECT old.a;
|
||||
END;
|
||||
}
|
||||
do_execsql_test 405 {
|
||||
SELECT a FROM v0;
|
||||
} {1234}
|
||||
do_execsql_test 410 {
|
||||
DELETE FROM v0;
|
||||
}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -1164,4 +1164,11 @@ do_execsql_test 25.1 {
|
||||
SELECT (SELECT 1324 FROM cte1) FROM cte1;
|
||||
} {1324}
|
||||
|
||||
do_catchsql_test 26.0 {
|
||||
WITH i(x) AS (
|
||||
VALUES(1) UNION ALL SELECT x+1 FRO, a.b,O. * ,I¬i O, a.b,O. * ORDER BY 1
|
||||
)
|
||||
SELECT x,O. * O FROM i ¬I,I? 10;
|
||||
} {1 {near "O": syntax error}}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -173,5 +173,29 @@ do_execsql_test 4.1 {
|
||||
);
|
||||
} {1}
|
||||
|
||||
# 2020-01-18 chrome ticket 1043236
|
||||
# Correct handling of the sequence:
|
||||
# OP_OpenEphem
|
||||
# OP_OpenDup
|
||||
# Op_OpenEphem
|
||||
# OP_OpenDup
|
||||
#
|
||||
do_execsql_test 4.2 {
|
||||
SELECT (
|
||||
WITH t1(a) AS (VALUES(1))
|
||||
SELECT (
|
||||
WITH t2(b) AS (
|
||||
WITH t3(c) AS (
|
||||
WITH t4(d) AS (VALUES('elvis'))
|
||||
SELECT t4a.d FROM t4 AS t4a JOIN t4 AS t4b LEFT JOIN t4 AS t4c
|
||||
)
|
||||
SELECT c FROM t3 WHERE a = 1
|
||||
)
|
||||
SELECT t2a.b FROM t2 AS t2a JOIN t2 AS t2x
|
||||
)
|
||||
FROM t1 GROUP BY 1
|
||||
)
|
||||
GROUP BY 1;
|
||||
} {elvis}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -98,7 +98,7 @@ proc run_quick_test {dir omit_symbol_list} {
|
||||
}
|
||||
|
||||
if {$::SKIP_RUN} {
|
||||
puts "Skip testing $dir."
|
||||
# puts "Skip testing $dir."
|
||||
} else {
|
||||
# Run the test suite.
|
||||
puts -nonewline "Testing $dir..."
|
||||
@@ -127,7 +127,7 @@ proc process_options {argv} {
|
||||
} else {
|
||||
set ::MAKEFILE ./Makefile.linux-gcc ;# Default value
|
||||
}
|
||||
set ::SKIP_RUN 0 ;# Default to attempt test
|
||||
set ::SKIP_RUN 1 ;# Default to attempt test
|
||||
set ::TARGET testfixture ;# Default thing to build
|
||||
|
||||
for {set i 0} {$i < [llength $argv]} {incr i} {
|
||||
@@ -150,6 +150,9 @@ proc process_options {argv} {
|
||||
-{1,2}skip_run {
|
||||
set ::SKIP_RUN 1
|
||||
}
|
||||
-{1,2}run {
|
||||
set ::SKIP_RUN 0
|
||||
}
|
||||
|
||||
-{1,2}help {
|
||||
puts $::USAGE_MESSAGE
|
||||
@@ -192,6 +195,7 @@ proc main {argv} {
|
||||
SQLITE_OMIT_BETWEEN_OPTIMIZATION \
|
||||
SQLITE_OMIT_BLOB_LITERAL \
|
||||
SQLITE_OMIT_BTREECOUNT \
|
||||
SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA \
|
||||
SQLITE_OMIT_CAST \
|
||||
SQLITE_OMIT_CHECK \
|
||||
SQLITE_OMIT_COMPILEOPTION_DIAGS \
|
||||
@@ -207,16 +211,17 @@ proc main {argv} {
|
||||
SQLITE_OMIT_FLAG_PRAGMAS \
|
||||
SQLITE_OMIT_FLOATING_POINT \
|
||||
SQLITE_OMIT_FOREIGN_KEY \
|
||||
SQLITE_OMIT_GENERATED_COLUMNS \
|
||||
SQLITE_OMIT_GET_TABLE \
|
||||
SQLITE_OMIT_HEX_INTEGER \
|
||||
SQLITE_OMIT_INCRBLOB \
|
||||
SQLITE_OMIT_INTEGRITY_CHECK \
|
||||
SQLITE_OMIT_INTROSPECTION_PRAGMAS \
|
||||
SQLITE_OMIT_LIKE_OPTIMIZATION \
|
||||
SQLITE_OMIT_LOAD_EXTENSION \
|
||||
SQLITE_OMIT_LOCALTIME \
|
||||
SQLITE_OMIT_LOOKASIDE \
|
||||
SQLITE_OMIT_MEMORYDB \
|
||||
SQLITE_OMIT_MEMORY_ALLOCATION \
|
||||
SQLITE_OMIT_OR_OPTIMIZATION \
|
||||
SQLITE_OMIT_PAGER_PRAGMAS \
|
||||
SQLITE_OMIT_PARSER_TRACE \
|
||||
|
||||
Reference in New Issue
Block a user