Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 48fa01e4a8 | |||
| e18246199a | |||
| 76167f96b0 | |||
| 3ec786ab9c | |||
| 8cf7bedb81 | |||
| 77aa809a37 | |||
| 1b7e5d2b0b | |||
| 3943571dda | |||
| 3ec39b0cf2 | |||
| 230ad4565e | |||
| 98e57757dc | |||
| e8b45c33cd | |||
| 47405642f2 | |||
| 16938fc374 | |||
| cdce08b05a | |||
| 254c5ad58d | |||
| 87cef5ed35 | |||
| 9eb67ef5f9 | |||
| 7ef2cf86d3 | |||
| 0b316cb36d | |||
| 71dc5f83f4 | |||
| 7dde866d3b | |||
| 65f517d619 | |||
| 96e3015e4d | |||
| 202b2a7b54 | |||
| b0ddbf7922 | |||
| fd34e75b0a | |||
| 6eb7354fab | |||
| afb21dc9ca | |||
| b1c445732e | |||
| effc07ec9c | |||
| 8d65601931 | |||
| c892515c7a | |||
| 9dde91f613 | |||
| 11dbd0be3c | |||
| b3f7a5d8f6 | |||
| 14030cca04 | |||
| 9d905ce1c5 | |||
| 9dfd155f68 | |||
| 31114a38cc | |||
| 4292973810 | |||
| 8d7ffd2904 | |||
| 64477226e2 | |||
| d120a50ef7 | |||
| f14c4c91e1 | |||
| 98c336c2b2 |
+2
-1
@@ -503,6 +503,7 @@ TESTSRC2 = \
|
||||
$(TOP)/src/pcache1.c \
|
||||
$(TOP)/src/select.c \
|
||||
$(TOP)/src/tokenize.c \
|
||||
$(TOP)/src/treeview.c \
|
||||
$(TOP)/src/utf.c \
|
||||
$(TOP)/src/util.c \
|
||||
$(TOP)/src/vdbeapi.c \
|
||||
@@ -874,7 +875,7 @@ hash.lo: $(TOP)/src/hash.c $(HDR)
|
||||
insert.lo: $(TOP)/src/insert.c $(HDR)
|
||||
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/insert.c
|
||||
|
||||
json.lo: $(TOP)/src/json.c
|
||||
json.lo: $(TOP)/src/json.c $(HDR)
|
||||
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/json.c
|
||||
|
||||
legacy.lo: $(TOP)/src/legacy.c $(HDR)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.39.0.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.39.4.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -726,8 +726,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='sqlite'
|
||||
PACKAGE_TARNAME='sqlite'
|
||||
PACKAGE_VERSION='3.39.0'
|
||||
PACKAGE_STRING='sqlite 3.39.0'
|
||||
PACKAGE_VERSION='3.39.4'
|
||||
PACKAGE_STRING='sqlite 3.39.4'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1468,7 +1468,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures sqlite 3.39.0 to adapt to many kinds of systems.
|
||||
\`configure' configures sqlite 3.39.4 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1533,7 +1533,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of sqlite 3.39.0:";;
|
||||
short | recursive ) echo "Configuration of sqlite 3.39.4:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1661,7 +1661,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
sqlite configure 3.39.0
|
||||
sqlite configure 3.39.4
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2080,7 +2080,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by sqlite $as_me 3.39.0, which was
|
||||
It was created by sqlite $as_me 3.39.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -12390,7 +12390,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by sqlite $as_me 3.39.0, which was
|
||||
This file was extended by sqlite $as_me 3.39.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12456,7 +12456,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
sqlite config.status 3.39.0
|
||||
sqlite config.status 3.39.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+11
-9
@@ -2888,7 +2888,7 @@ static int fts3TermSelectMerge(
|
||||
**
|
||||
** Similar padding is added in the fts3DoclistOrMerge() function.
|
||||
*/
|
||||
pTS->aaOutput[0] = sqlite3_malloc(nDoclist + FTS3_VARINT_MAX + 1);
|
||||
pTS->aaOutput[0] = sqlite3_malloc64((i64)nDoclist + FTS3_VARINT_MAX + 1);
|
||||
pTS->anOutput[0] = nDoclist;
|
||||
if( pTS->aaOutput[0] ){
|
||||
memcpy(pTS->aaOutput[0], aDoclist, nDoclist);
|
||||
@@ -4308,8 +4308,7 @@ static int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){
|
||||
char *aPoslist = 0; /* Position list for deferred tokens */
|
||||
int nPoslist = 0; /* Number of bytes in aPoslist */
|
||||
int iPrev = -1; /* Token number of previous deferred token */
|
||||
|
||||
assert( pPhrase->doclist.bFreeList==0 );
|
||||
char *aFree = (pPhrase->doclist.bFreeList ? pPhrase->doclist.pList : 0);
|
||||
|
||||
for(iToken=0; iToken<pPhrase->nToken; iToken++){
|
||||
Fts3PhraseToken *pToken = &pPhrase->aToken[iToken];
|
||||
@@ -4323,6 +4322,7 @@ static int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){
|
||||
|
||||
if( pList==0 ){
|
||||
sqlite3_free(aPoslist);
|
||||
sqlite3_free(aFree);
|
||||
pPhrase->doclist.pList = 0;
|
||||
pPhrase->doclist.nList = 0;
|
||||
return SQLITE_OK;
|
||||
@@ -4343,6 +4343,7 @@ static int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){
|
||||
nPoslist = (int)(aOut - aPoslist);
|
||||
if( nPoslist==0 ){
|
||||
sqlite3_free(aPoslist);
|
||||
sqlite3_free(aFree);
|
||||
pPhrase->doclist.pList = 0;
|
||||
pPhrase->doclist.nList = 0;
|
||||
return SQLITE_OK;
|
||||
@@ -4375,13 +4376,14 @@ static int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){
|
||||
nDistance = iPrev - nMaxUndeferred;
|
||||
}
|
||||
|
||||
aOut = (char *)sqlite3_malloc(nPoslist+8);
|
||||
aOut = (char *)sqlite3Fts3MallocZero(nPoslist+FTS3_BUFFER_PADDING);
|
||||
if( !aOut ){
|
||||
sqlite3_free(aPoslist);
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
|
||||
pPhrase->doclist.pList = aOut;
|
||||
assert( p1 && p2 );
|
||||
if( fts3PoslistPhraseMerge(&aOut, nDistance, 0, 1, &p1, &p2) ){
|
||||
pPhrase->doclist.bFreeList = 1;
|
||||
pPhrase->doclist.nList = (int)(aOut - pPhrase->doclist.pList);
|
||||
@@ -4394,6 +4396,7 @@ static int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){
|
||||
}
|
||||
}
|
||||
|
||||
if( pPhrase->doclist.pList!=aFree ) sqlite3_free(aFree);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
#endif /* SQLITE_DISABLE_FTS4_DEFERRED */
|
||||
@@ -4742,7 +4745,7 @@ static int fts3EvalIncrPhraseNext(
|
||||
if( bEof==0 ){
|
||||
int nList = 0;
|
||||
int nByte = a[p->nToken-1].nList;
|
||||
char *aDoclist = sqlite3_malloc(nByte+FTS3_BUFFER_PADDING);
|
||||
char *aDoclist = sqlite3_malloc64((i64)nByte+FTS3_BUFFER_PADDING);
|
||||
if( !aDoclist ) return SQLITE_NOMEM;
|
||||
memcpy(aDoclist, a[p->nToken-1].pList, nByte+1);
|
||||
memset(&aDoclist[nByte], 0, FTS3_BUFFER_PADDING);
|
||||
@@ -5568,11 +5571,10 @@ static int fts3EvalTestExpr(
|
||||
|
||||
default: {
|
||||
#ifndef SQLITE_DISABLE_FTS4_DEFERRED
|
||||
if( pCsr->pDeferred
|
||||
&& (pExpr->iDocid==pCsr->iPrevId || pExpr->bDeferred)
|
||||
){
|
||||
if( pCsr->pDeferred && (pExpr->bDeferred || (
|
||||
pExpr->iDocid==pCsr->iPrevId && pExpr->pPhrase->doclist.pList
|
||||
))){
|
||||
Fts3Phrase *pPhrase = pExpr->pPhrase;
|
||||
assert( pExpr->bDeferred || pPhrase->doclist.bFreeList==0 );
|
||||
if( pExpr->bDeferred ){
|
||||
fts3EvalInvalidatePoslist(pPhrase);
|
||||
}
|
||||
|
||||
+1
-1
@@ -558,7 +558,7 @@ struct Fts3MultiSegReader {
|
||||
int nAdvance; /* How many seg-readers to advance */
|
||||
Fts3SegFilter *pFilter; /* Pointer to filter object */
|
||||
char *aBuffer; /* Buffer to merge doclists in */
|
||||
int nBuffer; /* Allocated size of aBuffer[] in bytes */
|
||||
i64 nBuffer; /* Allocated size of aBuffer[] in bytes */
|
||||
|
||||
int iColFilter; /* If >=0, filter for this column */
|
||||
int bRestart;
|
||||
|
||||
@@ -621,7 +621,7 @@ static int porterNext(
|
||||
if( n>c->nAllocated ){
|
||||
char *pNew;
|
||||
c->nAllocated = n+20;
|
||||
pNew = sqlite3_realloc(c->zToken, c->nAllocated);
|
||||
pNew = sqlite3_realloc64(c->zToken, c->nAllocated);
|
||||
if( !pNew ) return SQLITE_NOMEM;
|
||||
c->zToken = pNew;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ static int simpleNext(
|
||||
if( n>c->nTokenAllocated ){
|
||||
char *pNew;
|
||||
c->nTokenAllocated = n+20;
|
||||
pNew = sqlite3_realloc(c->pToken, c->nTokenAllocated);
|
||||
pNew = sqlite3_realloc64(c->pToken, c->nTokenAllocated);
|
||||
if( !pNew ) return SQLITE_NOMEM;
|
||||
c->pToken = pNew;
|
||||
}
|
||||
|
||||
+32
-30
@@ -649,7 +649,7 @@ static int fts3PendingListAppendVarint(
|
||||
|
||||
/* Allocate or grow the PendingList as required. */
|
||||
if( !p ){
|
||||
p = sqlite3_malloc(sizeof(*p) + 100);
|
||||
p = sqlite3_malloc64(sizeof(*p) + 100);
|
||||
if( !p ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -658,14 +658,14 @@ static int fts3PendingListAppendVarint(
|
||||
p->nData = 0;
|
||||
}
|
||||
else if( p->nData+FTS3_VARINT_MAX+1>p->nSpace ){
|
||||
int nNew = p->nSpace * 2;
|
||||
p = sqlite3_realloc(p, sizeof(*p) + nNew);
|
||||
i64 nNew = p->nSpace * 2;
|
||||
p = sqlite3_realloc64(p, sizeof(*p) + nNew);
|
||||
if( !p ){
|
||||
sqlite3_free(*pp);
|
||||
*pp = 0;
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
p->nSpace = nNew;
|
||||
p->nSpace = (int)nNew;
|
||||
p->aData = (char *)&p[1];
|
||||
}
|
||||
|
||||
@@ -1222,7 +1222,7 @@ int sqlite3Fts3ReadBlock(
|
||||
int nByte = sqlite3_blob_bytes(p->pSegments);
|
||||
*pnBlob = nByte;
|
||||
if( paBlob ){
|
||||
char *aByte = sqlite3_malloc(nByte + FTS3_NODE_PADDING);
|
||||
char *aByte = sqlite3_malloc64((i64)nByte + FTS3_NODE_PADDING);
|
||||
if( !aByte ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
@@ -1339,7 +1339,7 @@ static int fts3SegReaderNext(
|
||||
int nTerm = fts3HashKeysize(pElem);
|
||||
if( (nTerm+1)>pReader->nTermAlloc ){
|
||||
sqlite3_free(pReader->zTerm);
|
||||
pReader->zTerm = (char*)sqlite3_malloc((nTerm+1)*2);
|
||||
pReader->zTerm = (char*)sqlite3_malloc64(((i64)nTerm+1)*2);
|
||||
if( !pReader->zTerm ) return SQLITE_NOMEM;
|
||||
pReader->nTermAlloc = (nTerm+1)*2;
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ static int fts3SegReaderNext(
|
||||
pReader->zTerm[nTerm] = '\0';
|
||||
pReader->nTerm = nTerm;
|
||||
|
||||
aCopy = (char*)sqlite3_malloc(nCopy);
|
||||
aCopy = (char*)sqlite3_malloc64(nCopy);
|
||||
if( !aCopy ) return SQLITE_NOMEM;
|
||||
memcpy(aCopy, pList->aData, nCopy);
|
||||
pReader->nNode = pReader->nDoclist = nCopy;
|
||||
@@ -1634,7 +1634,7 @@ int sqlite3Fts3SegReaderNew(
|
||||
nExtra = nRoot + FTS3_NODE_PADDING;
|
||||
}
|
||||
|
||||
pReader = (Fts3SegReader *)sqlite3_malloc(sizeof(Fts3SegReader) + nExtra);
|
||||
pReader = (Fts3SegReader *)sqlite3_malloc64(sizeof(Fts3SegReader) + nExtra);
|
||||
if( !pReader ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -1726,7 +1726,7 @@ int sqlite3Fts3SegReaderPending(
|
||||
if( nElem==nAlloc ){
|
||||
Fts3HashElem **aElem2;
|
||||
nAlloc += 16;
|
||||
aElem2 = (Fts3HashElem **)sqlite3_realloc(
|
||||
aElem2 = (Fts3HashElem **)sqlite3_realloc64(
|
||||
aElem, nAlloc*sizeof(Fts3HashElem *)
|
||||
);
|
||||
if( !aElem2 ){
|
||||
@@ -2060,7 +2060,7 @@ static int fts3NodeAddTerm(
|
||||
** this is not expected to be a serious problem.
|
||||
*/
|
||||
assert( pTree->aData==(char *)&pTree[1] );
|
||||
pTree->aData = (char *)sqlite3_malloc(nReq);
|
||||
pTree->aData = (char *)sqlite3_malloc64(nReq);
|
||||
if( !pTree->aData ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -2078,7 +2078,7 @@ static int fts3NodeAddTerm(
|
||||
|
||||
if( isCopyTerm ){
|
||||
if( pTree->nMalloc<nTerm ){
|
||||
char *zNew = sqlite3_realloc(pTree->zMalloc, nTerm*2);
|
||||
char *zNew = sqlite3_realloc64(pTree->zMalloc, (i64)nTerm*2);
|
||||
if( !zNew ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -2104,7 +2104,7 @@ static int fts3NodeAddTerm(
|
||||
** now. Instead, the term is inserted into the parent of pTree. If pTree
|
||||
** has no parent, one is created here.
|
||||
*/
|
||||
pNew = (SegmentNode *)sqlite3_malloc(sizeof(SegmentNode) + p->nNodeSize);
|
||||
pNew = (SegmentNode *)sqlite3_malloc64(sizeof(SegmentNode) + p->nNodeSize);
|
||||
if( !pNew ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -2242,7 +2242,7 @@ static int fts3SegWriterAdd(
|
||||
){
|
||||
int nPrefix; /* Size of term prefix in bytes */
|
||||
int nSuffix; /* Size of term suffix in bytes */
|
||||
int nReq; /* Number of bytes required on leaf page */
|
||||
i64 nReq; /* Number of bytes required on leaf page */
|
||||
int nData;
|
||||
SegmentWriter *pWriter = *ppWriter;
|
||||
|
||||
@@ -2251,13 +2251,13 @@ static int fts3SegWriterAdd(
|
||||
sqlite3_stmt *pStmt;
|
||||
|
||||
/* Allocate the SegmentWriter structure */
|
||||
pWriter = (SegmentWriter *)sqlite3_malloc(sizeof(SegmentWriter));
|
||||
pWriter = (SegmentWriter *)sqlite3_malloc64(sizeof(SegmentWriter));
|
||||
if( !pWriter ) return SQLITE_NOMEM;
|
||||
memset(pWriter, 0, sizeof(SegmentWriter));
|
||||
*ppWriter = pWriter;
|
||||
|
||||
/* Allocate a buffer in which to accumulate data */
|
||||
pWriter->aData = (char *)sqlite3_malloc(p->nNodeSize);
|
||||
pWriter->aData = (char *)sqlite3_malloc64(p->nNodeSize);
|
||||
if( !pWriter->aData ) return SQLITE_NOMEM;
|
||||
pWriter->nSize = p->nNodeSize;
|
||||
|
||||
@@ -2332,7 +2332,7 @@ static int fts3SegWriterAdd(
|
||||
** the buffer to make it large enough.
|
||||
*/
|
||||
if( nReq>pWriter->nSize ){
|
||||
char *aNew = sqlite3_realloc(pWriter->aData, nReq);
|
||||
char *aNew = sqlite3_realloc64(pWriter->aData, nReq);
|
||||
if( !aNew ) return SQLITE_NOMEM;
|
||||
pWriter->aData = aNew;
|
||||
pWriter->nSize = nReq;
|
||||
@@ -2357,7 +2357,7 @@ static int fts3SegWriterAdd(
|
||||
*/
|
||||
if( isCopyTerm ){
|
||||
if( nTerm>pWriter->nMalloc ){
|
||||
char *zNew = sqlite3_realloc(pWriter->zMalloc, nTerm*2);
|
||||
char *zNew = sqlite3_realloc64(pWriter->zMalloc, (i64)nTerm*2);
|
||||
if( !zNew ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -2665,12 +2665,12 @@ static void fts3ColumnFilter(
|
||||
static int fts3MsrBufferData(
|
||||
Fts3MultiSegReader *pMsr, /* Multi-segment-reader handle */
|
||||
char *pList,
|
||||
int nList
|
||||
i64 nList
|
||||
){
|
||||
if( nList>pMsr->nBuffer ){
|
||||
char *pNew;
|
||||
pMsr->nBuffer = nList*2;
|
||||
pNew = (char *)sqlite3_realloc(pMsr->aBuffer, pMsr->nBuffer);
|
||||
pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, pMsr->nBuffer);
|
||||
if( !pNew ) return SQLITE_NOMEM;
|
||||
pMsr->aBuffer = pNew;
|
||||
}
|
||||
@@ -2726,7 +2726,7 @@ int sqlite3Fts3MsrIncrNext(
|
||||
fts3SegReaderSort(pMsr->apSegment, nMerge, j, xCmp);
|
||||
|
||||
if( nList>0 && fts3SegReaderIsPending(apSegment[0]) ){
|
||||
rc = fts3MsrBufferData(pMsr, pList, nList+1);
|
||||
rc = fts3MsrBufferData(pMsr, pList, (i64)nList+1);
|
||||
if( rc!=SQLITE_OK ) return rc;
|
||||
assert( (pMsr->aBuffer[nList] & 0xFE)==0x00 );
|
||||
pList = pMsr->aBuffer;
|
||||
@@ -2863,11 +2863,11 @@ int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, int nReq){
|
||||
static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, i64 nReq){
|
||||
if( nReq>pCsr->nBuffer ){
|
||||
char *aNew;
|
||||
pCsr->nBuffer = nReq*2;
|
||||
aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
|
||||
aNew = sqlite3_realloc64(pCsr->aBuffer, pCsr->nBuffer);
|
||||
if( !aNew ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
@@ -2958,7 +2958,8 @@ int sqlite3Fts3SegReaderStep(
|
||||
){
|
||||
pCsr->nDoclist = apSegment[0]->nDoclist;
|
||||
if( fts3SegReaderIsPending(apSegment[0]) ){
|
||||
rc = fts3MsrBufferData(pCsr, apSegment[0]->aDoclist, pCsr->nDoclist);
|
||||
rc = fts3MsrBufferData(pCsr, apSegment[0]->aDoclist,
|
||||
(i64)pCsr->nDoclist);
|
||||
pCsr->aDoclist = pCsr->aBuffer;
|
||||
}else{
|
||||
pCsr->aDoclist = apSegment[0]->aDoclist;
|
||||
@@ -3011,7 +3012,8 @@ int sqlite3Fts3SegReaderStep(
|
||||
|
||||
nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
|
||||
|
||||
rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist+FTS3_NODE_PADDING);
|
||||
rc = fts3GrowSegReaderBuffer(pCsr,
|
||||
(i64)nByte+nDoclist+FTS3_NODE_PADDING);
|
||||
if( rc ) return rc;
|
||||
|
||||
if( isFirst ){
|
||||
@@ -3037,7 +3039,7 @@ int sqlite3Fts3SegReaderStep(
|
||||
fts3SegReaderSort(apSegment, nMerge, j, xCmp);
|
||||
}
|
||||
if( nDoclist>0 ){
|
||||
rc = fts3GrowSegReaderBuffer(pCsr, nDoclist+FTS3_NODE_PADDING);
|
||||
rc = fts3GrowSegReaderBuffer(pCsr, (i64)nDoclist+FTS3_NODE_PADDING);
|
||||
if( rc ) return rc;
|
||||
memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);
|
||||
pCsr->aDoclist = pCsr->aBuffer;
|
||||
@@ -3750,7 +3752,7 @@ struct NodeReader {
|
||||
static void blobGrowBuffer(Blob *pBlob, int nMin, int *pRc){
|
||||
if( *pRc==SQLITE_OK && nMin>pBlob->nAlloc ){
|
||||
int nAlloc = nMin;
|
||||
char *a = (char *)sqlite3_realloc(pBlob->a, nAlloc);
|
||||
char *a = (char *)sqlite3_realloc64(pBlob->a, nAlloc);
|
||||
if( a ){
|
||||
pBlob->nAlloc = nAlloc;
|
||||
pBlob->a = a;
|
||||
@@ -4547,7 +4549,7 @@ static int fts3RepackSegdirLevel(
|
||||
if( nIdx>=nAlloc ){
|
||||
int *aNew;
|
||||
nAlloc += 16;
|
||||
aNew = sqlite3_realloc(aIdx, nAlloc*sizeof(int));
|
||||
aNew = sqlite3_realloc64(aIdx, nAlloc*sizeof(int));
|
||||
if( !aNew ){
|
||||
rc = SQLITE_NOMEM;
|
||||
break;
|
||||
@@ -4921,7 +4923,7 @@ int sqlite3Fts3Incrmerge(Fts3Table *p, int nMerge, int nMin){
|
||||
|
||||
/* Allocate space for the cursor, filter and writer objects */
|
||||
const int nAlloc = sizeof(*pCsr) + sizeof(*pFilter) + sizeof(*pWriter);
|
||||
pWriter = (IncrmergeWriter *)sqlite3_malloc(nAlloc);
|
||||
pWriter = (IncrmergeWriter *)sqlite3_malloc64(nAlloc);
|
||||
if( !pWriter ) return SQLITE_NOMEM;
|
||||
pFilter = (Fts3SegFilter *)&pWriter[1];
|
||||
pCsr = (Fts3MultiSegReader *)&pFilter[1];
|
||||
@@ -5557,7 +5559,7 @@ int sqlite3Fts3DeferredTokenList(
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
pRet = (char *)sqlite3_malloc(p->pList->nData);
|
||||
pRet = (char *)sqlite3_malloc64(p->pList->nData);
|
||||
if( !pRet ) return SQLITE_NOMEM;
|
||||
|
||||
nSkip = sqlite3Fts3GetVarint(p->pList->aData, &dummy);
|
||||
@@ -5577,7 +5579,7 @@ int sqlite3Fts3DeferToken(
|
||||
int iCol /* Column that token must appear in (or -1) */
|
||||
){
|
||||
Fts3DeferredToken *pDeferred;
|
||||
pDeferred = sqlite3_malloc(sizeof(*pDeferred));
|
||||
pDeferred = sqlite3_malloc64(sizeof(*pDeferred));
|
||||
if( !pDeferred ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,16 @@ source [file join [file dirname [info script]] fts5_common.tcl]
|
||||
source $testdir/malloc_common.tcl
|
||||
set testprefix fts5fault4
|
||||
|
||||
# If SQLITE_ENABLE_FTS3 is defined, omit this file.
|
||||
# If SQLITE_ENABLE_FTS5 is not defined, omit this file.
|
||||
ifcapable !fts5 {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
set ::TMPDBERROR [list 1 \
|
||||
{unable to open a temporary database file for storing temporary tables}
|
||||
]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# An OOM while dropping an fts5 table.
|
||||
#
|
||||
@@ -391,7 +395,7 @@ do_faultsim_test 14.1 -faults oom-t* -prep {
|
||||
} -body {
|
||||
db eval { ALTER TABLE "tbl one" RENAME TO "tbl two" }
|
||||
} -test {
|
||||
faultsim_test_result {0 {}}
|
||||
faultsim_test_result {0 {}} $::TMPDBERROR
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
+3
-2
@@ -299,8 +299,9 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
|
||||
|
||||
if( U_SUCCESS(status) ){
|
||||
sqlite3_set_auxdata(p, 0, pExpr, icuRegexpDelete);
|
||||
}else{
|
||||
assert(!pExpr);
|
||||
pExpr = sqlite3_get_auxdata(p, 0);
|
||||
}
|
||||
if( !pExpr ){
|
||||
icuFunctionError(p, "uregex_open", status);
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -685,7 +685,7 @@ static const char *re_compile(ReCompiled **ppRe, const char *zIn, int noCase){
|
||||
pRe->zInit[j++] = (unsigned char)(0xc0 | (x>>6));
|
||||
pRe->zInit[j++] = 0x80 | (x&0x3f);
|
||||
}else if( x<=0xffff ){
|
||||
pRe->zInit[j++] = (unsigned char)(0xd0 | (x>>12));
|
||||
pRe->zInit[j++] = (unsigned char)(0xe0 | (x>>12));
|
||||
pRe->zInit[j++] = 0x80 | ((x>>6)&0x3f);
|
||||
pRe->zInit[j++] = 0x80 | (x&0x3f);
|
||||
}else{
|
||||
|
||||
+81
-44
@@ -30,6 +30,16 @@ SQLITE_EXTENSION_INIT1
|
||||
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
|
||||
|
||||
#define STMT_NUM_INTEGER_COLUMN 10
|
||||
typedef struct StmtRow StmtRow;
|
||||
struct StmtRow {
|
||||
sqlite3_int64 iRowid; /* Rowid value */
|
||||
char *zSql; /* column "sql" */
|
||||
int aCol[STMT_NUM_INTEGER_COLUMN+1]; /* all other column values */
|
||||
StmtRow *pNext; /* Next row to return */
|
||||
};
|
||||
|
||||
/* stmt_vtab is a subclass of sqlite3_vtab which will
|
||||
** serve as the underlying representation of a stmt virtual table
|
||||
*/
|
||||
@@ -47,8 +57,7 @@ typedef struct stmt_cursor stmt_cursor;
|
||||
struct stmt_cursor {
|
||||
sqlite3_vtab_cursor base; /* Base class - must be first */
|
||||
sqlite3 *db; /* Database connection for this cursor */
|
||||
sqlite3_stmt *pStmt; /* Statement cursor is currently pointing at */
|
||||
sqlite3_int64 iRowid; /* The rowid */
|
||||
StmtRow *pRow; /* Current row */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -92,7 +101,7 @@ static int stmtConnect(
|
||||
"CREATE TABLE x(sql,ncol,ro,busy,nscan,nsort,naidx,nstep,"
|
||||
"reprep,run,mem)");
|
||||
if( rc==SQLITE_OK ){
|
||||
pNew = sqlite3_malloc( sizeof(*pNew) );
|
||||
pNew = sqlite3_malloc64( sizeof(*pNew) );
|
||||
*ppVtab = (sqlite3_vtab*)pNew;
|
||||
if( pNew==0 ) return SQLITE_NOMEM;
|
||||
memset(pNew, 0, sizeof(*pNew));
|
||||
@@ -114,7 +123,7 @@ static int stmtDisconnect(sqlite3_vtab *pVtab){
|
||||
*/
|
||||
static int stmtOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
|
||||
stmt_cursor *pCur;
|
||||
pCur = sqlite3_malloc( sizeof(*pCur) );
|
||||
pCur = sqlite3_malloc64( sizeof(*pCur) );
|
||||
if( pCur==0 ) return SQLITE_NOMEM;
|
||||
memset(pCur, 0, sizeof(*pCur));
|
||||
pCur->db = ((stmt_vtab*)p)->db;
|
||||
@@ -122,10 +131,21 @@ static int stmtOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
static void stmtCsrReset(stmt_cursor *pCur){
|
||||
StmtRow *pRow = 0;
|
||||
StmtRow *pNext = 0;
|
||||
for(pRow=pCur->pRow; pRow; pRow=pNext){
|
||||
pNext = pRow->pNext;
|
||||
sqlite3_free(pRow);
|
||||
}
|
||||
pCur->pRow = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Destructor for a stmt_cursor.
|
||||
*/
|
||||
static int stmtClose(sqlite3_vtab_cursor *cur){
|
||||
stmtCsrReset((stmt_cursor*)cur);
|
||||
sqlite3_free(cur);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -136,8 +156,9 @@ static int stmtClose(sqlite3_vtab_cursor *cur){
|
||||
*/
|
||||
static int stmtNext(sqlite3_vtab_cursor *cur){
|
||||
stmt_cursor *pCur = (stmt_cursor*)cur;
|
||||
pCur->iRowid++;
|
||||
pCur->pStmt = sqlite3_next_stmt(pCur->db, pCur->pStmt);
|
||||
StmtRow *pNext = pCur->pRow->pNext;
|
||||
sqlite3_free(pCur->pRow);
|
||||
pCur->pRow = pNext;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
@@ -151,39 +172,11 @@ static int stmtColumn(
|
||||
int i /* Which column to return */
|
||||
){
|
||||
stmt_cursor *pCur = (stmt_cursor*)cur;
|
||||
switch( i ){
|
||||
case STMT_COLUMN_SQL: {
|
||||
sqlite3_result_text(ctx, sqlite3_sql(pCur->pStmt), -1, SQLITE_TRANSIENT);
|
||||
break;
|
||||
}
|
||||
case STMT_COLUMN_NCOL: {
|
||||
sqlite3_result_int(ctx, sqlite3_column_count(pCur->pStmt));
|
||||
break;
|
||||
}
|
||||
case STMT_COLUMN_RO: {
|
||||
sqlite3_result_int(ctx, sqlite3_stmt_readonly(pCur->pStmt));
|
||||
break;
|
||||
}
|
||||
case STMT_COLUMN_BUSY: {
|
||||
sqlite3_result_int(ctx, sqlite3_stmt_busy(pCur->pStmt));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
assert( i==STMT_COLUMN_MEM );
|
||||
i = SQLITE_STMTSTATUS_MEMUSED +
|
||||
STMT_COLUMN_NSCAN - SQLITE_STMTSTATUS_FULLSCAN_STEP;
|
||||
/* Fall thru */
|
||||
}
|
||||
case STMT_COLUMN_NSCAN:
|
||||
case STMT_COLUMN_NSORT:
|
||||
case STMT_COLUMN_NAIDX:
|
||||
case STMT_COLUMN_NSTEP:
|
||||
case STMT_COLUMN_REPREP:
|
||||
case STMT_COLUMN_RUN: {
|
||||
sqlite3_result_int(ctx, sqlite3_stmt_status(pCur->pStmt,
|
||||
i-STMT_COLUMN_NSCAN+SQLITE_STMTSTATUS_FULLSCAN_STEP, 0));
|
||||
break;
|
||||
}
|
||||
StmtRow *pRow = pCur->pRow;
|
||||
if( i==STMT_COLUMN_SQL ){
|
||||
sqlite3_result_text(ctx, pRow->zSql, -1, SQLITE_TRANSIENT);
|
||||
}else{
|
||||
sqlite3_result_int(ctx, pRow->aCol[i]);
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -194,7 +187,7 @@ static int stmtColumn(
|
||||
*/
|
||||
static int stmtRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
|
||||
stmt_cursor *pCur = (stmt_cursor*)cur;
|
||||
*pRowid = pCur->iRowid;
|
||||
*pRowid = pCur->pRow->iRowid;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
@@ -204,7 +197,7 @@ static int stmtRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
|
||||
*/
|
||||
static int stmtEof(sqlite3_vtab_cursor *cur){
|
||||
stmt_cursor *pCur = (stmt_cursor*)cur;
|
||||
return pCur->pStmt==0;
|
||||
return pCur->pRow==0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -219,9 +212,53 @@ static int stmtFilter(
|
||||
int argc, sqlite3_value **argv
|
||||
){
|
||||
stmt_cursor *pCur = (stmt_cursor *)pVtabCursor;
|
||||
pCur->pStmt = 0;
|
||||
pCur->iRowid = 0;
|
||||
return stmtNext(pVtabCursor);
|
||||
sqlite3_stmt *p = 0;
|
||||
sqlite3_int64 iRowid = 1;
|
||||
StmtRow **ppRow = 0;
|
||||
|
||||
stmtCsrReset(pCur);
|
||||
ppRow = &pCur->pRow;
|
||||
for(p=sqlite3_next_stmt(pCur->db, 0); p; p=sqlite3_next_stmt(pCur->db, p)){
|
||||
const char *zSql = sqlite3_sql(p);
|
||||
sqlite3_int64 nSql = zSql ? strlen(zSql)+1 : 0;
|
||||
StmtRow *pNew = (StmtRow*)sqlite3_malloc64(sizeof(StmtRow) + nSql);
|
||||
|
||||
if( pNew==0 ) return SQLITE_NOMEM;
|
||||
memset(pNew, 0, sizeof(StmtRow));
|
||||
if( zSql ){
|
||||
pNew->zSql = (char*)&pNew[1];
|
||||
memcpy(pNew->zSql, zSql, nSql);
|
||||
}
|
||||
pNew->aCol[STMT_COLUMN_NCOL] = sqlite3_column_count(p);
|
||||
pNew->aCol[STMT_COLUMN_RO] = sqlite3_stmt_readonly(p);
|
||||
pNew->aCol[STMT_COLUMN_BUSY] = sqlite3_stmt_busy(p);
|
||||
pNew->aCol[STMT_COLUMN_NSCAN] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_FULLSCAN_STEP, 0
|
||||
);
|
||||
pNew->aCol[STMT_COLUMN_NSORT] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_SORT, 0
|
||||
);
|
||||
pNew->aCol[STMT_COLUMN_NAIDX] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_AUTOINDEX, 0
|
||||
);
|
||||
pNew->aCol[STMT_COLUMN_NSTEP] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_VM_STEP, 0
|
||||
);
|
||||
pNew->aCol[STMT_COLUMN_REPREP] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_REPREPARE, 0
|
||||
);
|
||||
pNew->aCol[STMT_COLUMN_RUN] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_RUN, 0
|
||||
);
|
||||
pNew->aCol[STMT_COLUMN_MEM] = sqlite3_stmt_status(
|
||||
p, SQLITE_STMTSTATUS_MEMUSED, 0
|
||||
);
|
||||
pNew->iRowid = iRowid++;
|
||||
*ppRow = pNew;
|
||||
ppRow = &pNew->pNext;
|
||||
}
|
||||
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -1695,7 +1695,7 @@ static int geopolyUpdate(
|
||||
sqlite3_free(p);
|
||||
nChange = 1;
|
||||
}
|
||||
for(jj=1; jj<pRtree->nAux; jj++){
|
||||
for(jj=1; jj<nData-2; jj++){
|
||||
nChange++;
|
||||
sqlite3_bind_value(pUp, jj+2, aData[jj+2]);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ ifcapable !rtree {
|
||||
return
|
||||
}
|
||||
|
||||
set ::TMPDBERROR [list 1 \
|
||||
{unable to open a temporary database file for storing temporary tables}
|
||||
]
|
||||
|
||||
# Test summary:
|
||||
#
|
||||
# rtree3-1: Test OOM in simple CREATE TABLE, INSERT, DELETE and SELECT
|
||||
@@ -196,9 +200,9 @@ do_test rtree3-7.prep {
|
||||
do_faultsim_test rtree3-7 -faults oom-* -prep {
|
||||
faultsim_restore_and_reopen
|
||||
} -body {
|
||||
execsql { ALTER TABLE rt RENAME TO rt2 }
|
||||
execsql { ALTER TABLE rt RENAME TO rt2 }
|
||||
} -test {
|
||||
faultsim_test_result {0 {}}
|
||||
faultsim_test_result {0 {}} $::TMPDBERROR
|
||||
}
|
||||
|
||||
do_faultsim_test rtree3-8 -faults oom-* -prep {
|
||||
|
||||
@@ -423,6 +423,7 @@ TESTSRC2 = \
|
||||
$(TOP)/src/select.c \
|
||||
$(TOP)/src/threads.c \
|
||||
$(TOP)/src/tokenize.c \
|
||||
$(TOP)/src/treeview.c \
|
||||
$(TOP)/src/utf.c \
|
||||
$(TOP)/src/util.c \
|
||||
$(TOP)/src/vdbeapi.c \
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
C Version\s3.39.0
|
||||
D 2022-06-25T14:57:57.276
|
||||
C Version\s3.39.4
|
||||
D 2022-09-29T15:55:41.801
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
F Makefile.in bccb0ed3f05fc41aee15da77c844c48b5da419cbb9af35b8a147536c9ad1c822
|
||||
F Makefile.in 4e1cacdce04497567464116cf5798674e8a21e15b4d44838ceaa8a49c527028c
|
||||
F Makefile.linux-gcc f609543700659711fbd230eced1f01353117621dccae7b9fb70daa64236c5241
|
||||
F Makefile.msc de7cb3e095ce2fdc33513ccd76ebdaeda1483d0ddab0410fe65cbdeadd4c0ee1
|
||||
F README.md 8b8df9ca852aeac4864eb1e400002633ee6db84065bd01b78c33817f97d31f5e
|
||||
F VERSION fa8e7d2d1cc962f9e14c6d410387cf75860ee139462763fda887c1be4261f824
|
||||
F VERSION ad74f073c8910c112b5db75d9a7be486305a91d8a352d53f2a4c7dda9e9e5efa
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||
@@ -34,7 +34,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
||||
F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
|
||||
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
|
||||
F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559
|
||||
F configure 00378d14cca0ce02fa9eca28fd494789c2eda7d10d86003a5f9a42f34b0af418 x
|
||||
F configure 01ce1a8ad8aa8450bc4e7bef937588a116ed724aa49802537ec9399ee18a8488 x
|
||||
F configure.ac 3ef6eeff4387585bfcab76b0c3f6e15a0618587bb90245dd5d44e4378141bb35
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
|
||||
@@ -102,25 +102,25 @@ 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 6634a3854e70afa8710ee5e3a7253cd0f0c89d4cce207fcbfe2ead3bad1db7d5
|
||||
F ext/fts3/fts3.c 46c116ee0868fc09520d61a1b747c62343c71c399ba67a3d0395b0be29b1a19f
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h dafdc371f9fbab175744b06cfe019d5f040cdfdbd11fea752f5dc28d45b04c05
|
||||
F ext/fts3/fts3Int.h ae2a44b04cddb5fb35cac4ea5f7f819b2894fd258186465777a19f7acfdf84ed
|
||||
F ext/fts3/fts3_aux.c f0dc9bd98582615b7750218899bd0c729879b6bbf94d1be57ca1833ff49afc6f
|
||||
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_porter.c e19807ce0ae31c1c6e9898e89ecc93183d7ec224ea101af039722a4f49e5f2b8
|
||||
F ext/fts3/fts3_snippet.c f9a8149173553113f3c495a503843e30028b5dc3723d0ca798c5ad6142e130e6
|
||||
F ext/fts3/fts3_term.c f45a1e7c6ef464abb1231245d123dae12266b69e05cc56e14045b76591ae92d1
|
||||
F ext/fts3/fts3_test.c d8d7b2734f894e8a489987447658e374cdd3a3bc8575c401decf1911cb7c6454
|
||||
F ext/fts3/fts3_tokenize_vtab.c a95feda3590f3c3e17672fe35b67ea6112471aeea4c07ef7744a6606b66549aa
|
||||
F ext/fts3/fts3_tokenizer.c 6d8fc150c48238955d5182bf661498db0dd473c8a2a80e00c16994a646fa96e7
|
||||
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
|
||||
F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
|
||||
F ext/fts3/fts3_tokenizer1.c c1de4ae28356ad98ccb8b2e3388a7fdcce7607b5523738c9afb6275dab765154
|
||||
F ext/fts3/fts3_unicode.c de426ff05c1c2e7bce161cf6b706638419c3a1d9c2667de9cb9dc0458c18e226
|
||||
F ext/fts3/fts3_unicode2.c 416eb7e1e81142703520d284b768ca2751d40e31fa912cae24ba74860532bf0f
|
||||
F ext/fts3/fts3_write.c 85279b980f99253c296006503a13f92957ec49b716123083f021acc74545ecfc
|
||||
F ext/fts3/fts3_write.c 4fb644df0ff840267e47a724286c7a1fa5540273a7ce15756dd5913a101ec302
|
||||
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
|
||||
F ext/fts3/tool/fts3cov.sh c331d006359456cf6f8f953e37f2b9c7d568f3863f00bb5f7eb87fea4ac01b73
|
||||
F ext/fts3/tool/fts3view.c 413c346399159df81f86c4928b7c4a455caab73bfbc8cd68f950f632e5751674
|
||||
@@ -191,7 +191,7 @@ F ext/fts5/test/fts5eb.test a973baadac524dbbb4ad9b0e99030e12cabde2c6b28e0ac43729
|
||||
F ext/fts5/test/fts5fault1.test d28a65caee75db6897c3cf1358c5230d3bb2a3bf7fb31062c19c7e5382b3d2bd
|
||||
F ext/fts5/test/fts5fault2.test 69c8fdbef830cd0d450908d4504d5bb86609e255af99c421c20a0756251fe344
|
||||
F ext/fts5/test/fts5fault3.test da2f9e3e56ff5740d68ebdd6877c97089e7ed28ddff28a0da87a6afea27e5522
|
||||
F ext/fts5/test/fts5fault4.test 1c1db5fcfe59401e7833146100f1d8de284a0a686fac31ddac9fb56c459f725b
|
||||
F ext/fts5/test/fts5fault4.test 87a10d0caee57da587c7588b0c8d25d2930197399b4812ad1e4d574c75324cee
|
||||
F ext/fts5/test/fts5fault5.test a336e4e11847de24c9497f80cce18e00bb3fab7fb11f97d04eb9af898900a762
|
||||
F ext/fts5/test/fts5fault6.test a0fc0a8f99e4b16500c31dfc7e38e1defe0f1693ac47650517ac7b723b1956f8
|
||||
F ext/fts5/test/fts5fault7.test 0acbec416edb24b8881f154e99c31e9ccf73f539cfcd164090be139e9e97ed4c
|
||||
@@ -255,7 +255,7 @@ F ext/fts5/tool/loadfts5.tcl 95b03429ee6b138645703c6ca192c3ac96eaf093
|
||||
F ext/fts5/tool/mkfts5c.tcl 3eba8e9bee4221ed165f3304b51b2a74a705f4ec5df3d044573a2be539534af8
|
||||
F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
|
||||
F ext/icu/README.txt 7ab7ced8ae78e3a645b57e78570ff589d4c672b71370f5aa9e1cd7024f400fc9
|
||||
F ext/icu/icu.c 91c021c7e3e8bbba286960810fa303295c622e323567b2e6def4ce58e4466e60
|
||||
F ext/icu/icu.c c074519b46baa484bb5396c7e01e051034da8884bad1a1cb7f09bbe6be3f0282
|
||||
F ext/icu/sqliteicu.h fa373836ed5a1ee7478bdf8a1650689294e41d0c89c1daab26e9ae78a32075a8
|
||||
F ext/lsm1/Makefile a553b728bba6c11201b795188c5708915cc4290f02b7df6ba7e8c4c943fd5cd9
|
||||
F ext/lsm1/Makefile.msc f8c878b467232226de288da320e1ac71c131f5ec91e08b21f502303347260013
|
||||
@@ -334,7 +334,7 @@ F ext/misc/normalize.c bd84355c118e297522aba74de34a4fd286fc775524e0499b14473918d
|
||||
F ext/misc/percentile.c b9086e223d583bdaf8cb73c98a6539d501a2fc4282654adbfea576453d82e691
|
||||
F ext/misc/prefixes.c 0f4f8cff5aebc00a7e3ac4021fd59cfe1a8e17c800ceaf592859ecb9cbc38196
|
||||
F ext/misc/qpvtab.c 09738419e25f603a35c0ac8bd0a04daab794f48d08a9bc07a6085b9057b99009
|
||||
F ext/misc/regexp.c b267fd05ff8d38b22f4c2809d7b7a2c61d522e9faf2feb928dbb9662e4a3a386
|
||||
F ext/misc/regexp.c 03e483711534c437b2e29648d2a4b7730f5cb781a434ac8150907376bc4489f6
|
||||
F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c
|
||||
F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d38556c
|
||||
F ext/misc/scrub.c 2a44b0d44c69584c0580ad2553f6290a307a49df4668941d2812135bfb96a946
|
||||
@@ -344,7 +344,7 @@ F ext/misc/shathree.c 7b17615869a495659f1569ada1d8d3d21b4a24614f2746d93cc87ef7c0
|
||||
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
|
||||
F ext/misc/spellfix.c 94df9bbfa514a563c1484f684a2df3d128a2f7209a84ca3ca100c68a0163e29f
|
||||
F ext/misc/sqlar.c 0ace5d3c10fe736dc584bf1159a36b8e2e60fab309d310cd8a0eecd9036621b6
|
||||
F ext/misc/stmt.c 35063044a388ead95557e4b84b89c1b93accc2f1c6ddea3f9710e8486a7af94a
|
||||
F ext/misc/stmt.c ed05ad78013edccd43f4fc33d8244001f6f886eb2dfd2106ba33616ac514c6fb
|
||||
F ext/misc/templatevtab.c 8a16a91a5ceaccfcbd6aaaa56d46828806e460dd194965b3f77bf38f14b942c4
|
||||
F ext/misc/totype.c fa4aedeb07f66169005dffa8de3b0a2b621779fd44f85c103228a42afa71853b
|
||||
F ext/misc/uint.c 053fed3bce2e89583afcd4bf804d75d659879bbcedac74d0fa9ed548839a030b
|
||||
@@ -413,12 +413,12 @@ F ext/repair/test/checkfreelist01.test 3e8aa6aeb4007680c94a8d07b41c339aa635cc782
|
||||
F ext/repair/test/checkindex01.test b530f141413b587c9eb78ff734de6bb79bc3515c335096108c12c01bddbadcec
|
||||
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
|
||||
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
||||
F ext/rtree/geopoly.c cc3f89c11abcf114fa60d74709ae8b5bc1eae5a261b30bc1bb7085089c03bfab
|
||||
F ext/rtree/geopoly.c bb0dcd013dbb3fe0335b6bbae0d9c29fcfffda93d5ef6c31daa47e802132e435
|
||||
F ext/rtree/rtree.c d7b4b8b81d8d54376a7f81de5be85ec58b37c11604bcf42984a8418b34158d93
|
||||
F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
|
||||
F ext/rtree/rtree1.test d47f58832145fcfed9067bc457ca8664962196c4566c17a1ebd679367db55d11
|
||||
F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e1303d32603d
|
||||
F ext/rtree/rtree3.test 4ee5d7df86040efe3d8d84f141f2962a7745452200a7cba1db06f86d97050499
|
||||
F ext/rtree/rtree3.test 272594f88c344e973864008bbe4c71fd3a41a264c097d568593ee7886d83d409
|
||||
F ext/rtree/rtree4.test 304de65d484540111b896827e4261815e5dca4ce28eeecd58be648cd73452c4b
|
||||
F ext/rtree/rtree5.test 49c9041d713d54560b315c2c7ef7207ee287eba1b20f8266968a06f2e55d3142
|
||||
F ext/rtree/rtree6.test 9ce3691c1aac43070a9f194f0ebf54372db346c5a82241fd11b525ed53ce9f3f
|
||||
@@ -491,7 +491,7 @@ F ext/userauth/userauth.c 7f00cded7dcaa5d47f54539b290a43d2e59f4b1eb5f447545fa865
|
||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
|
||||
F main.mk a5412510e5ec952915a7fda34e02079bb4e6ff8f97903f2a3d9ad2dee3e18044
|
||||
F main.mk 50e98928657b6d5aeb9445f6130964bd644861cfa049d689db41da317d449517
|
||||
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
|
||||
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
|
||||
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
|
||||
@@ -510,10 +510,10 @@ F src/auth.c f4fa91b6a90bbc8e0d0f738aa284551739c9543a367071f55574681e0f24f8cf
|
||||
F src/backup.c a2891172438e385fdbe97c11c9745676bec54f518d4447090af97189fd8e52d7
|
||||
F src/bitvec.c 7c849aac407230278445cb069bebc5f89bf2ddd87c5ed9459b070a9175707b3d
|
||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c b5a74c39d3123dadd190019c0afadd7f62b43dfe0712a39e9d0ff2fe26be5d93
|
||||
F src/btree.c 98e30d582239e1c940390f6487aa0d231691989a142fa863a689c021517ede08
|
||||
F src/btree.h 74d64b8f28cfa4a894d14d4ed64fa432cd697b98b61708d4351482ae15913e22
|
||||
F src/btreeInt.h 8ce1332edd89dfd2461d561ac10a0ab5601c8e06200cb5230596c3caaf54482e
|
||||
F src/build.c 23f874642825d7eaaeeb7a3281b2b1a75e1d4c4dd9ae4dceddcd908266634214
|
||||
F src/build.c 29fcc97af5197511788a571ed35a001eea472cbe3bcdbae88178e17fcafd4341
|
||||
F src/callback.c 4c19af69835787bfe790ac560f3071a824eb629f34e41f97b52ce5235c77de1c
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 026dbdcdbd8c3cde98a88483ee88310ff43150ab164ad768f12cc700a11495ad
|
||||
@@ -534,8 +534,8 @@ F src/insert.c 173845e5a6bac96ae937409e4f876b631f26b31dabb9df8fd0eb3b130b2bb3a7
|
||||
F src/json.c 7749b98c62f691697c7ee536b570c744c0583cab4a89200fdd0fc2aa8cc8cbd6
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c 853385cc7a604157e137585097949252d5d0c731768e16b044608e5c95c3614b
|
||||
F src/main.c e946f1d9e30bf49cf399ddf860cfd2319e3a97bbaabfb8e87d6ab985a20d54ad
|
||||
F src/malloc.c a9127efdcef92d6934c6339ea9813075b90edc0ce2e5c723556381a3828fb720
|
||||
F src/main.c b91c7e71af6f33640c35b8239a285040aad8dfcfdaaf979152e743c0f8017ea8
|
||||
F src/malloc.c 4a3785323104678a8b4b0a482fe0c2a80900e7468ddf76ab0f2ea1c79a8ca8cd
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||
F src/mem2.c c8bfc9446fd0798bddd495eb5d9dbafa7d4b7287d8c22d50a83ac9daa26d8a75
|
||||
@@ -554,28 +554,28 @@ F src/os.c b1c4f2d485961e9a5b6b648c36687d25047c252222e9660b7cc25a6e1ea436ab
|
||||
F src/os.h 1ff5ae51d339d0e30d8a9d814f4b8f8e448169304d83a7ed9db66a65732f3e63
|
||||
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
||||
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c 2df2b33db88f00af13805d4573ee126bc5973f9e3b91d03c575fa7ba64e7dc41
|
||||
F src/os_win.c a8ea80037e81127ca01959daa87387cc135f325c88dc745376c4f760de852a10
|
||||
F src/os_unix.c e020676e334a0a78c3affb7dd1789a240071ed6af98309f1bef76948cb8382bd
|
||||
F src/os_win.c e9454cb141908e8eef2102180bad353a36480612d5b736e4c2bd5777d9b25a34
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c 74596fc3d5d8a50de32c37225fc300cccd5ea27ea303c5f4b845d6572f999c5f
|
||||
F src/pager.c 8c3853cad320c24904a2f970777bbdda2deb9572f53e6a1d73b28b85a7fd30cc
|
||||
F src/pager.h f82e9844166e1585f5786837ddc7709966138ced17f568c16af7ccf946c2baa3
|
||||
F src/parse.y 8e67d820030d2655b9942ffe61c1e7e6b96cea2f2f72183533299393907d0564
|
||||
F src/pcache.c 084e638432c610f95aea72b8509f0845d2791293f39d1b82f0c0a7e089c3bb6b
|
||||
F src/pcache.c 5df59c993907b742dfac6aa9038d2515856bede56040a7640d39d06e1c93b494
|
||||
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
||||
F src/pcache1.c 54881292a9a5db202b2c0ac541c5e3ef9a5e8c4f1c1383adb2601d5499a60e65
|
||||
F src/pragma.c d1aead03e8418ff586c7cfca344c50a914b8eb06abd841e8e91a982d823671da
|
||||
F src/pcache1.c 3e6267b17bae4cbaf02dfa08c4507794452991206862e3fc5c94d28313d32c18
|
||||
F src/pragma.c 404c0fe37b51f6def2c9ec6b07c80f0355673f0e74d720dc9a58a78725502417
|
||||
F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7
|
||||
F src/prepare.c c62820c15dcb63013519c8e41d9f928d7478672cc902cfd0581c733c271dbf45
|
||||
F src/printf.c 6166a30417b05c5b2f82e1f183f75faa2926ad60531c0b688a57dbc951441a20
|
||||
F src/printf.c e99ee9741e79ae3873458146f59644276657340385ade4e76a5f5d1c25793764
|
||||
F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
|
||||
F src/resolve.c 1655e44c77c51ebbe82924287528a78bd4a4aaaf34189dbae28d19ccf2ca615c
|
||||
F src/resolve.c f0d663c9b1ceeb3e7d262ede872dd3b24b323a7cc11d84c05a39d962e7d64b07
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c 2db8bbf13f57cc9872f9b927546e98f5ea583e9e364182426492a434a994421b
|
||||
F src/shell.c.in 08e59f1cb9d9b1180aba52861aaada0c95f6ddd210488719684e160a0724c806
|
||||
F src/sqlite.h.in 172528c287399a34f188154017b7268bf82c6d5b780902e361958d2318c4e37c
|
||||
F src/select.c fea5ae26259dc995b2144a28bbb5b013196dbcc86527cd992ed109b00af7f9e8
|
||||
F src/shell.c.in 2b85128ca8ea13fc2dc32f971d628d9f688a324a30f469619b817ce490764fcb
|
||||
F src/sqlite.h.in 01573eae96721f2a8ee2a9e3b7140ceeba2e9c44350911890b89b8ff0dcf6781
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h a988810c9b21c0dc36dc7a62735012339dc76fc7ab448fb0792721d30eacb69d
|
||||
F src/sqliteInt.h 8353e96646372efdb0795a13cd9949831b4992c928de8f5c43b2524e8a4c6e7b
|
||||
F src/sqliteInt.h 9491831b5faa77584f0f7f52c087b48ba573714fa20a448a1550180ce42ef5aa
|
||||
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
|
||||
F src/status.c 4a3da6d77eeb3531cb0dbdf7047772a2a1b99f98c69e90ce009c75fe6328b2c0
|
||||
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
|
||||
@@ -634,19 +634,19 @@ F src/test_windirent.h 90dfbe95442c9762357fe128dc7ae3dc199d006de93eb33ba3972e0a9
|
||||
F src/test_window.c cdae419fdcea5bad6dcd9368c685abdad6deb59e9fc8b84b153de513d394ba3f
|
||||
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||
F src/tokenize.c a38f52058b517929e264094abd0b5fd1e8e145a1aa43bc6f6a72ae5218f96c98
|
||||
F src/treeview.c 0bd550f5974565eba541db339906be7a3f9e91beafb879cb40705382887f08e1
|
||||
F src/trigger.c 61bea163b1fa3039bc572ed8312461b978e5c527e5301f302b078f4c1ccdec6a
|
||||
F src/tokenize.c 36eb0799e487759bbe73e5742b82ee676f06cea2515ff578d03c59a74ccf2d6c
|
||||
F src/treeview.c 07787f67cd297a6d09d04b8d70c06769c60c9c1d9080378f93929c16f8fd3298
|
||||
F src/trigger.c bc70c58e713dcfb6cabe5cc0bed71aedb02c3e9e128c6089a78aca945ba4d720
|
||||
F src/update.c c52a7991bece0453d22c77c08469512ee2f1391c12503fd347d1c939220c5877
|
||||
F src/upsert.c 8789047a8f0a601ea42fa0256d1ba3190c13746b6ba940fe2d25643a7e991937
|
||||
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
||||
F src/util.c 602fe229f32a96ceccae4f40824129669582096f7c355f53dbac156c9fecef23
|
||||
F src/util.c 0be191521ff6d2805995f4910f0b6231b42843678b2efdc1abecaf39929a673f
|
||||
F src/vacuum.c bb346170b0b54c6683bba4a5983aea40485597fdf605c87ec8bc2e199fe88cd8
|
||||
F src/vdbe.c 3df15f0f2cd9d8faeeea18398a62f16c07fda2bfd8d726186f07508ad69b40e2
|
||||
F src/vdbe.h 07641758ca8b4f4c6d81ea667ea167c541e6ece21f5574da11e3d21ec37e2662
|
||||
F src/vdbeInt.h 2cad0aeeb106371ed0e0946bab89f60627087068847afc2451c05056961c18da
|
||||
F src/vdbeapi.c 602610f1252d59cd69742f78a1e2f6fbae40a4b407f5506a6a7b869b0df08ff2
|
||||
F src/vdbeaux.c 328b866880e67526300aa2361c5e50beb3d97dd8746db37dd4aa0135aea60e4d
|
||||
F src/vdbeaux.c dbdfa27cdaf91f18fbc960902fc45e79db3dbfcc05edd9f1f878c144437ce9f6
|
||||
F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd
|
||||
F src/vdbemem.c 5ebf05c0182addedb1607ade848e1c83cef40981df94d1abfab0c59288c6064f
|
||||
F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35
|
||||
@@ -657,9 +657,9 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c b9df133a705093da8977da5eb202eaadb844839f1c7297c08d33471f5491843d
|
||||
F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
|
||||
F src/walker.c f890a3298418d7cba3b69b8803594fdc484ea241206a8dfa99db6dd36f8cbb3b
|
||||
F src/where.c 9a44063e60d8f42dd9dc8147b8e8dcfc315bbd13e25c395211292c36d828c869
|
||||
F src/where.c e7b7c9d37f4f8d14d4d05b20e57ae43712a51ffed7d45f547a23f9c42ee483dd
|
||||
F src/whereInt.h b48ca529ffe293c18cbfa8326af18a09e39910de66fb3e96ef788c7cbf8ef3a7
|
||||
F src/wherecode.c 0b09abfcb88c61c6a6984a3e065786631ff35495e9bdf865e6b74ab0a1299c5b
|
||||
F src/wherecode.c f8acceb057286ed95b66689d1981985228fd925001fdc49dbd3b112f4d739174
|
||||
F src/whereexpr.c 55a39f42aaf982574fbf52906371a84cceed98a994422198dfd03db4fce4cc46
|
||||
F src/window.c fff1b51757438c664e471d5184634e48dcdf8ea34b640f3b1b0810b1e06de18c
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
@@ -1007,7 +1007,7 @@ F test/fts3conf.test c84bbaec81281c1788aa545ac6e78a6bd6cde2bdbbce2da261690e3659f
|
||||
F test/fts3corrupt.test 6732477c5ace050c5758a40a8b5706c8c0cccd416b9c558e0e15224805a40e57
|
||||
F test/fts3corrupt2.test e318f0676e5e78d5a4b702637e2bb25265954c08a1b1e4aaf93c7880bb0c67d0
|
||||
F test/fts3corrupt3.test 0d5b69a0998b4adf868cc301fc78f3d0707745f1d984ce044c205cdb764b491f
|
||||
F test/fts3corrupt4.test 799ff994b964fed7201be6b6b62c7ff2ef7bb3da6c02b9eaf0d96a5a4d9b6ca3
|
||||
F test/fts3corrupt4.test 589e043d1114ea02c83530e459ef5c2d6adce63094e72826ed3bceb02e795116
|
||||
F test/fts3corrupt5.test 0549f85ec4bd22e992f645f13c59b99d652f2f5e643dac75568bfd23a6db7ed5
|
||||
F test/fts3corrupt6.test f417c910254f32c0bc9ead7affa991a1d5aec35b3b32a183ffb05eea78289525
|
||||
F test/fts3cov.test 7eacdbefd756cfa4dc2241974e3db2834e9b372ca215880e00032222f32194cf
|
||||
@@ -1024,8 +1024,8 @@ F test/fts3expr3.test c4d4a7d6327418428c96e0a3a1137c251b8dfbf8
|
||||
F test/fts3expr4.test f5b2832549f01b1f7f73389fa21d4b875499bc95bf7c8b36271844888c6a0938
|
||||
F test/fts3expr5.test a5b9a053becbdb8e973fbf4d6d3abaabeb42d511d1848bd57931f3e0a1cf983e
|
||||
F test/fts3f.test 8c438d5e1cab526b0021988fb1dc70cf3597b006a33ffd6c955ee89929077fe3
|
||||
F test/fts3fault.test 798e45af84be7978ca33d5bdc94246eb44724db24174b5d8e9b1ac46c57fb08d
|
||||
F test/fts3fault2.test 6a17a11d8034b1c4eca9f3091649273d56c49ff049e2173df8060f94341e9da0
|
||||
F test/fts3fault.test f4e1342acfe6d216a001490e8cd52afac1f9ffe4a11bbcdcb296129a45c5df45
|
||||
F test/fts3fault2.test 7b2741e5095367238380b0fcdb837f36c24484c7a5f353659b387df63cf039ec
|
||||
F test/fts3first.test dbdedd20914c8d539aa3206c9b34a23775644641
|
||||
F test/fts3fuzz001.test e3c7b0ce9b04cc02281dcc96812a277f02df03cd7dc082055d87e11eb18aaf56
|
||||
F test/fts3join.test ee25def5e763ea8879c19e74f862d5191410ccc7259338887a3685e97f512662
|
||||
@@ -1168,7 +1168,7 @@ F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
|
||||
F test/join5.test d22b6cba8fb59ab3f1c82701434c360705eb12d4ce200c449f37b018fc47681a
|
||||
F test/join6.test f809c025fa253f9e150c0e9afd4cef8813257bceeb6f46e04041228c9403cc2c
|
||||
F test/join7.test 2268dcbb54b724391dda3748ea95c60d960607ffeed67885675998e7117697f6
|
||||
F test/join8.test d0e75bf880a1b1ee8fda57d8187170c5b2ff0c0cd0e1d6d474faa99fe1283d8d
|
||||
F test/join8.test ef5fb09a7ce6b59addb8bd16e11607db6c44a0afcac5774a5dc03193fd0a1df5
|
||||
F test/join9.test 9056ddd3b0c0f4f9d658f4521038d9a37dc23ead8ca9a505d0b0db2b6a471e05
|
||||
F test/joinA.test 7eab225dc1c1ab258a5e62513a4ed7cabbd3db971d59d5d92f4fb6fa14c12f6a
|
||||
F test/joinB.test 1b2ba3fc8568b49411787fccbf540570c148e9b6a53a30f80691cb6268098ded
|
||||
@@ -1183,7 +1183,7 @@ F test/journal3.test 7c3cf23ffc77db06601c1fcfc9743de8441cb77db9d1aa931863d94f5ff
|
||||
F test/jrnlmode.test 9b5bc01dac22223cb60ec2d5f97acf568d73820794386de5634dcadbea9e1946
|
||||
F test/jrnlmode2.test 8759a1d4657c064637f8b079592651530db738419e1d649c6df7048cd724363d
|
||||
F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
|
||||
F test/json101.test 9d46b8e254c4e23306da175dd226d5c4f164db6b294bcea98e5dcd891ba48c91
|
||||
F test/json101.test 9f6337e7423d2c1774d1d485c919fc4e11c8f7e423a2f8831f73471983432108
|
||||
F test/json102.test 327e77275f338c028faefa2da5164daf6b142a165e3015ff2a6e4251ddc6a0ac
|
||||
F test/json103.test 53df87f83a4e5fa0c0a56eb29ff6c94055c6eb919f33316d62161a8880112dbe
|
||||
F test/json104.test a502dc01853aada95d721b3b275afbe2dc18fffdac1fea6e96fb20c13586bbb5
|
||||
@@ -1233,7 +1233,7 @@ F test/mallocJ.test b5d1839da331d96223e5f458856f8ffe1366f62e
|
||||
F test/mallocK.test 25897506da0098cea09b302ff432b0fb6d8002773c1e0fc9732aa8b444bfd455
|
||||
F test/mallocL.test fb311ff80afddf3b1a75e52289081f4754d901dc
|
||||
F test/mallocM.test 78bbe9d3da84a5c679123cdb40d7b2010b18fc46e13897e4f253c6ba6fbff134
|
||||
F test/malloc_common.tcl aac62499b76be719fac31e7a3e54a7fd53272e7f
|
||||
F test/malloc_common.tcl 806c50379cf4fa65008cd4d5af18273e5dac8ab62d1d4316c76aa2ecd2e54018
|
||||
F test/malloctraceviewer.tcl b7a54595270c1d201abf1c3f3d461f27eaf24cdef623ad08a0fe5e411264c8a9
|
||||
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
|
||||
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
|
||||
@@ -1244,7 +1244,7 @@ F test/memjournal2.test 89a4e0d1084170a281efa4d54c2677599f986f44227f98f7dfae2828
|
||||
F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
|
||||
F test/memsubsys1.test 9e7555a22173b8f1c96c281ce289b338fcba2abe8b157f8798ca195bbf1d347e
|
||||
F test/memsubsys2.test 3e4a8d0c05fd3e5fa92017c64666730a520c7e08
|
||||
F test/merge1.test 0ade470d77b689c4a64dc7f736527fcd893140bcafa70af8f7b98523cfb83f16
|
||||
F test/merge1.test 2de6d6ef8d25402764b1aab49d8f9d7f89208c89a6674e437f76de4c812157b8
|
||||
F test/minmax.test fe638b55d77d2375531a8f549b338eafcd9adfbd2f72df37ed77d9b26ca0a71a
|
||||
F test/minmax2.test cf9311babb6f0518d04e42fd6a42c619531c4309a9dd790a2c4e9b3bc595e0de
|
||||
F test/minmax3.test cc1e8b010136db0d01a6f2a29ba5a9f321034354
|
||||
@@ -1285,7 +1285,7 @@ F test/null.test b7ff206a1c60fe01aa2abd33ef9ea83c93727d993ca8a613de86e925c9f2bc6
|
||||
F test/nulls1.test 7a5e4346ee4285034100b4cd20e6784f16a9d6c927e44ecdf10034086bbee9c9
|
||||
F test/numcast.test 5d126f7f581432e86a90d1e35cac625164aec4a1
|
||||
F test/numindex1.test 20a5450d4b056e48cd5db30e659f13347a099823
|
||||
F test/offset1.test f06b83657bcf26f9ce805e67450e189e282143b2
|
||||
F test/offset1.test 72cca52482cbd5bc687cfa67aa2566c859081b5a353fd2f9da9bbd3914dea1ef
|
||||
F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
|
||||
F test/optfuzz-db01.c 9f2fa80b8f84ebbf1f2e8b13421a4e0477fe300f6686fbd76cac1d2db66e0fdc
|
||||
F test/optfuzz-db01.txt 21f6bdeadc701cf11528276e2a55c70bfcb846ba42df327f979bd9e7b6ce7041
|
||||
@@ -1342,7 +1342,7 @@ F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
|
||||
F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736
|
||||
F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
|
||||
F test/recover.test ccb8c2623902a92ebb76770edd075cb4f75a4760bb7afde38026572c6e79070d
|
||||
F test/regexp1.test 0c3ff80f66b0eff80e623eb5db7a3dad512095c573d78ac23009785f6d8f51ce
|
||||
F test/regexp1.test 4a44e014664a109bbb1c37d29d9b61ca5aa5a7f49cc564c95208a80f818e3377
|
||||
F test/regexp2.test 55ed41da802b0e284ac7e2fe944be3948f93ff25abbca0361a609acfed1368b5
|
||||
F test/reindex.test cd9d6021729910ece82267b4f5e1b5ac2911a7566c43b43c176a6a4732e2118d
|
||||
F test/releasetest_data.tcl 11ba48a21ed1c808147b0e77c6e93d204577f4327ffe6d7c3b34cd3c01eac3a2
|
||||
@@ -1357,7 +1357,7 @@ F test/round1.test 768018b04522ca420b1aba8a24bd76091d269f3bce3902af3ec6ebcee41ab
|
||||
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
|
||||
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
|
||||
F test/rowid.test e29025be95baf6b32f0d5edef59a7633028325896a98f1caa8019559ca910350
|
||||
F test/rowvalue.test ff1ffa31cebe12feb6f989e09263f3b1e8c560db94b40fe006126a8435fd6832
|
||||
F test/rowvalue.test baf4fa3ec1a8c1c920c3faa5fd25959cb454bbd99ac8960397c34549d9fc4abe
|
||||
F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
|
||||
F test/rowvalue3.test 1347e25ca11c547c5a6ff0cc5626f95aa9740e9275bfaec096029f57cb2130ce
|
||||
F test/rowvalue4.test 441e7e366ac6d939a3a95a574031c56ec2a854077a91d66eee5ff1d86cb5be58
|
||||
@@ -1390,7 +1390,7 @@ F test/securedel.test 2f70b2449186a1921bd01ec9da407fbfa98c3a7a5521854c300c194b2f
|
||||
F test/securedel2.test 2d54c28e46eb1fd6902089958b20b1b056c6f1c5
|
||||
F test/select1.test 692e84cfa29c405854c69e8a4027183d64c22952866a123fabbce741a379e889
|
||||
F test/select2.test 352480e0e9c66eda9c3044e412abdf5be0215b56
|
||||
F test/select3.test 399a0b23f8618bfe07ea24fb67f2952f620d6eba662bccabf6f4f71c2d89e6c9
|
||||
F test/select3.test ce4f78bbc809b0513f960f1ee84cdbc5af50ba112c343d5266558a8b2468f656
|
||||
F test/select4.test f0684d3da3bccacbe2a1ebadf6fb49d9df6f53acb4c6ebc228a88d0d6054cc7b
|
||||
F test/select5.test 8afc5e5dcdebc2be54472e73ebd9cd1adef1225fd15d37a1c62f969159f390ae
|
||||
F test/select6.test 9b2fb4ffedf52e1b5703cfcae1212e7a4a063f014c0458d78d29aca3db766d1f
|
||||
@@ -1978,11 +1978,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P cd6254fcd32798f7be4e6d827597ddaa2e46ac6e2f0149cd3a3be0416fa18835
|
||||
R 4b3e64a86ee9acaa4f97f1ab6ad6f3ae
|
||||
T +sym-major-release *
|
||||
P 6607dd010359d0f2e07e49ce69d4bfd1e57c3505df5d667cf7735facf34112d7
|
||||
R 7ddc9e480f1c6dbefb10e119ae3343ea
|
||||
T +sym-release *
|
||||
T +sym-version-3.39.0 *
|
||||
T +sym-version-3.39.4 *
|
||||
U drh
|
||||
Z f64bfe891f96e530fe80668f0f22f84a
|
||||
Z 191c67622a74f691de0b6643916bb1a3
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918
|
||||
a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309
|
||||
+27
-32
@@ -1548,7 +1548,7 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
|
||||
if( iFree2+sz2 > usableSize ) return SQLITE_CORRUPT_PAGE(pPage);
|
||||
memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));
|
||||
sz += sz2;
|
||||
}else if( NEVER(iFree+sz>usableSize) ){
|
||||
}else if( iFree+sz>usableSize ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
|
||||
@@ -7904,8 +7904,6 @@ static int balance_nonroot(
|
||||
Pgno pgno; /* Temp var to store a page number in */
|
||||
u8 abDone[NB+2]; /* True after i'th new page is populated */
|
||||
Pgno aPgno[NB+2]; /* Page numbers of new pages before shuffling */
|
||||
Pgno aPgOrder[NB+2]; /* Copy of aPgno[] used for sorting pages */
|
||||
u16 aPgFlags[NB+2]; /* flags field of new pages before shuffling */
|
||||
CellArray b; /* Parsed information on cells being balanced */
|
||||
|
||||
memset(abDone, 0, sizeof(abDone));
|
||||
@@ -8329,42 +8327,39 @@ static int balance_nonroot(
|
||||
** of the table is closer to a linear scan through the file. That in turn
|
||||
** helps the operating system to deliver pages from the disk more rapidly.
|
||||
**
|
||||
** An O(n^2) insertion sort algorithm is used, but since n is never more
|
||||
** than (NB+2) (a small constant), that should not be a problem.
|
||||
** An O(N*N) sort algorithm is used, but since N is never more than NB+2
|
||||
** (5), that is not a performance concern.
|
||||
**
|
||||
** When NB==3, this one optimization makes the database about 25% faster
|
||||
** for large insertions and deletions.
|
||||
*/
|
||||
for(i=0; i<nNew; i++){
|
||||
aPgOrder[i] = aPgno[i] = apNew[i]->pgno;
|
||||
aPgFlags[i] = apNew[i]->pDbPage->flags;
|
||||
for(j=0; j<i; j++){
|
||||
if( NEVER(aPgno[j]==aPgno[i]) ){
|
||||
/* This branch is taken if the set of sibling pages somehow contains
|
||||
** duplicate entries. This can happen if the database is corrupt.
|
||||
** It would be simpler to detect this as part of the loop below, but
|
||||
** we do the detection here in order to avoid populating the pager
|
||||
** cache with two separate objects associated with the same
|
||||
** page number. */
|
||||
assert( CORRUPT_DB );
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
goto balance_cleanup;
|
||||
}
|
||||
}
|
||||
aPgno[i] = apNew[i]->pgno;
|
||||
assert( apNew[i]->pDbPage->flags & PGHDR_WRITEABLE );
|
||||
assert( apNew[i]->pDbPage->flags & PGHDR_DIRTY );
|
||||
}
|
||||
for(i=0; i<nNew; i++){
|
||||
int iBest = 0; /* aPgno[] index of page number to use */
|
||||
for(j=1; j<nNew; j++){
|
||||
if( aPgOrder[j]<aPgOrder[iBest] ) iBest = j;
|
||||
for(i=0; i<nNew-1; i++){
|
||||
int iB = i;
|
||||
for(j=i+1; j<nNew; j++){
|
||||
if( apNew[j]->pgno < apNew[iB]->pgno ) iB = j;
|
||||
}
|
||||
pgno = aPgOrder[iBest];
|
||||
aPgOrder[iBest] = 0xffffffff;
|
||||
if( iBest!=i ){
|
||||
if( iBest>i ){
|
||||
sqlite3PagerRekey(apNew[iBest]->pDbPage, pBt->nPage+iBest+1, 0);
|
||||
}
|
||||
sqlite3PagerRekey(apNew[i]->pDbPage, pgno, aPgFlags[iBest]);
|
||||
apNew[i]->pgno = pgno;
|
||||
|
||||
/* If apNew[i] has a page number that is bigger than any of the
|
||||
** subsequence apNew[i] entries, then swap apNew[i] with the subsequent
|
||||
** entry that has the smallest page number (which we know to be
|
||||
** entry apNew[iB]).
|
||||
*/
|
||||
if( iB!=i ){
|
||||
Pgno pgnoA = apNew[i]->pgno;
|
||||
Pgno pgnoB = apNew[iB]->pgno;
|
||||
Pgno pgnoTemp = (PENDING_BYTE/pBt->pageSize)+1;
|
||||
u16 fgA = apNew[i]->pDbPage->flags;
|
||||
u16 fgB = apNew[iB]->pDbPage->flags;
|
||||
sqlite3PagerRekey(apNew[i]->pDbPage, pgnoTemp, fgB);
|
||||
sqlite3PagerRekey(apNew[iB]->pDbPage, pgnoA, fgA);
|
||||
sqlite3PagerRekey(apNew[i]->pDbPage, pgnoB, fgB);
|
||||
apNew[i]->pgno = pgnoB;
|
||||
apNew[iB]->pgno = pgnoA;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,8 +331,6 @@ void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
|
||||
memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);
|
||||
db->mDbFlags |= DBFLAG_PreferBuiltin;
|
||||
sqlite3RunParser(pParse, zSql);
|
||||
sqlite3DbFree(db, pParse->zErrMsg);
|
||||
pParse->zErrMsg = 0;
|
||||
db->mDbFlags = savedDbFlags;
|
||||
sqlite3DbFree(db, zSql);
|
||||
memcpy(PARSE_TAIL(pParse), saveBuf, PARSE_TAIL_SZ);
|
||||
|
||||
@@ -4112,8 +4112,11 @@ int sqlite3_test_control(int op, ...){
|
||||
sqlite3ShowTriggerStepList(0);
|
||||
sqlite3ShowTrigger(0);
|
||||
sqlite3ShowTriggerList(0);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
sqlite3ShowWindow(0);
|
||||
sqlite3ShowWinFunc(0);
|
||||
#endif
|
||||
sqlite3ShowSelect(0);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -776,8 +776,13 @@ void *sqlite3OomFault(sqlite3 *db){
|
||||
}
|
||||
DisableLookaside;
|
||||
if( db->pParse ){
|
||||
Parse *pParse;
|
||||
sqlite3ErrorMsg(db->pParse, "out of memory");
|
||||
db->pParse->rc = SQLITE_NOMEM_BKPT;
|
||||
for(pParse=db->pParse->pOuterParse; pParse; pParse = pParse->pOuterParse){
|
||||
pParse->nErr++;
|
||||
pParse->rc = SQLITE_NOMEM;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
+20
-11
@@ -5855,6 +5855,7 @@ static const char *unixTempFileDir(void){
|
||||
static int unixGetTempname(int nBuf, char *zBuf){
|
||||
const char *zDir;
|
||||
int iLimit = 0;
|
||||
int rc = SQLITE_OK;
|
||||
|
||||
/* It's odd to simulate an io-error here, but really this is just
|
||||
** using the io-error infrastructure to test that SQLite handles this
|
||||
@@ -5863,18 +5864,26 @@ static int unixGetTempname(int nBuf, char *zBuf){
|
||||
zBuf[0] = 0;
|
||||
SimulateIOError( return SQLITE_IOERR );
|
||||
|
||||
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
zDir = unixTempFileDir();
|
||||
if( zDir==0 ) return SQLITE_IOERR_GETTEMPPATH;
|
||||
do{
|
||||
u64 r;
|
||||
sqlite3_randomness(sizeof(r), &r);
|
||||
assert( nBuf>2 );
|
||||
zBuf[nBuf-2] = 0;
|
||||
sqlite3_snprintf(nBuf, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX"%llx%c",
|
||||
zDir, r, 0);
|
||||
if( zBuf[nBuf-2]!=0 || (iLimit++)>10 ) return SQLITE_ERROR;
|
||||
}while( osAccess(zBuf,0)==0 );
|
||||
return SQLITE_OK;
|
||||
if( zDir==0 ){
|
||||
rc = SQLITE_IOERR_GETTEMPPATH;
|
||||
}else{
|
||||
do{
|
||||
u64 r;
|
||||
sqlite3_randomness(sizeof(r), &r);
|
||||
assert( nBuf>2 );
|
||||
zBuf[nBuf-2] = 0;
|
||||
sqlite3_snprintf(nBuf, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX"%llx%c",
|
||||
zDir, r, 0);
|
||||
if( zBuf[nBuf-2]!=0 || (iLimit++)>10 ){
|
||||
rc = SQLITE_ERROR;
|
||||
break;
|
||||
}
|
||||
}while( osAccess(zBuf,0)==0 );
|
||||
}
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
|
||||
|
||||
+41
-6
@@ -1918,10 +1918,12 @@ int sqlite3_win32_set_directory8(
|
||||
const char *zValue /* New value for directory being set or reset */
|
||||
){
|
||||
char **ppDirectory = 0;
|
||||
int rc;
|
||||
#ifndef SQLITE_OMIT_AUTOINIT
|
||||
int rc = sqlite3_initialize();
|
||||
rc = sqlite3_initialize();
|
||||
if( rc ) return rc;
|
||||
#endif
|
||||
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
if( type==SQLITE_WIN32_DATA_DIRECTORY_TYPE ){
|
||||
ppDirectory = &sqlite3_data_directory;
|
||||
}else if( type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE ){
|
||||
@@ -1936,14 +1938,19 @@ int sqlite3_win32_set_directory8(
|
||||
if( zValue && zValue[0] ){
|
||||
zCopy = sqlite3_mprintf("%s", zValue);
|
||||
if ( zCopy==0 ){
|
||||
return SQLITE_NOMEM_BKPT;
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
goto set_directory8_done;
|
||||
}
|
||||
}
|
||||
sqlite3_free(*ppDirectory);
|
||||
*ppDirectory = zCopy;
|
||||
return SQLITE_OK;
|
||||
rc = SQLITE_OK;
|
||||
}else{
|
||||
rc = SQLITE_ERROR;
|
||||
}
|
||||
return SQLITE_ERROR;
|
||||
set_directory8_done:
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4717,6 +4724,18 @@ static int winMakeEndInDirSep(int nBuf, char *zBuf){
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** If sqlite3_temp_directory is not, take the mutex and return true.
|
||||
**
|
||||
** If sqlite3_temp_directory is NULL, omit the mutex and return false.
|
||||
*/
|
||||
static int winTempDirDefined(void){
|
||||
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
if( sqlite3_temp_directory!=0 ) return 1;
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Create a temporary file name and store the resulting pointer into pzBuf.
|
||||
** The pointer returned in pzBuf must be freed via sqlite3_free().
|
||||
@@ -4753,20 +4772,23 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
|
||||
*/
|
||||
nDir = nMax - (nPre + 15);
|
||||
assert( nDir>0 );
|
||||
if( sqlite3_temp_directory ){
|
||||
if( winTempDirDefined() ){
|
||||
int nDirLen = sqlite3Strlen30(sqlite3_temp_directory);
|
||||
if( nDirLen>0 ){
|
||||
if( !winIsDirSep(sqlite3_temp_directory[nDirLen-1]) ){
|
||||
nDirLen++;
|
||||
}
|
||||
if( nDirLen>nDir ){
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
sqlite3_free(zBuf);
|
||||
OSTRACE(("TEMP-FILENAME rc=SQLITE_ERROR\n"));
|
||||
return winLogError(SQLITE_ERROR, 0, "winGetTempname1", 0);
|
||||
}
|
||||
sqlite3_snprintf(nMax, zBuf, "%s", sqlite3_temp_directory);
|
||||
}
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
}
|
||||
|
||||
#if defined(__CYGWIN__)
|
||||
else{
|
||||
static const char *azDirs[] = {
|
||||
@@ -5555,7 +5577,7 @@ static BOOL winIsVerbatimPathname(
|
||||
** pathname into zOut[]. zOut[] will be at least pVfs->mxPathname
|
||||
** bytes in size.
|
||||
*/
|
||||
static int winFullPathname(
|
||||
static int winFullPathnameNoMutex(
|
||||
sqlite3_vfs *pVfs, /* Pointer to vfs object */
|
||||
const char *zRelative, /* Possibly relative input path */
|
||||
int nFull, /* Size of output buffer in bytes */
|
||||
@@ -5734,6 +5756,19 @@ static int winFullPathname(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
static int winFullPathname(
|
||||
sqlite3_vfs *pVfs, /* Pointer to vfs object */
|
||||
const char *zRelative, /* Possibly relative input path */
|
||||
int nFull, /* Size of output buffer in bytes */
|
||||
char *zFull /* Output buffer */
|
||||
){
|
||||
int rc;
|
||||
sqlite3_mutex *pMutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR);
|
||||
sqlite3_mutex_enter(pMutex);
|
||||
rc = winFullPathnameNoMutex(pVfs, zRelative, nFull, zFull);
|
||||
sqlite3_mutex_leave(pMutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
||||
/*
|
||||
|
||||
+2
-1
@@ -5821,6 +5821,7 @@ static int pager_open_journal(Pager *pPager){
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3BitvecDestroy(pPager->pInJournal);
|
||||
pPager->pInJournal = 0;
|
||||
pPager->journalOff = 0;
|
||||
}else{
|
||||
assert( pPager->eState==PAGER_WRITER_LOCKED );
|
||||
pPager->eState = PAGER_WRITER_CACHEMOD;
|
||||
@@ -7376,7 +7377,7 @@ int sqlite3PagerGetJournalMode(Pager *pPager){
|
||||
int sqlite3PagerOkToChangeJournalMode(Pager *pPager){
|
||||
assert( assert_pager_state(pPager) );
|
||||
if( pPager->eState>=PAGER_WRITER_CACHEMOD ) return 0;
|
||||
if( NEVER(isOpen(pPager->jfd) && pPager->journalOff>0) ) return 0;
|
||||
if( isOpen(pPager->jfd) && pPager->journalOff>0 ) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -622,14 +622,24 @@ void sqlite3PcacheClearSyncFlags(PCache *pCache){
|
||||
*/
|
||||
void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){
|
||||
PCache *pCache = p->pCache;
|
||||
sqlite3_pcache_page *pOther;
|
||||
assert( p->nRef>0 );
|
||||
assert( newPgno>0 );
|
||||
assert( sqlite3PcachePageSanity(p) );
|
||||
pcacheTrace(("%p.MOVE %d -> %d\n",pCache,p->pgno,newPgno));
|
||||
pOther = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, newPgno, 0);
|
||||
if( pOther ){
|
||||
PgHdr *pXPage = (PgHdr*)pOther->pExtra;
|
||||
assert( pXPage->nRef==0 );
|
||||
pXPage->nRef++;
|
||||
pCache->nRefSum++;
|
||||
sqlite3PcacheDrop(pXPage);
|
||||
}
|
||||
sqlite3GlobalConfig.pcache2.xRekey(pCache->pCache, p->pPage, p->pgno,newPgno);
|
||||
p->pgno = newPgno;
|
||||
if( (p->flags&PGHDR_DIRTY) && (p->flags&PGHDR_NEED_SYNC) ){
|
||||
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
|
||||
assert( sqlite3PcachePageSanity(p) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-7
@@ -1123,23 +1123,26 @@ static void pcache1Rekey(
|
||||
PCache1 *pCache = (PCache1 *)p;
|
||||
PgHdr1 *pPage = (PgHdr1 *)pPg;
|
||||
PgHdr1 **pp;
|
||||
unsigned int h;
|
||||
unsigned int hOld, hNew;
|
||||
assert( pPage->iKey==iOld );
|
||||
assert( pPage->pCache==pCache );
|
||||
assert( iOld!=iNew ); /* The page number really is changing */
|
||||
|
||||
pcache1EnterMutex(pCache->pGroup);
|
||||
|
||||
h = iOld%pCache->nHash;
|
||||
pp = &pCache->apHash[h];
|
||||
|
||||
assert( pcache1FetchNoMutex(p, iOld, 0)==pPage ); /* pPg really is iOld */
|
||||
hOld = iOld%pCache->nHash;
|
||||
pp = &pCache->apHash[hOld];
|
||||
while( (*pp)!=pPage ){
|
||||
pp = &(*pp)->pNext;
|
||||
}
|
||||
*pp = pPage->pNext;
|
||||
|
||||
h = iNew%pCache->nHash;
|
||||
assert( pcache1FetchNoMutex(p, iNew, 0)==0 ); /* iNew not in cache */
|
||||
hNew = iNew%pCache->nHash;
|
||||
pPage->iKey = iNew;
|
||||
pPage->pNext = pCache->apHash[h];
|
||||
pCache->apHash[h] = pPage;
|
||||
pPage->pNext = pCache->apHash[hNew];
|
||||
pCache->apHash[hNew] = pPage;
|
||||
if( iNew>pCache->iMaxKey ){
|
||||
pCache->iMaxKey = iNew;
|
||||
}
|
||||
|
||||
@@ -965,6 +965,7 @@ void sqlite3Pragma(
|
||||
**
|
||||
*/
|
||||
case PragTyp_TEMP_STORE_DIRECTORY: {
|
||||
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
if( !zRight ){
|
||||
returnSingleText(v, sqlite3_temp_directory);
|
||||
}else{
|
||||
@@ -974,6 +975,7 @@ void sqlite3Pragma(
|
||||
rc = sqlite3OsAccess(db->pVfs, zRight, SQLITE_ACCESS_READWRITE, &res);
|
||||
if( rc!=SQLITE_OK || res==0 ){
|
||||
sqlite3ErrorMsg(pParse, "not a writable directory");
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
goto pragma_out;
|
||||
}
|
||||
}
|
||||
@@ -991,6 +993,7 @@ void sqlite3Pragma(
|
||||
}
|
||||
#endif /* SQLITE_OMIT_WSD */
|
||||
}
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1009,6 +1012,7 @@ void sqlite3Pragma(
|
||||
**
|
||||
*/
|
||||
case PragTyp_DATA_STORE_DIRECTORY: {
|
||||
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
if( !zRight ){
|
||||
returnSingleText(v, sqlite3_data_directory);
|
||||
}else{
|
||||
@@ -1018,6 +1022,7 @@ void sqlite3Pragma(
|
||||
rc = sqlite3OsAccess(db->pVfs, zRight, SQLITE_ACCESS_READWRITE, &res);
|
||||
if( rc!=SQLITE_OK || res==0 ){
|
||||
sqlite3ErrorMsg(pParse, "not a writable directory");
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
goto pragma_out;
|
||||
}
|
||||
}
|
||||
@@ -1029,6 +1034,7 @@ void sqlite3Pragma(
|
||||
}
|
||||
#endif /* SQLITE_OMIT_WSD */
|
||||
}
|
||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -803,8 +803,8 @@ void sqlite3_str_vappendf(
|
||||
case etSQLESCAPE: /* %q: Escape ' characters */
|
||||
case etSQLESCAPE2: /* %Q: Escape ' and enclose in '...' */
|
||||
case etSQLESCAPE3: { /* %w: Escape " characters */
|
||||
int i, j, k, n, isnull;
|
||||
int needQuote;
|
||||
i64 i, j, k, n;
|
||||
int needQuote, isnull;
|
||||
char ch;
|
||||
char q = ((xtype==etSQLESCAPE3)?'"':'\''); /* Quote character */
|
||||
char *escarg;
|
||||
|
||||
+8
-18
@@ -85,33 +85,23 @@ static void resolveAlias(
|
||||
sqlite3ExprDelete(db, pDup);
|
||||
pDup = 0;
|
||||
}else{
|
||||
Expr temp;
|
||||
incrAggFunctionDepth(pDup, nSubquery);
|
||||
if( pExpr->op==TK_COLLATE ){
|
||||
assert( !ExprHasProperty(pExpr, EP_IntValue) );
|
||||
pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
|
||||
}
|
||||
|
||||
/* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
|
||||
** prevents ExprDelete() from deleting the Expr structure itself,
|
||||
** allowing it to be repopulated by the memcpy() on the following line.
|
||||
** The pExpr->u.zToken might point into memory that will be freed by the
|
||||
** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
|
||||
** make a copy of the token before doing the sqlite3DbFree().
|
||||
*/
|
||||
ExprSetProperty(pExpr, EP_Static);
|
||||
sqlite3ExprDelete(db, pExpr);
|
||||
memcpy(pExpr, pDup, sizeof(*pExpr));
|
||||
if( !ExprHasProperty(pExpr, EP_IntValue) && pExpr->u.zToken!=0 ){
|
||||
assert( (pExpr->flags & (EP_Reduced|EP_TokenOnly))==0 );
|
||||
pExpr->u.zToken = sqlite3DbStrDup(db, pExpr->u.zToken);
|
||||
pExpr->flags |= EP_MemToken;
|
||||
}
|
||||
memcpy(&temp, pDup, sizeof(Expr));
|
||||
memcpy(pDup, pExpr, sizeof(Expr));
|
||||
memcpy(pExpr, &temp, sizeof(Expr));
|
||||
if( ExprHasProperty(pExpr, EP_WinFunc) ){
|
||||
if( ALWAYS(pExpr->y.pWin!=0) ){
|
||||
pExpr->y.pWin->pOwner = pExpr;
|
||||
}
|
||||
}
|
||||
sqlite3DbFree(db, pDup);
|
||||
sqlite3ParserAddCleanup(pParse,
|
||||
(void(*)(sqlite3*,void*))sqlite3ExprDelete,
|
||||
pDup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +304,7 @@ static int lookupName(
|
||||
pTab = pItem->pTab;
|
||||
assert( pTab!=0 && pTab->zName!=0 );
|
||||
assert( pTab->nCol>0 || pParse->nErr );
|
||||
assert( pItem->fg.isNestedFrom == IsNestedFrom(pItem->pSelect) );
|
||||
assert( (int)pItem->fg.isNestedFrom == IsNestedFrom(pItem->pSelect) );
|
||||
if( pItem->fg.isNestedFrom ){
|
||||
/* In this case, pItem is a subquery that has been formed from a
|
||||
** parenthesized subset of the FROM clause terms. Example:
|
||||
|
||||
+29
-9
@@ -324,7 +324,7 @@ int sqlite3ColumnIndex(Table *pTab, const char *zCol){
|
||||
*/
|
||||
void sqlite3SrcItemColumnUsed(SrcItem *pItem, int iCol){
|
||||
assert( pItem!=0 );
|
||||
assert( pItem->fg.isNestedFrom == IsNestedFrom(pItem->pSelect) );
|
||||
assert( (int)pItem->fg.isNestedFrom == IsNestedFrom(pItem->pSelect) );
|
||||
if( pItem->fg.isNestedFrom ){
|
||||
ExprList *pResults;
|
||||
assert( pItem->pSelect!=0 );
|
||||
@@ -1688,7 +1688,7 @@ static void generateSortTail(
|
||||
if( addrOnce ) sqlite3VdbeJumpHere(v, addrOnce);
|
||||
addr = 1 + sqlite3VdbeAddOp2(v, OP_SorterSort, iTab, addrBreak);
|
||||
VdbeCoverage(v);
|
||||
codeOffset(v, p->iOffset, addrContinue);
|
||||
assert( p->iLimit==0 && p->iOffset==0 );
|
||||
sqlite3VdbeAddOp3(v, OP_SorterData, iTab, regSortOut, iSortTab);
|
||||
bSeq = 0;
|
||||
}else{
|
||||
@@ -1696,6 +1696,9 @@ static void generateSortTail(
|
||||
codeOffset(v, p->iOffset, addrContinue);
|
||||
iSortTab = iTab;
|
||||
bSeq = 1;
|
||||
if( p->iOffset>0 ){
|
||||
sqlite3VdbeAddOp2(v, OP_AddImm, p->iLimit, -1);
|
||||
}
|
||||
}
|
||||
for(i=0, iCol=nKey+bSeq-1; i<nColumn; i++){
|
||||
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
|
||||
@@ -3688,10 +3691,11 @@ static int multiSelectOrderBy(
|
||||
*/
|
||||
sqlite3VdbeResolveLabel(v, labelEnd);
|
||||
|
||||
/* Reassembly the compound query so that it will be freed correctly
|
||||
/* Reassemble the compound query so that it will be freed correctly
|
||||
** by the calling function */
|
||||
if( pSplit->pPrior ){
|
||||
sqlite3SelectDelete(db, pSplit->pPrior);
|
||||
sqlite3ParserAddCleanup(pParse,
|
||||
(void(*)(sqlite3*,void*))sqlite3SelectDelete, pSplit->pPrior);
|
||||
}
|
||||
pSplit->pPrior = pPrior;
|
||||
pPrior->pNext = pSplit;
|
||||
@@ -4122,6 +4126,9 @@ static void renumberCursors(
|
||||
** (17d2) DISTINCT
|
||||
** (17e) the subquery may not contain window functions, and
|
||||
** (17f) the subquery must not be the RHS of a LEFT JOIN.
|
||||
** (17g) either the subquery is the first element of the outer
|
||||
** query or there are no RIGHT or FULL JOINs in any arm
|
||||
** of the subquery. (This is a duplicate of condition (27b).)
|
||||
**
|
||||
** The parent and sub-query may contain WHERE clauses. Subject to
|
||||
** rules (11), (13) and (14), they may also contain ORDER BY,
|
||||
@@ -4173,7 +4180,11 @@ static void renumberCursors(
|
||||
** See also (3) for restrictions on LEFT JOIN.
|
||||
**
|
||||
** (27) The subquery may not contain a FULL or RIGHT JOIN unless it
|
||||
** is the first element of the parent query.
|
||||
** is the first element of the parent query. This must be the
|
||||
** the case if:
|
||||
** (27a) the subquery is not compound query, and
|
||||
** (27b) the subquery is a compound query and the RIGHT JOIN occurs
|
||||
** in any arm of the compound query. (See also (17g).)
|
||||
**
|
||||
** (28) The subquery is not a MATERIALIZED CTE.
|
||||
**
|
||||
@@ -4303,7 +4314,7 @@ static int flattenSubquery(
|
||||
|
||||
assert( pSubSrc->nSrc>0 ); /* True by restriction (7) */
|
||||
if( iFrom>0 && (pSubSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){
|
||||
return 0; /* Restriction (27) */
|
||||
return 0; /* Restriction (27a) */
|
||||
}
|
||||
if( pSubitem->fg.isCte && pSubitem->u2.pCteUse->eM10d==M10d_Yes ){
|
||||
return 0; /* (28) */
|
||||
@@ -4323,7 +4334,7 @@ static int flattenSubquery(
|
||||
** NATURAL join or a join that as an ON or USING clause.
|
||||
**
|
||||
** These conditions are sufficient to keep an EP_OuterON from being
|
||||
** flattened into an EP_InnerON. Restrictions (3a) and (27) prevent
|
||||
** flattened into an EP_InnerON. Restrictions (3a) and (27a) prevent
|
||||
** an EP_InnerON from being flattened into an EP_OuterON.
|
||||
*/
|
||||
if( pSubSrc->nSrc>=2
|
||||
@@ -4365,6 +4376,12 @@ static int flattenSubquery(
|
||||
){
|
||||
return 0;
|
||||
}
|
||||
if( iFrom>0 && (pSub1->pSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){
|
||||
/* Without this restriction, the JT_LTORJ flag would end up being
|
||||
** omitted on left-hand tables of the right join that is being
|
||||
** flattened. */
|
||||
return 0; /* Restrictions (17g), (27b) */
|
||||
}
|
||||
testcase( pSub1->pSrc->nSrc>1 );
|
||||
}
|
||||
|
||||
@@ -5197,6 +5214,7 @@ static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
|
||||
|| p->pSrc->nSrc!=1
|
||||
|| p->pSrc->a[0].pSelect
|
||||
|| pAggInfo->nFunc!=1
|
||||
|| p->pHaving
|
||||
){
|
||||
return 0;
|
||||
}
|
||||
@@ -5898,7 +5916,7 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
zTabName = pTab->zName;
|
||||
}
|
||||
if( db->mallocFailed ) break;
|
||||
assert( pFrom->fg.isNestedFrom == IsNestedFrom(pFrom->pSelect) );
|
||||
assert( (int)pFrom->fg.isNestedFrom == IsNestedFrom(pFrom->pSelect) );
|
||||
if( pFrom->fg.isNestedFrom ){
|
||||
assert( pFrom->pSelect!=0 );
|
||||
pNestedFrom = pFrom->pSelect->pEList;
|
||||
@@ -6827,7 +6845,9 @@ int sqlite3Select(
|
||||
){
|
||||
SELECTTRACE(0x100,pParse,p,
|
||||
("omit superfluous ORDER BY on %r FROM-clause subquery\n",i+1));
|
||||
sqlite3ExprListDelete(db, pSub->pOrderBy);
|
||||
sqlite3ParserAddCleanup(pParse,
|
||||
(void(*)(sqlite3*,void*))sqlite3ExprListDelete,
|
||||
pSub->pOrderBy);
|
||||
pSub->pOrderBy = 0;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11990,7 +11990,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
|
||||
char **argv;
|
||||
#endif
|
||||
#ifdef SQLITE_DEBUG
|
||||
sqlite3_uint64 mem_main_enter = sqlite3_memory_used();
|
||||
sqlite3_int64 mem_main_enter = sqlite3_memory_used();
|
||||
#endif
|
||||
char *zErrMsg = 0;
|
||||
#ifdef SQLITE_SHELL_WASM_MODE
|
||||
|
||||
+1
-1
@@ -6282,7 +6282,7 @@ sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
||||
**
|
||||
** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
|
||||
** for the N-th database on database connection D, or a NULL pointer of N is
|
||||
** out of range. An N alue of 0 means the main database file. An N of 1 is
|
||||
** out of range. An N value of 0 means the main database file. An N of 1 is
|
||||
** the "temp" schema. Larger values of N correspond to various ATTACH-ed
|
||||
** databases.
|
||||
**
|
||||
|
||||
@@ -198,6 +198,11 @@
|
||||
*/
|
||||
#include "sqlite3.h"
|
||||
|
||||
/*
|
||||
** Reuse the STATIC_LRU for mutex access to sqlite3_temp_directory.
|
||||
*/
|
||||
#define SQLITE_MUTEX_STATIC_TEMPDIR SQLITE_MUTEX_STATIC_VFS1
|
||||
|
||||
/*
|
||||
** Include the configuration header output by 'configure' if we're using the
|
||||
** autoconf-based build
|
||||
@@ -4474,6 +4479,7 @@ char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
|
||||
void sqlite3TreeViewSelect(TreeView*, const Select*, u8);
|
||||
void sqlite3TreeViewWith(TreeView*, const With*, u8);
|
||||
void sqlite3TreeViewUpsert(TreeView*, const Upsert*, u8);
|
||||
#if TREETRACE_ENABLED
|
||||
void sqlite3TreeViewDelete(const With*, const SrcList*, const Expr*,
|
||||
const ExprList*,const Expr*, const Trigger*);
|
||||
void sqlite3TreeViewInsert(const With*, const SrcList*,
|
||||
@@ -4482,6 +4488,7 @@ char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
|
||||
void sqlite3TreeViewUpdate(const With*, const SrcList*, const ExprList*,
|
||||
const Expr*, int, const ExprList*, const Expr*,
|
||||
const Upsert*, const Trigger*);
|
||||
#endif
|
||||
#ifndef SQLITE_OMIT_TRIGGER
|
||||
void sqlite3TreeViewTriggerStep(TreeView*, const TriggerStep*, u8, u8);
|
||||
void sqlite3TreeViewTrigger(TreeView*, const Trigger*, u8, u8);
|
||||
|
||||
@@ -614,6 +614,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql){
|
||||
mxSqlLen -= n;
|
||||
if( mxSqlLen<0 ){
|
||||
pParse->rc = SQLITE_TOOBIG;
|
||||
pParse->nErr++;
|
||||
break;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
|
||||
+9
-3
@@ -100,8 +100,8 @@ void sqlite3TreeViewColumnList(
|
||||
sqlite3TreeViewLine(pView, "COLUMNS");
|
||||
for(i=0; i<nCol; i++){
|
||||
u16 flg = aCol[i].colFlags;
|
||||
int moreToFollow = i<(nCol - 1);
|
||||
sqlite3TreeViewPush(&pView, moreToFollow);
|
||||
int colMoreToFollow = i<(nCol - 1);
|
||||
sqlite3TreeViewPush(&pView, colMoreToFollow);
|
||||
sqlite3TreeViewLine(pView, 0);
|
||||
printf(" %s", aCol[i].zCnName);
|
||||
switch( aCol[i].eCType ){
|
||||
@@ -232,7 +232,7 @@ void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){
|
||||
Table *pTab = pItem->pTab;
|
||||
sqlite3TreeViewColumnList(pView, pTab->aCol, pTab->nCol, 1);
|
||||
}
|
||||
assert( pItem->fg.isNestedFrom == IsNestedFrom(pItem->pSelect) );
|
||||
assert( (int)pItem->fg.isNestedFrom == IsNestedFrom(pItem->pSelect) );
|
||||
sqlite3TreeViewSelect(pView, pItem->pSelect, (--n)>0);
|
||||
}
|
||||
if( pItem->fg.isTabFunc ){
|
||||
@@ -999,6 +999,7 @@ void sqlite3TreeViewUpsert(
|
||||
sqlite3TreeViewPop(&pView);
|
||||
}
|
||||
|
||||
#if TREETRACE_ENABLED
|
||||
/*
|
||||
** Generate a human-readable diagram of the data structure that go
|
||||
** into generating an DELETE statement.
|
||||
@@ -1052,7 +1053,9 @@ void sqlite3TreeViewDelete(
|
||||
}
|
||||
sqlite3TreeViewPop(&pView);
|
||||
}
|
||||
#endif /* TREETRACE_ENABLED */
|
||||
|
||||
#if TREETRACE_ENABLED
|
||||
/*
|
||||
** Generate a human-readable diagram of the data structure that go
|
||||
** into generating an INSERT statement.
|
||||
@@ -1120,7 +1123,9 @@ void sqlite3TreeViewInsert(
|
||||
}
|
||||
sqlite3TreeViewPop(&pView);
|
||||
}
|
||||
#endif /* TREETRACE_ENABLED */
|
||||
|
||||
#if TREETRACE_ENABLED
|
||||
/*
|
||||
** Generate a human-readable diagram of the data structure that go
|
||||
** into generating an UPDATE statement.
|
||||
@@ -1196,6 +1201,7 @@ void sqlite3TreeViewUpdate(
|
||||
}
|
||||
sqlite3TreeViewPop(&pView);
|
||||
}
|
||||
#endif /* TREETRACE_ENABLED */
|
||||
|
||||
#ifndef SQLITE_OMIT_TRIGGER
|
||||
/*
|
||||
|
||||
@@ -351,6 +351,23 @@ void sqlite3FinishTrigger(
|
||||
Vdbe *v;
|
||||
char *z;
|
||||
|
||||
/* If this is a new CREATE TABLE statement, and if shadow tables
|
||||
** are read-only, and the trigger makes a change to a shadow table,
|
||||
** then raise an error - do not allow the trigger to be created. */
|
||||
if( sqlite3ReadOnlyShadowTables(db) ){
|
||||
TriggerStep *pStep;
|
||||
for(pStep=pTrig->step_list; pStep; pStep=pStep->pNext){
|
||||
if( pStep->zTarget!=0
|
||||
&& sqlite3ShadowTableName(db, pStep->zTarget)
|
||||
){
|
||||
sqlite3ErrorMsg(pParse,
|
||||
"trigger \"%s\" may not write to shadow table \"%s\"",
|
||||
pTrig->zName, pStep->zTarget);
|
||||
goto triggerfinish_cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Make an entry in the sqlite_schema table */
|
||||
v = sqlite3GetVdbe(pParse);
|
||||
if( v==0 ) goto triggerfinish_cleanup;
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
|
||||
va_list ap;
|
||||
sqlite3 *db = pParse->db;
|
||||
assert( db!=0 );
|
||||
assert( db->pParse==pParse );
|
||||
assert( db->pParse==pParse || db->pParse->pToplevel==pParse );
|
||||
db->errByteOffset = -2;
|
||||
va_start(ap, zFormat);
|
||||
zMsg = sqlite3VMPrintf(db, zFormat, ap);
|
||||
|
||||
@@ -381,6 +381,7 @@ int sqlite3VdbeAddFunctionCall(
|
||||
addr = sqlite3VdbeAddOp4(v, eCallCtx ? OP_PureFunc : OP_Function,
|
||||
p1, p2, p3, (char*)pCtx, P4_FUNCCTX);
|
||||
sqlite3VdbeChangeP5(v, eCallCtx & NC_SelfRef);
|
||||
sqlite3MayAbort(pParse);
|
||||
return addr;
|
||||
}
|
||||
|
||||
@@ -716,6 +717,7 @@ int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
|
||||
|| opcode==OP_VDestroy
|
||||
|| opcode==OP_VCreate
|
||||
|| opcode==OP_ParseSchema
|
||||
|| opcode==OP_Function || opcode==OP_PureFunc
|
||||
|| ((opcode==OP_Halt || opcode==OP_HaltIfNull)
|
||||
&& ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))
|
||||
){
|
||||
|
||||
+10
-8
@@ -1433,7 +1433,7 @@ static int whereKeyStats(
|
||||
#endif
|
||||
assert( pRec!=0 );
|
||||
assert( pIdx->nSample>0 );
|
||||
assert( pRec->nField>0 && pRec->nField<=pIdx->nSampleCol );
|
||||
assert( pRec->nField>0 );
|
||||
|
||||
/* Do a binary search to find the first sample greater than or equal
|
||||
** to pRec. If pRec contains a single field, the set of samples to search
|
||||
@@ -1479,7 +1479,7 @@ static int whereKeyStats(
|
||||
** it is extended to two fields. The duplicates that this creates do not
|
||||
** cause any problems.
|
||||
*/
|
||||
nField = pRec->nField;
|
||||
nField = MIN(pRec->nField, pIdx->nSample);
|
||||
iCol = 0;
|
||||
iSample = pIdx->nSample * nField;
|
||||
do{
|
||||
@@ -4168,6 +4168,7 @@ static int whereLoopAddAll(WhereLoopBuilder *pBuilder){
|
||||
sqlite3 *db = pWInfo->pParse->db;
|
||||
int rc = SQLITE_OK;
|
||||
int bFirstPastRJ = 0;
|
||||
int hasRightJoin = 0;
|
||||
WhereLoop *pNew;
|
||||
|
||||
|
||||
@@ -4188,15 +4189,16 @@ static int whereLoopAddAll(WhereLoopBuilder *pBuilder){
|
||||
** prevents the right operand of a RIGHT JOIN from being swapped with
|
||||
** other elements even further to the right.
|
||||
**
|
||||
** The JT_LTORJ term prevents any FROM-clause term reordering for terms
|
||||
** to the left of a RIGHT JOIN. This is conservative. Relaxing this
|
||||
** constraint somewhat to prevent terms from crossing from the right
|
||||
** side of a LEFT JOIN over to the left side when they are on the
|
||||
** left side of a RIGHT JOIN would be sufficient for all known failure
|
||||
** cases. FIX ME: Implement this optimization.
|
||||
** The JT_LTORJ case and the hasRightJoin flag work together to
|
||||
** prevent FROM-clause terms from moving from the right side of
|
||||
** a LEFT JOIN over to the left side of that join if the LEFT JOIN
|
||||
** is itself on the left side of a RIGHT JOIN.
|
||||
*/
|
||||
if( pItem->fg.jointype & JT_LTORJ ) hasRightJoin = 1;
|
||||
mPrereq |= mPrior;
|
||||
bFirstPastRJ = (pItem->fg.jointype & JT_RIGHT)!=0;
|
||||
}else if( !hasRightJoin ){
|
||||
mPrereq = 0;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
if( IsVirtual(pItem->pTab) ){
|
||||
|
||||
+2
-1
@@ -622,7 +622,8 @@ static int codeEqualityTerm(
|
||||
}
|
||||
sqlite3ExprDelete(db, pX);
|
||||
}else{
|
||||
aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
|
||||
int n = sqlite3ExprVectorSize(pX->pLeft);
|
||||
aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
|
||||
eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
|
||||
}
|
||||
pX = pExpr;
|
||||
|
||||
@@ -7033,6 +7033,8 @@ set sqlite_fts3_enable_parentheses $saved
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
set saved $sqlite_fts3_enable_parentheses
|
||||
set sqlite_fts3_enable_parentheses 1
|
||||
reset_db
|
||||
do_test 52.0 {
|
||||
sqlite3 db {}
|
||||
@@ -7228,5 +7230,438 @@ do_catchsql_test 52.1 {
|
||||
SELECT * FROM t1, t2;
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_test 53.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
.open --hexdb
|
||||
| size 8192 pagesize 1024 filename crash-7bc.txt.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 04 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
|
||||
| 32: 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 04 ................
|
||||
| 48: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ................
|
||||
| 96: 00 00 00 00 0d 02 f3 00 07 01 51 00 03 c8 03 63 ..........Q....c
|
||||
| 112: 02 fb 02 0a 02 c0 01 a8 01 51 00 00 00 00 00 00 .........Q......
|
||||
| 336: 00 55 07 07 17 1b 1b 01 81 01 74 61 62 6c 65 74 .U........tablet
|
||||
| 352: 31 5f 73 74 61 74 74 31 5f 73 74 61 74 07 43 52 1_statt1_stat.CR
|
||||
| 368: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
|
||||
| 384: 74 61 74 27 28 69 64 20 49 4e 54 45 47 45 52 20 tat'(id INTEGER
|
||||
| 400: 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 61 6c PRIMARY KEY, val
|
||||
| 416: 75 65 20 42 4c 4f 42 29 60 06 07 17 21 21 01 81 ue BLOB)`...!!..
|
||||
| 432: 0b 74 61 62 6c 65 74 31 5f 64 6f 63 73 69 7a 65 .tablet1_docsize
|
||||
| 448: 74 31 5f 64 6f 63 73 69 7a 65 06 43 52 45 41 54 t1_docsize.CREAT
|
||||
| 464: 45 20 54 41 42 4c 45 20 27 74 31 5f 64 6f 63 73 E TABLE 't1_docs
|
||||
| 480: 69 7a 65 27 28 64 6f 63 69 64 20 49 4e 54 45 47 ize'(docid INTEG
|
||||
| 496: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
|
||||
| 512: 73 69 7a 65 20 42 4c 4f 42 29 81 33 04 07 17 1f size BLOB).3....
|
||||
| 528: 1f 01 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 ...5tablet1_segd
|
||||
| 544: 69 72 74 31 5f 73 65 67 64 69 72 04 43 52 45 41 irt1_segdir.CREA
|
||||
| 560: 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 TE TABLE 't1_seg
|
||||
| 576: 64 69 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 dir'(level INTEG
|
||||
| 592: 45 52 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 ER,idx INTEGER,s
|
||||
| 608: 74 61 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 tart_block INTEG
|
||||
| 624: 45 52 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c ER,leaves_end_bl
|
||||
| 640: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f ock INTEGER,end_
|
||||
| 656: 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f block INTEGER,ro
|
||||
| 672: 6f 74 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 ot BLOB,PRIMARY
|
||||
| 688: 4b 45 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 KEY(level, idx))
|
||||
| 704: 31 05 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 1...E...indexsql
|
||||
| 720: 69 74 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 ite_autoindex_t1
|
||||
| 736: 5f 73 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 _segdir_1t1_segd
|
||||
| 752: 69 72 05 00 00 00 08 00 00 00 00 66 03 07 17 23 ir.........f...#
|
||||
| 768: 23 01 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d #...tablet1_segm
|
||||
| 784: 65 6e 74 73 74 31 5f 73 65 67 6d 65 6e 74 73 03 entst1_segments.
|
||||
| 800: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
|
||||
| 816: 5f 73 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b _segments'(block
|
||||
| 832: 69 64 20 49 4e 53 45 47 45 52 20 50 52 49 4d 41 id INSEGER PRIMA
|
||||
| 848: 52 59 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c RY KEY, block BL
|
||||
| 864: 4f 42 29 63 02 07 17 21 21 01 81 11 74 61 62 6c OB)c...!!...tabl
|
||||
| 880: 65 74 31 5f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f et1_contentt1_co
|
||||
| 896: 6e 74 65 6e 74 02 43 52 45 41 54 45 20 54 41 42 ntent.CREATE TAB
|
||||
| 912: 4c 45 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 LE 't1_content'(
|
||||
| 928: 64 6f 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 docid INTEGER PR
|
||||
| 944: 49 4d 41 52 59 20 4b 45 59 2c 20 27 63 30 30 27 IMARY KEY, 'c00'
|
||||
| 960: 2c 20 27 63 31 62 27 29 36 01 06 17 11 11 08 5b , 'c1b')6......[
|
||||
| 976: 74 61 62 6c 65 74 31 74 31 43 52 45 41 54 45 20 tablet1t1CREATE
|
||||
| 992: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 74 31 VIRTUAL TABLE t1
|
||||
| 1008: 20 55 53 49 4e 47 20 66 74 73 34 28 30 2c 62 29 USING fts4(0,b)
|
||||
| page 2 offset 1024
|
||||
| 0: 0d 00 00 00 03 00 0f 00 00 23 00 16 00 0f 00 05 .........#......
|
||||
| 16: 03 04 00 08 0f 61 0b 02 04 00 08 1b 41 54 45 20 .....a......ATE
|
||||
| 32: 32 3a 50 87 5a 01 05 00 08 8f 37 66 30 30 30 30 2:P.Z.....7f0000
|
||||
| 48: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 64: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 80: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 96: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 112: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 128: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 144: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 160: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 176: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 192: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 208: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 224: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 240: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 256: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 272: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 288: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 304: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 320: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 336: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 352: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 368: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 384: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 400: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 416: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 432: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 448: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 464: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 480: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 496: 30 40 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0@00000000000000
|
||||
| 512: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 528: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 544: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 560: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 576: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 592: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 608: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 624: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 640: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 656: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 672: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 688: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 704: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 720: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 736: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 752: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 768: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 784: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 800: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 816: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 832: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 848: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 864: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 880: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 896: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 912: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 928: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 944: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 960: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 976: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 992: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 1008: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| page 3 offset 2048
|
||||
| 0: 0d 00 00 00 02 03 86 00 03 f4 03 86 00 00 00 00 ................
|
||||
| 896: 00 00 00 00 00 00 87 62 02 04 00 8f 48 00 d5 07 .......b....H...
|
||||
| 912: 66 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 f000000000000000
|
||||
| 928: 30 30 30 30 3a 30 30 30 30 30 30 30 30 30 30 30 0000:00000000000
|
||||
| 944: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 960: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 976: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 992: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 1008: 00 00 00 08 0a 01 03 00 1a 00 01 30 03 01 02 00 ...........0....
|
||||
| page 4 offset 3072
|
||||
| 0: 0d 00 00 00 03 03 9e 00 03 ed 03 bc 03 9e 00 00 ................
|
||||
| 912: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 03 ................
|
||||
| 928: 07 08 01 08 08 15 2c 02 30 20 31 36 00 01 30 03 ......,.0 16..0.
|
||||
| 944: 03 02 00 00 01 61 05 03 01 01 02 00 2f 02 07 08 .....a....../...
|
||||
| 960: 09 08 08 15 54 30 20 33 36 00 01 30 03 02 02 00 ....T0 36..0....
|
||||
| 976: 00 01 32 05 02 01 01 03 00 00 03 61 74 65 05 02 ..2........ate..
|
||||
| 992: 01 01 02 00 00 01 70 05 02 01 01 04 00 11 01 07 ......p.........
|
||||
| 1008: 08 08 09 01 17 14 02 32 20 39 39 37 01 01 01 66 .......2 997...f
|
||||
| page 5 offset 4096
|
||||
| 0: 0a 00 00 00 03 03 ee 00 03 fb 03 f5 03 ee 00 00 ................
|
||||
| 992: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 04 ................
|
||||
| 1008: 08 01 01 02 03 05 04 08 09 01 02 04 04 08 08 09 ................
|
||||
| page 6 offset 5120
|
||||
| 0: 0d 00 00 00 03 03 eb 00 00 00 00 00 00 00 00 00 ................
|
||||
| 992: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
|
||||
| 1008: 01 01 05 02 03 00 10 01 03 05 01 03 00 10 01 01 ................
|
||||
| page 7 offset 6144
|
||||
| 0: 0d 00 00 00 01 03 f6 00 03 f6 00 00 00 00 00 00 ................
|
||||
| 1008: 00 00 00 00 00 00 08 00 03 00 16 03 08 c5 e0 07 ................
|
||||
| page 8 offset 7168
|
||||
| 0: 00 00 00 00 30 30 30 30 30 30 30 30 30 30 30 30 ....000000000000
|
||||
| 16: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 32: 30 30 30 30 30 30 30 30 30 30 30 30 30 bc 30 30 0000000000000.00
|
||||
| 48: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 64: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 80: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 96: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 112: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 128: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 144: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 160: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 176: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 192: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 c0 30 00000000000000.0
|
||||
| 208: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 224: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 240: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 256: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 272: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 288: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 304: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 320: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 336: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 352: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 368: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 384: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 400: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 416: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 432: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 448: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 464: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 480: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 496: 30 30 30 30 30 30 30 30 30 30 30 40 30 30 30 30 00000000000@0000
|
||||
| 512: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 528: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 544: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 560: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 576: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 592: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 608: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 624: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 640: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 656: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 672: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 688: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 704: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 720: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 736: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 752: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 768: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 784: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 800: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 816: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 832: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 848: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 864: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 880: 30 30 30 30 30 30 30 30 30 05 01 00 00 00 00 00 000000000.......
|
||||
| end crash-7bc.txt.db
|
||||
}]} {}
|
||||
|
||||
do_execsql_test 53.1 {
|
||||
SELECT*FROM t1 WHERE t1 MATCH'ATE"0"OR"2D:P"""ATE"0"OR"2:P"""';
|
||||
} {0 {ATE 2:P}}
|
||||
set sqlite_fts3_enable_parentheses $saved
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_test 54.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
.open --hexdb
|
||||
| size 8192 pagesize 1024 filename crash-365.txt.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 04 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
|
||||
| 32: 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 04 ................
|
||||
| 96: 00 00 00 00 0d 02 f3 00 07 01 51 00 03 c8 03 63 ..........Q....c
|
||||
| 112: 02 fb 02 0a 02 c0 01 a8 01 51 00 00 00 00 00 00 .........Q......
|
||||
| 336: 00 55 07 07 17 1b 1b 01 81 01 74 61 62 6c 65 74 .U........tablet
|
||||
| 352: 31 5f 73 74 61 74 74 31 5f 73 74 61 74 07 43 52 1_statt1_stat.CR
|
||||
| 368: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
|
||||
| 384: 74 61 74 27 28 69 64 20 49 4e 54 45 47 45 52 20 tat'(id INTEGER
|
||||
| 400: 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 61 6c PRIMARY KEY, val
|
||||
| 416: 75 65 20 42 4c 4f 42 29 60 06 07 17 21 21 01 81 ue BLOB)`...!!..
|
||||
| 432: 0b 74 61 62 6c 65 74 31 5f 64 6f 63 73 69 7a 65 .tablet1_docsize
|
||||
| 448: 74 31 5f 64 6f 63 73 69 7a 65 06 43 52 45 41 54 t1_docsize.CREAT
|
||||
| 464: 45 20 54 41 42 4c 45 20 27 74 31 5f 64 6f 63 73 E TABLE 't1_docs
|
||||
| 480: 69 7a 65 27 28 64 6f 63 69 64 20 49 4e 54 45 47 ize'(docid INTEG
|
||||
| 496: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
|
||||
| 512: 73 69 7a 65 20 42 4c 4f 42 29 81 33 04 07 17 1f size BLOB).3....
|
||||
| 528: 1f 01 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 ...5tablet1_segd
|
||||
| 544: 69 72 74 31 5f 73 65 67 64 69 72 04 43 52 45 41 irt1_segdir.CREA
|
||||
| 560: 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 TE TABLE 't1_seg
|
||||
| 576: 64 69 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 dir'(level INTEG
|
||||
| 592: 45 52 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 ER,idx INTEGER,s
|
||||
| 608: 74 61 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 tart_block INTEG
|
||||
| 624: 45 52 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c ER,leaves_end_bl
|
||||
| 640: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f ock INTEGER,end_
|
||||
| 656: 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f block INTEGER,ro
|
||||
| 672: 6f 74 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 ot BLOB,PRIMARY
|
||||
| 688: 4b 45 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 KEY(level, idx))
|
||||
| 704: 31 05 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 1...E...indexsql
|
||||
| 720: 69 74 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 ite_autoindex_t1
|
||||
| 736: 5f 73 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 _segdir_1t1_segd
|
||||
| 752: 69 72 05 00 00 00 08 00 00 00 00 66 03 07 17 23 ir.........f...#
|
||||
| 768: 23 01 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d #...tablet1_segm
|
||||
| 784: 65 6e 74 73 74 31 5f 73 65 67 6d 65 6e 74 73 03 entst1_segments.
|
||||
| 800: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
|
||||
| 816: 5f 73 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b _segments'(block
|
||||
| 832: 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 id INTEGER PRIMA
|
||||
| 848: 52 59 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c RY KEY, block BL
|
||||
| 864: 4f 42 29 63 02 07 17 21 21 01 81 11 74 61 62 6c OB)c...!!...tabl
|
||||
| 880: 65 74 31 5f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f et1_contentt1_co
|
||||
| 896: 6e 74 65 6e 74 02 43 52 45 41 54 45 20 54 41 42 ntent.CREATE TAB
|
||||
| 912: 4c 45 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 LE 't1_content'(
|
||||
| 928: 64 6f 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 docid INTEGER PR
|
||||
| 944: 49 4d 41 52 59 20 4b 45 59 2c 20 27 63 30 30 27 IMARY KEY, 'c00'
|
||||
| 960: 2c 20 27 63 31 62 27 29 36 01 06 17 11 11 08 5b , 'c1b')6......[
|
||||
| 976: 74 61 62 6c 65 74 31 74 31 43 52 45 41 54 45 20 tablet1t1CREATE
|
||||
| 992: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 74 31 VIRTUAL TABLE t1
|
||||
| 1008: 20 55 53 49 4e 47 20 66 74 73 34 28 30 2c 62 29 USING fts4(0,b)
|
||||
| page 2 offset 1024
|
||||
| 0: 0d 00 00 00 03 00 0f 00 00 23 00 16 00 0f 00 05 .........#......
|
||||
| 16: 03 04 00 08 0f 61 0b 02 04 00 08 1b 41 54 45 20 .....a......ATE
|
||||
| 32: 32 3a 50 87 5a 01 05 00 08 8f 37 66 30 30 30 30 2:P.Z.....7f0000
|
||||
| 48: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 64: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 80: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 96: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 112: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 128: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 144: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 160: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 176: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 192: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 208: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 224: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 240: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 256: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 272: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 288: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 304: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 320: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 336: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 352: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 368: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 384: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 400: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 416: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 432: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 448: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 464: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 480: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 496: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 512: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 528: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 544: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 560: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 576: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 592: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 608: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 624: 30 30 30 30 30 30 30 30 30 30 1b 30 30 30 30 30 0000000000.00000
|
||||
| 640: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 656: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 672: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 688: 30 30 30 30 30 30 30 30 2f 30 30 30 30 30 30 30 00000000/0000000
|
||||
| 704: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 720: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 736: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 752: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 768: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 784: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 800: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 816: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 832: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 848: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 864: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 880: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 896: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 912: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 928: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 944: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 960: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 976: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 992: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 1008: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| page 3 offset 2048
|
||||
| 0: 0d 00 00 00 02 03 86 00 03 f4 03 86 00 00 00 00 ................
|
||||
| 896: 00 00 00 00 00 00 87 62 02 04 00 8f 48 00 d5 07 .......b....H...
|
||||
| 912: 66 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 f000000000000000
|
||||
| 928: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 944: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 960: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 976: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 992: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 1008: 00 00 00 08 0a 01 03 00 1a 00 01 30 03 01 02 00 ...........0....
|
||||
| page 4 offset 3072
|
||||
| 0: 0d 00 00 00 03 03 9e 00 03 ed 03 bc 03 9e 00 01 ................
|
||||
| 912: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 03 ................
|
||||
| 928: 07 08 01 08 08 15 2c 02 30 20 31 36 00 01 30 03 ......,.0 16..0.
|
||||
| 944: 03 02 00 00 01 61 05 03 01 01 02 00 2f 02 07 08 .....a....../...
|
||||
| 960: 09 08 08 15 54 30 20 33 36 00 01 30 03 02 02 00 ....T0 36..0....
|
||||
| 976: 00 01 32 05 02 01 01 03 00 00 03 61 74 65 05 02 ..2........ate..
|
||||
| 992: 01 01 02 00 00 01 70 05 02 01 01 04 00 11 01 07 ......p.........
|
||||
| 1008: 08 08 09 01 17 14 02 32 20 39 39 37 01 01 01 66 .......2 997...f
|
||||
| page 5 offset 4096
|
||||
| 0: 0a 00 00 00 03 03 ee 00 03 fb 03 f5 03 ee 00 00 ................
|
||||
| 992: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 04 ................
|
||||
| 1008: 08 01 01 02 03 05 04 08 09 01 02 04 04 08 08 09 ................
|
||||
| page 6 offset 5120
|
||||
| 0: 0d 00 00 00 03 03 eb 00 03 f9 03 f2 00 00 00 00 ................
|
||||
| 992: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
|
||||
| 1008: 01 01 05 02 03 00 10 01 03 05 01 03 00 10 01 01 ................
|
||||
| page 7 offset 6144
|
||||
| 0: 0d 00 00 00 01 03 f6 00 03 f6 00 00 00 00 00 00 ................
|
||||
| 1008: 00 00 00 00 00 00 08 00 03 00 16 03 03 05 e0 07 ................
|
||||
| page 8 offset 7168
|
||||
| 0: 00 00 00 00 30 30 30 30 30 30 30 30 30 30 30 30 ....000000000000
|
||||
| 16: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 32: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 48: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 64: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 80: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 96: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 112: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 128: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 144: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 160: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 176: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 192: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 208: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 224: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 240: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 256: 30 30 30 30 30 2f 30 30 30 30 30 30 30 30 30 30 00000/0000000000
|
||||
| 272: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 288: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 304: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 320: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 336: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 352: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 368: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 384: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 400: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 416: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 432: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 448: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 464: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 480: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 496: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 512: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 528: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 544: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 560: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 576: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 592: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 608: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 624: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 640: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 656: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 672: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 688: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 704: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 720: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 736: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 752: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 768: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 784: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 800: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 816: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 832: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 848: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 864: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
|
||||
| 880: 30 30 30 30 30 30 30 30 30 05 01 01 01 02 00 00 000000000.......
|
||||
| end crash-365.txt.db
|
||||
}]} {}
|
||||
|
||||
do_execsql_test 54.1 {
|
||||
SELECT rowid, quote(matchinfo(t1,'pcxybspcxybs')) FROM t1 WHERE t1 MATCH'ATE"0"OR"2:P"""';
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
+6
-2
@@ -18,6 +18,10 @@ set ::testprefix fts3fault
|
||||
# If SQLITE_ENABLE_FTS3 is not defined, omit this file.
|
||||
ifcapable !fts3 { finish_test ; return }
|
||||
|
||||
set ::TMPDBERROR [list 1 \
|
||||
{unable to open a temporary database file for storing temporary tables}
|
||||
]
|
||||
|
||||
# Test error handling in the sqlite3Fts3Init() function. This is the
|
||||
# function that registers the FTS3 module and various support functions
|
||||
# with SQLite.
|
||||
@@ -49,7 +53,7 @@ do_faultsim_test 2 -prep {
|
||||
} -body {
|
||||
execsql { ALTER TABLE t1 RENAME TO t2 }
|
||||
} -test {
|
||||
faultsim_test_result {0 {}}
|
||||
faultsim_test_result {0 {}} $::TMPDBERROR
|
||||
}
|
||||
|
||||
# Test error handling in the special case where a single prefix query
|
||||
@@ -194,7 +198,7 @@ do_faultsim_test 8.2 -faults oom-t* -prep {
|
||||
} -body {
|
||||
execsql { SELECT mit(matchinfo(t8, 's')) FROM t8 WHERE t8 MATCH 'a b c' }
|
||||
} -test {
|
||||
faultsim_test_result {0 3}
|
||||
faultsim_test_result {0 3} $::TMPDBERROR
|
||||
}
|
||||
do_faultsim_test 8.3 -prep {
|
||||
faultsim_restore_and_reopen
|
||||
|
||||
@@ -215,12 +215,15 @@ do_faultsim_test 8.1 -faults oom* -prep {
|
||||
faultsim_test_result {0 {}}
|
||||
}
|
||||
|
||||
set ::TMPDBERROR [list 1 \
|
||||
{unable to open a temporary database file for storing temporary tables}
|
||||
]
|
||||
do_faultsim_test 8.2 -faults oom* -prep {
|
||||
faultsim_restore_and_reopen
|
||||
} -body {
|
||||
execsql { ALTER TABLE t8 RENAME TO t8ii }
|
||||
} -test {
|
||||
faultsim_test_result {0 {}}
|
||||
faultsim_test_result {0 {}} $::TMPDBERROR
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -786,4 +786,19 @@ do_execsql_test join8-25020 {
|
||||
SELECT 1 FROM t1 LEFT JOIN t2 ON true JOIN t3 ON (b2 IN (a1)) FULL JOIN t4 ON true;
|
||||
} {1}
|
||||
|
||||
# 2022-07-13
|
||||
# forum/forumpost/174afeae57
|
||||
#
|
||||
reset_db
|
||||
db null -
|
||||
do_execsql_test join8-26000 {
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(b INT, c INT);
|
||||
CREATE VIEW t3(d) AS SELECT NULL FROM t2 FULL OUTER JOIN t1 ON c=a UNION ALL SELECT b FROM t2;
|
||||
INSERT INTO t1(a) VALUES (NULL);
|
||||
INSERT INTO t2(b, c) VALUES (99, NULL);
|
||||
SELECT DISTINCT b, c, d FROM t2, t3 WHERE b<>0
|
||||
UNION SELECT DISTINCT b, c, d FROM t2, t3 WHERE b ISNULL;
|
||||
} {99 - - 99 - 99}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -867,4 +867,22 @@ do_catchsql_test json-18.5 {
|
||||
SELECT json_extract('{"":8}', '$.');
|
||||
} {1 {JSON path error near ''}}
|
||||
|
||||
# 2022-08-29 https://sqlite.org/forum/forumpost/9b9e4716c0d7bbd1
|
||||
# This is not a problem specifically with JSON functions. It is
|
||||
# a problem with transaction control. But the json() function makes
|
||||
# the problem more easily accessible, so it is tested here.
|
||||
#
|
||||
do_execsql_test json-19.1 {
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(x);
|
||||
} {}
|
||||
do_catchsql_test json-19.2 {
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(0), (json('not-valid-json'));
|
||||
} {1 {malformed JSON}}
|
||||
do_execsql_test json-19.3 {
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
} {}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -664,6 +664,7 @@ proc do_write_test {name tbl sql} {
|
||||
|
||||
if {$::DO_MALLOC_TEST } {
|
||||
set answers [list {1 {out of memory}} {0 {}}]
|
||||
lappend answers [list 1 {unable to open a temporary database file for storing temporary tables}]
|
||||
if {$::DO_MALLOC_TEST==1} {
|
||||
set modes {100000 persistent}
|
||||
} else {
|
||||
|
||||
@@ -141,3 +141,5 @@ do_eqp_test 111 {
|
||||
`--RIGHT
|
||||
`--SCAN generate_series VIRTUAL TABLE INDEX 23:
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
+42
-1
@@ -156,6 +156,47 @@ do_execsql_test offset1-1.4.9 {
|
||||
LIMIT 9 OFFSET 1;
|
||||
} {2 b 3 c 4 d 5 e 6 w 7 x 8 y 9 z}
|
||||
|
||||
|
||||
# 2022-08-04
|
||||
# https://sqlite.org/forum/forumpost/6b5e9188f0657616
|
||||
#
|
||||
do_execsql_test offset1-2.0 {
|
||||
CREATE TABLE employees (
|
||||
id integer primary key,
|
||||
name text,
|
||||
city text,
|
||||
department text,
|
||||
salary integer
|
||||
);
|
||||
INSERT INTO employees VALUES
|
||||
(11,'Diane','London','hr',70),
|
||||
(12,'Bob','London','hr',78),
|
||||
(21,'Emma','London','it',84),
|
||||
(22,'Grace','Berlin','it',90),
|
||||
(23,'Henry','London','it',104),
|
||||
(24,'Irene','Berlin','it',104),
|
||||
(25,'Frank','Berlin','it',120),
|
||||
(31,'Cindy','Berlin','sales',96),
|
||||
(32,'Dave','London','sales',96),
|
||||
(33,'Alice','Berlin','sales',100);
|
||||
CREATE VIEW v AS
|
||||
SELECT * FROM (
|
||||
SELECT * FROM employees
|
||||
WHERE salary < 100
|
||||
ORDER BY salary desc)
|
||||
UNION ALL
|
||||
SELECT * FROM (
|
||||
SELECT * FROM employees
|
||||
WHERE salary >= 100
|
||||
ORDER BY salary asc);
|
||||
} {}
|
||||
do_execsql_test offset1-2.1 {
|
||||
SELECT * FROM v LIMIT 5 OFFSET 2;
|
||||
} {
|
||||
22 Grace Berlin it 90
|
||||
21 Emma London it 84
|
||||
12 Bob London hr 78
|
||||
11 Diane London hr 70
|
||||
33 Alice Berlin sales 100
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -239,4 +239,26 @@ do_execsql_test regexp1-2.22 {
|
||||
SELECT 'abc$¢€xyz' REGEXP '^abc[^\u0025-X][^ -\u007f][^\u20ab]xyz$'
|
||||
} {1}
|
||||
|
||||
# 2022-07-03
|
||||
# https://sqlite.org/forum/forumpost/96692f8ba5
|
||||
# The REGEXP extension mishandles the prefix search optimization when
|
||||
# the prefix contains 3-byte UTF8 characters.
|
||||
#
|
||||
reset_db
|
||||
load_static_extension db regexp
|
||||
do_execsql_test regexp1-3.1 {
|
||||
CREATE TABLE t1(id INTEGER PRIMARY KEY, a TEXT);
|
||||
INSERT INTO t1(id, a) VALUES(1, '日本語');
|
||||
SELECT a, hex(a), length(a) FROM t1;
|
||||
} {日本語 E697A5E69CACE8AA9E 3}
|
||||
do_execsql_test regexp1-3.2 {
|
||||
SELECT * FROM t1 WHERE a='日本語';
|
||||
} {1 日本語}
|
||||
do_execsql_test regexp1-3.3 {
|
||||
SELECT * FROM t1 WHERE a LIKE '日本語';
|
||||
} {1 日本語}
|
||||
do_execsql_test regexp1-3.4 {
|
||||
SELECT * FROM t1 wHERE a REGEXP '日本語';
|
||||
} {1 日本語}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -751,4 +751,35 @@ do_execsql_test 32.1 {
|
||||
WHERE a=1234 OR a<=567;
|
||||
} {500 502}
|
||||
|
||||
# 2022-07-15
|
||||
# https://sqlite.org/forum/forumpost/3607259d3c
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 33.1 {
|
||||
CREATE TABLE t1(a INT, b INT PRIMARY KEY) WITHOUT ROWID;
|
||||
INSERT INTO t1(a, b) VALUES (0, 1),(15,-7),(3,100);
|
||||
ANALYZE;
|
||||
} {}
|
||||
do_execsql_test 33.2 {
|
||||
SELECT * FROM t1 WHERE (b,a) BETWEEN (0,5) AND (99,-2);
|
||||
} {0 1}
|
||||
do_execsql_test 33.3 {
|
||||
SELECT * FROM t1 WHERE (b,a) BETWEEN (-8,5) AND (0,-2);
|
||||
} {15 -7}
|
||||
do_execsql_test 33.3 {
|
||||
SELECT * FROM t1 WHERE (b,a) BETWEEN (3,5) AND (100,4);
|
||||
} {3 100}
|
||||
do_execsql_test 33.3 {
|
||||
SELECT * FROM t1 WHERE (b,a) BETWEEN (3,5) AND (100,2);
|
||||
} {}
|
||||
do_execsql_test 33.3 {
|
||||
SELECT * FROM t1 WHERE (a,b) BETWEEN (-2,99) AND (1,0);
|
||||
} {0 1}
|
||||
do_execsql_test 33.3 {
|
||||
SELECT * FROM t1 WHERE (a,b) BETWEEN (14,99) AND (16,0);
|
||||
} {15 -7}
|
||||
do_execsql_test 33.3 {
|
||||
SELECT * FROM t1 WHERE (a,b) BETWEEN (2,99) AND (4,0);
|
||||
} {3 100}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -118,10 +118,18 @@ do_test select3-2.14 {
|
||||
} {1 {near ";": syntax error}}
|
||||
|
||||
# Cannot have a HAVING without a GROUP BY
|
||||
#
|
||||
# Update: As of 3.39.0, you can.
|
||||
#
|
||||
do_execsql_test select3-3.1 {
|
||||
SELECT log, count(*) FROM t1 HAVING log>=4
|
||||
} {}
|
||||
do_execsql_test select3-3.2 {
|
||||
SELECT count(*) FROM t1 HAVING log>=4
|
||||
} {}
|
||||
do_execsql_test select3-3.3 {
|
||||
SELECT count(*) FROM t1 HAVING log!=400
|
||||
} {31}
|
||||
|
||||
# Toss in some HAVING clauses
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user