Version History
1.0.95.0 - March XX, 2015 (release scheduled)
- - Updated to SQLite 3.8.8.2.
+ - Updated to SQLite 3.8.8.3.
- Updated to Entity Framework 6.1.2.
- Modify configuration file transforms performed by the NuGet packages to allow Entity Framework 6 design-time integration to work automatically. Fix for [2be4298631], [abad7c577d], and [417d669435].
- The "System.Data.SQLite.EF6*" and "System.Data.SQLite.Linq*" NuGet packages no longer depend on the "System.Data.SQLite.Core*" packages. ** Potentially Incompatible Change **
- The "System.Data.SQLite.MSIL*" NuGet packages no longer directly include any files; they are now meta-packages. ** Potentially Incompatible Change **
- The "System.Data.SQLite.x86*" and "System.Data.SQLite.x64*" NuGet packages now depend on the "System.Data.SQLite.Linq" and "System.Data.SQLite.EF6" NuGet packages. ** Potentially Incompatible Change **
Index: SQLite.Interop/props/sqlite3.props
==================================================================
--- SQLite.Interop/props/sqlite3.props
+++ SQLite.Interop/props/sqlite3.props
@@ -7,12 +7,12 @@
* Released to the public domain, use at your own risk!
*
-->
- 3.8.8.2
- 3,8,8,2
+ 3.8.8.3
+ 3,8,8,3
_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;SQLITE_THREADSAFE=1;SQLITE_USE_URI=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT4=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1;SQLITE_ENABLE_MEMORY_MANAGEMENT=1
SQLITE_HAS_CODEC=1
SQLITE_OMIT_WAL=1
HAVE_ERRNO_H=1;SQLITE_MSVC_LOCALTIME_API=1
SQLITE_DEBUG=1;SQLITE_MEMDEBUG=1;SQLITE_ENABLE_EXPENSIVE_ASSERT=1
Index: SQLite.Interop/props/sqlite3.vsprops
==================================================================
--- SQLite.Interop/props/sqlite3.vsprops
+++ SQLite.Interop/props/sqlite3.vsprops
@@ -12,16 +12,16 @@
Version="8.00"
Name="sqlite3"
>
pWLoop;
idxCols = 0;
for(pTerm=pWC->a; pTermprereq==0
&& (pTerm->wtFlags & TERM_VIRTUAL)==0
+ && !ExprHasProperty(pTerm->pExpr, EP_FromJoin)
&& sqlite3ExprIsTableConstant(pTerm->pExpr, pSrc->iCursor) ){
pPartial = sqlite3ExprAnd(pParse->db, pPartial,
sqlite3ExprDup(pParse->db, pTerm->pExpr, 0));
}
if( termCanDriveIndex(pTerm, pSrc, notReady) ){
@@ -119629,11 +119630,15 @@
*/
static int whereUsablePartialIndex(int iTab, WhereClause *pWC, Expr *pWhere){
int i;
WhereTerm *pTerm;
for(i=0, pTerm=pWC->a; inTerm; i++, pTerm++){
- if( sqlite3ExprImpliesExpr(pTerm->pExpr, pWhere, iTab) ) return 1;
+ if( sqlite3ExprImpliesExpr(pTerm->pExpr, pWhere, iTab)
+ && !ExprHasProperty(pTerm->pExpr, EP_FromJoin)
+ ){
+ return 1;
+ }
}
return 0;
}
/*
@@ -131384,10 +131389,15 @@
struct Fts3Phrase {
/* Cache of doclist for this phrase. */
Fts3Doclist doclist;
int bIncr; /* True if doclist is loaded incrementally */
int iDoclistToken;
+
+ /* Used by sqlite3Fts3EvalPhrasePoslist() if this is a descendent of an
+ ** OR condition. */
+ char *pOrPoslist;
+ i64 iOrDocid;
/* Variables below this point are populated by fts3_expr.c when parsing
** a MATCH expression. Everything above is part of the evaluation phase.
*/
int nToken; /* Number of tokens in the phrase */
@@ -136335,10 +136345,26 @@
fts3EvalNextRow(pCsr, pRight, pRc);
}
}
pExpr->iDocid = pLeft->iDocid;
pExpr->bEof = (pLeft->bEof || pRight->bEof);
+ if( pExpr->eType==FTSQUERY_NEAR && pExpr->bEof ){
+ if( pRight->pPhrase && pRight->pPhrase->doclist.aAll ){
+ Fts3Doclist *pDl = &pRight->pPhrase->doclist;
+ while( *pRc==SQLITE_OK && pRight->bEof==0 ){
+ memset(pDl->pList, 0, pDl->nList);
+ fts3EvalNextRow(pCsr, pRight, pRc);
+ }
+ }
+ if( pLeft->pPhrase && pLeft->pPhrase->doclist.aAll ){
+ Fts3Doclist *pDl = &pLeft->pPhrase->doclist;
+ while( *pRc==SQLITE_OK && pLeft->bEof==0 ){
+ memset(pDl->pList, 0, pDl->nList);
+ fts3EvalNextRow(pCsr, pLeft, pRc);
+ }
+ }
+ }
}
break;
}
case FTSQUERY_OR: {
@@ -136707,10 +136733,11 @@
}
*pRc = fts3EvalPhraseStart(pCsr, 0, pPhrase);
}
pPhrase->doclist.pNextDocid = 0;
pPhrase->doclist.iDocid = 0;
+ pPhrase->pOrPoslist = 0;
}
pExpr->iDocid = 0;
pExpr->bEof = 0;
pExpr->bStart = 0;
@@ -136952,10 +136979,11 @@
}
iDocid = pExpr->iDocid;
pIter = pPhrase->doclist.pList;
if( iDocid!=pCsr->iPrevId || pExpr->bEof ){
+ int rc = SQLITE_OK;
int bDescDoclist = pTab->bDescIdx; /* For DOCID_CMP macro */
int iMul; /* +1 if csr dir matches index dir, else -1 */
int bOr = 0;
u8 bEof = 0;
u8 bTreeEof = 0;
@@ -136977,76 +137005,47 @@
/* This is the descendent of an OR node. In this case we cannot use
** an incremental phrase. Load the entire doclist for the phrase
** into memory in this case. */
if( pPhrase->bIncr ){
- int rc = SQLITE_OK;
- int bEofSave = pExpr->bEof;
- fts3EvalRestart(pCsr, pExpr, &rc);
- while( rc==SQLITE_OK && !pExpr->bEof ){
- fts3EvalNextRow(pCsr, pExpr, &rc);
- if( bEofSave==0 && pExpr->iDocid==iDocid ) break;
- }
- pIter = pPhrase->doclist.pList;
+ int bEofSave = pNear->bEof;
+ fts3EvalRestart(pCsr, pNear, &rc);
+ while( rc==SQLITE_OK && !pNear->bEof ){
+ fts3EvalNextRow(pCsr, pNear, &rc);
+ if( bEofSave==0 && pNear->iDocid==iDocid ) break;
+ }
assert( rc!=SQLITE_OK || pPhrase->bIncr==0 );
- if( rc!=SQLITE_OK ) return rc;
- }
-
- iMul = ((pCsr->bDesc==bDescDoclist) ? 1 : -1);
- while( bTreeEof==1
- && pNear->bEof==0
- && (DOCID_CMP(pNear->iDocid, pCsr->iPrevId) * iMul)<0
- ){
- int rc = SQLITE_OK;
- fts3EvalNextRow(pCsr, pExpr, &rc);
- if( rc!=SQLITE_OK ) return rc;
- iDocid = pExpr->iDocid;
- pIter = pPhrase->doclist.pList;
- }
-
- bEof = (pPhrase->doclist.nAll==0);
- assert( bDescDoclist==0 || bDescDoclist==1 );
- assert( pCsr->bDesc==0 || pCsr->bDesc==1 );
-
- if( bEof==0 ){
- if( pCsr->bDesc==bDescDoclist ){
+ }
+ if( bTreeEof ){
+ while( rc==SQLITE_OK && !pNear->bEof ){
+ fts3EvalNextRow(pCsr, pNear, &rc);
+ }
+ }
+ if( rc!=SQLITE_OK ) return rc;
+
+ pIter = pPhrase->pOrPoslist;
+ iDocid = pPhrase->iOrDocid;
+ if( pCsr->bDesc==bDescDoclist ){
+ bEof = (pIter >= (pPhrase->doclist.aAll + pPhrase->doclist.nAll));
+ while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
+ sqlite3Fts3DoclistNext(
+ bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll,
+ &pIter, &iDocid, &bEof
+ );
+ }
+ }else{
+ bEof = !pPhrase->doclist.nAll || (pIter && pIter<=pPhrase->doclist.aAll);
+ while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
int dummy;
- if( pNear->bEof ){
- /* This expression is already at EOF. So position it to point to the
- ** last entry in the doclist at pPhrase->doclist.aAll[]. Variable
- ** iDocid is already set for this entry, so all that is required is
- ** to set pIter to point to the first byte of the last position-list
- ** in the doclist.
- **
- ** It would also be correct to set pIter and iDocid to zero. In
- ** this case, the first call to sqltie3Fts4DoclistPrev() below
- ** would also move the iterator to point to the last entry in the
- ** doclist. However, this is expensive, as to do so it has to
- ** iterate through the entire doclist from start to finish (since
- ** it does not know the docid for the last entry). */
- pIter = &pPhrase->doclist.aAll[pPhrase->doclist.nAll-1];
- fts3ReversePoslist(pPhrase->doclist.aAll, &pIter);
- }
- while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
- sqlite3Fts3DoclistPrev(
- bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll,
- &pIter, &iDocid, &dummy, &bEof
- );
- }
- }else{
- if( pNear->bEof ){
- pIter = 0;
- iDocid = 0;
- }
- while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
- sqlite3Fts3DoclistNext(
- bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll,
- &pIter, &iDocid, &bEof
- );
- }
- }
- }
+ sqlite3Fts3DoclistPrev(
+ bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll,
+ &pIter, &iDocid, &dummy, &bEof
+ );
+ }
+ }
+ pPhrase->pOrPoslist = pIter;
+ pPhrase->iOrDocid = iDocid;
if( bEof || iDocid!=pCsr->iPrevId ) pIter = 0;
}
if( pIter==0 ) return SQLITE_OK;
@@ -137056,13 +137055,16 @@
}else{
iThis = 0;
}
while( iThispExpr, fts3SnippetFindPositions, (void *)&sIter);
-
- /* Set the *pmSeen output variable. */
- for(i=0; iiCol = iCol;
- while( !fts3SnippetNextCandidate(&sIter) ){
- int iPos;
- int iScore;
- u64 mCover;
- u64 mHighlight;
- fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover, &mHighlight);
- assert( iScore>=0 );
- if( iScore>iBestScore ){
- pFragment->iPos = iPos;
- pFragment->hlmask = mHighlight;
- pFragment->covered = mCover;
- iBestScore = iScore;
- }
- }
-
+ rc = fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sIter);
+ if( rc==SQLITE_OK ){
+
+ /* Set the *pmSeen output variable. */
+ for(i=0; iiCol = iCol;
+ while( !fts3SnippetNextCandidate(&sIter) ){
+ int iPos;
+ int iScore;
+ u64 mCover;
+ u64 mHighlite;
+ fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover,&mHighlite);
+ assert( iScore>=0 );
+ if( iScore>iBestScore ){
+ pFragment->iPos = iPos;
+ pFragment->hlmask = mHighlite;
+ pFragment->covered = mCover;
+ iBestScore = iScore;
+ }
+ }
+
+ *piScore = iBestScore;
+ }
sqlite3_free(sIter.aPhrase);
- *piScore = iBestScore;
- return SQLITE_OK;
+ return rc;
}
/*
** Append a string to the string-buffer passed as the first argument.
Index: SQLite.Interop/src/core/sqlite3.h
==================================================================
--- SQLite.Interop/src/core/sqlite3.h
+++ SQLite.Interop/src/core/sqlite3.h
@@ -105,13 +105,13 @@
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.8.8.2"
+#define SQLITE_VERSION "3.8.8.3"
#define SQLITE_VERSION_NUMBER 3008008
-#define SQLITE_SOURCE_ID "2015-01-30 14:30:45 7757fc721220e136620a89c9d28247f28bbbc098"
+#define SQLITE_SOURCE_ID "2015-02-25 13:29:11 9d6c1880fb75660bbabd693175579529785f8a6b"
/*
** CAPI3REF: Run-Time Library Version Numbers
** KEYWORDS: sqlite3_version, sqlite3_sourceid
**
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -4,11 +4,11 @@
ADO.NET SQLite Data Provider
Version 1.0.95.0 - March XX, 2015 (release scheduled)
-Using SQLite 3.8.8.2
+Using SQLite 3.8.8.3
Originally written by Robert Simpson
Released to the public domain, use at your own risk!
Official provider website: https://system.data.sqlite.org/
Legacy versions: http://sqlite.phxsoftware.com/
@@ -210,11 +210,11 @@
1.0.95.0 - March XX, 2015 (release scheduled)
- - Updated to SQLite 3.8.8.2.
+ - Updated to SQLite 3.8.8.3.
- Updated to Entity Framework 6.1.2.
- Modify configuration file transforms performed by the NuGet packages to allow Entity Framework 6 design-time integration to work automatically. Fix for [2be4298631], [abad7c577d], and [417d669435].
- The "System.Data.SQLite.EF6*" and "System.Data.SQLite.Linq*" NuGet packages no longer depend on the "System.Data.SQLite.Core*" packages. ** Potentially Incompatible Change **
- The "System.Data.SQLite.MSIL*" NuGet packages no longer directly include any files; they are now meta-packages. ** Potentially Incompatible Change **
- The "System.Data.SQLite.x86*" and "System.Data.SQLite.x64*" NuGet packages now depend on the "System.Data.SQLite.Linq" and "System.Data.SQLite.EF6" NuGet packages. ** Potentially Incompatible Change **
Index: www/news.wiki
==================================================================
--- www/news.wiki
+++ www/news.wiki
@@ -4,11 +4,11 @@
1.0.95.0 - March XX, 2015 (release scheduled)
- - Updated to [https://www.sqlite.org/releaselog/3_8_8_2.html|SQLite 3.8.8.2].
+ - Updated to [https://www.sqlite.org/releaselog/3_8_8_3.html|SQLite 3.8.8.3].
- Updated to [https://www.nuget.org/packages/EntityFramework/6.1.2|Entity Framework 6.1.2].
- Modify configuration file transforms performed by the NuGet packages to allow Entity Framework 6 design-time integration to work automatically. Fix for [2be4298631], [abad7c577d], and [417d669435].
- The "System.Data.SQLite.EF6*" and "System.Data.SQLite.Linq*" NuGet packages no longer depend on the "System.Data.SQLite.Core*" packages. ** Potentially Incompatible Change **
- The "System.Data.SQLite.MSIL*" NuGet packages no longer directly include any files; they are now meta-packages. ** Potentially Incompatible Change **
- The "System.Data.SQLite.x86*" and "System.Data.SQLite.x64*" NuGet packages now depend on the "System.Data.SQLite.Linq" and "System.Data.SQLite.EF6" NuGet packages. ** Potentially Incompatible Change **