use amalgamation 3.14.0
This commit is contained in:
parent
297d6f8d2d
commit
ee996d6946
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
** This file is an amalgamation of many separate C source files from SQLite
|
||||
** version 3.15.0. By combining all the individual C code files into this
|
||||
** version 3.14.0. By combining all the individual C code files into this
|
||||
** single large file, the entire code can be compiled as a single translation
|
||||
** unit. This allows many compilers to do optimizations that would not be
|
||||
** possible if the files were compiled separately. Performance improvements
|
||||
|
@ -380,9 +380,9 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.15.0"
|
||||
#define SQLITE_VERSION_NUMBER 3015000
|
||||
#define SQLITE_SOURCE_ID "2016-08-10 15:02:49 059f4e2efefb7b9deaf539110c19bceaeb10c6ce"
|
||||
#define SQLITE_VERSION "3.14.0"
|
||||
#define SQLITE_VERSION_NUMBER 3014000
|
||||
#define SQLITE_SOURCE_ID "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
@ -44998,30 +44998,12 @@ static void pcache1TruncateUnsafe(
|
|||
PCache1 *pCache, /* The cache to truncate */
|
||||
unsigned int iLimit /* Drop pages with this pgno or larger */
|
||||
){
|
||||
TESTONLY( int nPage = 0; ) /* To assert pCache->nPage is correct */
|
||||
unsigned int h, iStop;
|
||||
TESTONLY( unsigned int nPage = 0; ) /* To assert pCache->nPage is correct */
|
||||
unsigned int h;
|
||||
assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
|
||||
assert( pCache->iMaxKey >= iLimit );
|
||||
assert( pCache->nHash > 0 );
|
||||
if( pCache->iMaxKey - iLimit < pCache->nHash ){
|
||||
/* If we are just shaving the last few pages off the end of the
|
||||
** cache, then there is no point in scanning the entire hash table.
|
||||
** Only scan those hash slots that might contain pages that need to
|
||||
** be removed. */
|
||||
h = iLimit % pCache->nHash;
|
||||
iStop = pCache->iMaxKey % pCache->nHash;
|
||||
TESTONLY( nPage = -10; ) /* Disable the pCache->nPage validity check */
|
||||
}else{
|
||||
/* This is the general case where many pages are being removed.
|
||||
** It is necessary to scan the entire hash table */
|
||||
h = pCache->nHash/2;
|
||||
iStop = h - 1;
|
||||
}
|
||||
for(;;){
|
||||
PgHdr1 **pp;
|
||||
for(h=0; h<pCache->nHash; h++){
|
||||
PgHdr1 **pp = &pCache->apHash[h];
|
||||
PgHdr1 *pPage;
|
||||
assert( h<pCache->nHash );
|
||||
pp = &pCache->apHash[h];
|
||||
while( (pPage = *pp)!=0 ){
|
||||
if( pPage->iKey>=iLimit ){
|
||||
pCache->nPage--;
|
||||
|
@ -45030,13 +45012,11 @@ static void pcache1TruncateUnsafe(
|
|||
pcache1FreePage(pPage);
|
||||
}else{
|
||||
pp = &pPage->pNext;
|
||||
TESTONLY( if( nPage>=0 ) nPage++; )
|
||||
TESTONLY( nPage++; )
|
||||
}
|
||||
}
|
||||
if( h==iStop ) break;
|
||||
h = (h+1) % pCache->nHash;
|
||||
}
|
||||
assert( nPage<0 || pCache->nPage==(unsigned)nPage );
|
||||
assert( pCache->nPage==nPage );
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -45513,7 +45493,7 @@ static void pcache1Destroy(sqlite3_pcache *p){
|
|||
PGroup *pGroup = pCache->pGroup;
|
||||
assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );
|
||||
pcache1EnterMutex(pGroup);
|
||||
if( pCache->nPage ) pcache1TruncateUnsafe(pCache, 0);
|
||||
pcache1TruncateUnsafe(pCache, 0);
|
||||
assert( pGroup->nMaxPage >= pCache->nMax );
|
||||
pGroup->nMaxPage -= pCache->nMax;
|
||||
assert( pGroup->nMinPage >= pCache->nMin );
|
||||
|
@ -131870,7 +131850,7 @@ typedef union {
|
|||
**
|
||||
** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
|
||||
** and YY_MAX_REDUCE
|
||||
**
|
||||
|
||||
** N == YY_ERROR_ACTION A syntax error has occurred.
|
||||
**
|
||||
** N == YY_ACCEPT_ACTION The parser accepts its input.
|
||||
|
@ -131879,20 +131859,16 @@ typedef union {
|
|||
** slots in the yy_action[] table.
|
||||
**
|
||||
** The action table is constructed as a single large table named yy_action[].
|
||||
** Given state S and lookahead X, the action is computed as either:
|
||||
** Given state S and lookahead X, the action is computed as
|
||||
**
|
||||
** (A) N = yy_action[ yy_shift_ofst[S] + X ]
|
||||
** (B) N = yy_default[S]
|
||||
** yy_action[ yy_shift_ofst[S] + X ]
|
||||
**
|
||||
** The (A) formula is preferred. The B formula is used instead if:
|
||||
** (1) The yy_shift_ofst[S]+X value is out of range, or
|
||||
** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or
|
||||
** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT.
|
||||
** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that
|
||||
** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X.
|
||||
** Hence only tests (1) and (2) need to be evaluated.)
|
||||
** If the index value yy_shift_ofst[S]+X is out of range or if the value
|
||||
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
|
||||
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
|
||||
** and that yy_default[S] should be used instead.
|
||||
**
|
||||
** The formulas above are for computing the action when the lookahead is
|
||||
** The formula above is for computing the action when the lookahead is
|
||||
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
|
||||
** a reduce action) then the yy_reduce_ofst[] array is used in place of
|
||||
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
|
||||
|
@ -132217,10 +132193,10 @@ static const YYCODETYPE yy_lookahead[] = {
|
|||
/* 1490 */ 24, 1, 23, 22, 26, 122, 24, 23, 22, 122,
|
||||
/* 1500 */ 23, 23, 22, 122, 122, 23, 15,
|
||||
};
|
||||
#define YY_SHIFT_USE_DFLT (1507)
|
||||
#define YY_SHIFT_COUNT (442)
|
||||
#define YY_SHIFT_MIN (-94)
|
||||
#define YY_SHIFT_MAX (1491)
|
||||
#define YY_SHIFT_USE_DFLT (-95)
|
||||
#define YY_SHIFT_COUNT (442)
|
||||
#define YY_SHIFT_MIN (-94)
|
||||
#define YY_SHIFT_MAX (1491)
|
||||
static const short yy_shift_ofst[] = {
|
||||
/* 0 */ 40, 564, 869, 577, 725, 725, 725, 725, 690, -19,
|
||||
/* 10 */ 16, 16, 100, 725, 725, 725, 725, 725, 725, 725,
|
||||
|
@ -132233,12 +132209,12 @@ static const short yy_shift_ofst[] = {
|
|||
/* 80 */ 725, 725, 725, 725, 821, 725, 725, 725, 725, 725,
|
||||
/* 90 */ 725, 725, 725, 725, 725, 725, 725, 725, 952, 711,
|
||||
/* 100 */ 711, 711, 711, 711, 766, 23, 32, 924, 637, 825,
|
||||
/* 110 */ 837, 837, 924, 73, 183, -51, 1507, 1507, 1507, 501,
|
||||
/* 110 */ 837, 837, 924, 73, 183, -51, -95, -95, -95, 501,
|
||||
/* 120 */ 501, 501, 903, 903, 632, 205, 241, 924, 924, 924,
|
||||
/* 130 */ 924, 924, 924, 924, 924, 924, 924, 924, 924, 924,
|
||||
/* 140 */ 924, 924, 924, 924, 924, 924, 924, 192, 1027, 1106,
|
||||
/* 150 */ 1106, 183, 176, 176, 176, 176, 176, 176, 1507, 1507,
|
||||
/* 160 */ 1507, 880, -94, -94, 578, 734, 99, 730, 769, 349,
|
||||
/* 150 */ 1106, 183, 176, 176, 176, 176, 176, 176, -95, -95,
|
||||
/* 160 */ -95, 880, -94, -94, 578, 734, 99, 730, 769, 349,
|
||||
/* 170 */ 924, 924, 924, 924, 924, 924, 924, 924, 924, 924,
|
||||
/* 180 */ 924, 924, 924, 924, 924, 924, 924, 954, 954, 954,
|
||||
/* 190 */ 924, 924, 622, 924, 924, 924, -18, 924, 924, 914,
|
||||
|
@ -132252,8 +132228,8 @@ static const short yy_shift_ofst[] = {
|
|||
/* 270 */ 1234, 1234, 1267, 1311, 1234, 1244, 1234, 1267, 1234, 1234,
|
||||
/* 280 */ 1232, 1247, 1232, 1247, 1232, 1247, 1232, 1247, 1176, 1334,
|
||||
/* 290 */ 1176, 1235, 1311, 1318, 1318, 1311, 1248, 1253, 1245, 1249,
|
||||
/* 300 */ 1183, 1355, 1357, 1368, 1368, 1378, 1378, 1378, 1378, 1507,
|
||||
/* 310 */ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 451, 936, 816,
|
||||
/* 300 */ 1183, 1355, 1357, 1368, 1368, 1378, 1378, 1378, 1378, -95,
|
||||
/* 310 */ -95, -95, -95, -95, -95, -95, -95, 451, 936, 816,
|
||||
/* 320 */ 888, 1069, 799, 1111, 1197, 1193, 1201, 1202, 1203, 1213,
|
||||
/* 330 */ 1134, 1117, 1230, 497, 1218, 1219, 1154, 1223, 1115, 1120,
|
||||
/* 340 */ 1231, 1164, 1160, 1392, 1394, 1376, 1257, 1385, 1307, 1386,
|
||||
|
@ -133206,47 +133182,50 @@ static unsigned int yy_find_shift_action(
|
|||
assert( stateno <= YY_SHIFT_COUNT );
|
||||
do{
|
||||
i = yy_shift_ofst[stateno];
|
||||
if( i==YY_SHIFT_USE_DFLT ) return yy_default[stateno];
|
||||
assert( iLookAhead!=YYNOCODE );
|
||||
i += iLookAhead;
|
||||
if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
|
||||
if( iLookAhead>0 ){
|
||||
#ifdef YYFALLBACK
|
||||
YYCODETYPE iFallback; /* Fallback token */
|
||||
if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
|
||||
&& (iFallback = yyFallback[iLookAhead])!=0 ){
|
||||
#ifndef NDEBUG
|
||||
if( yyTraceFILE ){
|
||||
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
|
||||
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
|
||||
}
|
||||
#endif
|
||||
assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
|
||||
iLookAhead = iFallback;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef YYWILDCARD
|
||||
{
|
||||
int j = i - iLookAhead + YYWILDCARD;
|
||||
if(
|
||||
#if YY_SHIFT_MIN+YYWILDCARD<0
|
||||
j>=0 &&
|
||||
#endif
|
||||
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
|
||||
j<YY_ACTTAB_COUNT &&
|
||||
#endif
|
||||
yy_lookahead[j]==YYWILDCARD && iLookAhead>0
|
||||
){
|
||||
YYCODETYPE iFallback; /* Fallback token */
|
||||
if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
|
||||
&& (iFallback = yyFallback[iLookAhead])!=0 ){
|
||||
#ifndef NDEBUG
|
||||
if( yyTraceFILE ){
|
||||
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
|
||||
yyTracePrompt, yyTokenName[iLookAhead],
|
||||
yyTokenName[YYWILDCARD]);
|
||||
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
|
||||
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
|
||||
}
|
||||
#endif
|
||||
assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
|
||||
iLookAhead = iFallback;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef YYWILDCARD
|
||||
{
|
||||
int j = i - iLookAhead + YYWILDCARD;
|
||||
if(
|
||||
#if YY_SHIFT_MIN+YYWILDCARD<0
|
||||
j>=0 &&
|
||||
#endif
|
||||
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
|
||||
j<YY_ACTTAB_COUNT &&
|
||||
#endif
|
||||
yy_lookahead[j]==YYWILDCARD
|
||||
){
|
||||
#ifndef NDEBUG
|
||||
if( yyTraceFILE ){
|
||||
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
|
||||
yyTracePrompt, yyTokenName[iLookAhead],
|
||||
yyTokenName[YYWILDCARD]);
|
||||
}
|
||||
#endif /* NDEBUG */
|
||||
return yy_action[j];
|
||||
}
|
||||
#endif /* NDEBUG */
|
||||
return yy_action[j];
|
||||
}
|
||||
}
|
||||
#endif /* YYWILDCARD */
|
||||
}
|
||||
return yy_default[stateno];
|
||||
}else{
|
||||
return yy_action[i];
|
||||
|
@ -136009,26 +135988,14 @@ SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzEr
|
|||
assert( pParse->nVar==0 );
|
||||
assert( pParse->nzVar==0 );
|
||||
assert( pParse->azVar==0 );
|
||||
while( 1 ){
|
||||
while( zSql[i]!=0 ){
|
||||
assert( i>=0 );
|
||||
if( zSql[i]!=0 ){
|
||||
pParse->sLastToken.z = &zSql[i];
|
||||
pParse->sLastToken.n = sqlite3GetToken((u8*)&zSql[i],&tokenType);
|
||||
i += pParse->sLastToken.n;
|
||||
if( i>mxSqlLen ){
|
||||
pParse->rc = SQLITE_TOOBIG;
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
/* Upon reaching the end of input, call the parser two more times
|
||||
** with tokens TK_SEMI and 0, in that order. */
|
||||
if( lastTokenParsed==TK_SEMI ){
|
||||
tokenType = 0;
|
||||
}else if( lastTokenParsed==0 ){
|
||||
break;
|
||||
}else{
|
||||
tokenType = TK_SEMI;
|
||||
}
|
||||
pParse->sLastToken.z = &zSql[i];
|
||||
pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
|
||||
i += pParse->sLastToken.n;
|
||||
if( i>mxSqlLen ){
|
||||
pParse->rc = SQLITE_TOOBIG;
|
||||
break;
|
||||
}
|
||||
if( tokenType>=TK_SPACE ){
|
||||
assert( tokenType==TK_SPACE || tokenType==TK_ILLEGAL );
|
||||
|
@ -136049,6 +136016,15 @@ SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzEr
|
|||
}
|
||||
assert( nErr==0 );
|
||||
pParse->zTail = &zSql[i];
|
||||
if( pParse->rc==SQLITE_OK && db->mallocFailed==0 ){
|
||||
assert( zSql[i]==0 );
|
||||
if( lastTokenParsed!=TK_SEMI ){
|
||||
sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
|
||||
}
|
||||
if( pParse->rc==SQLITE_OK && db->mallocFailed==0 ){
|
||||
sqlite3Parser(pEngine, 0, pParse->sLastToken, pParse);
|
||||
}
|
||||
}
|
||||
#ifdef YYTRACKMAXSTACKDEPTH
|
||||
sqlite3_mutex_enter(sqlite3MallocMutex());
|
||||
sqlite3StatusHighwater(SQLITE_STATUS_PARSER_STACK,
|
||||
|
@ -178536,7 +178512,6 @@ static void sqlite3Fts5ParseNodeFree(Fts5ExprNode*);
|
|||
|
||||
static void sqlite3Fts5ParseSetDistance(Fts5Parse*, Fts5ExprNearset*, Fts5Token*);
|
||||
static void sqlite3Fts5ParseSetColset(Fts5Parse*, Fts5ExprNearset*, Fts5Colset*);
|
||||
static Fts5Colset *sqlite3Fts5ParseColsetInvert(Fts5Parse*, Fts5Colset*);
|
||||
static void sqlite3Fts5ParseFinished(Fts5Parse *pParse, Fts5ExprNode *p);
|
||||
static void sqlite3Fts5ParseNear(Fts5Parse *pParse, Fts5Token*);
|
||||
|
||||
|
@ -178594,13 +178569,12 @@ static int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic);
|
|||
#define FTS5_COLON 5
|
||||
#define FTS5_LP 6
|
||||
#define FTS5_RP 7
|
||||
#define FTS5_MINUS 8
|
||||
#define FTS5_LCP 9
|
||||
#define FTS5_RCP 10
|
||||
#define FTS5_STRING 11
|
||||
#define FTS5_COMMA 12
|
||||
#define FTS5_PLUS 13
|
||||
#define FTS5_STAR 14
|
||||
#define FTS5_LCP 8
|
||||
#define FTS5_RCP 9
|
||||
#define FTS5_STRING 10
|
||||
#define FTS5_COMMA 11
|
||||
#define FTS5_PLUS 12
|
||||
#define FTS5_STAR 13
|
||||
|
||||
/*
|
||||
** 2000-05-29
|
||||
|
@ -178714,17 +178688,17 @@ static int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic);
|
|||
#endif
|
||||
/************* Begin control #defines *****************************************/
|
||||
#define fts5YYCODETYPE unsigned char
|
||||
#define fts5YYNOCODE 28
|
||||
#define fts5YYNOCODE 27
|
||||
#define fts5YYACTIONTYPE unsigned char
|
||||
#define sqlite3Fts5ParserFTS5TOKENTYPE Fts5Token
|
||||
typedef union {
|
||||
int fts5yyinit;
|
||||
sqlite3Fts5ParserFTS5TOKENTYPE fts5yy0;
|
||||
int fts5yy4;
|
||||
Fts5Colset* fts5yy11;
|
||||
Fts5ExprNode* fts5yy24;
|
||||
Fts5ExprNearset* fts5yy46;
|
||||
Fts5ExprPhrase* fts5yy53;
|
||||
Fts5Colset* fts5yy3;
|
||||
Fts5ExprPhrase* fts5yy11;
|
||||
Fts5ExprNode* fts5yy18;
|
||||
int fts5yy20;
|
||||
Fts5ExprNearset* fts5yy26;
|
||||
} fts5YYMINORTYPE;
|
||||
#ifndef fts5YYSTACKDEPTH
|
||||
#define fts5YYSTACKDEPTH 100
|
||||
|
@ -178733,16 +178707,16 @@ typedef union {
|
|||
#define sqlite3Fts5ParserARG_PDECL ,Fts5Parse *pParse
|
||||
#define sqlite3Fts5ParserARG_FETCH Fts5Parse *pParse = fts5yypParser->pParse
|
||||
#define sqlite3Fts5ParserARG_STORE fts5yypParser->pParse = pParse
|
||||
#define fts5YYNSTATE 29
|
||||
#define fts5YYNRULE 26
|
||||
#define fts5YY_MAX_SHIFT 28
|
||||
#define fts5YY_MIN_SHIFTREDUCE 45
|
||||
#define fts5YY_MAX_SHIFTREDUCE 70
|
||||
#define fts5YY_MIN_REDUCE 71
|
||||
#define fts5YY_MAX_REDUCE 96
|
||||
#define fts5YY_ERROR_ACTION 97
|
||||
#define fts5YY_ACCEPT_ACTION 98
|
||||
#define fts5YY_NO_ACTION 99
|
||||
#define fts5YYNSTATE 26
|
||||
#define fts5YYNRULE 24
|
||||
#define fts5YY_MAX_SHIFT 25
|
||||
#define fts5YY_MIN_SHIFTREDUCE 40
|
||||
#define fts5YY_MAX_SHIFTREDUCE 63
|
||||
#define fts5YY_MIN_REDUCE 64
|
||||
#define fts5YY_MAX_REDUCE 87
|
||||
#define fts5YY_ERROR_ACTION 88
|
||||
#define fts5YY_ACCEPT_ACTION 89
|
||||
#define fts5YY_NO_ACTION 90
|
||||
/************* End control #defines *******************************************/
|
||||
|
||||
/* Define the fts5yytestcase() macro to be a no-op if is not already defined
|
||||
|
@ -178774,7 +178748,7 @@ typedef union {
|
|||
**
|
||||
** N between fts5YY_MIN_REDUCE Reduce by rule N-fts5YY_MIN_REDUCE
|
||||
** and fts5YY_MAX_REDUCE
|
||||
**
|
||||
|
||||
** N == fts5YY_ERROR_ACTION A syntax error has occurred.
|
||||
**
|
||||
** N == fts5YY_ACCEPT_ACTION The parser accepts its input.
|
||||
|
@ -178783,20 +178757,16 @@ typedef union {
|
|||
** slots in the fts5yy_action[] table.
|
||||
**
|
||||
** The action table is constructed as a single large table named fts5yy_action[].
|
||||
** Given state S and lookahead X, the action is computed as either:
|
||||
** Given state S and lookahead X, the action is computed as
|
||||
**
|
||||
** (A) N = fts5yy_action[ fts5yy_shift_ofst[S] + X ]
|
||||
** (B) N = fts5yy_default[S]
|
||||
** fts5yy_action[ fts5yy_shift_ofst[S] + X ]
|
||||
**
|
||||
** The (A) formula is preferred. The B formula is used instead if:
|
||||
** (1) The fts5yy_shift_ofst[S]+X value is out of range, or
|
||||
** (2) fts5yy_lookahead[fts5yy_shift_ofst[S]+X] is not equal to X, or
|
||||
** (3) fts5yy_shift_ofst[S] equal fts5YY_SHIFT_USE_DFLT.
|
||||
** (Implementation note: fts5YY_SHIFT_USE_DFLT is chosen so that
|
||||
** fts5YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X.
|
||||
** Hence only tests (1) and (2) need to be evaluated.)
|
||||
** If the index value fts5yy_shift_ofst[S]+X is out of range or if the value
|
||||
** fts5yy_lookahead[fts5yy_shift_ofst[S]+X] is not equal to X or if fts5yy_shift_ofst[S]
|
||||
** is equal to fts5YY_SHIFT_USE_DFLT, it means that the action is not in the table
|
||||
** and that fts5yy_default[S] should be used instead.
|
||||
**
|
||||
** The formulas above are for computing the action when the lookahead is
|
||||
** The formula above is for computing the action when the lookahead is
|
||||
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
|
||||
** a reduce action) then the fts5yy_reduce_ofst[] array is used in place of
|
||||
** the fts5yy_shift_ofst[] array and fts5YY_REDUCE_USE_DFLT is used in place of
|
||||
|
@ -178814,50 +178784,48 @@ typedef union {
|
|||
** fts5yy_default[] Default action for each state.
|
||||
**
|
||||
*********** Begin parsing tables **********************************************/
|
||||
#define fts5YY_ACTTAB_COUNT (85)
|
||||
#define fts5YY_ACTTAB_COUNT (78)
|
||||
static const fts5YYACTIONTYPE fts5yy_action[] = {
|
||||
/* 0 */ 98, 16, 51, 5, 53, 27, 83, 7, 26, 15,
|
||||
/* 10 */ 51, 5, 53, 27, 13, 69, 26, 48, 51, 5,
|
||||
/* 20 */ 53, 27, 19, 11, 26, 9, 20, 51, 5, 53,
|
||||
/* 30 */ 27, 13, 22, 26, 28, 51, 5, 53, 27, 68,
|
||||
/* 40 */ 1, 26, 19, 11, 17, 9, 52, 10, 53, 27,
|
||||
/* 50 */ 23, 24, 26, 54, 3, 4, 2, 26, 6, 21,
|
||||
/* 60 */ 49, 71, 3, 4, 2, 7, 56, 59, 55, 59,
|
||||
/* 70 */ 4, 2, 12, 69, 58, 60, 18, 67, 62, 69,
|
||||
/* 80 */ 25, 66, 8, 14, 2,
|
||||
/* 0 */ 89, 15, 46, 5, 48, 24, 12, 19, 23, 14,
|
||||
/* 10 */ 46, 5, 48, 24, 20, 21, 23, 43, 46, 5,
|
||||
/* 20 */ 48, 24, 6, 18, 23, 17, 46, 5, 48, 24,
|
||||
/* 30 */ 75, 7, 23, 25, 46, 5, 48, 24, 62, 47,
|
||||
/* 40 */ 23, 48, 24, 7, 11, 23, 9, 3, 4, 2,
|
||||
/* 50 */ 62, 50, 52, 44, 64, 3, 4, 2, 49, 4,
|
||||
/* 60 */ 2, 1, 23, 11, 16, 9, 12, 2, 10, 61,
|
||||
/* 70 */ 53, 59, 62, 60, 22, 13, 55, 8,
|
||||
};
|
||||
static const fts5YYCODETYPE fts5yy_lookahead[] = {
|
||||
/* 0 */ 16, 17, 18, 19, 20, 21, 5, 6, 24, 17,
|
||||
/* 10 */ 18, 19, 20, 21, 11, 14, 24, 17, 18, 19,
|
||||
/* 20 */ 20, 21, 8, 9, 24, 11, 17, 18, 19, 20,
|
||||
/* 30 */ 21, 11, 12, 24, 17, 18, 19, 20, 21, 26,
|
||||
/* 40 */ 6, 24, 8, 9, 22, 11, 18, 11, 20, 21,
|
||||
/* 50 */ 24, 25, 24, 20, 1, 2, 3, 24, 23, 24,
|
||||
/* 60 */ 7, 0, 1, 2, 3, 6, 10, 11, 10, 11,
|
||||
/* 70 */ 2, 3, 9, 14, 11, 11, 22, 26, 7, 14,
|
||||
/* 80 */ 13, 11, 5, 11, 3,
|
||||
/* 0 */ 15, 16, 17, 18, 19, 20, 10, 11, 23, 16,
|
||||
/* 10 */ 17, 18, 19, 20, 23, 24, 23, 16, 17, 18,
|
||||
/* 20 */ 19, 20, 22, 23, 23, 16, 17, 18, 19, 20,
|
||||
/* 30 */ 5, 6, 23, 16, 17, 18, 19, 20, 13, 17,
|
||||
/* 40 */ 23, 19, 20, 6, 8, 23, 10, 1, 2, 3,
|
||||
/* 50 */ 13, 9, 10, 7, 0, 1, 2, 3, 19, 2,
|
||||
/* 60 */ 3, 6, 23, 8, 21, 10, 10, 3, 10, 25,
|
||||
/* 70 */ 10, 10, 13, 25, 12, 10, 7, 5,
|
||||
};
|
||||
#define fts5YY_SHIFT_USE_DFLT (85)
|
||||
#define fts5YY_SHIFT_COUNT (28)
|
||||
#define fts5YY_SHIFT_MIN (0)
|
||||
#define fts5YY_SHIFT_MAX (81)
|
||||
static const unsigned char fts5yy_shift_ofst[] = {
|
||||
/* 0 */ 34, 34, 34, 34, 34, 14, 20, 3, 36, 1,
|
||||
/* 10 */ 59, 64, 64, 65, 65, 53, 61, 56, 58, 63,
|
||||
/* 20 */ 68, 67, 70, 67, 71, 72, 67, 77, 81,
|
||||
#define fts5YY_SHIFT_USE_DFLT (-5)
|
||||
#define fts5YY_SHIFT_COUNT (25)
|
||||
#define fts5YY_SHIFT_MIN (-4)
|
||||
#define fts5YY_SHIFT_MAX (72)
|
||||
static const signed char fts5yy_shift_ofst[] = {
|
||||
/* 0 */ 55, 55, 55, 55, 55, 36, -4, 56, 58, 25,
|
||||
/* 10 */ 37, 60, 59, 59, 46, 54, 42, 57, 62, 61,
|
||||
/* 20 */ 62, 69, 65, 62, 72, 64,
|
||||
};
|
||||
#define fts5YY_REDUCE_USE_DFLT (-17)
|
||||
#define fts5YY_REDUCE_COUNT (14)
|
||||
#define fts5YY_REDUCE_MIN (-16)
|
||||
#define fts5YY_REDUCE_MAX (54)
|
||||
#define fts5YY_REDUCE_USE_DFLT (-16)
|
||||
#define fts5YY_REDUCE_COUNT (13)
|
||||
#define fts5YY_REDUCE_MIN (-15)
|
||||
#define fts5YY_REDUCE_MAX (48)
|
||||
static const signed char fts5yy_reduce_ofst[] = {
|
||||
/* 0 */ -16, -8, 0, 9, 17, 28, 26, 35, 33, 13,
|
||||
/* 10 */ 13, 22, 54, 13, 51,
|
||||
/* 0 */ -15, -7, 1, 9, 17, 22, -9, 0, 39, 44,
|
||||
/* 10 */ 44, 43, 44, 48,
|
||||
};
|
||||
static const fts5YYACTIONTYPE fts5yy_default[] = {
|
||||
/* 0 */ 97, 97, 97, 97, 97, 76, 91, 97, 97, 96,
|
||||
/* 10 */ 96, 97, 97, 96, 96, 97, 97, 97, 97, 97,
|
||||
/* 20 */ 73, 89, 97, 90, 97, 97, 87, 97, 72,
|
||||
/* 0 */ 88, 88, 88, 88, 88, 69, 82, 88, 88, 87,
|
||||
/* 10 */ 87, 88, 87, 87, 88, 88, 88, 66, 80, 88,
|
||||
/* 20 */ 81, 88, 88, 78, 88, 65,
|
||||
};
|
||||
/********** End of lemon-generated parsing tables *****************************/
|
||||
|
||||
|
@ -178964,11 +178932,11 @@ static void sqlite3Fts5ParserTrace(FILE *TraceFILE, char *zTracePrompt){
|
|||
static const char *const fts5yyTokenName[] = {
|
||||
"$", "OR", "AND", "NOT",
|
||||
"TERM", "COLON", "LP", "RP",
|
||||
"MINUS", "LCP", "RCP", "STRING",
|
||||
"COMMA", "PLUS", "STAR", "error",
|
||||
"input", "expr", "cnearset", "exprlist",
|
||||
"nearset", "colset", "colsetlist", "nearphrases",
|
||||
"phrase", "neardist_opt", "star_opt",
|
||||
"LCP", "RCP", "STRING", "COMMA",
|
||||
"PLUS", "STAR", "error", "input",
|
||||
"expr", "cnearset", "exprlist", "nearset",
|
||||
"colset", "colsetlist", "nearphrases", "phrase",
|
||||
"neardist_opt", "star_opt",
|
||||
};
|
||||
#endif /* NDEBUG */
|
||||
|
||||
|
@ -178986,22 +178954,20 @@ static const char *const fts5yyRuleName[] = {
|
|||
/* 7 */ "exprlist ::= exprlist cnearset",
|
||||
/* 8 */ "cnearset ::= nearset",
|
||||
/* 9 */ "cnearset ::= colset COLON nearset",
|
||||
/* 10 */ "colset ::= MINUS LCP colsetlist RCP",
|
||||
/* 11 */ "colset ::= LCP colsetlist RCP",
|
||||
/* 12 */ "colset ::= STRING",
|
||||
/* 13 */ "colset ::= MINUS STRING",
|
||||
/* 14 */ "colsetlist ::= colsetlist STRING",
|
||||
/* 15 */ "colsetlist ::= STRING",
|
||||
/* 16 */ "nearset ::= phrase",
|
||||
/* 17 */ "nearset ::= STRING LP nearphrases neardist_opt RP",
|
||||
/* 18 */ "nearphrases ::= phrase",
|
||||
/* 19 */ "nearphrases ::= nearphrases phrase",
|
||||
/* 20 */ "neardist_opt ::=",
|
||||
/* 21 */ "neardist_opt ::= COMMA STRING",
|
||||
/* 22 */ "phrase ::= phrase PLUS STRING star_opt",
|
||||
/* 23 */ "phrase ::= STRING star_opt",
|
||||
/* 24 */ "star_opt ::= STAR",
|
||||
/* 25 */ "star_opt ::=",
|
||||
/* 10 */ "colset ::= LCP colsetlist RCP",
|
||||
/* 11 */ "colset ::= STRING",
|
||||
/* 12 */ "colsetlist ::= colsetlist STRING",
|
||||
/* 13 */ "colsetlist ::= STRING",
|
||||
/* 14 */ "nearset ::= phrase",
|
||||
/* 15 */ "nearset ::= STRING LP nearphrases neardist_opt RP",
|
||||
/* 16 */ "nearphrases ::= phrase",
|
||||
/* 17 */ "nearphrases ::= nearphrases phrase",
|
||||
/* 18 */ "neardist_opt ::=",
|
||||
/* 19 */ "neardist_opt ::= COMMA STRING",
|
||||
/* 20 */ "phrase ::= phrase PLUS STRING star_opt",
|
||||
/* 21 */ "phrase ::= STRING star_opt",
|
||||
/* 22 */ "star_opt ::= STAR",
|
||||
/* 23 */ "star_opt ::=",
|
||||
};
|
||||
#endif /* NDEBUG */
|
||||
|
||||
|
@ -179111,33 +179077,33 @@ static void fts5yy_destructor(
|
|||
** inside the C code.
|
||||
*/
|
||||
/********* Begin destructor definitions ***************************************/
|
||||
case 16: /* input */
|
||||
case 15: /* input */
|
||||
{
|
||||
(void)pParse;
|
||||
}
|
||||
break;
|
||||
case 17: /* expr */
|
||||
case 18: /* cnearset */
|
||||
case 19: /* exprlist */
|
||||
case 16: /* expr */
|
||||
case 17: /* cnearset */
|
||||
case 18: /* exprlist */
|
||||
{
|
||||
sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy24));
|
||||
sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy18));
|
||||
}
|
||||
break;
|
||||
case 20: /* nearset */
|
||||
case 23: /* nearphrases */
|
||||
case 19: /* nearset */
|
||||
case 22: /* nearphrases */
|
||||
{
|
||||
sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy46));
|
||||
sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy26));
|
||||
}
|
||||
break;
|
||||
case 21: /* colset */
|
||||
case 22: /* colsetlist */
|
||||
case 20: /* colset */
|
||||
case 21: /* colsetlist */
|
||||
{
|
||||
sqlite3_free((fts5yypminor->fts5yy11));
|
||||
sqlite3_free((fts5yypminor->fts5yy3));
|
||||
}
|
||||
break;
|
||||
case 24: /* phrase */
|
||||
case 23: /* phrase */
|
||||
{
|
||||
sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy53));
|
||||
sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy11));
|
||||
}
|
||||
break;
|
||||
/********* End destructor definitions *****************************************/
|
||||
|
@ -179214,47 +179180,50 @@ static unsigned int fts5yy_find_shift_action(
|
|||
assert( stateno <= fts5YY_SHIFT_COUNT );
|
||||
do{
|
||||
i = fts5yy_shift_ofst[stateno];
|
||||
if( i==fts5YY_SHIFT_USE_DFLT ) return fts5yy_default[stateno];
|
||||
assert( iLookAhead!=fts5YYNOCODE );
|
||||
i += iLookAhead;
|
||||
if( i<0 || i>=fts5YY_ACTTAB_COUNT || fts5yy_lookahead[i]!=iLookAhead ){
|
||||
if( iLookAhead>0 ){
|
||||
#ifdef fts5YYFALLBACK
|
||||
fts5YYCODETYPE iFallback; /* Fallback token */
|
||||
if( iLookAhead<sizeof(fts5yyFallback)/sizeof(fts5yyFallback[0])
|
||||
&& (iFallback = fts5yyFallback[iLookAhead])!=0 ){
|
||||
#ifndef NDEBUG
|
||||
if( fts5yyTraceFILE ){
|
||||
fprintf(fts5yyTraceFILE, "%sFALLBACK %s => %s\n",
|
||||
fts5yyTracePrompt, fts5yyTokenName[iLookAhead], fts5yyTokenName[iFallback]);
|
||||
}
|
||||
#endif
|
||||
assert( fts5yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
|
||||
iLookAhead = iFallback;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef fts5YYWILDCARD
|
||||
{
|
||||
int j = i - iLookAhead + fts5YYWILDCARD;
|
||||
if(
|
||||
#if fts5YY_SHIFT_MIN+fts5YYWILDCARD<0
|
||||
j>=0 &&
|
||||
#endif
|
||||
#if fts5YY_SHIFT_MAX+fts5YYWILDCARD>=fts5YY_ACTTAB_COUNT
|
||||
j<fts5YY_ACTTAB_COUNT &&
|
||||
#endif
|
||||
fts5yy_lookahead[j]==fts5YYWILDCARD && iLookAhead>0
|
||||
){
|
||||
fts5YYCODETYPE iFallback; /* Fallback token */
|
||||
if( iLookAhead<sizeof(fts5yyFallback)/sizeof(fts5yyFallback[0])
|
||||
&& (iFallback = fts5yyFallback[iLookAhead])!=0 ){
|
||||
#ifndef NDEBUG
|
||||
if( fts5yyTraceFILE ){
|
||||
fprintf(fts5yyTraceFILE, "%sWILDCARD %s => %s\n",
|
||||
fts5yyTracePrompt, fts5yyTokenName[iLookAhead],
|
||||
fts5yyTokenName[fts5YYWILDCARD]);
|
||||
fprintf(fts5yyTraceFILE, "%sFALLBACK %s => %s\n",
|
||||
fts5yyTracePrompt, fts5yyTokenName[iLookAhead], fts5yyTokenName[iFallback]);
|
||||
}
|
||||
#endif
|
||||
assert( fts5yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
|
||||
iLookAhead = iFallback;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef fts5YYWILDCARD
|
||||
{
|
||||
int j = i - iLookAhead + fts5YYWILDCARD;
|
||||
if(
|
||||
#if fts5YY_SHIFT_MIN+fts5YYWILDCARD<0
|
||||
j>=0 &&
|
||||
#endif
|
||||
#if fts5YY_SHIFT_MAX+fts5YYWILDCARD>=fts5YY_ACTTAB_COUNT
|
||||
j<fts5YY_ACTTAB_COUNT &&
|
||||
#endif
|
||||
fts5yy_lookahead[j]==fts5YYWILDCARD
|
||||
){
|
||||
#ifndef NDEBUG
|
||||
if( fts5yyTraceFILE ){
|
||||
fprintf(fts5yyTraceFILE, "%sWILDCARD %s => %s\n",
|
||||
fts5yyTracePrompt, fts5yyTokenName[iLookAhead],
|
||||
fts5yyTokenName[fts5YYWILDCARD]);
|
||||
}
|
||||
#endif /* NDEBUG */
|
||||
return fts5yy_action[j];
|
||||
}
|
||||
#endif /* NDEBUG */
|
||||
return fts5yy_action[j];
|
||||
}
|
||||
}
|
||||
#endif /* fts5YYWILDCARD */
|
||||
}
|
||||
return fts5yy_default[stateno];
|
||||
}else{
|
||||
return fts5yy_action[i];
|
||||
|
@ -179381,32 +179350,30 @@ static const struct {
|
|||
fts5YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
|
||||
unsigned char nrhs; /* Number of right-hand side symbols in the rule */
|
||||
} fts5yyRuleInfo[] = {
|
||||
{ 15, 1 },
|
||||
{ 16, 3 },
|
||||
{ 16, 3 },
|
||||
{ 16, 3 },
|
||||
{ 16, 3 },
|
||||
{ 16, 1 },
|
||||
{ 17, 3 },
|
||||
{ 17, 3 },
|
||||
{ 17, 3 },
|
||||
{ 17, 3 },
|
||||
{ 17, 1 },
|
||||
{ 19, 1 },
|
||||
{ 19, 2 },
|
||||
{ 18, 1 },
|
||||
{ 18, 3 },
|
||||
{ 21, 4 },
|
||||
{ 21, 3 },
|
||||
{ 21, 1 },
|
||||
{ 21, 2 },
|
||||
{ 22, 2 },
|
||||
{ 22, 1 },
|
||||
{ 18, 2 },
|
||||
{ 17, 1 },
|
||||
{ 17, 3 },
|
||||
{ 20, 3 },
|
||||
{ 20, 1 },
|
||||
{ 20, 5 },
|
||||
{ 23, 1 },
|
||||
{ 23, 2 },
|
||||
{ 25, 0 },
|
||||
{ 25, 2 },
|
||||
{ 24, 4 },
|
||||
{ 21, 2 },
|
||||
{ 21, 1 },
|
||||
{ 19, 1 },
|
||||
{ 19, 5 },
|
||||
{ 22, 1 },
|
||||
{ 22, 2 },
|
||||
{ 24, 0 },
|
||||
{ 24, 2 },
|
||||
{ 26, 1 },
|
||||
{ 26, 0 },
|
||||
{ 23, 4 },
|
||||
{ 23, 2 },
|
||||
{ 25, 1 },
|
||||
{ 25, 0 },
|
||||
};
|
||||
|
||||
static void fts5yy_accept(fts5yyParser*); /* Forward Declaration */
|
||||
|
@ -179471,131 +179438,120 @@ static void fts5yy_reduce(
|
|||
/********** Begin reduce actions **********************************************/
|
||||
fts5YYMINORTYPE fts5yylhsminor;
|
||||
case 0: /* input ::= expr */
|
||||
{ sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy24); }
|
||||
{ sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy18); }
|
||||
break;
|
||||
case 1: /* expr ::= expr AND expr */
|
||||
{
|
||||
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
|
||||
fts5yylhsminor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
|
||||
}
|
||||
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
fts5yymsp[-2].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 2: /* expr ::= expr OR expr */
|
||||
{
|
||||
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
|
||||
fts5yylhsminor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
|
||||
}
|
||||
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
fts5yymsp[-2].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 3: /* expr ::= expr NOT expr */
|
||||
{
|
||||
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);
|
||||
fts5yylhsminor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
|
||||
}
|
||||
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
fts5yymsp[-2].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 4: /* expr ::= LP expr RP */
|
||||
{fts5yymsp[-2].minor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;}
|
||||
{fts5yymsp[-2].minor.fts5yy18 = fts5yymsp[-1].minor.fts5yy18;}
|
||||
break;
|
||||
case 5: /* expr ::= exprlist */
|
||||
case 6: /* exprlist ::= cnearset */ fts5yytestcase(fts5yyruleno==6);
|
||||
{fts5yylhsminor.fts5yy24 = fts5yymsp[0].minor.fts5yy24;}
|
||||
fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
{fts5yylhsminor.fts5yy18 = fts5yymsp[0].minor.fts5yy18;}
|
||||
fts5yymsp[0].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 7: /* exprlist ::= exprlist cnearset */
|
||||
{
|
||||
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseImplicitAnd(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24);
|
||||
fts5yylhsminor.fts5yy18 = sqlite3Fts5ParseImplicitAnd(pParse, fts5yymsp[-1].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18);
|
||||
}
|
||||
fts5yymsp[-1].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
fts5yymsp[-1].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 8: /* cnearset ::= nearset */
|
||||
{
|
||||
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
|
||||
fts5yylhsminor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy26);
|
||||
}
|
||||
fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
fts5yymsp[0].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 9: /* cnearset ::= colset COLON nearset */
|
||||
{
|
||||
sqlite3Fts5ParseSetColset(pParse, fts5yymsp[0].minor.fts5yy46, fts5yymsp[-2].minor.fts5yy11);
|
||||
fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);
|
||||
sqlite3Fts5ParseSetColset(pParse, fts5yymsp[0].minor.fts5yy26, fts5yymsp[-2].minor.fts5yy3);
|
||||
fts5yylhsminor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy26);
|
||||
}
|
||||
fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;
|
||||
fts5yymsp[-2].minor.fts5yy18 = fts5yylhsminor.fts5yy18;
|
||||
break;
|
||||
case 10: /* colset ::= MINUS LCP colsetlist RCP */
|
||||
{
|
||||
fts5yymsp[-3].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
|
||||
}
|
||||
case 10: /* colset ::= LCP colsetlist RCP */
|
||||
{ fts5yymsp[-2].minor.fts5yy3 = fts5yymsp[-1].minor.fts5yy3; }
|
||||
break;
|
||||
case 11: /* colset ::= LCP colsetlist RCP */
|
||||
{ fts5yymsp[-2].minor.fts5yy11 = fts5yymsp[-1].minor.fts5yy11; }
|
||||
break;
|
||||
case 12: /* colset ::= STRING */
|
||||
case 11: /* colset ::= STRING */
|
||||
{
|
||||
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
|
||||
fts5yylhsminor.fts5yy3 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
|
||||
}
|
||||
fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
|
||||
fts5yymsp[0].minor.fts5yy3 = fts5yylhsminor.fts5yy3;
|
||||
break;
|
||||
case 13: /* colset ::= MINUS STRING */
|
||||
{
|
||||
fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
|
||||
fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);
|
||||
}
|
||||
break;
|
||||
case 14: /* colsetlist ::= colsetlist STRING */
|
||||
case 12: /* colsetlist ::= colsetlist STRING */
|
||||
{
|
||||
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy11, &fts5yymsp[0].minor.fts5yy0); }
|
||||
fts5yymsp[-1].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
|
||||
fts5yylhsminor.fts5yy3 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy3, &fts5yymsp[0].minor.fts5yy0); }
|
||||
fts5yymsp[-1].minor.fts5yy3 = fts5yylhsminor.fts5yy3;
|
||||
break;
|
||||
case 15: /* colsetlist ::= STRING */
|
||||
case 13: /* colsetlist ::= STRING */
|
||||
{
|
||||
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
|
||||
fts5yylhsminor.fts5yy3 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
|
||||
}
|
||||
fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
|
||||
fts5yymsp[0].minor.fts5yy3 = fts5yylhsminor.fts5yy3;
|
||||
break;
|
||||
case 16: /* nearset ::= phrase */
|
||||
{ fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53); }
|
||||
fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
|
||||
case 14: /* nearset ::= phrase */
|
||||
{ fts5yylhsminor.fts5yy26 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy11); }
|
||||
fts5yymsp[0].minor.fts5yy26 = fts5yylhsminor.fts5yy26;
|
||||
break;
|
||||
case 17: /* nearset ::= STRING LP nearphrases neardist_opt RP */
|
||||
case 15: /* nearset ::= STRING LP nearphrases neardist_opt RP */
|
||||
{
|
||||
sqlite3Fts5ParseNear(pParse, &fts5yymsp[-4].minor.fts5yy0);
|
||||
sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy46, &fts5yymsp[-1].minor.fts5yy0);
|
||||
fts5yylhsminor.fts5yy46 = fts5yymsp[-2].minor.fts5yy46;
|
||||
sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy26, &fts5yymsp[-1].minor.fts5yy0);
|
||||
fts5yylhsminor.fts5yy26 = fts5yymsp[-2].minor.fts5yy26;
|
||||
}
|
||||
fts5yymsp[-4].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
|
||||
fts5yymsp[-4].minor.fts5yy26 = fts5yylhsminor.fts5yy26;
|
||||
break;
|
||||
case 18: /* nearphrases ::= phrase */
|
||||
case 16: /* nearphrases ::= phrase */
|
||||
{
|
||||
fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);
|
||||
fts5yylhsminor.fts5yy26 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy11);
|
||||
}
|
||||
fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
|
||||
fts5yymsp[0].minor.fts5yy26 = fts5yylhsminor.fts5yy26;
|
||||
break;
|
||||
case 19: /* nearphrases ::= nearphrases phrase */
|
||||
case 17: /* nearphrases ::= nearphrases phrase */
|
||||
{
|
||||
fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy46, fts5yymsp[0].minor.fts5yy53);
|
||||
fts5yylhsminor.fts5yy26 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy26, fts5yymsp[0].minor.fts5yy11);
|
||||
}
|
||||
fts5yymsp[-1].minor.fts5yy46 = fts5yylhsminor.fts5yy46;
|
||||
fts5yymsp[-1].minor.fts5yy26 = fts5yylhsminor.fts5yy26;
|
||||
break;
|
||||
case 20: /* neardist_opt ::= */
|
||||
case 18: /* neardist_opt ::= */
|
||||
{ fts5yymsp[1].minor.fts5yy0.p = 0; fts5yymsp[1].minor.fts5yy0.n = 0; }
|
||||
break;
|
||||
case 21: /* neardist_opt ::= COMMA STRING */
|
||||
case 19: /* neardist_opt ::= COMMA STRING */
|
||||
{ fts5yymsp[-1].minor.fts5yy0 = fts5yymsp[0].minor.fts5yy0; }
|
||||
break;
|
||||
case 22: /* phrase ::= phrase PLUS STRING star_opt */
|
||||
case 20: /* phrase ::= phrase PLUS STRING star_opt */
|
||||
{
|
||||
fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy53, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
|
||||
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy11, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy20);
|
||||
}
|
||||
fts5yymsp[-3].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
|
||||
fts5yymsp[-3].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
|
||||
break;
|
||||
case 23: /* phrase ::= STRING star_opt */
|
||||
case 21: /* phrase ::= STRING star_opt */
|
||||
{
|
||||
fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);
|
||||
fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy20);
|
||||
}
|
||||
fts5yymsp[-1].minor.fts5yy53 = fts5yylhsminor.fts5yy53;
|
||||
fts5yymsp[-1].minor.fts5yy11 = fts5yylhsminor.fts5yy11;
|
||||
break;
|
||||
case 24: /* star_opt ::= STAR */
|
||||
{ fts5yymsp[0].minor.fts5yy4 = 1; }
|
||||
case 22: /* star_opt ::= STAR */
|
||||
{ fts5yymsp[0].minor.fts5yy20 = 1; }
|
||||
break;
|
||||
case 25: /* star_opt ::= */
|
||||
{ fts5yymsp[1].minor.fts5yy4 = 0; }
|
||||
case 23: /* star_opt ::= */
|
||||
{ fts5yymsp[1].minor.fts5yy20 = 0; }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -181949,7 +181905,6 @@ static int fts5ExprGetToken(
|
|||
case ',': tok = FTS5_COMMA; break;
|
||||
case '+': tok = FTS5_PLUS; break;
|
||||
case '*': tok = FTS5_STAR; break;
|
||||
case '-': tok = FTS5_MINUS; break;
|
||||
case '\0': tok = FTS5_EOF; break;
|
||||
|
||||
case '"': {
|
||||
|
@ -183576,34 +183531,6 @@ static Fts5Colset *fts5ParseColset(
|
|||
return pNew;
|
||||
}
|
||||
|
||||
/*
|
||||
** Allocate and return an Fts5Colset object specifying the inverse of
|
||||
** the colset passed as the second argument. Free the colset passed
|
||||
** as the second argument before returning.
|
||||
*/
|
||||
static Fts5Colset *sqlite3Fts5ParseColsetInvert(Fts5Parse *pParse, Fts5Colset *p){
|
||||
Fts5Colset *pRet;
|
||||
int nCol = pParse->pConfig->nCol;
|
||||
|
||||
pRet = (Fts5Colset*)sqlite3Fts5MallocZero(&pParse->rc,
|
||||
sizeof(Fts5Colset) + sizeof(int)*nCol
|
||||
);
|
||||
if( pRet ){
|
||||
int i;
|
||||
int iOld = 0;
|
||||
for(i=0; i<nCol; i++){
|
||||
if( iOld>=p->nCol || p->aiCol[iOld]!=i ){
|
||||
pRet->aiCol[pRet->nCol++] = i;
|
||||
}else{
|
||||
iOld++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sqlite3_free(p);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
static Fts5Colset *sqlite3Fts5ParseColset(
|
||||
Fts5Parse *pParse, /* Store SQLITE_NOMEM here if required */
|
||||
Fts5Colset *pColset, /* Existing colset object */
|
||||
|
@ -188192,14 +188119,6 @@ static void fts5IterSetOutputs_Nocolset(Fts5Iter *pIter, Fts5SegIter *pSeg){
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** xSetOutputs callback used when the Fts5Colset object has nCol==0 (match
|
||||
** against no columns at all).
|
||||
*/
|
||||
static void fts5IterSetOutputs_ZeroColset(Fts5Iter *pIter, Fts5SegIter *pSeg){
|
||||
pIter->base.nData = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** xSetOutputs callback used by detail=col when there is a column filter
|
||||
** and there are 100 or more columns. Also called as a fallback from
|
||||
|
@ -188305,10 +188224,6 @@ static void fts5IterSetOutputCb(int *pRc, Fts5Iter *pIter){
|
|||
pIter->xSetOutputs = fts5IterSetOutputs_Nocolset;
|
||||
}
|
||||
|
||||
else if( pIter->pColset->nCol==0 ){
|
||||
pIter->xSetOutputs = fts5IterSetOutputs_ZeroColset;
|
||||
}
|
||||
|
||||
else if( pConfig->eDetail==FTS5_DETAIL_FULL ){
|
||||
pIter->xSetOutputs = fts5IterSetOutputs_Full;
|
||||
}
|
||||
|
@ -194085,7 +194000,7 @@ static void fts5SourceIdFunc(
|
|||
){
|
||||
assert( nArg==0 );
|
||||
UNUSED_PARAM2(nArg, apUnused);
|
||||
sqlite3_result_text(pCtx, "fts5: 2016-08-10 11:50:12 b07a26df06a2ffb946ff8a1cc7f43eaf701a94b5", -1, SQLITE_TRANSIENT);
|
||||
sqlite3_result_text(pCtx, "fts5: 2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de", -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
static int fts5Init(sqlite3 *db){
|
||||
|
|
|
@ -120,9 +120,9 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.15.0"
|
||||
#define SQLITE_VERSION_NUMBER 3015000
|
||||
#define SQLITE_SOURCE_ID "2016-08-10 15:02:49 059f4e2efefb7b9deaf539110c19bceaeb10c6ce"
|
||||
#define SQLITE_VERSION "3.14.0"
|
||||
#define SQLITE_VERSION_NUMBER 3014000
|
||||
#define SQLITE_SOURCE_ID "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
|
Loading…
Reference in New Issue