Merge trunk changes into this branch.
FossilOrigin-Name: 638c1b0c50229800067eb1ba29d829b4d6e008256c21a1f67b4ce4d19ea307b3
This commit is contained in:
commit
e7c23433fb
@ -624,7 +624,7 @@ FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000
|
||||
FUZZCHECK_OPT += -DSQLITE_PRINTF_PRECISION_LIMIT=1000
|
||||
FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS4
|
||||
FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS3_PARENTHESIS
|
||||
#FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS5
|
||||
FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS5
|
||||
FUZZCHECK_OPT += -DSQLITE_ENABLE_RTREE
|
||||
FUZZCHECK_OPT += -DSQLITE_ENABLE_GEOPOLY
|
||||
FUZZCHECK_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
|
@ -1699,6 +1699,7 @@ MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
|
||||
FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
|
||||
FUZZCHECK_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ -DSQLITE_MAX_MEMORY=50000000 -DSQLITE_PRINTF_PRECISION_LIMIT=1000
|
||||
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
|
||||
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS5
|
||||
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
|
||||
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
|
||||
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||
|
@ -5337,8 +5337,8 @@ static void fts3EvalNextRow(
|
||||
Fts3Expr *pRight = pExpr->pRight;
|
||||
sqlite3_int64 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
|
||||
|
||||
assert( pLeft->bStart || pLeft->iDocid==pRight->iDocid );
|
||||
assert( pRight->bStart || pLeft->iDocid==pRight->iDocid );
|
||||
assert_fts3_nc( pLeft->bStart || pLeft->iDocid==pRight->iDocid );
|
||||
assert_fts3_nc( pRight->bStart || pLeft->iDocid==pRight->iDocid );
|
||||
|
||||
if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
|
||||
fts3EvalNextRow(pCsr, pLeft, pRc);
|
||||
|
@ -621,6 +621,7 @@ void sqlite3Fts3ExprFree(Fts3Expr *);
|
||||
int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash*);
|
||||
int sqlite3Fts3InitTerm(sqlite3 *db);
|
||||
#endif
|
||||
void *sqlite3Fts3MallocZero(i64 nByte);
|
||||
|
||||
int sqlite3Fts3OpenTokenizer(sqlite3_tokenizer *, int, const char *, int,
|
||||
sqlite3_tokenizer_cursor **
|
||||
|
@ -122,7 +122,7 @@ static int fts3isspace(char c){
|
||||
** zero the memory before returning a pointer to it. If unsuccessful,
|
||||
** return NULL.
|
||||
*/
|
||||
static void *fts3MallocZero(sqlite3_int64 nByte){
|
||||
void *sqlite3Fts3MallocZero(sqlite3_int64 nByte){
|
||||
void *pRet = sqlite3_malloc64(nByte);
|
||||
if( pRet ) memset(pRet, 0, nByte);
|
||||
return pRet;
|
||||
@ -203,7 +203,7 @@ static int getNextToken(
|
||||
rc = pModule->xNext(pCursor, &zToken, &nToken, &iStart, &iEnd, &iPosition);
|
||||
if( rc==SQLITE_OK ){
|
||||
nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
|
||||
pRet = (Fts3Expr *)fts3MallocZero(nByte);
|
||||
pRet = (Fts3Expr *)sqlite3Fts3MallocZero(nByte);
|
||||
if( !pRet ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
@ -458,7 +458,7 @@ static int getNextNode(
|
||||
if( fts3isspace(cNext)
|
||||
|| cNext=='"' || cNext=='(' || cNext==')' || cNext==0
|
||||
){
|
||||
pRet = (Fts3Expr *)fts3MallocZero(sizeof(Fts3Expr));
|
||||
pRet = (Fts3Expr *)sqlite3Fts3MallocZero(sizeof(Fts3Expr));
|
||||
if( !pRet ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@ -637,7 +637,7 @@ static int fts3ExprParse(
|
||||
&& p->eType==FTSQUERY_PHRASE && pParse->isNot
|
||||
){
|
||||
/* Create an implicit NOT operator. */
|
||||
Fts3Expr *pNot = fts3MallocZero(sizeof(Fts3Expr));
|
||||
Fts3Expr *pNot = sqlite3Fts3MallocZero(sizeof(Fts3Expr));
|
||||
if( !pNot ){
|
||||
sqlite3Fts3ExprFree(p);
|
||||
rc = SQLITE_NOMEM;
|
||||
@ -671,7 +671,7 @@ static int fts3ExprParse(
|
||||
/* Insert an implicit AND operator. */
|
||||
Fts3Expr *pAnd;
|
||||
assert( pRet && pPrev );
|
||||
pAnd = fts3MallocZero(sizeof(Fts3Expr));
|
||||
pAnd = sqlite3Fts3MallocZero(sizeof(Fts3Expr));
|
||||
if( !pAnd ){
|
||||
sqlite3Fts3ExprFree(p);
|
||||
rc = SQLITE_NOMEM;
|
||||
|
@ -138,9 +138,8 @@ static MatchinfoBuffer *fts3MIBufferNew(size_t nElem, const char *zMatchinfo){
|
||||
+ sizeof(MatchinfoBuffer);
|
||||
sqlite3_int64 nStr = strlen(zMatchinfo);
|
||||
|
||||
pRet = sqlite3_malloc64(nByte + nStr+1);
|
||||
pRet = sqlite3Fts3MallocZero(nByte + nStr+1);
|
||||
if( pRet ){
|
||||
memset(pRet, 0, nByte);
|
||||
pRet->aMatchinfo[0] = (u8*)(&pRet->aMatchinfo[1]) - (u8*)pRet;
|
||||
pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0]
|
||||
+ sizeof(u32)*((int)nElem+1);
|
||||
@ -544,11 +543,10 @@ static int fts3BestSnippet(
|
||||
** the required space using malloc().
|
||||
*/
|
||||
nByte = sizeof(SnippetPhrase) * nList;
|
||||
sIter.aPhrase = (SnippetPhrase *)sqlite3_malloc64(nByte);
|
||||
sIter.aPhrase = (SnippetPhrase *)sqlite3Fts3MallocZero(nByte);
|
||||
if( !sIter.aPhrase ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
memset(sIter.aPhrase, 0, nByte);
|
||||
|
||||
/* Initialize the contents of the SnippetIter object. Then iterate through
|
||||
** the set of phrases in the expression to populate the aPhrase[] array.
|
||||
@ -1151,9 +1149,8 @@ static int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){
|
||||
/* Allocate and populate the array of LcsIterator objects. The array
|
||||
** contains one element for each matchable phrase in the query.
|
||||
**/
|
||||
aIter = sqlite3_malloc64(sizeof(LcsIterator) * pCsr->nPhrase);
|
||||
aIter = sqlite3Fts3MallocZero(sizeof(LcsIterator) * pCsr->nPhrase);
|
||||
if( !aIter ) return SQLITE_NOMEM;
|
||||
memset(aIter, 0, sizeof(LcsIterator) * pCsr->nPhrase);
|
||||
(void)fts3ExprIterate(pCsr->pExpr, fts3MatchinfoLcsCb, (void*)aIter);
|
||||
|
||||
for(i=0; i<pInfo->nPhrase; i++){
|
||||
@ -1614,7 +1611,7 @@ void sqlite3Fts3Offsets(
|
||||
if( rc!=SQLITE_OK ) goto offsets_out;
|
||||
|
||||
/* Allocate the array of TermOffset iterators. */
|
||||
sCtx.aTerm = (TermOffset *)sqlite3_malloc64(sizeof(TermOffset)*nToken);
|
||||
sCtx.aTerm = (TermOffset *)sqlite3Fts3MallocZero(sizeof(TermOffset)*nToken);
|
||||
if( 0==sCtx.aTerm ){
|
||||
rc = SQLITE_NOMEM;
|
||||
goto offsets_out;
|
||||
|
@ -464,7 +464,7 @@ SQLITE_API int sqlite3_carray_bind(
|
||||
z += n+1;
|
||||
}
|
||||
}else{
|
||||
memcpy(pNew->aData, aData, sz*nData);
|
||||
memcpy(pNew->aData, aData, sz);
|
||||
}
|
||||
pNew->xDel = sqlite3_free;
|
||||
}else{
|
||||
|
@ -1680,7 +1680,8 @@ static JsonNode *jsonMergePatch(
|
||||
if( pParse->oom ) return 0;
|
||||
jsonRemoveAllNulls(pPatch);
|
||||
pTarget = &pParse->aNode[iTarget];
|
||||
assert( pParse->aNode[iRoot].eU==0 );
|
||||
assert( pParse->aNode[iRoot].eU==0 || pParse->aNode[iRoot].eU==2 );
|
||||
testcase( pParse->aNode[iRoot].eU==2 );
|
||||
pParse->aNode[iRoot].jnFlags |= JNODE_APPEND;
|
||||
VVA( pParse->aNode[iRoot].eU = 2 );
|
||||
pParse->aNode[iRoot].u.iAppend = iStart - iRoot;
|
||||
|
@ -436,7 +436,7 @@ struct RtreeMatchArg {
|
||||
** it is not, make it a no-op.
|
||||
*/
|
||||
#ifndef SQLITE_AMALGAMATION
|
||||
# ifdef SQLITE_COVERAGE_TEST
|
||||
# if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)
|
||||
unsigned int sqlite3RtreeTestcase = 0;
|
||||
# define testcase(X) if( X ){ sqlite3RtreeTestcase += __LINE__; }
|
||||
# else
|
||||
|
@ -36,7 +36,7 @@ do_execsql_test rtree9-1.4 {
|
||||
DELETE FROM rt;
|
||||
} {}
|
||||
|
||||
|
||||
unset -nocomplain x
|
||||
for {set i 0} {$i < 1000} {incr i} {
|
||||
set x [expr $i%10]
|
||||
set y [expr ($i/10)%10]
|
||||
|
@ -39,6 +39,7 @@ proc column_name_list {db tbl} {
|
||||
}
|
||||
return $lCol
|
||||
}
|
||||
unset -nocomplain res
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#-------------------------------------------------------------------------
|
||||
@ -792,6 +793,7 @@ do_execsql_test 3.0 {
|
||||
INSERT INTO x1 VALUES(4, 4, 4);
|
||||
}
|
||||
do_test 3.1 {
|
||||
unset -nocomplain res
|
||||
set res [list]
|
||||
db eval { SELECT * FROM x1 } {
|
||||
lappend res $a $b $c
|
||||
@ -1579,4 +1581,3 @@ execsql ROLLBACK
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
|
@ -105,15 +105,15 @@ static int invokeTclGeomCb(
|
||||
if( p->pUser || p->xDelUser ){
|
||||
rc = SQLITE_ERROR;
|
||||
}else{
|
||||
BoxGeomCtx *pCtx = sqlite3_malloc(sizeof(BoxGeomCtx));
|
||||
if( pCtx==0 ){
|
||||
BoxGeomCtx *pBGCtx = sqlite3_malloc(sizeof(BoxGeomCtx));
|
||||
if( pBGCtx==0 ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
pCtx->interp = interp;
|
||||
pCtx->pScript = Tcl_DuplicateObj(pRes);
|
||||
Tcl_IncrRefCount(pCtx->pScript);
|
||||
Tcl_ListObjReplace(interp, pCtx->pScript, 0, 1, 0, 0);
|
||||
p->pUser = (void*)pCtx;
|
||||
pBGCtx->interp = interp;
|
||||
pBGCtx->pScript = Tcl_DuplicateObj(pRes);
|
||||
Tcl_IncrRefCount(pBGCtx->pScript);
|
||||
Tcl_ListObjReplace(interp, pBGCtx->pScript, 0, 1, 0, 0);
|
||||
p->pUser = (void*)pBGCtx;
|
||||
p->xDelUser = testDelUser;
|
||||
}
|
||||
}
|
||||
@ -346,4 +346,3 @@ int Sqlitetestrtreedoc_Init(Tcl_Interp *interp){
|
||||
#endif /* SQLITE_ENABLE_RTREE */
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
98
manifest
98
manifest
@ -1,11 +1,11 @@
|
||||
C Merge\smulti-module\stest\slogic\simprovements\sfrom\strunk.
|
||||
D 2021-10-19T19:26:27.711
|
||||
C Merge\strunk\schanges\sinto\sthis\sbranch.
|
||||
D 2021-10-30T17:30:48.966
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
F Makefile.in 457a0f10540bd18a700c9d45add8dcc06e040bc9d1e948c9816b9b6eab1de384
|
||||
F Makefile.in 0e91c42a1dd13a569b1fa4f4dfb7d3632f3164a1c05c71341533d67db5b641dd
|
||||
F Makefile.linux-gcc f609543700659711fbd230eced1f01353117621dccae7b9fb70daa64236c5241
|
||||
F Makefile.msc fef1e54f1a2138aa2de79ad8a928f1711106d082e6a35cdfbbfec9e8fd0c59c3
|
||||
F Makefile.msc 5904e640ee2f577bcd137b9b5393895be3a1602d1e2b8c99e356f569d96ad98b
|
||||
F README.md 27fb76aa7eb57ed63a53bbba7292b6bf71f51125554f79f16b5d040edd1e6110
|
||||
F VERSION c6595fef606851f2bc3ebed6a7386c73751835fc909feab7c093739fa4b3c1d1
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
@ -84,16 +84,16 @@ F ext/fts3/README.content b9078d0843a094d86af0d48dffbff13c906702b4c3558012e67b9c
|
||||
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
|
||||
F ext/fts3/README.tokenizers b92bdeb8b46503f0dd301d364efc5ef59ef9fa8e2758b8e742f39fa93a2e422d
|
||||
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
|
||||
F ext/fts3/fts3.c 957237610d2938d4ec694fa6aed02140f1af6256b08f831a5a38657dcb3fa711
|
||||
F ext/fts3/fts3.c a28ef007016800249b2360fa4c66d7fcb71217f54755cc1a6772946b3246d6b3
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h 07cf1abc14140973c8f7f5e3035e9fe5c9f0fc04785c38821540a177ec32fca8
|
||||
F ext/fts3/fts3Int.h cff59b8b13dafe9d59924a5d710f771ed8b121a55cccbc99b6e2a723fcde14dc
|
||||
F ext/fts3/fts3_aux.c 1af58af8f2b00a49f4fb1c2602f8da2054ad60076f46c8ebf85c5410eccccb65
|
||||
F ext/fts3/fts3_expr.c 5853cd7a35a79d193614add9b4c461b2d56f465d90899ca4309f05d9d1536558
|
||||
F ext/fts3/fts3_expr.c 903bfb9433109fffb10e910d7066c49cbf8eeae316adc93f0499c4da7dfc932a
|
||||
F ext/fts3/fts3_hash.c 8b6e31bfb0844c27dc6092c2620bdb1fca17ed613072db057d96952c6bdb48b7
|
||||
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
|
||||
F ext/fts3/fts3_icu.c 305ce7fb6036484085b5556a9c8e62acdc7763f0f4cdf5fd538212a9f3720116
|
||||
F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009
|
||||
F ext/fts3/fts3_snippet.c a4b2f009c3eba05fc51826d70a31aad67f2a0681b6a5b12a9d1d8b7575c88f93
|
||||
F ext/fts3/fts3_snippet.c dd267a96a064b068d69d26de2f98b234807bd2c82acf55641ebc362d89c55260
|
||||
F ext/fts3/fts3_term.c f45a1e7c6ef464abb1231245d123dae12266b69e05cc56e14045b76591ae92d1
|
||||
F ext/fts3/fts3_test.c d8d7b2734f894e8a489987447658e374cdd3a3bc8575c401decf1911cb7c6454
|
||||
F ext/fts3/fts3_tokenize_vtab.c 8d15b148e7d88a4280389a200b26e8d52abda4c4ec2e9a35e9d7a1fa50e5aa03
|
||||
@ -290,7 +290,7 @@ F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a2
|
||||
F ext/misc/appendvfs.c 9642c7a194a2a25dca7ad3e36af24a0a46d7702168c4ad7e59c9f9b0e16a3824
|
||||
F ext/misc/blobio.c a867c4c4617f6ec223a307ebfe0eabb45e0992f74dd47722b96f3e631c0edb2a
|
||||
F ext/misc/btreeinfo.c d28ce349b40054eaa9473e835837bad7a71deec33ba13e39f963d50933bfa0f9
|
||||
F ext/misc/carray.c af9c4b3de67f87eb00644c3bb874b77e5917422b8d2c3ffc2853a118668501fa
|
||||
F ext/misc/carray.c b752f46411e4e47e34dce6f0c88bc8e51bb821ba9e49bfcd882506451c928f69
|
||||
F ext/misc/carray.h d2b1b12486d531367c37832d3d0dad34eea4bdd83ed839d445521ef01f0bc4e3
|
||||
F ext/misc/cksumvfs.c b42ef52eaaa510d54ec320c87bea149e934a3b06cd232be2093562bf669bd572
|
||||
F ext/misc/closure.c dbfd8543b2a017ae6b1a5843986b22ddf99ff126ec9634a2f4047cd14c85c243
|
||||
@ -306,7 +306,7 @@ F ext/misc/fileio.c 57fefd0efc535e62bb8b07fa146875171481da81a759bbfbe2fc91bab900
|
||||
F ext/misc/fossildelta.c 1240b2d3e52eab1d50c160c7fe1902a9bd210e052dc209200a750bbf885402d5
|
||||
F ext/misc/fuzzer.c eae560134f66333e9e1ca4c8ffea75df42056e2ce8456734565dbe1c2a92bf3d
|
||||
F ext/misc/ieee754.c 91a5594071143a4ab79c638fe9f059af1db09932faf2e704c3e29216a7d4f511
|
||||
F ext/misc/json1.c 9344f0c08fe74119022466384557c849f21fb4a15e8314f70847b1831c500f29
|
||||
F ext/misc/json1.c 2ff65a8f97c9b8ae03124fe89a1b74197e68958882cb533daac8a694d1b81c57
|
||||
F ext/misc/memstat.c 3017a0832c645c0f8c773435620d663855f04690172316bd127270d1a7523d4d
|
||||
F ext/misc/memtrace.c 7c0d115d2ef716ad0ba632c91e05bd119cb16c1aedf3bec9f06196ead2d5537b
|
||||
F ext/misc/memvfs.c 7dffa8cc89c7f2d73da4bd4ccea1bcbd2bd283e3bb4cea398df7c372a197291b
|
||||
@ -394,7 +394,7 @@ F ext/repair/test/checkindex01.test b530f141413b587c9eb78ff734de6bb79bc3515c3350
|
||||
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
|
||||
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
||||
F ext/rtree/geopoly.c a7021cb524621573ccda213a35b0339371849dd4acc4909f689786ee1f964b7f
|
||||
F ext/rtree/rtree.c f2658ccaf20c65f2c2d7b097e42aa71be7272a3b49af586a57d9eed8ceb8436f
|
||||
F ext/rtree/rtree.c a602c5ba860c93a3087ec0c41ad4c4c0c2e9ba2f0008617d4b444200e3b3625d
|
||||
F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
|
||||
F ext/rtree/rtree1.test 35c3bc0def71317b7601ee0d1149e7df2cd8fc4f13ec89a64761ac3f46ca123f
|
||||
F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e1303d32603d
|
||||
@ -404,7 +404,7 @@ F ext/rtree/rtree5.test 49c9041d713d54560b315c2c7ef7207ee287eba1b20f8266968a06f2
|
||||
F ext/rtree/rtree6.test 9ce3691c1aac43070a9f194f0ebf54372db346c5a82241fd11b525ed53ce9f3f
|
||||
F ext/rtree/rtree7.test c8fb2e555b128dd0f0bdb520c61380014f497f8a23c40f2e820acc9f9e4fdce5
|
||||
F ext/rtree/rtree8.test 2d99006a1386663978c9e1df167554671e4f711c419175b39f332719deb1ce0e
|
||||
F ext/rtree/rtree9.test c646f12c8c1c68ef015c6c043d86a0c42488e2e68ed1bb1b0771a7ca246cbabf
|
||||
F ext/rtree/rtree9.test fd3c9384ef8aabbc127b3878764070398f136eebc551cd20484b570f2cc1956a
|
||||
F ext/rtree/rtreeA.test c0d8e91e25052d5f3fbda17632ca843b82ca13c4181fb6000a0d63bd2d7e70ce
|
||||
F ext/rtree/rtreeB.test 4cec297f8e5c588654bbf3c6ed0903f10612be8a2878055dd25faf8c71758bc9
|
||||
F ext/rtree/rtreeC.test c4bfa9a61c6788c03e4a9ce40ab2cfc6100982559effd9842d1b658e1d47aa5f
|
||||
@ -419,12 +419,12 @@ F ext/rtree/rtree_util.tcl db734b4c5e75fed6acc56d9701f2235345acfdec750b5fc7b5879
|
||||
F ext/rtree/rtreecheck.test d67d5b3e9e45bfa8cd90734e8e9302144ac415b8e9176c6f02d4f92892ee8a35
|
||||
F ext/rtree/rtreecirc.test aec664eb21ae943aeb344191407afff5d392d3ae9d12b9a112ced0d9c5de298e
|
||||
F ext/rtree/rtreeconnect.test 225ad3fcb483d36cbee423a25052a6bbae762c9576ae9268332360c68c170d3d
|
||||
F ext/rtree/rtreedoc.test 903c5229758bcef1d5590892bf973d9f91dcd1d96b1c09b6761e2c0e398e78e1
|
||||
F ext/rtree/rtreedoc.test 27a5703cb1200f6f69051de68da546cef3dfdcf59be73afadfc50b9f9c9960d9
|
||||
F ext/rtree/rtreedoc2.test 194ebb7d561452dcdc10bf03f44e30c082c2f0c14efeb07f5e02c7daf8284d93
|
||||
F ext/rtree/rtreedoc3.test 555a878c4d79c4e37fa439a1c3b02ee65d3ebaf75d9e8d96a9c55d66db3efbf8
|
||||
F ext/rtree/rtreefuzz001.test 0fc793f67897c250c5fde96cefee455a5e2fb92f4feeabde5b85ea02040790ee
|
||||
F ext/rtree/sqlite3rtree.h 03c8db3261e435fbddcfc961471795cbf12b24e03001d0015b2636b0f3881373
|
||||
F ext/rtree/test_rtreedoc.c e81d9bf69f7cbc8ba536458bbd8fc06a6f9ca93165f7d68832f588461e6a53cb
|
||||
F ext/rtree/test_rtreedoc.c 0167f9243a56d08e79230f604f3979d6b7cde4816355acf7a7d436d9d788bf38
|
||||
F ext/rtree/tkt3363.test 142ab96eded44a3615ec79fba98c7bde7d0f96de
|
||||
F ext/rtree/util/randomshape.tcl 54ee03d0d4a1c621806f7f44d5b78d2db8fac26e0e8687c36c4bd0203b27dbff
|
||||
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
|
||||
@ -490,10 +490,10 @@ F src/auth.c f4fa91b6a90bbc8e0d0f738aa284551739c9543a367071f55574681e0f24f8cf
|
||||
F src/backup.c 3014889fa06e20e6adfa0d07b60097eec1f6e5b06671625f476a714d2356513d
|
||||
F src/bitvec.c 7c849aac407230278445cb069bebc5f89bf2ddd87c5ed9459b070a9175707b3d
|
||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c 91e27692b94c44f7b64413b10dd777770d7e5f03767777bad15b11f95081c77c
|
||||
F src/btree.c 2c8a52a7fd84b1aec4a79e7861b6368aecbf011a43247cc7d9a2946c7f0ae5ea
|
||||
F src/btree.h 74d64b8f28cfa4a894d14d4ed64fa432cd697b98b61708d4351482ae15913e22
|
||||
F src/btreeInt.h ee9348c4cb9077243b049edc93a82c1f32ca48baeabf2140d41362b9f9139ff7
|
||||
F src/build.c f70d6375ea5b78daac5b1d24eab53ed7b81c3e68a17dff9581c50c0c06180e00
|
||||
F src/build.c 8bdda90f9b1189c7b0813575171b3c6b2d74b3ade57c11cb4383776781ea9335
|
||||
F src/callback.c 106b585da1edd57d75fa579d823a5218e0bf37f191dbf7417eeb4a8a9a267dbc
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 8159d5f706551861c18ec6c8f6bdf105e15ea00367f05d9ab65d31a1077facc1
|
||||
@ -501,16 +501,16 @@ F src/date.c fa928630fecf1d436cdc7a7a5c950c781709023ca782c21b7a43cc7361a9451e
|
||||
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
|
||||
F src/dbstat.c 861e08690fcb0f2ee1165eff0060ea8d4f3e2ea10f80dab7d32ad70443a6ff2d
|
||||
F src/delete.c 0c151975fa99560767d7747f9b60543d0093d9f8b89f13d2d6058e9c83ad19e7
|
||||
F src/expr.c 529f7eca2821e874a375b1b318e697d62cb28f56069677c93f587f2de5dceb54
|
||||
F src/expr.c b882787df249b7de2f62c5c240ca8af2111839c761f1a5e9b8f501f940a9d92e
|
||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c 187b67af20c5795953a592832c5d985e4313fe503ebd8f95e3e9e9ad5a730bb5
|
||||
F src/func.c 1cfb09d7ffca81238eccefdb0293e1f5b7cfebbd1816dfad5ec6024742a7496b
|
||||
F src/global.c 612ea60c9acbcb45754c2ed659b4a56936a06814718e969636fedc7e3b889808
|
||||
F src/global.c 1f56aead86e8a18c4415638f5e6c4d0a0550427f4b3f5d065ba5164cc09c22e8
|
||||
F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
|
||||
F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
|
||||
F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
|
||||
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
|
||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c b32e2dcbca838cb8acd4777a59243db4bcea53089e3181b0ea3e4dc75b43aeff
|
||||
F src/insert.c 137038155adad9f00ba4e2c2602eec0335d6ef5ff0c3958c02f778657006dc59
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c e1dcff1c916bf6834e150b492eddda5d9792453182d2ad64294d2266b6e93c4c
|
||||
F src/main.c 546dd2418c4f5d59aced76c68e55290735feb420ee305051fbd55ab8fff0d255
|
||||
@ -520,7 +520,7 @@ F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||
F src/mem2.c c8bfc9446fd0798bddd495eb5d9dbafa7d4b7287d8c22d50a83ac9daa26d8a75
|
||||
F src/mem3.c 30301196cace2a085cbedee1326a49f4b26deff0af68774ca82c1f7c06fda4f6
|
||||
F src/mem5.c 9bf955937b07f8c32541c8a9991f33ce3173d944
|
||||
F src/memdb.c cd8cf3ee965db4a4ab4b5423b49a4ef810490b8ba828911e523325f2cce3ed1a
|
||||
F src/memdb.c a6c2bb1257c3398b4dd058f81888d647472b140bb1d262d47be50606eed75d55
|
||||
F src/memjournal.c a85f0dc5c02a42453d0bc3819ecfb5666cb6433e5deefcd93ccbe05c9f088b83
|
||||
F src/msvc.h 3a15918220367a8876be3fa4f2abe423a861491e84b864fb2b7426bf022a28f8
|
||||
F src/mutex.c 5e3409715552348732e97b9194abe92fdfcd934cfb681df4ba0ab87ac6c18d25
|
||||
@ -529,20 +529,20 @@ F src/mutex_noop.c 9d4309c075ba9cc7249e19412d3d62f7f94839c4
|
||||
F src/mutex_unix.c dd2b3f1cc1863079bc1349ac0fec395a500090c4fe4e11ab775310a49f2f956d
|
||||
F src/mutex_w32.c caa50e1c0258ac4443f52e00fe8aaea73b6d0728bd8856bedfff822cae418541
|
||||
F src/notify.c 89a97dc854c3aa62ad5f384ef50c5a4a11d70fcc69f86de3e991573421130ed6
|
||||
F src/os.c 91fc69f95ef0528368174dca20f01e1d8f82934f719e1cb50fd0260b18c028a6
|
||||
F src/os.c b1c4f2d485961e9a5b6b648c36687d25047c252222e9660b7cc25a6e1ea436ab
|
||||
F src/os.h 26890f540b475598cd9881dcc68931377b8d429d3ea3e2eeb64470cde64199f8
|
||||
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
||||
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c feac74a0ba7652c405ba30f61d9e738be717d15899f2915a129ef160a3e5b26b
|
||||
F src/os_unix.c f445ad0597184e27f225bfc3d327dee32b49f7918d6eda9c921369b5060d96ef
|
||||
F src/os_win.c 77d39873836f1831a9b0b91894fec45ab0e9ca8e067dc8c549e1d1eca1566fe9
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c 71e3102150ae1b5567043ccda932aa81fb7de9848f501dafe491087c940e34dc
|
||||
F src/pager.c bc10c191d18bffd3d76eda5f162799e43a9f875ecfe7c4869f752e2ddef87ea2
|
||||
F src/pager.h 4bf9b3213a4b2bebbced5eaa8b219cf25d4a82f385d093cd64b7e93e5285f66f
|
||||
F src/parse.y 0bd7971a7489bbf6c3726f1b50da6e508bdff8fa493e9cc3f5a96b12cbb2361e
|
||||
F src/pcache.c 084e638432c610f95aea72b8509f0845d2791293f39d1b82f0c0a7e089c3bb6b
|
||||
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
||||
F src/pcache1.c 54881292a9a5db202b2c0ac541c5e3ef9a5e8c4f1c1383adb2601d5499a60e65
|
||||
F src/pragma.c 12760c6ae92a350f5924896644a3e58d969c7c78e346b8cb542f2a8cef7c45d1
|
||||
F src/pragma.c fc4c772d25766f7440dff6bf352e8c66981f92c80689d1a0fe229d39a38f69a5
|
||||
F src/pragma.h 87330ed2fbfa2a1274de93ca0ab850fba336189228cb256089202c3b52766fad
|
||||
F src/prepare.c 8f07616db04337057b8498b72d051ee90f73c54615c2e908c05404cef1e060b7
|
||||
F src/printf.c 5901672228f305f7d493cbc4e7d76a61a5caecdbc1cd06b1f9ec42ea4265cf8d
|
||||
@ -550,11 +550,11 @@ F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
|
||||
F src/resolve.c ae65c88f5d0d4bc0052b203773d407efa2387c2bd6b202f87178006c7bb8632c
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c 32d25b5af6c708aa63373c78c2e59681910387a7a78c08ec3086cadc77d41627
|
||||
F src/shell.c.in e80fe5118fc3b942c1becc67ebfca6a887dbab9295e0bd5b6da61c4375baa637
|
||||
F src/shell.c.in 185e4b905c3a399e9376597a04cf668f6f992513290978ac978cf4991954d89f
|
||||
F src/sqlite.h.in 99786216caf1c57aa3d70f95a7f84566dff6a9eeb50174799ea3b387eafd2a22
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h d8f6f67ae9ad990a70dd03c093bcdc8883e159ff4bfd16a496f8fb80c6840b5a
|
||||
F src/sqliteInt.h 896cc476bb814ad1f893715e7e174dede81c94b4fed4073de0e76b68f11bf827
|
||||
F src/sqliteInt.h 02f7ccc971d67d8641707f219b9c304113d43a9a128b73a39d1fcaa036c885b7
|
||||
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
|
||||
F src/status.c 4b8bc2a6905163a38b739854a35b826c737333fab5b1f8e03fa7eb9a4799c4c1
|
||||
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
|
||||
@ -588,7 +588,7 @@ F src/test_journal.c a0b9709b2f12b1ec819eea8a1176f283bca6d688a6d4a502bd6fd79786f
|
||||
F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
|
||||
F src/test_malloc.c 21121ea85b49ec0bdb69995847cef9036ef9beca3ce63bbb776e4ea2ecc44b97
|
||||
F src/test_md5.c 7268e1e8c399d4a5e181b64ac20e1e6f3bc4dd9fc87abac02db145a3d951fa8c
|
||||
F src/test_multiplex.c 2ccf35551c094e353af20b0cdfac053a37bf3e96e10e7cf9f4abd1d279890a78
|
||||
F src/test_multiplex.c 1b23782212a01349fac382913ef82b8de4ae8a4cb46556602c2ee733edabbbc9
|
||||
F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635
|
||||
F src/test_mutex.c abf486e91bd65e2448027d4bb505e7cce6ba110e1afb9bd348d1996961cadf0d
|
||||
F src/test_onefile.c f31e52e891c5fef6709b9fcef54ce660648a34172423a9cbdf4cbce3ba0049f4
|
||||
@ -619,21 +619,21 @@ F src/trigger.c 3f612ce5f0858b6c23460a3c799d01f408b49b0b29d931d8b8e6fc224a8667de
|
||||
F src/update.c 69c4c10bc6873a80c0a77cb578f9fc60ee90003d03f9530bc3370fa24615772d
|
||||
F src/upsert.c 8789047a8f0a601ea42fa0256d1ba3190c13746b6ba940fe2d25643a7e991937
|
||||
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
||||
F src/util.c 34b6b9a82ec6a15eaf94dd69cbb21362dffc9f27682ca1d6f1eccc352cf89d3e
|
||||
F src/vacuum.c 454973a59fb20bb982efc2df568a098616db6328a0491b6e84e2e07f7333db45
|
||||
F src/vdbe.c b42cf4c8518ef237586258528cd7ecff14134e1ceee741e6f95b68848b844eff
|
||||
F src/util.c 30df8356e231dad33be10bb27897655002668343280004ba28c734489414a167
|
||||
F src/vacuum.c 6c38ddc52f0619865c91dae9c441d4d48bf3040d7dc1bc5b22da1e45547ed0b3
|
||||
F src/vdbe.c 54089e5ebb02d35e52d6b3d51061b79b8923c70e839df4ca4ff7bd9bcb9b9708
|
||||
F src/vdbe.h 25dabb25c7e157b84e59260cfb5b466c3ac103ede9f36f4db371332c47601abe
|
||||
F src/vdbeInt.h 38206c8dd6b60ff03d9fd4f626b1b4fd0eef7cdc44f2fc2c1973b0f932a3f26b
|
||||
F src/vdbeapi.c 7b83468feb1d42a09d4c2e5241a3eaa3d1f138e289a843cba9fd3f1dad95ca67
|
||||
F src/vdbeaux.c 897912feb91ec3cd8dedc3fce21d192fd6d37d299538a13d9d93100b22e4d4a0
|
||||
F src/vdbeaux.c a57c760d1897f1b72f6fae26983df363db7a2c42d88721187e907f2c84862b42
|
||||
F src/vdbeblob.c 292e96c01c4219fca71d74e1002906d43eb232af4bd83f7552a3faec741f3eb8
|
||||
F src/vdbemem.c 8be0af1060012520381d3296fcb1718e80cd5b99ce04f51f7e1c4dba4072caac
|
||||
F src/vdbesort.c cd5130f683706c1a43e165a74187745fb3351cb56052cf9dc91de820634bbde2
|
||||
F src/vdbemem.c 71a449c57be10a66a8a5620e5c5a67ebb9ca70121556dc631ffd4c4458708d8c
|
||||
F src/vdbesort.c 513b481c8bab4a6578c92194a60cf3bc3b48736e4a53f8d2d7918121c5b594e7
|
||||
F src/vdbetrace.c fe0bc29ebd4e02c8bc5c1945f1d2e6be5927ec12c06d89b03ef2a4def34bf823
|
||||
F src/vdbevtab.c f99b275366c5fc5e2d99f734729880994ab9500bdafde7fae3b02d562b9d323c
|
||||
F src/vtab.c d07cc24dd84b0b51bf05adb187b0d2e6b0cac56cfbc0197995a26d4f8fa5c7e2
|
||||
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 2be08331d798237ad5d7ae0b252700ffb2b63189cb18d993496d009a93e2f81c
|
||||
F src/wal.c 6ae14d4797f31c67fc2be659d24fbc6e1a6f5f423bdfb5ef831ea171bce42320
|
||||
F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
|
||||
F src/walker.c f890a3298418d7cba3b69b8803594fdc484ea241206a8dfa99db6dd36f8cbb3b
|
||||
F src/where.c ecabef93b0f14442a73eca205fc960428984d75fbdc7d60226b7fc9cac127187
|
||||
@ -759,7 +759,7 @@ F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
|
||||
F test/capi3c.test 54e2dc0c8fd7c34ad1590d1be6864397da2438c95a9f5aee2f8fbc60c112e44b
|
||||
F test/capi3d.test aba917805573a03deed961a21f07a5a84505ad0a616f7e3fc1508844a15bccc4
|
||||
F test/capi3e.test 3d49c01ef2a1a55f41d73cba2b23b5059ec460fe
|
||||
F test/carray01.test 3f2658bbddd75a013735a296ae2178ff441aca3f00ba623cfbae00b732ede792
|
||||
F test/carray01.test d55d57bf66b1af1c7ac55fae66ff4910884a8f5d21a90a18797ce386212a2634
|
||||
F test/cast.test 336fa21989b5170ebcaf90c24266be22dd97b3e23d1fad5ecf6ad4efb04c4423
|
||||
F test/cffault.test 9d6b20606afe712374952eec4f8fd74b1a8097ef
|
||||
F test/changes.test 9dd8e597d84072122fc8a4fcdea837f4a54a461e6e536053ea984303e8ca937b
|
||||
@ -1056,7 +1056,7 @@ F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c
|
||||
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
|
||||
F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830
|
||||
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
|
||||
F test/fuzzcheck.c 2295d04576264ef8d1aa5adf689fa0b774aede30c565cd6cb11772bf66361b69
|
||||
F test/fuzzcheck.c 7a07718e3c017f31e88b56a891bb79a3eb42a413a811fd65b89a7b09fdd1adbd
|
||||
F test/fuzzdata1.db d36e88741b4f23bcbaaf55b006290669d03c6c891cf13c7b3a53bc1b097b693f
|
||||
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
|
||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||
@ -1064,7 +1064,7 @@ F test/fuzzdata4.db b502c7d5498261715812dd8b3c2005bad08b3a26e6489414bd13926cd3e4
|
||||
F test/fuzzdata5.db e35f64af17ec48926481cfaf3b3855e436bd40d1cfe2d59a9474cb4b748a52a5
|
||||
F test/fuzzdata6.db 92a80e4afc172c24f662a10a612d188fb272de4a9bd19e017927c95f737de6d7
|
||||
F test/fuzzdata7.db 0166b56fd7a6b9636a1d60ef0a060f86ddaecf99400a666bb6e5bbd7199ad1f2
|
||||
F test/fuzzdata8.db 62c5303ef5a570b1a302d7e495ecfaf007dd4752618ed6378913df671fd0cb2a
|
||||
F test/fuzzdata8.db ea80e98f115387b052effb7194899cc9780a81f15606bc4641051342352020cc
|
||||
F test/fuzzer1.test 3d4c4b7e547aba5e5511a2991e3e3d07166cfbb8
|
||||
F test/fuzzer2.test a85ef814ce071293bce1ad8dffa217cbbaad4c14
|
||||
F test/fuzzerfault.test f64c4aef4c9e9edf1d6dc0d3f1e65dcc81e67c996403c88d14f09b74807a42bc
|
||||
@ -1223,7 +1223,7 @@ F test/mmap3.test b3c297e78e6a8520aafcc1a8f140535594c9086e
|
||||
F test/mmap4.test 2e2b4e32555b58da15176e6fe750f17c9dcf7f93
|
||||
F test/mmapfault.test d4c9eff9cd8c2dc14bc43e71e042f175b0a26fe3
|
||||
F test/mmapwarm.test 2272005969cd17a910077bd5082f70bc1fefad9a875afec7fc9af483898ecaf3
|
||||
F test/multiplex.test dc0d67b66f84b484a83cb8bbdf3f0a7f49562ccd
|
||||
F test/multiplex.test d74c034e52805f6de8cc5432cef8c9eb774bb64ec29b83a22effc8ca4dac1f08
|
||||
F test/multiplex2.test 580ca5817c7edbe4cc68fa150609c9473393003a
|
||||
F test/multiplex3.test d228f59eac91839a977eac19f21d053f03e4d101
|
||||
F test/multiplex4.test e8ae4c4bd70606a5727743241f13b5701990abe4
|
||||
@ -1377,11 +1377,11 @@ F test/sharedA.test 49d87ec54ab640fbbc3786ee3c01de94aaa482a3a9f834ad3fe92770eb69
|
||||
F test/sharedB.test 16cc7178e20965d75278f410943109b77b2e645e
|
||||
F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939
|
||||
F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
|
||||
F test/shell1.test d014dc15876233d06df1eaf5a22275653a1d391abf1ca28df5ef3ac688df72e9
|
||||
F test/shell2.test a03b835a9e7dcc1f79b471e4d62e0c85bdc4cb954a00820702603f1409553caf
|
||||
F test/shell3.test 1586a163e7918775d3c25530bf84200453f30a77cc338490389114a67352f4d9
|
||||
F test/shell1.test c354008b27c904f0166c2138abd7382013ea070b41114114ecbdfb32c726a807
|
||||
F test/shell2.test f00a0501c00583cbc46f7510e1d713366326b2b3e63d06d15937284171a8787c
|
||||
F test/shell3.test cb4b835a901742c9719437a89171172ecc4a8823ad97349af8e4e841e6f82566
|
||||
F test/shell4.test 3ed6c4b42fd695efcbc25d69ef759dbb15855ca8e52ba6c5ee076f8b435f48be
|
||||
F test/shell5.test 84a30b55722a95a5b72989e691c469a999ca7591e7aa00b7fabc783ea5c9a6fe
|
||||
F test/shell5.test 6e4aa0e531dcb8dcf74b7920a2a7442c6712d4dff8422bbc81f768f9dee8a0e3
|
||||
F test/shell6.test 1ceb51b2678c472ba6cf1e5da96679ce8347889fe2c3bf93a0e0fa73f00b00d3
|
||||
F test/shell7.test 115132f66d0463417f408562cc2cf534f6bbc6d83a6d50f0072a9eb171bae97f
|
||||
F test/shell8.test 96be02ea0c21f05b24c1883d7b711a1fa8525a68ab7b636aacf6057876941013
|
||||
@ -1462,7 +1462,7 @@ F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30
|
||||
F test/temptable2.test d2940417496e2b9548e01d09990763fbe88c316504033256d51493e1f1a5ce6a
|
||||
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
|
||||
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
|
||||
F test/tester.tcl 2b55f29390d187026f187b5b82849a4001763960e5e90797ba2dc95c70fe77a6
|
||||
F test/tester.tcl f577d040078dd4fb56ea1ccaa71f6bfd0ebf0bd0ac373304db4269b5474f9cb7
|
||||
F test/thread001.test b61a29dd87cf669f5f6ac96124a7c97d71b0c80d9012746072055877055cf9ef
|
||||
F test/thread002.test e630504f8a06c00bf8bbe68528774dd96aeb2e58
|
||||
F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7
|
||||
@ -1682,7 +1682,7 @@ F test/uri.test 3481026f00ade6dfe8adb7acb6e1e47b04369568
|
||||
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
|
||||
F test/userauth01.test e740a2697a7b40d7c5003a7d7edaee16acd349a9
|
||||
F test/utf16align.test 54cd35a27c005a9b6e7815d887718780b6a462ae
|
||||
F test/vacuum-into.test 48f4cec354fb6f27c98ef58d2fe49a11b71ff131af0cd9140efacc9858b9f670
|
||||
F test/vacuum-into.test c4c25dcf8ca909e33c1f5f0bb0f54b990c2c1dcbee7a4995843e79e40681a894
|
||||
F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
|
||||
F test/vacuum2.test 9fd45ce6ce29f5614c249e03938d3567c06a9e772d4f155949f8eafe2d8af520
|
||||
F test/vacuum3.test 77ecdd54592b45a0bcb133339f99f1ae0ae94d0d
|
||||
@ -1930,7 +1930,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 c26c9e5040ef4c52f2a99597e3a7c3eabd52c905d874fc76ca10fd54b749fa97 3658417bf300e004e5166ee69aa2d8c70697b87ea7456cb6337b0ad6d60257d5
|
||||
R cef68242e5282392d1b565c1664937af
|
||||
U drh
|
||||
Z 51c1251fe159b92025649ec2f4e8d588
|
||||
P e00a44ac10d68b7bdaff1d9c237b598696eddc2d7392574aee1a95d94b4f165a 8ba73b3cadb72ffcf176d19f9f946c1b90b224e5ab9a0e9eb9a83affa7476d23
|
||||
R 3e81ca5107c3ba7e39985ab60d26f57d
|
||||
U dan
|
||||
Z 1828748f66ed3db5a90f61fed859b997
|
||||
|
@ -1 +1 @@
|
||||
e00a44ac10d68b7bdaff1d9c237b598696eddc2d7392574aee1a95d94b4f165a
|
||||
638c1b0c50229800067eb1ba29d829b4d6e008256c21a1f67b4ce4d19ea307b3
|
@ -7111,7 +7111,7 @@ static int rebuildPage(
|
||||
|
||||
assert( i<iEnd );
|
||||
j = get2byte(&aData[hdr+5]);
|
||||
if( NEVER(j>(u32)usableSize) ){ j = 0; }
|
||||
if( j>(u32)usableSize ){ j = 0; }
|
||||
memcpy(&pTmp[j], &aData[j], usableSize - j);
|
||||
|
||||
for(k=0; pCArray->ixNx[k]<=i && ALWAYS(k<NB*2); k++){}
|
||||
|
31
src/build.c
31
src/build.c
@ -170,17 +170,21 @@ void sqlite3FinishCoding(Parse *pParse){
|
||||
int i;
|
||||
int reg;
|
||||
|
||||
addrRewind =
|
||||
sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);
|
||||
VdbeCoverage(v);
|
||||
reg = pReturning->iRetReg;
|
||||
for(i=0; i<pReturning->nRetCol; i++){
|
||||
sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i);
|
||||
if( pReturning->nRetCol==0 ){
|
||||
assert( CORRUPT_DB );
|
||||
}else{
|
||||
addrRewind =
|
||||
sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);
|
||||
VdbeCoverage(v);
|
||||
reg = pReturning->iRetReg;
|
||||
for(i=0; i<pReturning->nRetCol; i++){
|
||||
sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i);
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i);
|
||||
sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1);
|
||||
VdbeCoverage(v);
|
||||
sqlite3VdbeJumpHere(v, addrRewind);
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i);
|
||||
sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1);
|
||||
VdbeCoverage(v);
|
||||
sqlite3VdbeJumpHere(v, addrRewind);
|
||||
}
|
||||
sqlite3VdbeAddOp0(v, OP_Halt);
|
||||
|
||||
@ -261,7 +265,11 @@ void sqlite3FinishCoding(Parse *pParse){
|
||||
|
||||
if( pParse->bReturning ){
|
||||
Returning *pRet = pParse->u1.pReturning;
|
||||
sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRet->iRetCur, pRet->nRetCol);
|
||||
if( pRet->nRetCol==0 ){
|
||||
assert( CORRUPT_DB );
|
||||
}else{
|
||||
sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRet->iRetCur, pRet->nRetCol);
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally, jump back to the beginning of the executable code. */
|
||||
@ -2210,7 +2218,6 @@ static void estimateIndexWidth(Index *pIdx){
|
||||
*/
|
||||
static int hasColumn(const i16 *aiCol, int nCol, int x){
|
||||
while( nCol-- > 0 ){
|
||||
assert( aiCol[0]>=0 );
|
||||
if( x==*(aiCol++) ){
|
||||
return 1;
|
||||
}
|
||||
|
@ -1748,7 +1748,7 @@ Select *sqlite3SelectDup(sqlite3 *db, const Select *pDup, int flags){
|
||||
return pRet;
|
||||
}
|
||||
#else
|
||||
Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
|
||||
Select *sqlite3SelectDup(sqlite3 *db, const Select *p, int flags){
|
||||
assert( p==0 );
|
||||
return 0;
|
||||
}
|
||||
|
12
src/global.c
12
src/global.c
@ -298,6 +298,18 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = {
|
||||
*/
|
||||
FuncDefHash sqlite3BuiltinFunctions;
|
||||
|
||||
#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)
|
||||
/*
|
||||
** Counter used for coverage testing. Does not come into play for
|
||||
** release builds.
|
||||
**
|
||||
** Access to this global variable is not mutex protected. This might
|
||||
** result in TSAN warnings. But as the variable does not exist in
|
||||
** release builds, that should not be a concern.
|
||||
*/
|
||||
unsigned int sqlite3CoverageCounter;
|
||||
#endif /* SQLITE_COVERAGE_TEST || SQLITE_DEBUG */
|
||||
|
||||
#ifdef VDBE_PROFILE
|
||||
/*
|
||||
** The following performance counter can be used in place of
|
||||
|
@ -91,6 +91,6 @@ void sqlite3HashClear(Hash*);
|
||||
/*
|
||||
** Number of entries in a hash table
|
||||
*/
|
||||
/* #define sqliteHashCount(H) ((H)->count) // NOT USED */
|
||||
#define sqliteHashCount(H) ((H)->count)
|
||||
|
||||
#endif /* SQLITE_HASH_H */
|
||||
|
@ -2613,8 +2613,9 @@ int sqlite3OpenTableAndIndices(
|
||||
assert( op==OP_OpenWrite || p5==0 );
|
||||
if( IsVirtual(pTab) ){
|
||||
/* This routine is a no-op for virtual tables. Leave the output
|
||||
** variables *piDataCur and *piIdxCur uninitialized so that valgrind
|
||||
** can detect if they are used by mistake in the caller. */
|
||||
** variables *piDataCur and *piIdxCur set to illegal cursor numbers
|
||||
** for improved error detection. */
|
||||
*piDataCur = *piIdxCur = -999;
|
||||
return 0;
|
||||
}
|
||||
iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
|
||||
|
14
src/memdb.c
14
src/memdb.c
@ -272,7 +272,7 @@ static int memdbRead(
|
||||
*/
|
||||
static int memdbEnlarge(MemStore *p, sqlite3_int64 newSz){
|
||||
unsigned char *pNew;
|
||||
if( (p->mFlags & SQLITE_DESERIALIZE_RESIZEABLE)==0 || p->nMmap>0 ){
|
||||
if( (p->mFlags & SQLITE_DESERIALIZE_RESIZEABLE)==0 || NEVER(p->nMmap>0) ){
|
||||
return SQLITE_FULL;
|
||||
}
|
||||
if( newSz>p->szMax ){
|
||||
@ -471,7 +471,7 @@ static int memdbFetch(
|
||||
){
|
||||
MemStore *p = ((MemFile*)pFile)->pStore;
|
||||
memdbEnter(p);
|
||||
if( iOfst+iAmt>p->sz ){
|
||||
if( iOfst+iAmt>p->sz || (p->mFlags & SQLITE_DESERIALIZE_RESIZEABLE)!=0 ){
|
||||
*pp = 0;
|
||||
}else{
|
||||
p->nMmap++;
|
||||
@ -505,9 +505,8 @@ static int memdbOpen(
|
||||
MemFile *pFile = (MemFile*)pFd;
|
||||
MemStore *p = 0;
|
||||
int szName;
|
||||
if( (flags & SQLITE_OPEN_MAIN_DB)==0 ){
|
||||
return ORIGVFS(pVfs)->xOpen(ORIGVFS(pVfs), zName, pFd, flags, pOutFlags);
|
||||
}
|
||||
UNUSED_PARAMETER(pVfs);
|
||||
|
||||
memset(pFile, 0, sizeof(*pFile));
|
||||
szName = sqlite3Strlen30(zName);
|
||||
if( szName>1 && zName[0]=='/' ){
|
||||
@ -567,8 +566,9 @@ static int memdbOpen(
|
||||
p->szMax = sqlite3GlobalConfig.mxMemdbSize;
|
||||
}
|
||||
pFile->pStore = p;
|
||||
assert( pOutFlags!=0 ); /* True because flags==SQLITE_OPEN_MAIN_DB */
|
||||
*pOutFlags = flags | SQLITE_OPEN_MEMORY;
|
||||
if( pOutFlags!=0 ){
|
||||
*pOutFlags = flags | SQLITE_OPEN_MEMORY;
|
||||
}
|
||||
pFd->pMethods = &memdb_io_methods;
|
||||
memdbLeave(p);
|
||||
return SQLITE_OK;
|
||||
|
3
src/os.c
3
src/os.c
@ -316,12 +316,15 @@ int sqlite3OsOpenMalloc(
|
||||
rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3_free(pFile);
|
||||
*ppFile = 0;
|
||||
}else{
|
||||
*ppFile = pFile;
|
||||
}
|
||||
}else{
|
||||
*ppFile = 0;
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
}
|
||||
assert( *ppFile!=0 || rc!=SQLITE_OK );
|
||||
return rc;
|
||||
}
|
||||
void sqlite3OsCloseFree(sqlite3_file *pFile){
|
||||
|
@ -6125,6 +6125,11 @@ static int unixOpen(
|
||||
}
|
||||
memset(p, 0, sizeof(unixFile));
|
||||
|
||||
#ifdef SQLITE_ASSERT_NO_FILES
|
||||
/* Applications that never read or write a persistent disk files */
|
||||
assert( zName==0 );
|
||||
#endif
|
||||
|
||||
if( eType==SQLITE_OPEN_MAIN_DB ){
|
||||
UnixUnusedFd *pUnused;
|
||||
pUnused = findReusableFd(zName, flags);
|
||||
|
@ -630,6 +630,7 @@ struct Pager {
|
||||
u8 noLock; /* Do not lock (except in WAL mode) */
|
||||
u8 readOnly; /* True for a read-only database */
|
||||
u8 memDb; /* True to inhibit all file I/O */
|
||||
u8 memVfs; /* VFS-implemented memory database */
|
||||
|
||||
/**************************************************************************
|
||||
** The following block contains those class members that change during
|
||||
@ -4872,7 +4873,7 @@ int sqlite3PagerOpen(
|
||||
rc = sqlite3OsOpen(pVfs, pPager->zFilename, pPager->fd, vfsFlags, &fout);
|
||||
assert( !memDb );
|
||||
#ifndef SQLITE_OMIT_DESERIALIZE
|
||||
memJM = (fout&SQLITE_OPEN_MEMORY)!=0;
|
||||
pPager->memVfs = memJM = (fout&SQLITE_OPEN_MEMORY)!=0;
|
||||
#endif
|
||||
readOnly = (fout&SQLITE_OPEN_READONLY)!=0;
|
||||
|
||||
@ -6809,7 +6810,7 @@ void sqlite3PagerCacheStat(Pager *pPager, int eStat, int reset, int *pnVal){
|
||||
** Return true if this is an in-memory or temp-file backed pager.
|
||||
*/
|
||||
int sqlite3PagerIsMemdb(Pager *pPager){
|
||||
return pPager->tempFile;
|
||||
return pPager->tempFile || pPager->memVfs;
|
||||
}
|
||||
|
||||
/*
|
||||
|
27
src/pragma.c
27
src/pragma.c
@ -1227,8 +1227,35 @@ void sqlite3Pragma(
|
||||
for(ii=0; ii<db->nDb; ii++){
|
||||
HashElem *k;
|
||||
Hash *pHash;
|
||||
int initNCol;
|
||||
if( zDb && sqlite3_stricmp(zDb, db->aDb[ii].zDbSName)!=0 ) continue;
|
||||
|
||||
/* Ensure that the Table.nCol field is initialized for all views
|
||||
** and virtual tables. Each time we initialize a Table.nCol value
|
||||
** for a table, that can potentially disrupt the hash table, so restart
|
||||
** the initialization scan.
|
||||
*/
|
||||
pHash = &db->aDb[ii].pSchema->tblHash;
|
||||
initNCol = sqliteHashCount(pHash);
|
||||
while( initNCol-- ){
|
||||
for(k=sqliteHashFirst(pHash); 1; k=sqliteHashNext(k) ){
|
||||
Table *pTab;
|
||||
if( k==0 ){ initNCol = 0; break; }
|
||||
pTab = sqliteHashData(k);
|
||||
if( pTab->nCol==0 ){
|
||||
char *zSql = sqlite3MPrintf(db, "SELECT*FROM\"%w\"", pTab->zName);
|
||||
if( zSql ){
|
||||
sqlite3_stmt *pDummy = 0;
|
||||
(void)sqlite3_prepare(db, zSql, -1, &pDummy, 0);
|
||||
(void)sqlite3_finalize(pDummy);
|
||||
sqlite3DbFree(db, zSql);
|
||||
}
|
||||
pHash = &db->aDb[ii].pSchema->tblHash;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(k=sqliteHashFirst(pHash); k; k=sqliteHashNext(k) ){
|
||||
Table *pTab = sqliteHashData(k);
|
||||
const char *zType;
|
||||
|
@ -2606,17 +2606,16 @@ static int run_table_dump_query(
|
||||
}
|
||||
|
||||
/*
|
||||
** Allocate space and save off current error string.
|
||||
** Allocate space and save off string indicating current error.
|
||||
*/
|
||||
static char *save_err_msg(
|
||||
sqlite3 *db /* Database to query */
|
||||
sqlite3 *db, /* Database to query */
|
||||
const char *zWhen, /* Qualifier (format) wrapper */
|
||||
int rc /* Error code returned from API */
|
||||
){
|
||||
int nErrMsg = 1+strlen30(sqlite3_errmsg(db));
|
||||
char *zErrMsg = sqlite3_malloc64(nErrMsg);
|
||||
if( zErrMsg ){
|
||||
memcpy(zErrMsg, sqlite3_errmsg(db), nErrMsg);
|
||||
}
|
||||
return zErrMsg;
|
||||
if( zWhen==0 )
|
||||
zWhen = "%s (%d)";
|
||||
return sqlite3_mprintf(zWhen, sqlite3_errmsg(db), rc);
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
@ -3538,7 +3537,7 @@ static int shell_exec(
|
||||
rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);
|
||||
if( SQLITE_OK != rc ){
|
||||
if( pzErrMsg ){
|
||||
*pzErrMsg = save_err_msg(db);
|
||||
*pzErrMsg = save_err_msg(db, "in prepare, %s (%d)", rc);
|
||||
}
|
||||
}else{
|
||||
if( !pStmt ){
|
||||
@ -3652,7 +3651,7 @@ static int shell_exec(
|
||||
zSql = zLeftover;
|
||||
while( IsSpace(zSql[0]) ) zSql++;
|
||||
}else if( pzErrMsg ){
|
||||
*pzErrMsg = save_err_msg(db);
|
||||
*pzErrMsg = save_err_msg(db, "stepping, %s (%d)", rc);
|
||||
}
|
||||
|
||||
/* clear saved stmt handle */
|
||||
@ -8283,6 +8282,11 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
|
||||
failIfSafeMode(p, "cannot run .import in safe mode");
|
||||
memset(&sCtx, 0, sizeof(sCtx));
|
||||
sCtx.z = sqlite3_malloc64(120);
|
||||
if( sCtx.z==0 ){
|
||||
import_cleanup(&sCtx);
|
||||
shell_out_of_memory();
|
||||
}
|
||||
if( p->mode==MODE_Ascii ){
|
||||
xRead = ascii_read_one_field;
|
||||
}else{
|
||||
|
@ -435,11 +435,12 @@
|
||||
** is significant and used at least once. On switch statements
|
||||
** where multiple cases go to the same block of code, testcase()
|
||||
** can insure that all cases are evaluated.
|
||||
**
|
||||
*/
|
||||
#ifdef SQLITE_COVERAGE_TEST
|
||||
void sqlite3Coverage(int);
|
||||
# define testcase(X) if( X ){ sqlite3Coverage(__LINE__); }
|
||||
#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)
|
||||
# ifndef SQLITE_AMALGAMATION
|
||||
extern unsigned int sqlite3CoverageCounter;
|
||||
# endif
|
||||
# define testcase(X) if( X ){ sqlite3CoverageCounter += (unsigned)__LINE__; }
|
||||
#else
|
||||
# define testcase(X)
|
||||
#endif
|
||||
|
@ -962,26 +962,79 @@ static int multiplexFileControl(sqlite3_file *pConn, int op, void *pArg){
|
||||
** element is the argument to the pragma or NULL if the pragma has no
|
||||
** argument.
|
||||
*/
|
||||
if( aFcntl[1] && sqlite3_stricmp(aFcntl[1],"multiplex_truncate")==0 ){
|
||||
if( aFcntl[2] && aFcntl[2][0] ){
|
||||
if( sqlite3_stricmp(aFcntl[2], "on")==0
|
||||
|| sqlite3_stricmp(aFcntl[2], "1")==0 ){
|
||||
pGroup->bTruncate = 1;
|
||||
}else
|
||||
if( sqlite3_stricmp(aFcntl[2], "off")==0
|
||||
|| sqlite3_stricmp(aFcntl[2], "0")==0 ){
|
||||
pGroup->bTruncate = 0;
|
||||
}
|
||||
}
|
||||
/* EVIDENCE-OF: R-27806-26076 The handler for an SQLITE_FCNTL_PRAGMA
|
||||
** file control can optionally make the first element of the char**
|
||||
** argument point to a string obtained from sqlite3_mprintf() or the
|
||||
** equivalent and that string will become the result of the pragma
|
||||
** or the error message if the pragma fails.
|
||||
if( aFcntl[1] && sqlite3_strnicmp(aFcntl[1],"multiplex_",10)==0 ){
|
||||
sqlite3_int64 sz = 0;
|
||||
(void)multiplexFileSize(pConn, &sz);
|
||||
/*
|
||||
** PRAGMA multiplex_truncate=BOOLEAN;
|
||||
** PRAGMA multiplex_truncate;
|
||||
**
|
||||
** Turn the multiplexor truncate feature on or off. Return either
|
||||
** "on" or "off" to indicate the new setting. If the BOOLEAN argument
|
||||
** is omitted, just return the current value for the truncate setting.
|
||||
*/
|
||||
aFcntl[0] = sqlite3_mprintf(pGroup->bTruncate ? "on" : "off");
|
||||
rc = SQLITE_OK;
|
||||
break;
|
||||
if( sqlite3_stricmp(aFcntl[1],"multiplex_truncate")==0 ){
|
||||
if( aFcntl[2] && aFcntl[2][0] ){
|
||||
if( sqlite3_stricmp(aFcntl[2], "on")==0
|
||||
|| sqlite3_stricmp(aFcntl[2], "1")==0 ){
|
||||
pGroup->bTruncate = 1;
|
||||
}else
|
||||
if( sqlite3_stricmp(aFcntl[2], "off")==0
|
||||
|| sqlite3_stricmp(aFcntl[2], "0")==0 ){
|
||||
pGroup->bTruncate = 0;
|
||||
}
|
||||
}
|
||||
/* EVIDENCE-OF: R-27806-26076 The handler for an SQLITE_FCNTL_PRAGMA
|
||||
** file control can optionally make the first element of the char**
|
||||
** argument point to a string obtained from sqlite3_mprintf() or the
|
||||
** equivalent and that string will become the result of the pragma
|
||||
** or the error message if the pragma fails.
|
||||
*/
|
||||
aFcntl[0] = sqlite3_mprintf(pGroup->bTruncate ? "on" : "off");
|
||||
rc = SQLITE_OK;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
** PRAGMA multiplex_enabled;
|
||||
**
|
||||
** Return 0 or 1 depending on whether the multiplexor is enabled or
|
||||
** disabled, respectively.
|
||||
*/
|
||||
if( sqlite3_stricmp(aFcntl[1],"multiplex_enabled")==0 ){
|
||||
aFcntl[0] = sqlite3_mprintf("%d", pGroup->bEnabled!=0);
|
||||
rc = SQLITE_OK;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
** PRAGMA multiplex_chunksize;
|
||||
**
|
||||
** Return the chunksize for the multiplexor, or no-op if the
|
||||
** multiplexor is not active.
|
||||
*/
|
||||
if( sqlite3_stricmp(aFcntl[1],"multiplex_chunksize")==0
|
||||
&& pGroup->bEnabled
|
||||
){
|
||||
aFcntl[0] = sqlite3_mprintf("%u", pGroup->szChunk);
|
||||
rc = SQLITE_OK;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
** PRAGMA multiplex_filecount;
|
||||
**
|
||||
** Return the number of disk files currently in use by the
|
||||
** multiplexor. This should be the total database size size
|
||||
** divided by the chunksize and rounded up.
|
||||
*/
|
||||
if( sqlite3_stricmp(aFcntl[1],"multiplex_filecount")==0 ){
|
||||
int n = 0;
|
||||
int ii;
|
||||
for(ii=0; ii<pGroup->nReal; ii++){
|
||||
if( pGroup->aReal[ii].p!=0 ) n++;
|
||||
}
|
||||
aFcntl[0] = sqlite3_mprintf("%d", n);
|
||||
rc = SQLITE_OK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* If the multiplexor does not handle the pragma, pass it through
|
||||
** into the default case. */
|
||||
|
10
src/util.c
10
src/util.c
@ -21,16 +21,6 @@
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Routine needed to support the testcase() macro.
|
||||
*/
|
||||
#ifdef SQLITE_COVERAGE_TEST
|
||||
void sqlite3Coverage(int x){
|
||||
static unsigned dummy = 0;
|
||||
dummy += (unsigned)x;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Calls to sqlite3FaultSim() are used to simulate a failure during testing,
|
||||
** or to bypass normal error detection during testing in order to let
|
||||
|
@ -250,7 +250,9 @@ SQLITE_NOINLINE int sqlite3RunVacuum(
|
||||
|
||||
/* Do not attempt to change the page size for a WAL database */
|
||||
if( sqlite3PagerGetJournalMode(sqlite3BtreePager(pMain))
|
||||
==PAGER_JOURNALMODE_WAL ){
|
||||
==PAGER_JOURNALMODE_WAL
|
||||
&& pOut==0
|
||||
){
|
||||
db->nextPagesize = 0;
|
||||
}
|
||||
|
||||
|
@ -3656,6 +3656,7 @@ case OP_Transaction: {
|
||||
assert( pOp->p2>=0 && pOp->p2<=2 );
|
||||
assert( pOp->p1>=0 && pOp->p1<db->nDb );
|
||||
assert( DbMaskTest(p->btreeMask, pOp->p1) );
|
||||
assert( rc==SQLITE_OK );
|
||||
if( pOp->p2 && (db->flags & SQLITE_QueryOnly)!=0 ){
|
||||
rc = SQLITE_READONLY;
|
||||
goto abort_due_to_error;
|
||||
@ -3699,7 +3700,8 @@ case OP_Transaction: {
|
||||
}
|
||||
}
|
||||
assert( pOp->p5==0 || pOp->p4type==P4_INT32 );
|
||||
if( pOp->p5
|
||||
if( rc==SQLITE_OK
|
||||
&& pOp->p5
|
||||
&& (iMeta!=pOp->p3
|
||||
|| db->aDb[pOp->p1].pSchema->iGeneration!=pOp->p4.i)
|
||||
){
|
||||
@ -4093,7 +4095,7 @@ case OP_OpenEphemeral: {
|
||||
aMem[pOp->p3].z = "";
|
||||
}
|
||||
pCx = p->apCsr[pOp->p1];
|
||||
if( pCx && !pCx->hasBeenDuped ){
|
||||
if( pCx && !pCx->hasBeenDuped && ALWAYS(pOp->p2<=pCx->nField) ){
|
||||
/* If the ephermeral table is already open and has no duplicates from
|
||||
** OP_OpenDup, then erase all existing content so that the table is
|
||||
** empty again, rather than creating a new table. */
|
||||
|
@ -1907,8 +1907,8 @@ static void releaseMemArray(Mem *p, int N){
|
||||
*/
|
||||
testcase( p->flags & MEM_Agg );
|
||||
testcase( p->flags & MEM_Dyn );
|
||||
testcase( p->xDel==sqlite3VdbeFrameMemDel );
|
||||
if( p->flags&(MEM_Agg|MEM_Dyn) ){
|
||||
testcase( (p->flags & MEM_Dyn)!=0 && p->xDel==sqlite3VdbeFrameMemDel );
|
||||
sqlite3VdbeMemRelease(p);
|
||||
}else if( p->szMalloc ){
|
||||
sqlite3DbFreeNN(db, p->zMalloc);
|
||||
|
@ -374,6 +374,8 @@ int sqlite3VdbeMemExpandBlob(Mem *pMem){
|
||||
if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
|
||||
return SQLITE_NOMEM_BKPT;
|
||||
}
|
||||
assert( pMem->z!=0 );
|
||||
assert( sqlite3DbMallocSize(pMem->db,pMem->z) >= nByte );
|
||||
|
||||
memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
|
||||
pMem->n += pMem->u.nZero;
|
||||
|
@ -1289,7 +1289,7 @@ static void vdbeSorterExtendFile(sqlite3 *db, sqlite3_file *pFd, i64 nByte){
|
||||
sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_CHUNK_SIZE, &chunksize);
|
||||
sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_SIZE_HINT, &nByte);
|
||||
sqlite3OsFetch(pFd, 0, (int)nByte, &p);
|
||||
sqlite3OsUnfetch(pFd, 0, p);
|
||||
if( p ) sqlite3OsUnfetch(pFd, 0, p);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -2007,6 +2007,7 @@ static int vdbeIncrMergerNew(
|
||||
vdbeMergeEngineFree(pMerger);
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
}
|
||||
assert( *ppOut!=0 || rc!=SQLITE_OK );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
62
src/wal.c
62
src/wal.c
@ -620,9 +620,13 @@ struct WalIterator {
|
||||
** so. It is safe to enlarge the wal-index if pWal->writeLock is true
|
||||
** or pWal->exclusiveMode==WAL_HEAPMEMORY_MODE.
|
||||
**
|
||||
** If this call is successful, *ppPage is set to point to the wal-index
|
||||
** page and SQLITE_OK is returned. If an error (an OOM or VFS error) occurs,
|
||||
** then an SQLite error code is returned and *ppPage is set to 0.
|
||||
** Three possible result scenarios:
|
||||
**
|
||||
** (1) rc==SQLITE_OK and *ppPage==Requested-Wal-Index-Page
|
||||
** (2) rc>=SQLITE_ERROR and *ppPage==NULL
|
||||
** (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0
|
||||
**
|
||||
** Scenario (3) can only occur when pWal->writeLock is false and iPage==0
|
||||
*/
|
||||
static SQLITE_NOINLINE int walIndexPageRealloc(
|
||||
Wal *pWal, /* The WAL context */
|
||||
@ -655,7 +659,9 @@ static SQLITE_NOINLINE int walIndexPageRealloc(
|
||||
rc = sqlite3OsShmMap(pWal->pDbFd, iPage, WALINDEX_PGSZ,
|
||||
pWal->writeLock, (void volatile **)&pWal->apWiData[iPage]
|
||||
);
|
||||
assert( pWal->apWiData[iPage]!=0 || rc!=SQLITE_OK || pWal->writeLock==0 );
|
||||
assert( pWal->apWiData[iPage]!=0
|
||||
|| rc!=SQLITE_OK
|
||||
|| (pWal->writeLock==0 && iPage==0) );
|
||||
testcase( pWal->apWiData[iPage]==0 && rc==SQLITE_OK );
|
||||
if( rc==SQLITE_OK ){
|
||||
if( iPage>0 && sqlite3FaultSim(600) ) rc = SQLITE_NOMEM;
|
||||
@ -994,8 +1000,8 @@ struct WalHashLoc {
|
||||
** slot in the hash table is set to N, it refers to frame number
|
||||
** (pLoc->iZero+N) in the log.
|
||||
**
|
||||
** Finally, set pLoc->aPgno so that pLoc->aPgno[1] is the page number of the
|
||||
** first frame indexed by the hash table, frame (pLoc->iZero+1).
|
||||
** Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the
|
||||
** first frame indexed by the hash table, frame (pLoc->iZero).
|
||||
*/
|
||||
static int walHashGet(
|
||||
Wal *pWal, /* WAL handle */
|
||||
@ -1007,7 +1013,7 @@ static int walHashGet(
|
||||
rc = walIndexPage(pWal, iHash, &pLoc->aPgno);
|
||||
assert( rc==SQLITE_OK || iHash>0 );
|
||||
|
||||
if( rc==SQLITE_OK ){
|
||||
if( pLoc->aPgno ){
|
||||
pLoc->aHash = (volatile ht_slot *)&pLoc->aPgno[HASHTABLE_NPAGE];
|
||||
if( iHash==0 ){
|
||||
pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
|
||||
@ -1015,7 +1021,8 @@ static int walHashGet(
|
||||
}else{
|
||||
pLoc->iZero = HASHTABLE_NPAGE_ONE + (iHash-1)*HASHTABLE_NPAGE;
|
||||
}
|
||||
pLoc->aPgno = &pLoc->aPgno[-1];
|
||||
}else if( NEVER(rc==SQLITE_OK) ){
|
||||
rc = SQLITE_ERROR;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
@ -1097,8 +1104,9 @@ static void walCleanupHash(Wal *pWal){
|
||||
/* Zero the entries in the aPgno array that correspond to frames with
|
||||
** frame numbers greater than pWal->hdr.mxFrame.
|
||||
*/
|
||||
nByte = (int)((char *)sLoc.aHash - (char *)&sLoc.aPgno[iLimit+1]);
|
||||
memset((void *)&sLoc.aPgno[iLimit+1], 0, nByte);
|
||||
nByte = (int)((char *)sLoc.aHash - (char *)&sLoc.aPgno[iLimit]);
|
||||
assert( nByte>=0 );
|
||||
memset((void *)&sLoc.aPgno[iLimit], 0, nByte);
|
||||
|
||||
#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
|
||||
/* Verify that the every entry in the mapping region is still reachable
|
||||
@ -1107,11 +1115,11 @@ static void walCleanupHash(Wal *pWal){
|
||||
if( iLimit ){
|
||||
int j; /* Loop counter */
|
||||
int iKey; /* Hash key */
|
||||
for(j=1; j<=iLimit; j++){
|
||||
for(j=0; j<iLimit; j++){
|
||||
for(iKey=walHash(sLoc.aPgno[j]);sLoc.aHash[iKey];iKey=walNextHash(iKey)){
|
||||
if( sLoc.aHash[iKey]==j ) break;
|
||||
if( sLoc.aHash[iKey]==j+1 ) break;
|
||||
}
|
||||
assert( sLoc.aHash[iKey]==j );
|
||||
assert( sLoc.aHash[iKey]==j+1 );
|
||||
}
|
||||
}
|
||||
#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */
|
||||
@ -1143,9 +1151,9 @@ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
|
||||
** entire hash table and aPgno[] array before proceeding.
|
||||
*/
|
||||
if( idx==1 ){
|
||||
int nByte = (int)((u8 *)&sLoc.aHash[HASHTABLE_NSLOT]
|
||||
- (u8 *)&sLoc.aPgno[1]);
|
||||
memset((void*)&sLoc.aPgno[1], 0, nByte);
|
||||
int nByte = (int)((u8*)&sLoc.aHash[HASHTABLE_NSLOT] - (u8*)sLoc.aPgno);
|
||||
assert( nByte>=0 );
|
||||
memset((void*)sLoc.aPgno, 0, nByte);
|
||||
}
|
||||
|
||||
/* If the entry in aPgno[] is already set, then the previous writer
|
||||
@ -1154,9 +1162,9 @@ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
|
||||
** Remove the remnants of that writers uncommitted transaction from
|
||||
** the hash-table before writing any new entries.
|
||||
*/
|
||||
if( sLoc.aPgno[idx] ){
|
||||
if( sLoc.aPgno[idx-1] ){
|
||||
walCleanupHash(pWal);
|
||||
assert( !sLoc.aPgno[idx] );
|
||||
assert( !sLoc.aPgno[idx-1] );
|
||||
}
|
||||
|
||||
/* Write the aPgno[] array entry and the hash-table slot. */
|
||||
@ -1164,7 +1172,7 @@ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
|
||||
for(iKey=walHash(iPage); sLoc.aHash[iKey]; iKey=walNextHash(iKey)){
|
||||
if( (nCollide--)==0 ) return SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
sLoc.aPgno[idx] = iPage;
|
||||
sLoc.aPgno[idx-1] = iPage;
|
||||
AtomicStore(&sLoc.aHash[iKey], (ht_slot)idx);
|
||||
|
||||
#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
|
||||
@ -1185,19 +1193,18 @@ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
|
||||
*/
|
||||
if( (idx&0x3ff)==0 ){
|
||||
int i; /* Loop counter */
|
||||
for(i=1; i<=idx; i++){
|
||||
for(i=0; i<idx; i++){
|
||||
for(iKey=walHash(sLoc.aPgno[i]);
|
||||
sLoc.aHash[iKey];
|
||||
iKey=walNextHash(iKey)){
|
||||
if( sLoc.aHash[iKey]==i ) break;
|
||||
if( sLoc.aHash[iKey]==i+1 ) break;
|
||||
}
|
||||
assert( sLoc.aHash[iKey]==i );
|
||||
assert( sLoc.aHash[iKey]==i+1 );
|
||||
}
|
||||
}
|
||||
#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */
|
||||
}
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -1318,7 +1325,8 @@ static int walIndexRecover(Wal *pWal){
|
||||
u32 iFirst = 1 + (iPg==0?0:HASHTABLE_NPAGE_ONE+(iPg-1)*HASHTABLE_NPAGE);
|
||||
u32 nHdr, nHdr32;
|
||||
rc = walIndexPage(pWal, iPg, (volatile u32**)&aShare);
|
||||
if( rc ) break;
|
||||
assert( aShare!=0 || rc!=SQLITE_OK );
|
||||
if( aShare==0 ) break;
|
||||
pWal->apWiData[iPg] = aPrivate;
|
||||
|
||||
for(iFrame=iFirst; iFrame<=iLast; iFrame++){
|
||||
@ -1815,7 +1823,6 @@ static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){
|
||||
int nEntry; /* Number of entries in this segment */
|
||||
ht_slot *aIndex; /* Sorted index for this segment */
|
||||
|
||||
sLoc.aPgno++;
|
||||
if( (i+1)==nSegment ){
|
||||
nEntry = (int)(iLast - sLoc.iZero);
|
||||
}else{
|
||||
@ -2954,7 +2961,8 @@ int sqlite3WalSnapshotRecover(Wal *pWal){
|
||||
|
||||
rc = walHashGet(pWal, walFramePage(i), &sLoc);
|
||||
if( rc!=SQLITE_OK ) break;
|
||||
pgno = sLoc.aPgno[i-sLoc.iZero];
|
||||
assert( i - sLoc.iZero - 1 >=0 );
|
||||
pgno = sLoc.aPgno[i-sLoc.iZero-1];
|
||||
iDbOff = (i64)(pgno-1) * szPage;
|
||||
|
||||
if( iDbOff+szPage<=szDb ){
|
||||
@ -3187,7 +3195,7 @@ int sqlite3WalFindFrame(
|
||||
iKey = walHash(pgno);
|
||||
while( (iH = AtomicLoad(&sLoc.aHash[iKey]))!=0 ){
|
||||
u32 iFrame = iH + sLoc.iZero;
|
||||
if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH]==pgno ){
|
||||
if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH-1]==pgno ){
|
||||
assert( iFrame>iRead || CORRUPT_DB );
|
||||
iRead = iFrame;
|
||||
}
|
||||
|
@ -62,10 +62,34 @@ do_test 120 {
|
||||
sqlite3_carray_bind -int64 $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 121 {
|
||||
sqlite3_carray_bind -int64 -transient $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 122 {
|
||||
sqlite3_carray_bind -int64 -static $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 123 {
|
||||
sqlite3_carray_bind -int32 -transient $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 124 {
|
||||
sqlite3_carray_bind -int32 -static $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 125 {
|
||||
sqlite3_carray_bind -int32 $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 130 {
|
||||
sqlite3_carray_bind -int64 $STMT 3 1 2 3 4 6 7
|
||||
run_stmt $STMT 0
|
||||
} {0}
|
||||
do_test 131 {
|
||||
sqlite3_carray_bind -int64 -transient $STMT 3 1 2 3 4 6 7
|
||||
run_stmt $STMT 0
|
||||
} {0}
|
||||
do_test 131 {
|
||||
sqlite3_carray_bind -int64 -static $STMT 3 1 2 3 4 6 7
|
||||
run_stmt $STMT 0
|
||||
@ -74,6 +98,14 @@ do_test 140 {
|
||||
sqlite3_carray_bind -double $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 141 {
|
||||
sqlite3_carray_bind -double -transient $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 142 {
|
||||
sqlite3_carray_bind -double -static $STMT 3 1 2 3 4 5 6 7
|
||||
run_stmt $STMT 0
|
||||
} {1}
|
||||
do_test 150 {
|
||||
sqlite3_carray_bind -double $STMT 3 1 2 3 4 6 7
|
||||
run_stmt $STMT 0
|
||||
|
232
test/fuzzcheck.c
232
test/fuzzcheck.c
@ -302,6 +302,108 @@ static VFile *createVFile(const char *zName, int sz, unsigned char *pData){
|
||||
return pNew;
|
||||
}
|
||||
|
||||
/* Return true if the line is all zeros */
|
||||
static int allZero(unsigned char *aLine){
|
||||
int i;
|
||||
for(i=0; i<16 && aLine[i]==0; i++){}
|
||||
return i==16;
|
||||
}
|
||||
|
||||
/*
|
||||
** Render a database and query as text that can be input into
|
||||
** the CLI.
|
||||
*/
|
||||
static void renderDbSqlForCLI(
|
||||
FILE *out, /* Write to this file */
|
||||
const char *zFile, /* Name of the database file */
|
||||
unsigned char *aDb, /* Database content */
|
||||
int nDb, /* Number of bytes in aDb[] */
|
||||
unsigned char *zSql, /* SQL content */
|
||||
int nSql /* Bytes of SQL */
|
||||
){
|
||||
fprintf(out, ".print ******* %s *******\n", zFile);
|
||||
if( nDb>100 ){
|
||||
int i, j; /* Loop counters */
|
||||
int pgsz; /* Size of each page */
|
||||
int lastPage = 0; /* Last page number shown */
|
||||
int iPage; /* Current page number */
|
||||
unsigned char *aLine; /* Single line to display */
|
||||
unsigned char buf[16]; /* Fake line */
|
||||
unsigned char bShow[256]; /* Characters ok to display */
|
||||
|
||||
memset(bShow, '.', sizeof(bShow));
|
||||
for(i=' '; i<='~'; i++){
|
||||
if( i!='{' && i!='}' && i!='"' && i!='\\' ) bShow[i] = i;
|
||||
}
|
||||
pgsz = (aDb[16]<<8) | aDb[17];
|
||||
if( pgsz==0 ) pgsz = 65536;
|
||||
if( pgsz<512 || (pgsz&(pgsz-1))!=0 ) pgsz = 4096;
|
||||
fprintf(out,".open --hexdb\n");
|
||||
fprintf(out,"| size %d pagesize %d filename %s\n",nDb,pgsz,zFile);
|
||||
for(i=0; i<nDb; i += 16){
|
||||
if( i+16>nDb ){
|
||||
memset(buf, 0, sizeof(buf));
|
||||
memcpy(buf, aDb+i, nDb-i);
|
||||
aLine = buf;
|
||||
}else{
|
||||
aLine = aDb + i;
|
||||
}
|
||||
if( allZero(aLine) ) continue;
|
||||
iPage = i/pgsz + 1;
|
||||
if( lastPage!=iPage ){
|
||||
fprintf(out,"| page %d offset %d\n", iPage, (iPage-1)*pgsz);
|
||||
lastPage = iPage;
|
||||
}
|
||||
fprintf(out,"| %5d:", i-(iPage-1)*pgsz);
|
||||
for(j=0; j<16; j++) fprintf(out," %02x", aLine[j]);
|
||||
fprintf(out," ");
|
||||
for(j=0; j<16; j++){
|
||||
unsigned char c = (unsigned char)aLine[j];
|
||||
fputc( bShow[c], stdout);
|
||||
}
|
||||
fputc('\n', stdout);
|
||||
}
|
||||
fprintf(out,"| end %s\n", zFile);
|
||||
}else{
|
||||
fprintf(out,".open :memory:\n");
|
||||
}
|
||||
fprintf(out,".testctrl prng_seed 1 db\n");
|
||||
fprintf(out,".testctrl internal_functions\n");
|
||||
fprintf(out,"%.*s", nSql, zSql);
|
||||
if( nSql>0 && zSql[nSql-1]!='\n' ) fprintf(out, "\n");
|
||||
}
|
||||
|
||||
/*
|
||||
** Read the complete content of a file into memory. Add a 0x00 terminator
|
||||
** and return a pointer to the result.
|
||||
**
|
||||
** The file content is held in memory obtained from sqlite_malloc64() which
|
||||
** should be freed by the caller.
|
||||
*/
|
||||
static char *readFile(const char *zFilename, long *sz){
|
||||
FILE *in;
|
||||
long nIn;
|
||||
unsigned char *pBuf;
|
||||
|
||||
*sz = 0;
|
||||
if( zFilename==0 ) return 0;
|
||||
in = fopen(zFilename, "rb");
|
||||
if( in==0 ) return 0;
|
||||
fseek(in, 0, SEEK_END);
|
||||
*sz = nIn = ftell(in);
|
||||
rewind(in);
|
||||
pBuf = sqlite3_malloc64( nIn+1 );
|
||||
if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
|
||||
pBuf[nIn] = 0;
|
||||
fclose(in);
|
||||
return (char*)pBuf;
|
||||
}
|
||||
sqlite3_free(pBuf);
|
||||
*sz = 0;
|
||||
fclose(in);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Implementation of the "readfile(X)" SQL function. The entire content
|
||||
@ -313,25 +415,15 @@ static void readfileFunc(
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
const char *zName;
|
||||
FILE *in;
|
||||
long nIn;
|
||||
void *pBuf;
|
||||
const char *zName = (const char*)sqlite3_value_text(argv[0]);
|
||||
|
||||
zName = (const char*)sqlite3_value_text(argv[0]);
|
||||
if( zName==0 ) return;
|
||||
in = fopen(zName, "rb");
|
||||
if( in==0 ) return;
|
||||
fseek(in, 0, SEEK_END);
|
||||
nIn = ftell(in);
|
||||
rewind(in);
|
||||
pBuf = sqlite3_malloc64( nIn );
|
||||
if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
|
||||
pBuf = readFile(zName, &nIn);
|
||||
if( pBuf ){
|
||||
sqlite3_result_blob(context, pBuf, nIn, sqlite3_free);
|
||||
}else{
|
||||
sqlite3_free(pBuf);
|
||||
}
|
||||
fclose(in);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -750,7 +842,11 @@ static int block_troublesome_sql(
|
||||
(void)zArg3;
|
||||
(void)zArg4;
|
||||
if( eCode==SQLITE_PRAGMA ){
|
||||
if( eVerbosity==0 ){
|
||||
if( sqlite3_stricmp("busy_timeout",zArg1)==0
|
||||
&& (zArg2==0 || strtoll(zArg2,0,0)>100)
|
||||
){
|
||||
return SQLITE_DENY;
|
||||
}else if( eVerbosity==0 ){
|
||||
if( sqlite3_strnicmp("vdbe_", zArg1, 5)==0
|
||||
|| sqlite3_stricmp("parser_trace", zArg1)==0
|
||||
|| sqlite3_stricmp("temp_store_directory", zArg1)==0
|
||||
@ -762,9 +858,16 @@ static int block_troublesome_sql(
|
||||
oomCounter = atoi(zArg2);
|
||||
}
|
||||
}else if( eCode==SQLITE_ATTACH ){
|
||||
if( zArg1==0 || (zArg1[0]!=0 && strcmp(zArg1,":memory:")!=0) ){
|
||||
return SQLITE_DENY;
|
||||
/* Deny the ATTACH if it is attaching anything other than an in-memory
|
||||
** database. */
|
||||
if( zArg1==0 ) return SQLITE_DENY;
|
||||
if( strcmp(zArg1,":memory:")==0 ) return SQLITE_OK;
|
||||
if( sqlite3_strglob("file:*[?]vfs=memdb", zArg1)==0
|
||||
&& sqlite3_strglob("file:*[^/a-zA-Z0-9_.]*[?]vfs=memdb", zArg1)!=0
|
||||
){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
return SQLITE_DENY;
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@ -844,7 +947,13 @@ static int runDbSql(sqlite3 *db, const char *zSql){
|
||||
}
|
||||
|
||||
/* Invoke this routine to run a single test case */
|
||||
int runCombinedDbSqlInput(const uint8_t *aData, size_t nByte, int iTimeout){
|
||||
int runCombinedDbSqlInput(
|
||||
const uint8_t *aData, /* Combined DB+SQL content */
|
||||
size_t nByte, /* Size of aData in bytes */
|
||||
int iTimeout, /* Use this timeout */
|
||||
int bScript, /* If true, just render CLI output */
|
||||
int iSqlId /* SQL identifier */
|
||||
){
|
||||
int rc; /* SQLite API return value */
|
||||
int iSql; /* Index in aData[] of start of SQL */
|
||||
unsigned char *aDb = 0; /* Decoded database content */
|
||||
@ -870,6 +979,14 @@ int runCombinedDbSqlInput(const uint8_t *aData, size_t nByte, int iTimeout){
|
||||
iSql = decodeDatabase((unsigned char*)aData, (int)nByte, &aDb, &nDb);
|
||||
if( iSql<0 ) return 0;
|
||||
nSql = (int)(nByte - iSql);
|
||||
if( bScript ){
|
||||
char zName[100];
|
||||
sqlite3_snprintf(sizeof(zName),zName,"dbsql%06d.db",iSqlId);
|
||||
renderDbSqlForCLI(stdout, zName, aDb, nDb,
|
||||
(unsigned char*)(aData+iSql), nSql);
|
||||
sqlite3_free(aDb);
|
||||
return 0;
|
||||
}
|
||||
if( eVerbosity>=3 ){
|
||||
printf(
|
||||
"****** %d-byte input, %d-byte database, %d-byte script "
|
||||
@ -973,7 +1090,7 @@ testrun_finished:
|
||||
if( rc!=SQLITE_OK ){
|
||||
fprintf(stdout, "sqlite3_close() returns %d\n", rc);
|
||||
}
|
||||
if( eVerbosity>=2 ){
|
||||
if( eVerbosity>=2 && !bScript ){
|
||||
fprintf(stdout, "Peak memory usages: %f MB\n",
|
||||
sqlite3_memory_highwater(1) / 1000000.0);
|
||||
}
|
||||
@ -1447,6 +1564,7 @@ static void showHelp(void){
|
||||
" -q|--quiet Reduced output\n"
|
||||
" --rebuild Rebuild and vacuum the database file\n"
|
||||
" --result-trace Show the results of each SQL command\n"
|
||||
" --script Output CLI script instead of running tests\n"
|
||||
" --skip N Skip the first N test cases\n"
|
||||
" --spinner Use a spinner to show progress\n"
|
||||
" --sqlid N Use only SQL where sqlid=N\n"
|
||||
@ -1476,6 +1594,7 @@ int main(int argc, char **argv){
|
||||
int vdbeLimitFlag = 0; /* --limit-vdbe */
|
||||
int infoFlag = 0; /* --info */
|
||||
int nSkip = 0; /* --skip */
|
||||
int bScript = 0; /* --script */
|
||||
int bSpinner = 0; /* True for --spinner */
|
||||
int timeoutTest = 0; /* undocumented --timeout-test flag */
|
||||
int runFlags = 0; /* Flags sent to runSql() */
|
||||
@ -1503,6 +1622,7 @@ int main(int argc, char **argv){
|
||||
int nV; /* How much to increase verbosity with -vvvv */
|
||||
sqlite3_int64 tmStart; /* Start of each test */
|
||||
|
||||
sqlite3_config(SQLITE_CONFIG_URI,1);
|
||||
registerOomSimulator();
|
||||
sqlite3_initialize();
|
||||
iBegin = timeOfDay();
|
||||
@ -1573,7 +1693,7 @@ int main(int argc, char **argv){
|
||||
}else
|
||||
if( strcmp(z,"load-dbsql")==0 ){
|
||||
zInsSql = "INSERT INTO xsql(sqltext)"
|
||||
"VALUES(CAST(readtextfile(?1) AS text))";
|
||||
"VALUES(readfile(?1))";
|
||||
iFirstInsArg = i+1;
|
||||
openFlags4Data = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
|
||||
dbSqlOnly = 1;
|
||||
@ -1609,6 +1729,9 @@ int main(int argc, char **argv){
|
||||
if( strcmp(z,"result-trace")==0 ){
|
||||
runFlags |= SQL_OUTPUT;
|
||||
}else
|
||||
if( strcmp(z,"script")==0 ){
|
||||
bScript = 1;
|
||||
}else
|
||||
if( strcmp(z,"skip")==0 ){
|
||||
if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
|
||||
nSkip = atoi(argv[++i]);
|
||||
@ -1657,6 +1780,16 @@ int main(int argc, char **argv){
|
||||
}
|
||||
return 0;
|
||||
}else
|
||||
if( strcmp(z,"is-dbsql")==0 ){
|
||||
i++;
|
||||
for(i++; i<argc; i++){
|
||||
long nData;
|
||||
char *aData = readFile(argv[i], &nData);
|
||||
printf("%d %s\n", isDbSql((unsigned char*)aData,nData), argv[i]);
|
||||
sqlite3_free(aData);
|
||||
}
|
||||
exit(0);
|
||||
}else
|
||||
{
|
||||
fatalError("unknown option: %s", argv[i]);
|
||||
}
|
||||
@ -1678,12 +1811,21 @@ int main(int argc, char **argv){
|
||||
|
||||
/* Process each source database separately */
|
||||
for(iSrcDb=0; iSrcDb<nSrcDb; iSrcDb++){
|
||||
char *zRawData = 0;
|
||||
long nRawData = 0;
|
||||
g.zDbFile = azSrcDb[iSrcDb];
|
||||
rc = sqlite3_open_v2(azSrcDb[iSrcDb], &db,
|
||||
openFlags4Data, pDfltVfs->zName);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_exec(db, "SELECT count(*) FROM sqlite_schema", 0, 0, 0);
|
||||
}
|
||||
if( rc ){
|
||||
fatalError("cannot open source database %s - %s",
|
||||
azSrcDb[iSrcDb], sqlite3_errmsg(db));
|
||||
sqlite3_close(db);
|
||||
zRawData = readFile(azSrcDb[iSrcDb], &nRawData);
|
||||
if( zRawData==0 ){
|
||||
fatalError("input file \"%s\" is not recognized\n", azSrcDb[iSrcDb]);
|
||||
}
|
||||
sqlite3_open(":memory:", &db);
|
||||
}
|
||||
|
||||
/* Print the description, if there is one */
|
||||
@ -1718,6 +1860,7 @@ int main(int argc, char **argv){
|
||||
sqlite3_finalize(pStmt);
|
||||
printf("\n");
|
||||
sqlite3_close(db);
|
||||
sqlite3_free(zRawData);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1742,6 +1885,21 @@ int main(int argc, char **argv){
|
||||
sqlite3_free(zSql);
|
||||
if( rc ) fatalError("cannot change description: %s", sqlite3_errmsg(db));
|
||||
}
|
||||
if( zRawData ){
|
||||
zInsSql = "INSERT INTO xsql(sqltext) VALUES(?1)";
|
||||
rc = sqlite3_prepare_v2(db, zInsSql, -1, &pStmt, 0);
|
||||
if( rc ) fatalError("cannot prepare statement [%s]: %s",
|
||||
zInsSql, sqlite3_errmsg(db));
|
||||
sqlite3_bind_text(pStmt, 1, zRawData, nRawData, SQLITE_STATIC);
|
||||
sqlite3_step(pStmt);
|
||||
rc = sqlite3_reset(pStmt);
|
||||
if( rc ) fatalError("insert failed for %s", argv[i]);
|
||||
sqlite3_finalize(pStmt);
|
||||
rebuild_database(db, dbSqlOnly);
|
||||
zInsSql = 0;
|
||||
sqlite3_free(zRawData);
|
||||
zRawData = 0;
|
||||
}
|
||||
ossFuzzThisDb = ossFuzz;
|
||||
|
||||
/* If the CONFIG(name,value) table exists, read db-specific settings
|
||||
@ -1872,7 +2030,7 @@ int main(int argc, char **argv){
|
||||
}
|
||||
|
||||
/* Print the description, if there is one */
|
||||
if( !quietFlag ){
|
||||
if( !quietFlag && !bScript ){
|
||||
zDbName = azSrcDb[iSrcDb];
|
||||
i = (int)strlen(zDbName) - 1;
|
||||
while( i>0 && zDbName[i-1]!='/' && zDbName[i-1]!='\\' ){ i--; }
|
||||
@ -1929,12 +2087,16 @@ int main(int argc, char **argv){
|
||||
|
||||
/* Run a test using each SQL script against each database.
|
||||
*/
|
||||
if( !verboseFlag && !quietFlag && !bSpinner ) printf("%s:", zDbName);
|
||||
if( !verboseFlag && !quietFlag && !bSpinner && !bScript ){
|
||||
printf("%s:", zDbName);
|
||||
}
|
||||
for(pSql=g.pFirstSql; pSql; pSql=pSql->pNext){
|
||||
tmStart = timeOfDay();
|
||||
if( isDbSql(pSql->a, pSql->sz) ){
|
||||
sqlite3_snprintf(sizeof(g.zTestName), g.zTestName, "sqlid=%d",pSql->id);
|
||||
if( bSpinner ){
|
||||
if( bScript ){
|
||||
/* No progress output */
|
||||
}else if( bSpinner ){
|
||||
int nTotal =g.nSql;
|
||||
int idx = pSql->seq;
|
||||
printf("\r%s: %d/%d ", zDbName, idx, nTotal);
|
||||
@ -1955,10 +2117,10 @@ int main(int argc, char **argv){
|
||||
if( nSkip>0 ){
|
||||
nSkip--;
|
||||
}else{
|
||||
runCombinedDbSqlInput(pSql->a, pSql->sz, iTimeout);
|
||||
runCombinedDbSqlInput(pSql->a, pSql->sz, iTimeout, bScript, pSql->id);
|
||||
}
|
||||
nTest++;
|
||||
if( bTimer ){
|
||||
if( bTimer && !bScript ){
|
||||
sqlite3_int64 tmEnd = timeOfDay();
|
||||
printf("%lld %s\n", tmEnd - tmStart, g.zTestName);
|
||||
}
|
||||
@ -1971,7 +2133,9 @@ int main(int argc, char **argv){
|
||||
const char *zVfs = "inmem";
|
||||
sqlite3_snprintf(sizeof(g.zTestName), g.zTestName, "sqlid=%d,dbid=%d",
|
||||
pSql->id, pDb->id);
|
||||
if( bSpinner ){
|
||||
if( bScript ){
|
||||
/* No progress output */
|
||||
}else if( bSpinner ){
|
||||
int nTotal = g.nDb*g.nSql;
|
||||
int idx = pSql->seq*g.nDb + pDb->id - 1;
|
||||
printf("\r%s: %d/%d ", zDbName, idx, nTotal);
|
||||
@ -1993,6 +2157,14 @@ int main(int argc, char **argv){
|
||||
nSkip--;
|
||||
continue;
|
||||
}
|
||||
if( bScript ){
|
||||
char zName[100];
|
||||
sqlite3_snprintf(sizeof(zName), zName, "db%06d.db",
|
||||
pDb->id>1 ? pDb->id : pSql->id);
|
||||
renderDbSqlForCLI(stdout, zName,
|
||||
pDb->a, pDb->sz, pSql->a, pSql->sz);
|
||||
continue;
|
||||
}
|
||||
createVFile("main.db", pDb->sz, pDb->a);
|
||||
sqlite3_randomness(0,0);
|
||||
if( ossFuzzThisDb ){
|
||||
@ -2065,7 +2237,9 @@ int main(int argc, char **argv){
|
||||
}
|
||||
}
|
||||
}
|
||||
if( bSpinner ){
|
||||
if( bScript ){
|
||||
/* No progress output */
|
||||
}else if( bSpinner ){
|
||||
int nTotal = g.nDb*g.nSql;
|
||||
printf("\r%s: %d/%d \n", zDbName, nTotal, nTotal);
|
||||
}else if( !quietFlag && !verboseFlag ){
|
||||
@ -2081,7 +2255,7 @@ int main(int argc, char **argv){
|
||||
|
||||
} /* End loop over all source databases */
|
||||
|
||||
if( !quietFlag ){
|
||||
if( !quietFlag && !bScript ){
|
||||
sqlite3_int64 iElapse = timeOfDay() - iBegin;
|
||||
printf("fuzzcheck: 0 errors out of %d tests in %d.%03d seconds\n"
|
||||
"SQLite %s %s\n",
|
||||
|
Binary file not shown.
@ -182,6 +182,11 @@ do_test multiplex-2.1.3 { file size [multiplex_name test.x 0] } {4096}
|
||||
do_test multiplex-2.1.4 {
|
||||
execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
|
||||
} {}
|
||||
do_execsql_test multiplex-2.1.5 {
|
||||
PRAGMA multiplex_enabled;
|
||||
PRAGMA multiplex_filecount;
|
||||
PRAGMA multiplex_chunksize;
|
||||
} {1 1 2147418112}
|
||||
|
||||
do_test multiplex-2.2.1 {
|
||||
execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
|
||||
@ -267,6 +272,18 @@ do_test multiplex-2.5.8 {
|
||||
|
||||
do_test multiplex-2.5.9 { file size [multiplex_name test.x 0] } [list $g_chunk_size]
|
||||
do_test multiplex-2.5.10 { file size [multiplex_name test.x 1] } [list $g_chunk_size]
|
||||
do_execsql_test multiplex-2.5.11 {
|
||||
PRAGMA multiplex_enabled;
|
||||
PRAGMA multiplex_filecount;
|
||||
PRAGMA multiplex_chunksize;
|
||||
} {1 3 65536}
|
||||
sqlite3 db test.x
|
||||
do_execsql_test multiplex-2.5.12 {
|
||||
PRAGMA multiplex_filecount;
|
||||
PRAGMA multiplex_chunksize;
|
||||
} {3 65536}
|
||||
|
||||
|
||||
|
||||
do_test multiplex-2.5.99 {
|
||||
db close
|
||||
|
@ -53,7 +53,7 @@ do_test shell1-1.1.2 {
|
||||
# error on extra options
|
||||
do_test shell1-1.1.3 {
|
||||
catchcmd "test.db FOO test.db BAD" ".quit"
|
||||
} {1 {Error: near "FOO": syntax error}}
|
||||
} {1 {Error: in prepare, near "FOO": syntax error (1)}}
|
||||
|
||||
# -help
|
||||
do_test shell1-1.2.1 {
|
||||
@ -78,7 +78,7 @@ do_test shell1-1.3.2 {
|
||||
} {0 {}}
|
||||
do_test shell1-1.3.3 {
|
||||
catchcmd "-init FOO test.db BAD .quit" ""
|
||||
} {1 {Error: near "BAD": syntax error}}
|
||||
} {1 {Error: in prepare, near "BAD": syntax error (1)}}
|
||||
|
||||
# -echo print commands before execution
|
||||
do_test shell1-1.4.1 {
|
||||
|
@ -63,7 +63,7 @@ do_test shell2-1.3 {
|
||||
|
||||
UPDATE OR REPLACE t5 SET a = 4 WHERE a = 1;
|
||||
}
|
||||
} {1 {Error: near line 9: too many levels of trigger recursion}}
|
||||
} {1 {Error: near line 9: stepping, too many levels of trigger recursion (1)}}
|
||||
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ do_test shell3-1.6 {
|
||||
} {0 {}}
|
||||
do_test shell3-1.7 {
|
||||
catchcmd "foo.db \"CREATE TABLE\""
|
||||
} {1 {Error: incomplete input}}
|
||||
} {1 {Error: in prepare, incomplete input (1)}}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# shell3-2.*: Basic tests for running SQL file from command line.
|
||||
@ -98,7 +98,7 @@ do_test shell3-2.6 {
|
||||
} {0 {}}
|
||||
do_test shell3-2.7 {
|
||||
catchcmd "foo.db" "CREATE TABLE"
|
||||
} {1 {Error: near line 1: incomplete input}}
|
||||
} {1 {Error: near line 1: in prepare, incomplete input (1)}}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
@ -456,4 +456,19 @@ CREATE TABLE t7(a, b, c);
|
||||
db eval { SELECT * FROM t7 ORDER BY a }
|
||||
} {1 2 3 4 5 {} 6 7 8}
|
||||
|
||||
do_test shell5-4.3 {
|
||||
forcedelete shell5.csv
|
||||
set fd [open shell5.csv w]
|
||||
puts $fd ",,"
|
||||
puts $fd "1,2,3"
|
||||
close $fd
|
||||
catchcmd test.db [string trim {
|
||||
.mode csv
|
||||
CREATE TABLE t8(a, b, c);
|
||||
.import -skip 1 shell5.csv t8
|
||||
.nullvalue #
|
||||
}]
|
||||
db eval { SELECT * FROM t8 }
|
||||
} {1 2 3}
|
||||
|
||||
finish_test
|
||||
|
@ -1209,9 +1209,9 @@ proc finish_test_precleanup {} {
|
||||
catch {db1 close}
|
||||
catch {db2 close}
|
||||
catch {db3 close}
|
||||
unregister_devsim
|
||||
unregister_jt_vfs
|
||||
unregister_demovfs
|
||||
catch {unregister_devsim}
|
||||
catch {unregister_jt_vfs}
|
||||
catch {unregister_demovfs}
|
||||
}
|
||||
|
||||
# Run this routine last
|
||||
|
@ -100,4 +100,35 @@ do_test vacuum-into-510 {
|
||||
db2 close
|
||||
db close
|
||||
|
||||
# Change the page-size on a VACUUM INTO even if the original
|
||||
# database is in WAL mode.
|
||||
#
|
||||
forcedelete test.db
|
||||
forcedelete test.db2
|
||||
do_test vacuum-into-600 {
|
||||
sqlite3 db test.db
|
||||
db eval {
|
||||
PRAGMA page_size=4096;
|
||||
PRAGMA journal_mode=WAL;
|
||||
CREATE TABLE t1(a);
|
||||
INSERT INTO t1 VALUES(19);
|
||||
CREATE INDEX t1a ON t1(a);
|
||||
PRAGMA integrity_check;
|
||||
}
|
||||
} {wal ok}
|
||||
do_execsql_test vacuum-into-610 {
|
||||
PRAGMA page_size;
|
||||
} {4096}
|
||||
do_execsql_test vacuum-into-620 {
|
||||
PRAGMA page_size=1024;
|
||||
VACUUM INTO 'test.db2';
|
||||
} {}
|
||||
do_test vacuum-into-630 {
|
||||
sqlite3 db test.db2
|
||||
db eval {
|
||||
PRAGMA page_size;
|
||||
PRAGMA integrity_check;
|
||||
}
|
||||
} {1024 ok}
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user