Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Update the built-in SQLite to the latest trunk version from the 3.46.0 development cycle, for the purposing testing SQLite. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
03e00a67d9f0aff6e03afd7efed9ee43 |
| User & Date: | drh 2024-03-18 19:16:23.242 |
Context
|
2024-03-20
| ||
| 19:06 | Fix a potential NULL pointer dereference in search if the search index is not correct. check-in: 11ffd84a9a user: drh tags: trunk | |
|
2024-03-18
| ||
| 19:16 | Update the built-in SQLite to the latest trunk version from the 3.46.0 development cycle, for the purposing testing SQLite. check-in: 03e00a67d9 user: drh tags: trunk | |
|
2024-03-16
| ||
| 23:01 | Referenced prior commit's feature in the changelog check-in: 6f532afa47 user: wyoung tags: trunk | |
Changes
Changes to extsrc/shell.c.
| ︙ | ︙ | |||
26759 26760 26761 26762 26763 26764 26765 |
showHelp(p->out, 0);
}
}else
#ifndef SQLITE_SHELL_FIDDLE
if( c=='i' && cli_strncmp(azArg[0], "import", n)==0 ){
char *zTable = 0; /* Insert data into this table */
| | | | < | 26759 26760 26761 26762 26763 26764 26765 26766 26767 26768 26769 26770 26771 26772 26773 26774 26775 26776 26777 26778 26779 26780 26781 |
showHelp(p->out, 0);
}
}else
#ifndef SQLITE_SHELL_FIDDLE
if( c=='i' && cli_strncmp(azArg[0], "import", n)==0 ){
char *zTable = 0; /* Insert data into this table */
char *zSchema = 0; /* Schema of zTable */
char *zFile = 0; /* Name of file to extra content from */
sqlite3_stmt *pStmt = NULL; /* A statement */
int nCol; /* Number of columns in the table */
i64 nByte; /* Number of bytes in an SQL string */
int i, j; /* Loop counters */
int needCommit; /* True to COMMIT or ROLLBACK at end */
int nSep; /* Number of bytes in p->colSeparator[] */
char *zSql = 0; /* An SQL statement */
ImportCtx sCtx; /* Reader context */
char *(SQLITE_CDECL *xRead)(ImportCtx*); /* Func to read one value */
int eVerbose = 0; /* Larger for more console output */
int nSkip = 0; /* Initial lines to skip */
int useOutputMode = 1; /* Use output mode to determine separators */
char *zCreate = 0; /* CREATE TABLE statement text */
|
| ︙ | ︙ | |||
26902 26903 26904 26905 26906 26907 26908 |
import_cleanup(&sCtx);
shell_out_of_memory();
}
/* Below, resources must be freed before exit. */
while( (nSkip--)>0 ){
while( xRead(&sCtx) && sCtx.cTerm==sCtx.cColSep ){}
}
| < < < < < < < < < < < < | > | > < < < < > > > > > > | > > > > > > > > > > > | | < < | > > | | > > > > | > > > > > > | > > < < | 26901 26902 26903 26904 26905 26906 26907 26908 26909 26910 26911 26912 26913 26914 26915 26916 26917 26918 26919 26920 26921 26922 26923 26924 26925 26926 26927 26928 26929 26930 26931 26932 26933 26934 26935 26936 26937 26938 26939 26940 26941 26942 26943 26944 26945 26946 26947 26948 26949 26950 26951 26952 26953 26954 26955 26956 26957 26958 26959 26960 26961 26962 26963 26964 26965 26966 26967 26968 26969 26970 26971 26972 26973 26974 26975 26976 26977 26978 26979 26980 26981 26982 26983 26984 26985 26986 26987 26988 26989 26990 26991 26992 26993 26994 26995 26996 26997 26998 26999 27000 27001 27002 27003 27004 27005 27006 27007 27008 27009 27010 27011 27012 27013 27014 |
import_cleanup(&sCtx);
shell_out_of_memory();
}
/* Below, resources must be freed before exit. */
while( (nSkip--)>0 ){
while( xRead(&sCtx) && sCtx.cTerm==sCtx.cColSep ){}
}
import_append_char(&sCtx, 0); /* To ensure sCtx.z is allocated */
if( sqlite3_table_column_metadata(p->db, zSchema, zTable,0,0,0,0,0,0) ){
/* Table does not exist. Create it. */
sqlite3 *dbCols = 0;
char *zRenames = 0;
char *zColDefs;
zCreate = sqlite3_mprintf("CREATE TABLE \"%w\".\"%w\"",
zSchema ? zSchema : "main", zTable);
while( xRead(&sCtx) ){
zAutoColumn(sCtx.z, &dbCols, 0);
if( sCtx.cTerm!=sCtx.cColSep ) break;
}
zColDefs = zAutoColumn(0, &dbCols, &zRenames);
if( zRenames!=0 ){
sputf((stdin_is_interactive && p->in==stdin)? p->out : stderr,
"Columns renamed during .import %s due to duplicates:\n"
"%s\n", sCtx.zFile, zRenames);
sqlite3_free(zRenames);
}
assert(dbCols==0);
if( zColDefs==0 ){
eputf("%s: empty file\n", sCtx.zFile);
import_cleanup(&sCtx);
rc = 1;
goto meta_command_exit;
}
zCreate = sqlite3_mprintf("%z%z\n", zCreate, zColDefs);
if( zCreate==0 ){
import_cleanup(&sCtx);
shell_out_of_memory();
}
if( eVerbose>=1 ){
oputf("%s\n", zCreate);
}
rc = sqlite3_exec(p->db, zCreate, 0, 0, 0);
sqlite3_free(zCreate);
zCreate = 0;
if( rc ){
eputf("%s failed:\n%s\n", zCreate, sqlite3_errmsg(p->db));
import_cleanup(&sCtx);
rc = 1;
goto meta_command_exit;
}
}
zSql = sqlite3_mprintf("SELECT count(*) FROM pragma_table_info(%Q,%Q);",
zTable, zSchema);
if( zSql==0 ){
import_cleanup(&sCtx);
shell_out_of_memory();
}
nByte = strlen(zSql);
rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
sqlite3_free(zSql);
zSql = 0;
if( rc ){
if (pStmt) sqlite3_finalize(pStmt);
eputf("Error: %s\n", sqlite3_errmsg(p->db));
import_cleanup(&sCtx);
rc = 1;
goto meta_command_exit;
}
if( sqlite3_step(pStmt)==SQLITE_ROW ){
nCol = sqlite3_column_int(pStmt, 0);
}else{
nCol = 0;
}
sqlite3_finalize(pStmt);
pStmt = 0;
if( nCol==0 ) return 0; /* no columns, no error */
zSql = sqlite3_malloc64( nByte*2 + 20 + nCol*2 );
if( zSql==0 ){
import_cleanup(&sCtx);
shell_out_of_memory();
}
if( zSchema ){
sqlite3_snprintf(nByte+20, zSql, "INSERT INTO \"%w\".\"%w\" VALUES(?",
zSchema, zTable);
}else{
sqlite3_snprintf(nByte+20, zSql, "INSERT INTO \"%w\" VALUES(?", zTable);
}
j = strlen30(zSql);
for(i=1; i<nCol; i++){
zSql[j++] = ',';
zSql[j++] = '?';
}
zSql[j++] = ')';
zSql[j] = 0;
if( eVerbose>=2 ){
oputf("Insert using: %s\n", zSql);
}
rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
sqlite3_free(zSql);
zSql = 0;
if( rc ){
eputf("Error: %s\n", sqlite3_errmsg(p->db));
if (pStmt) sqlite3_finalize(pStmt);
import_cleanup(&sCtx);
rc = 1;
goto meta_command_exit;
}
needCommit = sqlite3_get_autocommit(p->db);
if( needCommit ) sqlite3_exec(p->db, "BEGIN", 0, 0, 0);
do{
int startLine = sCtx.nLine;
for(i=0; i<nCol; i++){
char *z = xRead(&sCtx);
/*
|
| ︙ | ︙ |
Changes to extsrc/sqlite3.c.
| ︙ | ︙ | |||
14 15 16 17 18 19 20 | ** the text of this file. Search for "Begin file sqlite3.h" to find the start ** of the embedded sqlite3.h header file.) Additional code files may be needed ** if you want a wrapper to interface SQLite with your choice of programming ** language. The code for the "sqlite3" command-line shell is also in a ** separate file. This file contains only code for the core SQLite library. ** ** The content in this amalgamation comes from Fossil check-in | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ** the text of this file. Search for "Begin file sqlite3.h" to find the start ** of the embedded sqlite3.h header file.) Additional code files may be needed ** if you want a wrapper to interface SQLite with your choice of programming ** language. The code for the "sqlite3" command-line shell is also in a ** separate file. This file contains only code for the core SQLite library. ** ** The content in this amalgamation comes from Fossil check-in ** 76fb3a908f45230b956cb659c754e47603e8. */ #define SQLITE_CORE 1 #define SQLITE_AMALGAMATION 1 #ifndef SQLITE_PRIVATE # define SQLITE_PRIVATE static #endif /************** Begin file sqliteInt.h ***************************************/ |
| ︙ | ︙ | |||
457 458 459 460 461 462 463 | ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.46.0" #define SQLITE_VERSION_NUMBER 3046000 | | | 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.46.0" #define SQLITE_VERSION_NUMBER 3046000 #define SQLITE_SOURCE_ID "2024-03-18 18:03:17 76fb3a908f45230b956cb659c754e47603e80aa72a2aad50d479437a9c013f61" /* ** CAPI3REF: Run-Time Library Version Numbers ** KEYWORDS: sqlite3_version sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
| ︙ | ︙ | |||
19171 19172 19173 19174 19175 19176 19177 | ** jointype expresses the join between the table and the previous table. ** ** In the colUsed field, the high-order bit (bit 63) is set if the table ** contains more than 63 columns and the 64-th or later column is used. ** ** Union member validity: ** | | | > > | | | 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 |
** jointype expresses the join between the table and the previous table.
**
** In the colUsed field, the high-order bit (bit 63) is set if the table
** contains more than 63 columns and the 64-th or later column is used.
**
** Union member validity:
**
** u1.zIndexedBy fg.isIndexedBy && !fg.isTabFunc
** u1.pFuncArg fg.isTabFunc && !fg.isIndexedBy
** u1.nRow !fg.isTabFunc && !fg.isIndexedBy
**
** u2.pIBIndex fg.isIndexedBy && !fg.isCte
** u2.pCteUse fg.isCte && !fg.isIndexedBy
*/
struct SrcItem {
Schema *pSchema; /* Schema to which this item is fixed */
char *zDatabase; /* Name of database holding this table */
char *zName; /* Name of the table */
char *zAlias; /* The "B" part of a "A AS B" phrase. zName is the "A" */
Table *pTab; /* An SQL table corresponding to zName */
|
| ︙ | ︙ | |||
19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 |
Expr *pOn; /* fg.isUsing==0 => The ON clause of a join */
IdList *pUsing; /* fg.isUsing==1 => The USING clause of a join */
} u3;
Bitmask colUsed; /* Bit N set if column N used. Details above for N>62 */
union {
char *zIndexedBy; /* Identifier from "INDEXED BY <zIndex>" clause */
ExprList *pFuncArg; /* Arguments to table-valued-function */
} u1;
union {
Index *pIBIndex; /* Index structure corresponding to u1.zIndexedBy */
CteUse *pCteUse; /* CTE Usage info when fg.isCte is true */
} u2;
};
| > | 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 |
Expr *pOn; /* fg.isUsing==0 => The ON clause of a join */
IdList *pUsing; /* fg.isUsing==1 => The USING clause of a join */
} u3;
Bitmask colUsed; /* Bit N set if column N used. Details above for N>62 */
union {
char *zIndexedBy; /* Identifier from "INDEXED BY <zIndex>" clause */
ExprList *pFuncArg; /* Arguments to table-valued-function */
u32 nRow; /* Number of rows in a VALUES clause */
} u1;
union {
Index *pIBIndex; /* Index structure corresponding to u1.zIndexedBy */
CteUse *pCteUse; /* CTE Usage info when fg.isCte is true */
} u2;
};
|
| ︙ | ︙ | |||
19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 | u8 isMultiWrite; /* True if statement may modify/insert multiple rows */ u8 mayAbort; /* True if statement may throw an ABORT exception */ u8 hasCompound; /* Need to invoke convertCompoundSelectToSubquery() */ u8 okConstFactor; /* OK to factor out constants */ u8 disableLookaside; /* Number of times lookaside has been disabled */ u8 prepFlags; /* SQLITE_PREPARE_* flags */ u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ #endif #ifdef SQLITE_DEBUG u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ #endif int nRangeReg; /* Size of the temporary register block */ | > | 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 | u8 isMultiWrite; /* True if statement may modify/insert multiple rows */ u8 mayAbort; /* True if statement may throw an ABORT exception */ u8 hasCompound; /* Need to invoke convertCompoundSelectToSubquery() */ u8 okConstFactor; /* OK to factor out constants */ u8 disableLookaside; /* Number of times lookaside has been disabled */ u8 prepFlags; /* SQLITE_PREPARE_* flags */ u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ u8 bHasWith; /* True if statement contains WITH */ #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ #endif #ifdef SQLITE_DEBUG u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ #endif int nRangeReg; /* Size of the temporary register block */ |
| ︙ | ︙ | |||
20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 |
int regOne; /* Register containing constant value 1 */
int regStartRowid;
int regEndRowid;
u8 bExprArgs; /* Defer evaluation of window function arguments
** due to the SQLITE_SUBTYPE flag */
};
#ifndef SQLITE_OMIT_WINDOWFUNC
SQLITE_PRIVATE void sqlite3WindowDelete(sqlite3*, Window*);
SQLITE_PRIVATE void sqlite3WindowUnlinkFromSelect(Window*);
SQLITE_PRIVATE void sqlite3WindowListDelete(sqlite3 *db, Window *p);
SQLITE_PRIVATE Window *sqlite3WindowAlloc(Parse*, int, int, Expr*, int , Expr*, u8);
SQLITE_PRIVATE void sqlite3WindowAttach(Parse*, Expr*, Window*);
SQLITE_PRIVATE void sqlite3WindowLink(Select *pSel, Window *pWin);
| > > > | 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 |
int regOne; /* Register containing constant value 1 */
int regStartRowid;
int regEndRowid;
u8 bExprArgs; /* Defer evaluation of window function arguments
** due to the SQLITE_SUBTYPE flag */
};
SQLITE_PRIVATE Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow);
SQLITE_PRIVATE void sqlite3MultiValuesEnd(Parse *pParse, Select *pVal);
#ifndef SQLITE_OMIT_WINDOWFUNC
SQLITE_PRIVATE void sqlite3WindowDelete(sqlite3*, Window*);
SQLITE_PRIVATE void sqlite3WindowUnlinkFromSelect(Window*);
SQLITE_PRIVATE void sqlite3WindowListDelete(sqlite3 *db, Window *p);
SQLITE_PRIVATE Window *sqlite3WindowAlloc(Parse*, int, int, Expr*, int , Expr*, u8);
SQLITE_PRIVATE void sqlite3WindowAttach(Parse*, Expr*, Window*);
SQLITE_PRIVATE void sqlite3WindowLink(Select *pSel, Window *pWin);
|
| ︙ | ︙ | |||
20955 20956 20957 20958 20959 20960 20961 | SQLITE_PRIVATE void sqlite3EndTransaction(Parse*,int); SQLITE_PRIVATE void sqlite3Savepoint(Parse*, int, Token*); SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *); SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*); SQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char*); SQLITE_PRIVATE int sqlite3ExprIdToTrueFalse(Expr*); SQLITE_PRIVATE int sqlite3ExprTruthValue(const Expr*); | | < | 20962 20963 20964 20965 20966 20967 20968 20969 20970 20971 20972 20973 20974 20975 20976 | SQLITE_PRIVATE void sqlite3EndTransaction(Parse*,int); SQLITE_PRIVATE void sqlite3Savepoint(Parse*, int, Token*); SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *); SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*); SQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char*); SQLITE_PRIVATE int sqlite3ExprIdToTrueFalse(Expr*); SQLITE_PRIVATE int sqlite3ExprTruthValue(const Expr*); SQLITE_PRIVATE int sqlite3ExprIsConstant(Parse*,Expr*); SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*, u8); SQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*); SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr*,int); SQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(Expr*,const SrcList*,int); #ifdef SQLITE_ENABLE_CURSOR_HINTS SQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*); #endif |
| ︙ | ︙ | |||
31894 31895 31896 31897 31898 31899 31900 31901 31902 31903 31904 31905 31906 31907 |
}else if( pItem->zAlias ){
sqlite3_str_appendall(pAccum, pItem->zAlias);
}else{
Select *pSel = pItem->pSelect;
assert( pSel!=0 );
if( pSel->selFlags & SF_NestedFrom ){
sqlite3_str_appendf(pAccum, "(join-%u)", pSel->selId);
}else{
sqlite3_str_appendf(pAccum, "(subquery-%u)", pSel->selId);
}
}
length = width = 0;
break;
}
| > > > > | 31900 31901 31902 31903 31904 31905 31906 31907 31908 31909 31910 31911 31912 31913 31914 31915 31916 31917 |
}else if( pItem->zAlias ){
sqlite3_str_appendall(pAccum, pItem->zAlias);
}else{
Select *pSel = pItem->pSelect;
assert( pSel!=0 );
if( pSel->selFlags & SF_NestedFrom ){
sqlite3_str_appendf(pAccum, "(join-%u)", pSel->selId);
}else if( pSel->selFlags & SF_MultiValue ){
assert( !pItem->fg.isTabFunc && !pItem->fg.isIndexedBy );
sqlite3_str_appendf(pAccum, "%u-ROW VALUES CLAUSE",
pItem->u1.nRow);
}else{
sqlite3_str_appendf(pAccum, "(subquery-%u)", pSel->selId);
}
}
length = width = 0;
break;
}
|
| ︙ | ︙ | |||
109034 109035 109036 109037 109038 109039 109040 |
SQLITE_PRIVATE Expr *sqlite3ExprSkipCollateAndLikely(Expr *pExpr){
while( pExpr && ExprHasProperty(pExpr, EP_Skip|EP_Unlikely) ){
if( ExprHasProperty(pExpr, EP_Unlikely) ){
assert( ExprUseXList(pExpr) );
assert( pExpr->x.pList->nExpr>0 );
assert( pExpr->op==TK_FUNCTION );
pExpr = pExpr->x.pList->a[0].pExpr;
| < | > > | 109044 109045 109046 109047 109048 109049 109050 109051 109052 109053 109054 109055 109056 109057 109058 109059 109060 109061 |
SQLITE_PRIVATE Expr *sqlite3ExprSkipCollateAndLikely(Expr *pExpr){
while( pExpr && ExprHasProperty(pExpr, EP_Skip|EP_Unlikely) ){
if( ExprHasProperty(pExpr, EP_Unlikely) ){
assert( ExprUseXList(pExpr) );
assert( pExpr->x.pList->nExpr>0 );
assert( pExpr->op==TK_FUNCTION );
pExpr = pExpr->x.pList->a[0].pExpr;
}else if( pExpr->op==TK_COLLATE ){
pExpr = pExpr->pLeft;
}else{
break;
}
}
return pExpr;
}
/*
** Return the collation sequence for the expression pExpr. If
|
| ︙ | ︙ | |||
110685 110686 110687 110688 110689 110690 110691 110692 110693 110694 110695 110696 110697 110698 |
pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
pNewItem->fg = pOldItem->fg;
pNewItem->iCursor = pOldItem->iCursor;
pNewItem->addrFillSub = pOldItem->addrFillSub;
pNewItem->regReturn = pOldItem->regReturn;
if( pNewItem->fg.isIndexedBy ){
pNewItem->u1.zIndexedBy = sqlite3DbStrDup(db, pOldItem->u1.zIndexedBy);
}
pNewItem->u2 = pOldItem->u2;
if( pNewItem->fg.isCte ){
pNewItem->u2.pCteUse->nUse++;
}
| > | 110696 110697 110698 110699 110700 110701 110702 110703 110704 110705 110706 110707 110708 110709 110710 |
pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
pNewItem->fg = pOldItem->fg;
pNewItem->iCursor = pOldItem->iCursor;
pNewItem->addrFillSub = pOldItem->addrFillSub;
pNewItem->regReturn = pOldItem->regReturn;
pNewItem->regResult = pOldItem->regResult;
if( pNewItem->fg.isIndexedBy ){
pNewItem->u1.zIndexedBy = sqlite3DbStrDup(db, pOldItem->u1.zIndexedBy);
}
pNewItem->u2 = pOldItem->u2;
if( pNewItem->fg.isCte ){
pNewItem->u2.pCteUse->nUse++;
}
|
| ︙ | ︙ | |||
111161 111162 111163 111164 111165 111166 111167 111168 111169 111170 111171 111172 111173 111174 |
}else if( ExprAlwaysTrue(pRight) || ExprAlwaysFalse(pLeft) ){
pExpr = pExpr->op==TK_AND ? pLeft : pRight;
}
}
return pExpr;
}
/*
** These routines are Walker callbacks used to check expressions to
** see if they are "constant" for some definition of constant. The
** Walker.eCode value determines the type of "constant" we are looking
** for.
**
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 111173 111174 111175 111176 111177 111178 111179 111180 111181 111182 111183 111184 111185 111186 111187 111188 111189 111190 111191 111192 111193 111194 111195 111196 111197 111198 111199 111200 111201 111202 111203 111204 111205 111206 111207 111208 111209 111210 111211 111212 111213 111214 111215 111216 111217 111218 111219 111220 111221 111222 111223 111224 111225 111226 111227 111228 111229 111230 111231 111232 111233 111234 |
}else if( ExprAlwaysTrue(pRight) || ExprAlwaysFalse(pLeft) ){
pExpr = pExpr->op==TK_AND ? pLeft : pRight;
}
}
return pExpr;
}
/*
** pExpr is a TK_FUNCTION node. Try to determine whether or not the
** function is a constant function. A function is constant if all of
** the following are true:
**
** (1) It is a scalar function (not an aggregate or window function)
** (2) It has either the SQLITE_FUNC_CONSTANT or SQLITE_FUNC_SLOCHNG
** property.
** (3) All of its arguments are constants
**
** This routine sets pWalker->eCode to 0 if pExpr is not a constant.
** It makes no changes to pWalker->eCode if pExpr is constant. In
** every case, it returns WRC_Abort.
**
** Called as a service subroutine from exprNodeIsConstant().
*/
static SQLITE_NOINLINE int exprNodeIsConstantFunction(
Walker *pWalker,
Expr *pExpr
){
int n; /* Number of arguments */
ExprList *pList; /* List of arguments */
FuncDef *pDef; /* The function */
sqlite3 *db; /* The database */
assert( pExpr->op==TK_FUNCTION );
if( ExprHasProperty(pExpr, EP_TokenOnly)
|| (pList = pExpr->x.pList)==0
){;
n = 0;
}else{
n = pList->nExpr;
sqlite3WalkExprList(pWalker, pList);
if( pWalker->eCode==0 ) return WRC_Abort;
}
db = pWalker->pParse->db;
pDef = sqlite3FindFunction(db, pExpr->u.zToken, n, ENC(db), 0);
if( pDef==0
|| pDef->xFinalize!=0
|| (pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG))==0
|| ExprHasProperty(pExpr, EP_WinFunc)
){
pWalker->eCode = 0;
return WRC_Abort;
}
return WRC_Continue;
}
/*
** These routines are Walker callbacks used to check expressions to
** see if they are "constant" for some definition of constant. The
** Walker.eCode value determines the type of "constant" we are looking
** for.
**
|
| ︙ | ︙ | |||
111189 111190 111191 111192 111193 111194 111195 111196 111197 111198 111199 111200 111201 111202 111203 111204 111205 111206 111207 111208 111209 111210 111211 111212 111213 111214 111215 111216 111217 111218 111219 111220 111221 |
** an error for new statements, but is silently converted
** to NULL for existing schemas. This allows sqlite_schema tables that
** contain a bound parameter because they were generated by older versions
** of SQLite to be parsed by newer versions of SQLite without raising a
** malformed schema error.
*/
static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
/* If pWalker->eCode is 2 then any term of the expression that comes from
** the ON or USING clauses of an outer join disqualifies the expression
** from being considered constant. */
if( pWalker->eCode==2 && ExprHasProperty(pExpr, EP_OuterON) ){
pWalker->eCode = 0;
return WRC_Abort;
}
switch( pExpr->op ){
/* Consider functions to be constant if all their arguments are constant
** and either pWalker->eCode==4 or 5 or the function has the
** SQLITE_FUNC_CONST flag. */
case TK_FUNCTION:
if( (pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_ConstFunc))
&& !ExprHasProperty(pExpr, EP_WinFunc)
){
if( pWalker->eCode==5 ) ExprSetProperty(pExpr, EP_FromDDL);
return WRC_Continue;
}else{
pWalker->eCode = 0;
return WRC_Abort;
}
case TK_ID:
/* Convert "true" or "false" in a DEFAULT clause into the
** appropriate TK_TRUEFALSE operator */
| > > > | 111249 111250 111251 111252 111253 111254 111255 111256 111257 111258 111259 111260 111261 111262 111263 111264 111265 111266 111267 111268 111269 111270 111271 111272 111273 111274 111275 111276 111277 111278 111279 111280 111281 111282 111283 111284 |
** an error for new statements, but is silently converted
** to NULL for existing schemas. This allows sqlite_schema tables that
** contain a bound parameter because they were generated by older versions
** of SQLite to be parsed by newer versions of SQLite without raising a
** malformed schema error.
*/
static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
assert( pWalker->eCode>0 );
/* If pWalker->eCode is 2 then any term of the expression that comes from
** the ON or USING clauses of an outer join disqualifies the expression
** from being considered constant. */
if( pWalker->eCode==2 && ExprHasProperty(pExpr, EP_OuterON) ){
pWalker->eCode = 0;
return WRC_Abort;
}
switch( pExpr->op ){
/* Consider functions to be constant if all their arguments are constant
** and either pWalker->eCode==4 or 5 or the function has the
** SQLITE_FUNC_CONST flag. */
case TK_FUNCTION:
if( (pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_ConstFunc))
&& !ExprHasProperty(pExpr, EP_WinFunc)
){
if( pWalker->eCode==5 ) ExprSetProperty(pExpr, EP_FromDDL);
return WRC_Continue;
}else if( pWalker->pParse ){
return exprNodeIsConstantFunction(pWalker, pExpr);
}else{
pWalker->eCode = 0;
return WRC_Abort;
}
case TK_ID:
/* Convert "true" or "false" in a DEFAULT clause into the
** appropriate TK_TRUEFALSE operator */
|
| ︙ | ︙ | |||
111260 111261 111262 111263 111264 111265 111266 |
/* no break */ deliberate_fall_through
default:
testcase( pExpr->op==TK_SELECT ); /* sqlite3SelectWalkFail() disallows */
testcase( pExpr->op==TK_EXISTS ); /* sqlite3SelectWalkFail() disallows */
return WRC_Continue;
}
}
| | > > > > > > > | | | | | | 111323 111324 111325 111326 111327 111328 111329 111330 111331 111332 111333 111334 111335 111336 111337 111338 111339 111340 111341 111342 111343 111344 111345 111346 111347 111348 111349 111350 111351 111352 111353 111354 111355 111356 111357 111358 111359 111360 111361 111362 111363 111364 111365 111366 111367 111368 111369 111370 111371 111372 111373 111374 111375 111376 111377 111378 111379 111380 111381 111382 111383 111384 111385 111386 111387 111388 111389 111390 111391 111392 111393 |
/* no break */ deliberate_fall_through
default:
testcase( pExpr->op==TK_SELECT ); /* sqlite3SelectWalkFail() disallows */
testcase( pExpr->op==TK_EXISTS ); /* sqlite3SelectWalkFail() disallows */
return WRC_Continue;
}
}
static int exprIsConst(Parse *pParse, Expr *p, int initFlag, int iCur){
Walker w;
w.eCode = initFlag;
w.pParse = pParse;
w.xExprCallback = exprNodeIsConstant;
w.xSelectCallback = sqlite3SelectWalkFail;
#ifdef SQLITE_DEBUG
w.xSelectCallback2 = sqlite3SelectWalkAssert2;
#endif
w.u.iCur = iCur;
sqlite3WalkExpr(&w, p);
return w.eCode;
}
/*
** Walk an expression tree. Return non-zero if the expression is constant
** and 0 if it involves variables or function calls.
**
** For the purposes of this function, a double-quoted string (ex: "abc")
** is considered a variable but a single-quoted string (ex: 'abc') is
** a constant.
**
** The pParse parameter may be NULL. But if it is NULL, there is no way
** to determine if function calls are constant or not, and hence all
** function calls will be considered to be non-constant. If pParse is
** not NULL, then a function call might be constant, depending on the
** function and on its parameters.
*/
SQLITE_PRIVATE int sqlite3ExprIsConstant(Parse *pParse, Expr *p){
return exprIsConst(pParse, p, 1, 0);
}
/*
** Walk an expression tree. Return non-zero if
**
** (1) the expression is constant, and
** (2) the expression does originate in the ON or USING clause
** of a LEFT JOIN, and
** (3) the expression does not contain any EP_FixedCol TK_COLUMN
** operands created by the constant propagation optimization.
**
** When this routine returns true, it indicates that the expression
** can be added to the pParse->pConstExpr list and evaluated once when
** the prepared statement starts up. See sqlite3ExprCodeRunJustOnce().
*/
static int sqlite3ExprIsConstantNotJoin(Parse *pParse, Expr *p){
return exprIsConst(pParse, p, 2, 0);
}
/*
** Walk an expression tree. Return non-zero if the expression is constant
** for any single row of the table with cursor iCur. In other words, the
** expression must not refer to any non-deterministic function nor any
** table other than iCur.
*/
SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr *p, int iCur){
return exprIsConst(0, p, 3, iCur);
}
/*
** Check pExpr to see if it is an constraint on the single data source
** pSrc = &pSrcList->a[iSrc]. In other words, check to see if pExpr
** constrains pSrc but does not depend on any other tables or data
** sources anywhere else in the query. Return true (non-zero) if pExpr
|
| ︙ | ︙ | |||
111466 111467 111468 111469 111470 111471 111472 |
**
** For the purposes of this function, a double-quoted string (ex: "abc")
** is considered a variable but a single-quoted string (ex: 'abc') is
** a constant.
*/
SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr *p, u8 isInit){
assert( isInit==0 || isInit==1 );
| | | 111536 111537 111538 111539 111540 111541 111542 111543 111544 111545 111546 111547 111548 111549 111550 |
**
** For the purposes of this function, a double-quoted string (ex: "abc")
** is considered a variable but a single-quoted string (ex: 'abc') is
** a constant.
*/
SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr *p, u8 isInit){
assert( isInit==0 || isInit==1 );
return exprIsConst(0, p, 4+isInit, 0);
}
#ifdef SQLITE_ENABLE_CURSOR_HINTS
/*
** Walk an expression tree. Return 1 if the expression contains a
** subquery of some kind. Return 0 if there are no subqueries.
*/
|
| ︙ | ︙ | |||
111711 111712 111713 111714 111715 111716 111717 | #ifndef SQLITE_OMIT_SUBQUERY /* ** The argument is an IN operator with a list (not a subquery) on the ** right-hand side. Return TRUE if that list is constant. */ | | | | 111781 111782 111783 111784 111785 111786 111787 111788 111789 111790 111791 111792 111793 111794 111795 111796 111797 111798 111799 111800 111801 |
#ifndef SQLITE_OMIT_SUBQUERY
/*
** The argument is an IN operator with a list (not a subquery) on the
** right-hand side. Return TRUE if that list is constant.
*/
static int sqlite3InRhsIsConstant(Parse *pParse, Expr *pIn){
Expr *pLHS;
int res;
assert( !ExprHasProperty(pIn, EP_xIsSelect) );
pLHS = pIn->pLeft;
pIn->pLeft = 0;
res = sqlite3ExprIsConstant(pParse, pIn);
pIn->pLeft = pLHS;
return res;
}
#endif
/*
** This function is used by the implementation of the IN (...) operator.
|
| ︙ | ︙ | |||
111986 111987 111988 111989 111990 111991 111992 | ** and the RHS is not constant or has two or fewer terms, ** then it is not worth creating an ephemeral table to evaluate ** the IN operator so return IN_INDEX_NOOP. */ if( eType==0 && (inFlags & IN_INDEX_NOOP_OK) && ExprUseXList(pX) | | | 112056 112057 112058 112059 112060 112061 112062 112063 112064 112065 112066 112067 112068 112069 112070 |
** and the RHS is not constant or has two or fewer terms,
** then it is not worth creating an ephemeral table to evaluate
** the IN operator so return IN_INDEX_NOOP.
*/
if( eType==0
&& (inFlags & IN_INDEX_NOOP_OK)
&& ExprUseXList(pX)
&& (!sqlite3InRhsIsConstant(pParse,pX) || pX->x.pList->nExpr<=2)
){
pParse->nTab--; /* Back out the allocation of the unused cursor */
iTab = -1; /* Cursor is not allocated */
eType = IN_INDEX_NOOP;
}
if( eType==0 ){
|
| ︙ | ︙ | |||
112269 112270 112271 112272 112273 112274 112275 |
Expr *pE2 = pItem->pExpr;
/* If the expression is not constant then we will need to
** disable the test that was generated above that makes sure
** this code only executes once. Because for a non-constant
** expression we need to rerun this code each time.
*/
| | | 112339 112340 112341 112342 112343 112344 112345 112346 112347 112348 112349 112350 112351 112352 112353 |
Expr *pE2 = pItem->pExpr;
/* If the expression is not constant then we will need to
** disable the test that was generated above that makes sure
** this code only executes once. Because for a non-constant
** expression we need to rerun this code each time.
*/
if( addrOnce && !sqlite3ExprIsConstant(pParse, pE2) ){
sqlite3VdbeChangeToNoop(v, addrOnce-1);
sqlite3VdbeChangeToNoop(v, addrOnce);
ExprClearProperty(pExpr, EP_Subrtn);
addrOnce = 0;
}
/* Evaluate the expression and insert it into the temp table */
|
| ︙ | ︙ | |||
113606 113607 113608 113609 113610 113611 113612 |
#ifndef SQLITE_OMIT_WINDOWFUNC
if( ExprHasProperty(pExpr, EP_WinFunc) ){
return pExpr->y.pWin->regResult;
}
#endif
| | > > | 113676 113677 113678 113679 113680 113681 113682 113683 113684 113685 113686 113687 113688 113689 113690 113691 113692 |
#ifndef SQLITE_OMIT_WINDOWFUNC
if( ExprHasProperty(pExpr, EP_WinFunc) ){
return pExpr->y.pWin->regResult;
}
#endif
if( ConstFactorOk(pParse)
&& sqlite3ExprIsConstantNotJoin(pParse,pExpr)
){
/* SQL functions can be expensive. So try to avoid running them
** multiple times if we know they always give the same result */
return sqlite3ExprCodeRunJustOnce(pParse, pExpr, -1);
}
assert( !ExprHasProperty(pExpr, EP_TokenOnly) );
assert( ExprUseXList(pExpr) );
pFarg = pExpr->x.pList;
|
| ︙ | ︙ | |||
113637 113638 113639 113640 113641 113642 113643 |
return exprCodeInlineFunction(pParse, pFarg,
SQLITE_PTR_TO_INT(pDef->pUserData), target);
}else if( pDef->funcFlags & (SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) ){
sqlite3ExprFunctionUsable(pParse, pExpr, pDef);
}
for(i=0; i<nFarg; i++){
| | | 113709 113710 113711 113712 113713 113714 113715 113716 113717 113718 113719 113720 113721 113722 113723 |
return exprCodeInlineFunction(pParse, pFarg,
SQLITE_PTR_TO_INT(pDef->pUserData), target);
}else if( pDef->funcFlags & (SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) ){
sqlite3ExprFunctionUsable(pParse, pExpr, pDef);
}
for(i=0; i<nFarg; i++){
if( i<32 && sqlite3ExprIsConstant(pParse, pFarg->a[i].pExpr) ){
testcase( i==31 );
constMask |= MASKBIT32(i);
}
if( (pDef->funcFlags & SQLITE_FUNC_NEEDCOLL)!=0 && !pColl ){
pColl = sqlite3ExprCollSeq(pParse, pFarg->a[i].pExpr);
}
}
|
| ︙ | ︙ | |||
114104 114105 114106 114107 114108 114109 114110 |
*/
SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse *pParse, Expr *pExpr, int *pReg){
int r2;
pExpr = sqlite3ExprSkipCollateAndLikely(pExpr);
if( ConstFactorOk(pParse)
&& ALWAYS(pExpr!=0)
&& pExpr->op!=TK_REGISTER
| | | 114176 114177 114178 114179 114180 114181 114182 114183 114184 114185 114186 114187 114188 114189 114190 |
*/
SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse *pParse, Expr *pExpr, int *pReg){
int r2;
pExpr = sqlite3ExprSkipCollateAndLikely(pExpr);
if( ConstFactorOk(pParse)
&& ALWAYS(pExpr!=0)
&& pExpr->op!=TK_REGISTER
&& sqlite3ExprIsConstantNotJoin(pParse, pExpr)
){
*pReg = 0;
r2 = sqlite3ExprCodeRunJustOnce(pParse, pExpr, -1);
}else{
int r1 = sqlite3GetTempReg(pParse);
r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
if( r2==r1 ){
|
| ︙ | ︙ | |||
114168 114169 114170 114171 114172 114173 114174 |
/*
** Generate code that will evaluate expression pExpr and store the
** results in register target. The results are guaranteed to appear
** in register target. If the expression is constant, then this routine
** might choose to code the expression at initialization time.
*/
SQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse *pParse, Expr *pExpr, int target){
| | | 114240 114241 114242 114243 114244 114245 114246 114247 114248 114249 114250 114251 114252 114253 114254 |
/*
** Generate code that will evaluate expression pExpr and store the
** results in register target. The results are guaranteed to appear
** in register target. If the expression is constant, then this routine
** might choose to code the expression at initialization time.
*/
SQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse *pParse, Expr *pExpr, int target){
if( pParse->okConstFactor && sqlite3ExprIsConstantNotJoin(pParse,pExpr) ){
sqlite3ExprCodeRunJustOnce(pParse, pExpr, target);
}else{
sqlite3ExprCodeCopy(pParse, pExpr, target);
}
}
/*
|
| ︙ | ︙ | |||
114227 114228 114229 114230 114231 114232 114233 |
if( flags & SQLITE_ECEL_OMITREF ){
i--;
n--;
}else{
sqlite3VdbeAddOp2(v, copyOp, j+srcReg-1, target+i);
}
}else if( (flags & SQLITE_ECEL_FACTOR)!=0
| | | 114299 114300 114301 114302 114303 114304 114305 114306 114307 114308 114309 114310 114311 114312 114313 |
if( flags & SQLITE_ECEL_OMITREF ){
i--;
n--;
}else{
sqlite3VdbeAddOp2(v, copyOp, j+srcReg-1, target+i);
}
}else if( (flags & SQLITE_ECEL_FACTOR)!=0
&& sqlite3ExprIsConstantNotJoin(pParse,pExpr)
){
sqlite3ExprCodeRunJustOnce(pParse, pExpr, target+i);
}else{
int inReg = sqlite3ExprCodeTarget(pParse, pExpr, target+i);
if( inReg!=target+i ){
VdbeOp *pOp;
if( copyOp==OP_Copy
|
| ︙ | ︙ | |||
133150 133151 133152 133153 133154 133155 133156 133157 133158 133159 133160 133161 133162 133163 | ** If SQLITE_OMIT_AUTOINCREMENT is defined, then the three routines ** above are all no-ops */ # define autoIncBegin(A,B,C) (0) # define autoIncStep(A,B,C) #endif /* SQLITE_OMIT_AUTOINCREMENT */ /* Forward declaration */ static int xferOptimization( Parse *pParse, /* Parser context */ Table *pDest, /* The table we are inserting into */ Select *pSelect, /* A SELECT statement to use as the data source */ int onError, /* How to handle constraint errors */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 133222 133223 133224 133225 133226 133227 133228 133229 133230 133231 133232 133233 133234 133235 133236 133237 133238 133239 133240 133241 133242 133243 133244 133245 133246 133247 133248 133249 133250 133251 133252 133253 133254 133255 133256 133257 133258 133259 133260 133261 133262 133263 133264 133265 133266 133267 133268 133269 133270 133271 133272 133273 133274 133275 133276 133277 133278 133279 133280 133281 133282 133283 133284 133285 133286 133287 133288 133289 133290 133291 133292 133293 133294 133295 133296 133297 133298 133299 133300 133301 133302 133303 133304 133305 133306 133307 133308 133309 133310 133311 133312 133313 133314 133315 133316 133317 133318 133319 133320 133321 133322 133323 133324 133325 133326 133327 133328 133329 133330 133331 133332 133333 133334 133335 133336 133337 133338 133339 133340 133341 133342 133343 133344 133345 133346 133347 133348 133349 133350 133351 133352 133353 133354 133355 133356 133357 133358 133359 133360 133361 133362 133363 133364 133365 133366 133367 133368 133369 133370 133371 133372 133373 133374 133375 133376 133377 133378 133379 133380 133381 133382 133383 133384 133385 133386 133387 133388 133389 133390 133391 133392 133393 133394 133395 133396 133397 133398 133399 133400 133401 133402 133403 133404 133405 133406 133407 133408 133409 133410 133411 133412 133413 133414 133415 133416 133417 133418 133419 133420 133421 133422 |
** If SQLITE_OMIT_AUTOINCREMENT is defined, then the three routines
** above are all no-ops
*/
# define autoIncBegin(A,B,C) (0)
# define autoIncStep(A,B,C)
#endif /* SQLITE_OMIT_AUTOINCREMENT */
/*
** If argument pVal is a Select object returned by an sqlite3MultiValues()
** that was able to use the co-routine optimization, finish coding the
** co-routine.
*/
SQLITE_PRIVATE void sqlite3MultiValuesEnd(Parse *pParse, Select *pVal){
if( ALWAYS(pVal) && pVal->pSrc->nSrc>0 ){
SrcItem *pItem = &pVal->pSrc->a[0];
sqlite3VdbeEndCoroutine(pParse->pVdbe, pItem->regReturn);
sqlite3VdbeJumpHere(pParse->pVdbe, pItem->addrFillSub - 1);
}
}
/*
** Return true if all expressions in the expression-list passed as the
** only argument are constant.
*/
static int exprListIsConstant(Parse *pParse, ExprList *pRow){
int ii;
for(ii=0; ii<pRow->nExpr; ii++){
if( 0==sqlite3ExprIsConstant(pParse, pRow->a[ii].pExpr) ) return 0;
}
return 1;
}
/*
** Return true if all expressions in the expression-list passed as the
** only argument are both constant and have no affinity.
*/
static int exprListIsNoAffinity(Parse *pParse, ExprList *pRow){
int ii;
if( exprListIsConstant(pParse,pRow)==0 ) return 0;
for(ii=0; ii<pRow->nExpr; ii++){
assert( pRow->a[ii].pExpr->affExpr==0 );
if( 0!=sqlite3ExprAffinity(pRow->a[ii].pExpr) ) return 0;
}
return 1;
}
/*
** This function is called by the parser for the second and subsequent
** rows of a multi-row VALUES clause. Argument pLeft is the part of
** the VALUES clause already parsed, argument pRow is the vector of values
** for the new row. The Select object returned represents the complete
** VALUES clause, including the new row.
**
** There are two ways in which this may be achieved - by incremental
** coding of a co-routine (the "co-routine" method) or by returning a
** Select object equivalent to the following (the "UNION ALL" method):
**
** "pLeft UNION ALL SELECT pRow"
**
** If the VALUES clause contains a lot of rows, this compound Select
** object may consume a lot of memory.
**
** When the co-routine method is used, each row that will be returned
** by the VALUES clause is coded into part of a co-routine as it is
** passed to this function. The returned Select object is equivalent to:
**
** SELECT * FROM (
** Select object to read co-routine
** )
**
** The co-routine method is used in most cases. Exceptions are:
**
** a) If the current statement has a WITH clause. This is to avoid
** statements like:
**
** WITH cte AS ( VALUES('x'), ('y') ... )
** SELECT * FROM cte AS a, cte AS b;
**
** This will not work, as the co-routine uses a hard-coded register
** for its OP_Yield instructions, and so it is not possible for two
** cursors to iterate through it concurrently.
**
** b) The schema is currently being parsed (i.e. the VALUES clause is part
** of a schema item like a VIEW or TRIGGER). In this case there is no VM
** being generated when parsing is taking place, and so generating
** a co-routine is not possible.
**
** c) There are non-constant expressions in the VALUES clause (e.g.
** the VALUES clause is part of a correlated sub-query).
**
** d) One or more of the values in the first row of the VALUES clause
** has an affinity (i.e. is a CAST expression). This causes problems
** because the complex rules SQLite uses (see function
** sqlite3SubqueryColumnTypes() in select.c) to determine the effective
** affinity of such a column for all rows require access to all values in
** the column simultaneously.
*/
SQLITE_PRIVATE Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
if( pParse->bHasWith /* condition (a) above */
|| pParse->db->init.busy /* condition (b) above */
|| exprListIsConstant(pParse,pRow)==0 /* condition (c) above */
|| (pLeft->pSrc->nSrc==0 &&
exprListIsNoAffinity(pParse,pLeft->pEList)==0) /* condition (d) above */
|| IN_SPECIAL_PARSE
){
/* The co-routine method cannot be used. Fall back to UNION ALL. */
Select *pSelect = 0;
int f = SF_Values | SF_MultiValue;
if( pLeft->pSrc->nSrc ){
sqlite3MultiValuesEnd(pParse, pLeft);
f = SF_Values;
}else if( pLeft->pPrior ){
/* In this case set the SF_MultiValue flag only if it was set on pLeft */
f = (f & pLeft->selFlags);
}
pSelect = sqlite3SelectNew(pParse, pRow, 0, 0, 0, 0, 0, f, 0);
pLeft->selFlags &= ~SF_MultiValue;
if( pSelect ){
pSelect->op = TK_ALL;
pSelect->pPrior = pLeft;
pLeft = pSelect;
}
}else{
SrcItem *p = 0; /* SrcItem that reads from co-routine */
if( pLeft->pSrc->nSrc==0 ){
/* Co-routine has not yet been started and the special Select object
** that accesses the co-routine has not yet been created. This block
** does both those things. */
Vdbe *v = sqlite3GetVdbe(pParse);
Select *pRet = sqlite3SelectNew(pParse, 0, 0, 0, 0, 0, 0, 0, 0);
/* Ensure the database schema has been read. This is to ensure we have
** the correct text encoding. */
if( (pParse->db->mDbFlags & DBFLAG_SchemaKnownOk)==0 ){
sqlite3ReadSchema(pParse);
}
if( pRet ){
SelectDest dest;
pRet->pSrc->nSrc = 1;
pRet->pPrior = pLeft->pPrior;
pRet->op = pLeft->op;
pLeft->pPrior = 0;
pLeft->op = TK_SELECT;
assert( pLeft->pNext==0 );
assert( pRet->pNext==0 );
p = &pRet->pSrc->a[0];
p->pSelect = pLeft;
p->fg.viaCoroutine = 1;
p->addrFillSub = sqlite3VdbeCurrentAddr(v) + 1;
p->regReturn = ++pParse->nMem;
p->iCursor = -1;
p->u1.nRow = 2;
sqlite3VdbeAddOp3(v,OP_InitCoroutine,p->regReturn,0,p->addrFillSub);
sqlite3SelectDestInit(&dest, SRT_Coroutine, p->regReturn);
/* Allocate registers for the output of the co-routine. Do so so
** that there are two unused registers immediately before those
** used by the co-routine. This allows the code in sqlite3Insert()
** to use these registers directly, instead of copying the output
** of the co-routine to a separate array for processing. */
dest.iSdst = pParse->nMem + 3;
dest.nSdst = pLeft->pEList->nExpr;
pParse->nMem += 2 + dest.nSdst;
pLeft->selFlags |= SF_MultiValue;
sqlite3Select(pParse, pLeft, &dest);
p->regResult = dest.iSdst;
assert( pParse->nErr || dest.iSdst>0 );
pLeft = pRet;
}
}else{
p = &pLeft->pSrc->a[0];
assert( !p->fg.isTabFunc && !p->fg.isIndexedBy );
p->u1.nRow++;
}
if( pParse->nErr==0 ){
assert( p!=0 );
if( p->pSelect->pEList->nExpr!=pRow->nExpr ){
sqlite3SelectWrongNumTermsError(pParse, p->pSelect);
}else{
sqlite3ExprCodeExprList(pParse, pRow, p->regResult, 0, 0);
sqlite3VdbeAddOp1(pParse->pVdbe, OP_Yield, p->regReturn);
}
}
sqlite3ExprListDelete(pParse->db, pRow);
}
return pLeft;
}
/* Forward declaration */
static int xferOptimization(
Parse *pParse, /* Parser context */
Table *pDest, /* The table we are inserting into */
Select *pSelect, /* A SELECT statement to use as the data source */
int onError, /* How to handle constraint errors */
|
| ︙ | ︙ | |||
133486 133487 133488 133489 133490 133491 133492 |
** is coming from a SELECT statement, then generate a co-routine that
** produces a single row of the SELECT on each invocation. The
** co-routine is the common header to the 3rd and 4th templates.
*/
if( pSelect ){
/* Data is coming from a SELECT or from a multi-row VALUES clause.
** Generate a co-routine to run the SELECT. */
| < < > > > > > > > > > > > > > > > > | | | | | | | | | | | | | | | > | 133745 133746 133747 133748 133749 133750 133751 133752 133753 133754 133755 133756 133757 133758 133759 133760 133761 133762 133763 133764 133765 133766 133767 133768 133769 133770 133771 133772 133773 133774 133775 133776 133777 133778 133779 133780 133781 133782 133783 133784 133785 133786 133787 133788 133789 133790 133791 133792 |
** is coming from a SELECT statement, then generate a co-routine that
** produces a single row of the SELECT on each invocation. The
** co-routine is the common header to the 3rd and 4th templates.
*/
if( pSelect ){
/* Data is coming from a SELECT or from a multi-row VALUES clause.
** Generate a co-routine to run the SELECT. */
int rc; /* Result code */
if( pSelect->pSrc->nSrc==1
&& pSelect->pSrc->a[0].fg.viaCoroutine
&& pSelect->pPrior==0
){
SrcItem *pItem = &pSelect->pSrc->a[0];
dest.iSDParm = pItem->regReturn;
regFromSelect = pItem->regResult;
nColumn = pItem->pSelect->pEList->nExpr;
ExplainQueryPlan((pParse, 0, "SCAN %S", pItem));
if( bIdListInOrder && nColumn==pTab->nCol ){
regData = regFromSelect;
regRowid = regData - 1;
regIns = regRowid - (IsVirtual(pTab) ? 1 : 0);
}
}else{
int addrTop; /* Top of the co-routine */
int regYield = ++pParse->nMem;
addrTop = sqlite3VdbeCurrentAddr(v) + 1;
sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop);
sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield);
dest.iSdst = bIdListInOrder ? regData : 0;
dest.nSdst = pTab->nCol;
rc = sqlite3Select(pParse, pSelect, &dest);
regFromSelect = dest.iSdst;
assert( db->pParse==pParse );
if( rc || pParse->nErr ) goto insert_cleanup;
assert( db->mallocFailed==0 );
sqlite3VdbeEndCoroutine(v, regYield);
sqlite3VdbeJumpHere(v, addrTop - 1); /* label B: */
assert( pSelect->pEList );
nColumn = pSelect->pEList->nExpr;
}
/* Set useTempTable to TRUE if the result of the SELECT statement
** should be written into a temporary table (template 4). Set to
** FALSE if each output row of the SELECT can be written directly into
** the destination table (template 3).
**
** A temp table must be used if the table being updated is also one
|
| ︙ | ︙ | |||
147131 147132 147133 147134 147135 147136 147137 |
WhereConst *pConst, /* The WhereConst into which we are inserting */
Expr *pColumn, /* The COLUMN part of the constraint */
Expr *pValue, /* The VALUE part of the constraint */
Expr *pExpr /* Overall expression: COLUMN=VALUE or VALUE=COLUMN */
){
int i;
assert( pColumn->op==TK_COLUMN );
| | | 147405 147406 147407 147408 147409 147410 147411 147412 147413 147414 147415 147416 147417 147418 147419 |
WhereConst *pConst, /* The WhereConst into which we are inserting */
Expr *pColumn, /* The COLUMN part of the constraint */
Expr *pValue, /* The VALUE part of the constraint */
Expr *pExpr /* Overall expression: COLUMN=VALUE or VALUE=COLUMN */
){
int i;
assert( pColumn->op==TK_COLUMN );
assert( sqlite3ExprIsConstant(pConst->pParse, pValue) );
if( ExprHasProperty(pColumn, EP_FixedCol) ) return;
if( sqlite3ExprAffinity(pValue)!=0 ) return;
if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr)) ){
return;
}
|
| ︙ | ︙ | |||
147189 147190 147191 147192 147193 147194 147195 |
return;
}
if( pExpr->op!=TK_EQ ) return;
pRight = pExpr->pRight;
pLeft = pExpr->pLeft;
assert( pRight!=0 );
assert( pLeft!=0 );
| | | | 147463 147464 147465 147466 147467 147468 147469 147470 147471 147472 147473 147474 147475 147476 147477 147478 147479 147480 |
return;
}
if( pExpr->op!=TK_EQ ) return;
pRight = pExpr->pRight;
pLeft = pExpr->pLeft;
assert( pRight!=0 );
assert( pLeft!=0 );
if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pLeft) ){
constInsert(pConst,pRight,pLeft,pExpr);
}
if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pRight) ){
constInsert(pConst,pLeft,pRight,pExpr);
}
}
/*
** This is a helper function for Walker callback propagateConstantExprRewrite().
**
|
| ︙ | ︙ | |||
149991 149992 149993 149994 149995 149996 149997 |
sqlite3AuthCheck(pParse, SQLITE_READ, pItem->zName, "", pItem->zDatabase);
}
#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
/* Generate code for all sub-queries in the FROM clause
*/
pSub = pItem->pSelect;
| | | 150265 150266 150267 150268 150269 150270 150271 150272 150273 150274 150275 150276 150277 150278 150279 |
sqlite3AuthCheck(pParse, SQLITE_READ, pItem->zName, "", pItem->zDatabase);
}
#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
/* Generate code for all sub-queries in the FROM clause
*/
pSub = pItem->pSelect;
if( pSub==0 || pItem->addrFillSub!=0 ) continue;
/* The code for a subquery should only be generated once. */
assert( pItem->addrFillSub==0 );
/* Increment Parse.nHeight by the height of the largest expression
** tree referred to by this, the parent select. The child select
** may contain expression trees of at most
|
| ︙ | ︙ | |||
160530 160531 160532 160533 160534 160535 160536 |
iCur = pFrom->a[j].iCursor;
for(pIdx=pFrom->a[j].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
if( pIdx->aColExpr==0 ) continue;
for(i=0; i<pIdx->nKeyCol; i++){
if( pIdx->aiColumn[i]!=XN_EXPR ) continue;
assert( pIdx->bHasExpr );
if( sqlite3ExprCompareSkip(pExpr,pIdx->aColExpr->a[i].pExpr,iCur)==0
| | | 160804 160805 160806 160807 160808 160809 160810 160811 160812 160813 160814 160815 160816 160817 160818 |
iCur = pFrom->a[j].iCursor;
for(pIdx=pFrom->a[j].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
if( pIdx->aColExpr==0 ) continue;
for(i=0; i<pIdx->nKeyCol; i++){
if( pIdx->aiColumn[i]!=XN_EXPR ) continue;
assert( pIdx->bHasExpr );
if( sqlite3ExprCompareSkip(pExpr,pIdx->aColExpr->a[i].pExpr,iCur)==0
&& !sqlite3ExprIsConstant(0,pIdx->aColExpr->a[i].pExpr)
){
aiCurCol[0] = iCur;
aiCurCol[1] = XN_EXPR;
return 1;
}
}
}
|
| ︙ | ︙ | |||
162743 162744 162745 162746 162747 162748 162749 |
if( pOrderBy ){
int n = pOrderBy->nExpr;
for(i=0; i<n; i++){
Expr *pExpr = pOrderBy->a[i].pExpr;
Expr *pE2;
/* Skip over constant terms in the ORDER BY clause */
| | | 163017 163018 163019 163020 163021 163022 163023 163024 163025 163026 163027 163028 163029 163030 163031 |
if( pOrderBy ){
int n = pOrderBy->nExpr;
for(i=0; i<n; i++){
Expr *pExpr = pOrderBy->a[i].pExpr;
Expr *pE2;
/* Skip over constant terms in the ORDER BY clause */
if( sqlite3ExprIsConstant(0, pExpr) ){
continue;
}
/* Virtual tables are unable to deal with NULLS FIRST */
if( pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_BIGNULL ) break;
/* First case - a direct column references without a COLLATE operator */
|
| ︙ | ︙ | |||
162855 162856 162857 162858 162859 162860 162861 |
j++;
}
assert( j==nTerm );
pIdxInfo->nConstraint = j;
for(i=j=0; i<nOrderBy; i++){
Expr *pExpr = pOrderBy->a[i].pExpr;
| | | 163129 163130 163131 163132 163133 163134 163135 163136 163137 163138 163139 163140 163141 163142 163143 |
j++;
}
assert( j==nTerm );
pIdxInfo->nConstraint = j;
for(i=j=0; i<nOrderBy; i++){
Expr *pExpr = pOrderBy->a[i].pExpr;
if( sqlite3ExprIsConstant(0, pExpr) ) continue;
assert( pExpr->op==TK_COLUMN
|| (pExpr->op==TK_COLLATE && pExpr->pLeft->op==TK_COLUMN
&& pExpr->iColumn==pExpr->pLeft->iColumn) );
pIdxOrderBy[j].iColumn = pExpr->iColumn;
pIdxOrderBy[j].desc = pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_DESC;
j++;
}
|
| ︙ | ︙ | |||
165037 165038 165039 165040 165041 165042 165043 |
if( (pPart->op==TK_EQ || pPart->op==TK_IS) ){
Expr *pLeft = pPart->pLeft;
Expr *pRight = pPart->pRight;
u8 aff;
if( pLeft->op!=TK_COLUMN ) return;
| | | 165311 165312 165313 165314 165315 165316 165317 165318 165319 165320 165321 165322 165323 165324 165325 |
if( (pPart->op==TK_EQ || pPart->op==TK_IS) ){
Expr *pLeft = pPart->pLeft;
Expr *pRight = pPart->pRight;
u8 aff;
if( pLeft->op!=TK_COLUMN ) return;
if( !sqlite3ExprIsConstant(0, pRight) ) return;
if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pParse, pPart)) ) return;
if( pLeft->iColumn<0 ) return;
aff = pIdx->pTable->aCol[pLeft->iColumn].affinity;
if( aff>=SQLITE_AFF_TEXT ){
if( pItem ){
sqlite3 *db = pParse->db;
IndexedExpr *p = (IndexedExpr*)sqlite3DbMallocRaw(db, sizeof(*p));
|
| ︙ | ︙ | |||
166411 166412 166413 166414 166415 166416 166417 |
orderDistinctMask |= pLoop->maskSelf;
for(i=0; i<nOrderBy; i++){
Expr *p;
Bitmask mTerm;
if( MASKBIT(i) & obSat ) continue;
p = pOrderBy->a[i].pExpr;
mTerm = sqlite3WhereExprUsage(&pWInfo->sMaskSet,p);
| | | 166685 166686 166687 166688 166689 166690 166691 166692 166693 166694 166695 166696 166697 166698 166699 |
orderDistinctMask |= pLoop->maskSelf;
for(i=0; i<nOrderBy; i++){
Expr *p;
Bitmask mTerm;
if( MASKBIT(i) & obSat ) continue;
p = pOrderBy->a[i].pExpr;
mTerm = sqlite3WhereExprUsage(&pWInfo->sMaskSet,p);
if( mTerm==0 && !sqlite3ExprIsConstant(0,p) ) continue;
if( (mTerm&~orderDistinctMask)==0 ){
obSat |= MASKBIT(i);
}
}
}
} /* End the loop over all WhereLoops from outer-most down to inner-most */
if( obSat==obDone ) return (i8)nOrderBy;
|
| ︙ | ︙ | |||
167280 167281 167282 167283 167284 167285 167286 |
bMaybeNullRow = (pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0;
}else if( j>=0 && (pTab->aCol[j].colFlags & COLFLAG_VIRTUAL)!=0 ){
pExpr = sqlite3ColumnExpr(pTab, &pTab->aCol[j]);
bMaybeNullRow = 0;
}else{
continue;
}
| | | 167554 167555 167556 167557 167558 167559 167560 167561 167562 167563 167564 167565 167566 167567 167568 |
bMaybeNullRow = (pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0;
}else if( j>=0 && (pTab->aCol[j].colFlags & COLFLAG_VIRTUAL)!=0 ){
pExpr = sqlite3ColumnExpr(pTab, &pTab->aCol[j]);
bMaybeNullRow = 0;
}else{
continue;
}
if( sqlite3ExprIsConstant(0,pExpr) ) continue;
if( pExpr->op==TK_FUNCTION ){
/* Functions that might set a subtype should not be replaced by the
** value taken from an expression index since the index omits the
** subtype. https://sqlite.org/forum/forumpost/68d284c86b082c3e */
int n;
FuncDef *pDef;
sqlite3 *db = pParse->db;
|
| ︙ | ︙ | |||
167558 167559 167560 167561 167562 167563 167564 |
if( nTabList==0 ){
if( pOrderBy ) pWInfo->nOBSat = pOrderBy->nExpr;
if( (wctrlFlags & WHERE_WANT_DISTINCT)!=0
&& OptimizationEnabled(db, SQLITE_DistinctOpt)
){
pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE;
}
| > > > | > | 167832 167833 167834 167835 167836 167837 167838 167839 167840 167841 167842 167843 167844 167845 167846 167847 167848 167849 167850 |
if( nTabList==0 ){
if( pOrderBy ) pWInfo->nOBSat = pOrderBy->nExpr;
if( (wctrlFlags & WHERE_WANT_DISTINCT)!=0
&& OptimizationEnabled(db, SQLITE_DistinctOpt)
){
pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE;
}
if( ALWAYS(pWInfo->pSelect)
&& (pWInfo->pSelect->selFlags & SF_MultiValue)==0
){
ExplainQueryPlan((pParse, 0, "SCAN CONSTANT ROW"));
}
}else{
/* Assign a bit from the bitmask to every term in the FROM clause.
**
** The N-th term of the FROM clause is assigned a bitmask of 1<<N.
**
** The rule of the previous sentence ensures that if X is the bitmask for
** a table T, then X-1 is the bitmask for all other tables to the left of T.
|
| ︙ | ︙ | |||
168310 168311 168312 168313 168314 168315 168316 168317 168318 168319 168320 168321 168322 168323 |
/* For a co-routine, change all OP_Column references to the table of
** the co-routine into OP_Copy of result contained in a register.
** OP_Rowid becomes OP_Null.
*/
if( pTabItem->fg.viaCoroutine ){
testcase( pParse->db->mallocFailed );
translateColumnToCopy(pParse, pLevel->addrBody, pLevel->iTabCur,
pTabItem->regResult, 0);
continue;
}
/* If this scan uses an index, make VDBE code substitutions to read data
** from the index instead of from the table where possible. In some cases
| > | 168588 168589 168590 168591 168592 168593 168594 168595 168596 168597 168598 168599 168600 168601 168602 |
/* For a co-routine, change all OP_Column references to the table of
** the co-routine into OP_Copy of result contained in a register.
** OP_Rowid becomes OP_Null.
*/
if( pTabItem->fg.viaCoroutine ){
testcase( pParse->db->mallocFailed );
assert( pTabItem->regResult>=0 );
translateColumnToCopy(pParse, pLevel->addrBody, pLevel->iTabCur,
pTabItem->regResult, 0);
continue;
}
/* If this scan uses an index, make VDBE code substitutions to read data
** from the index instead of from the table where possible. In some cases
|
| ︙ | ︙ | |||
169614 169615 169616 169617 169618 169619 169620 |
** The argument expression is an PRECEDING or FOLLOWING offset. The
** value should be a non-negative integer. If the value is not a
** constant, change it to NULL. The fact that it is then a non-negative
** integer will be caught later. But it is important not to leave
** variable values in the expression tree.
*/
static Expr *sqlite3WindowOffsetExpr(Parse *pParse, Expr *pExpr){
| | | 169893 169894 169895 169896 169897 169898 169899 169900 169901 169902 169903 169904 169905 169906 169907 |
** The argument expression is an PRECEDING or FOLLOWING offset. The
** value should be a non-negative integer. If the value is not a
** constant, change it to NULL. The fact that it is then a non-negative
** integer will be caught later. But it is important not to leave
** variable values in the expression tree.
*/
static Expr *sqlite3WindowOffsetExpr(Parse *pParse, Expr *pExpr){
if( 0==sqlite3ExprIsConstant(0,pExpr) ){
if( IN_RENAME_OBJECT ) sqlite3RenameExprUnmap(pParse, pExpr);
sqlite3ExprDelete(pParse->db, pExpr);
pExpr = sqlite3ExprAlloc(pParse->db, TK_NULL, 0, 0);
}
return pExpr;
}
|
| ︙ | ︙ | |||
172040 172041 172042 172043 172044 172045 172046 | ** YY_MAX_DSTRCTR Maximum symbol value that has a destructor */ #ifndef INTERFACE # define INTERFACE 1 #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int | | | | | > > | | < | | | | < | | | | | | | | | | | | | | | | | | | | 172319 172320 172321 172322 172323 172324 172325 172326 172327 172328 172329 172330 172331 172332 172333 172334 172335 172336 172337 172338 172339 172340 172341 172342 172343 172344 172345 172346 172347 172348 172349 172350 172351 172352 172353 172354 172355 172356 172357 172358 172359 172360 172361 172362 172363 172364 172365 172366 172367 172368 172369 172370 172371 172372 172373 172374 172375 172376 172377 172378 172379 172380 172381 172382 172383 172384 172385 172386 172387 172388 172389 |
** YY_MAX_DSTRCTR Maximum symbol value that has a destructor
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 322
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 101
#define sqlite3ParserTOKENTYPE Token
typedef union {
int yyinit;
sqlite3ParserTOKENTYPE yy0;
ExprList* yy14;
With* yy59;
Cte* yy67;
Upsert* yy122;
IdList* yy132;
int yy144;
const char* yy168;
SrcList* yy203;
Window* yy211;
OnOrUsing yy269;
struct TrigEvent yy286;
struct {int value; int mask;} yy383;
u32 yy391;
TriggerStep* yy427;
Expr* yy454;
u8 yy462;
struct FrameBound yy509;
Select* yy555;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define sqlite3ParserARG_SDECL
#define sqlite3ParserARG_PDECL
#define sqlite3ParserARG_PARAM
#define sqlite3ParserARG_FETCH
#define sqlite3ParserARG_STORE
#define YYREALLOC parserStackRealloc
#define YYFREE sqlite3_free
#define YYDYNSTACK 1
#define sqlite3ParserCTX_SDECL Parse *pParse;
#define sqlite3ParserCTX_PDECL ,Parse *pParse
#define sqlite3ParserCTX_PARAM ,pParse
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
#define YYFALLBACK 1
#define YYNSTATE 583
#define YYNRULE 409
#define YYNRULE_WITH_ACTION 344
#define YYNTOKEN 186
#define YY_MAX_SHIFT 582
#define YY_MIN_SHIFTREDUCE 845
#define YY_MAX_SHIFTREDUCE 1253
#define YY_ERROR_ACTION 1254
#define YY_ACCEPT_ACTION 1255
#define YY_NO_ACTION 1256
#define YY_MIN_REDUCE 1257
#define YY_MAX_REDUCE 1665
#define YY_MIN_DSTRCTR 205
#define YY_MAX_DSTRCTR 319
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
|
| ︙ | ︙ | |||
172179 172180 172181 172182 172183 172184 172185 | ** yy_shift_ofst[] For each state, the offset into yy_action for ** shifting terminals. ** yy_reduce_ofst[] For each state, the offset into yy_action for ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > | | | > | | < > | | | | < | > | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | 172458 172459 172460 172461 172462 172463 172464 172465 172466 172467 172468 172469 172470 172471 172472 172473 172474 172475 172476 172477 172478 172479 172480 172481 172482 172483 172484 172485 172486 172487 172488 172489 172490 172491 172492 172493 172494 172495 172496 172497 172498 172499 172500 172501 172502 172503 172504 172505 172506 172507 172508 172509 172510 172511 172512 172513 172514 172515 172516 172517 172518 172519 172520 172521 172522 172523 172524 172525 172526 172527 172528 172529 172530 172531 172532 172533 172534 172535 172536 172537 172538 172539 172540 172541 172542 172543 172544 172545 172546 172547 172548 172549 172550 172551 172552 172553 172554 172555 172556 172557 172558 172559 172560 172561 172562 172563 172564 172565 172566 172567 172568 172569 172570 172571 172572 172573 172574 172575 172576 172577 172578 172579 172580 172581 172582 172583 172584 172585 172586 172587 172588 172589 172590 172591 172592 172593 172594 172595 172596 172597 172598 172599 172600 172601 172602 172603 172604 172605 172606 172607 172608 172609 172610 172611 172612 172613 172614 172615 172616 172617 172618 172619 172620 172621 172622 172623 172624 172625 172626 172627 172628 172629 172630 172631 172632 172633 172634 172635 172636 172637 172638 172639 172640 172641 172642 172643 172644 172645 172646 172647 172648 172649 172650 172651 172652 172653 172654 172655 172656 172657 172658 172659 172660 172661 172662 172663 172664 172665 172666 172667 172668 172669 172670 172671 172672 172673 172674 172675 172676 172677 172678 172679 172680 172681 172682 172683 172684 172685 172686 172687 172688 172689 172690 172691 172692 172693 172694 172695 172696 172697 172698 172699 172700 172701 172702 172703 172704 172705 172706 172707 172708 172709 172710 172711 172712 172713 172714 172715 172716 172717 172718 172719 172720 172721 172722 172723 172724 172725 172726 172727 172728 172729 172730 172731 172732 172733 172734 172735 172736 172737 172738 172739 172740 172741 172742 172743 172744 172745 172746 172747 172748 172749 172750 172751 172752 172753 172754 172755 172756 172757 172758 172759 172760 172761 172762 172763 172764 172765 172766 172767 172768 172769 172770 172771 172772 172773 172774 172775 172776 172777 172778 172779 172780 172781 172782 172783 172784 172785 172786 172787 172788 172789 172790 172791 172792 172793 172794 172795 172796 172797 172798 172799 172800 172801 172802 172803 172804 172805 172806 172807 172808 172809 172810 172811 172812 172813 172814 172815 172816 172817 172818 172819 172820 172821 172822 172823 172824 172825 172826 172827 172828 172829 172830 172831 172832 172833 172834 172835 172836 172837 172838 172839 172840 172841 172842 172843 172844 172845 172846 172847 172848 172849 172850 172851 172852 172853 172854 172855 172856 172857 172858 172859 172860 172861 172862 172863 172864 172865 172866 172867 172868 172869 172870 172871 172872 172873 172874 172875 172876 172877 172878 172879 172880 172881 172882 172883 172884 172885 172886 172887 172888 172889 172890 172891 172892 172893 172894 172895 172896 172897 172898 172899 172900 172901 172902 172903 172904 172905 172906 172907 172908 172909 172910 172911 172912 172913 172914 172915 172916 172917 172918 172919 172920 172921 172922 172923 172924 172925 172926 172927 172928 172929 172930 172931 172932 172933 172934 172935 172936 172937 172938 172939 172940 172941 172942 172943 172944 172945 172946 172947 172948 172949 172950 172951 172952 172953 172954 172955 172956 172957 172958 172959 172960 172961 172962 172963 172964 172965 172966 172967 172968 172969 172970 172971 172972 172973 172974 172975 172976 172977 172978 172979 172980 172981 172982 172983 172984 172985 172986 172987 172988 172989 172990 172991 172992 172993 172994 172995 172996 172997 172998 172999 173000 173001 173002 173003 173004 173005 173006 173007 173008 173009 173010 173011 173012 173013 173014 173015 173016 173017 173018 173019 173020 173021 173022 173023 173024 173025 173026 173027 173028 173029 173030 173031 173032 173033 173034 173035 173036 173037 173038 173039 173040 173041 173042 173043 173044 173045 173046 173047 173048 173049 173050 173051 173052 173053 173054 173055 173056 173057 173058 173059 173060 173061 173062 173063 173064 173065 173066 173067 173068 173069 173070 173071 173072 173073 173074 173075 173076 173077 173078 173079 173080 173081 173082 173083 173084 173085 173086 173087 173088 173089 173090 173091 173092 173093 173094 173095 |
** yy_shift_ofst[] For each state, the offset into yy_action for
** shifting terminals.
** yy_reduce_ofst[] For each state, the offset into yy_action for
** shifting non-terminals after a reduce.
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (2142)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 576, 128, 125, 232, 1622, 549, 576, 1290, 1281, 576,
/* 10 */ 328, 576, 1300, 212, 576, 128, 125, 232, 578, 412,
/* 20 */ 578, 391, 1542, 51, 51, 523, 405, 1293, 529, 51,
/* 30 */ 51, 983, 51, 51, 81, 81, 1107, 61, 61, 984,
/* 40 */ 1107, 1292, 380, 135, 136, 90, 1228, 1228, 1063, 1066,
/* 50 */ 1053, 1053, 133, 133, 134, 134, 134, 134, 1577, 412,
/* 60 */ 287, 287, 7, 287, 287, 422, 1050, 1050, 1064, 1067,
/* 70 */ 289, 556, 492, 573, 524, 561, 573, 497, 561, 482,
/* 80 */ 530, 262, 229, 135, 136, 90, 1228, 1228, 1063, 1066,
/* 90 */ 1053, 1053, 133, 133, 134, 134, 134, 134, 128, 125,
/* 100 */ 232, 1506, 132, 132, 132, 132, 131, 131, 130, 130,
/* 110 */ 130, 129, 126, 450, 1204, 1255, 1, 1, 582, 2,
/* 120 */ 1259, 1571, 420, 1582, 379, 320, 1174, 153, 1174, 1584,
/* 130 */ 412, 378, 1582, 543, 1341, 330, 111, 570, 570, 570,
/* 140 */ 293, 1054, 132, 132, 132, 132, 131, 131, 130, 130,
/* 150 */ 130, 129, 126, 450, 135, 136, 90, 1228, 1228, 1063,
/* 160 */ 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, 287,
/* 170 */ 287, 1204, 1205, 1204, 255, 287, 287, 510, 507, 506,
/* 180 */ 137, 455, 573, 212, 561, 447, 446, 505, 573, 1616,
/* 190 */ 561, 134, 134, 134, 134, 127, 400, 243, 132, 132,
/* 200 */ 132, 132, 131, 131, 130, 130, 130, 129, 126, 450,
/* 210 */ 282, 471, 345, 132, 132, 132, 132, 131, 131, 130,
/* 220 */ 130, 130, 129, 126, 450, 574, 155, 936, 936, 454,
/* 230 */ 227, 521, 1236, 412, 1236, 134, 134, 134, 134, 132,
/* 240 */ 132, 132, 132, 131, 131, 130, 130, 130, 129, 126,
/* 250 */ 450, 130, 130, 130, 129, 126, 450, 135, 136, 90,
/* 260 */ 1228, 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134,
/* 270 */ 134, 134, 128, 125, 232, 450, 576, 412, 397, 1249,
/* 280 */ 180, 92, 93, 132, 132, 132, 132, 131, 131, 130,
/* 290 */ 130, 130, 129, 126, 450, 381, 387, 1204, 383, 81,
/* 300 */ 81, 135, 136, 90, 1228, 1228, 1063, 1066, 1053, 1053,
/* 310 */ 133, 133, 134, 134, 134, 134, 132, 132, 132, 132,
/* 320 */ 131, 131, 130, 130, 130, 129, 126, 450, 131, 131,
/* 330 */ 130, 130, 130, 129, 126, 450, 556, 1204, 302, 319,
/* 340 */ 567, 121, 568, 480, 4, 555, 1149, 1657, 1628, 1657,
/* 350 */ 45, 128, 125, 232, 1204, 1205, 1204, 1250, 571, 1169,
/* 360 */ 132, 132, 132, 132, 131, 131, 130, 130, 130, 129,
/* 370 */ 126, 450, 1169, 287, 287, 1169, 1019, 576, 422, 1019,
/* 380 */ 412, 451, 1602, 582, 2, 1259, 573, 44, 561, 95,
/* 390 */ 320, 110, 153, 565, 1204, 1205, 1204, 522, 522, 1341,
/* 400 */ 81, 81, 7, 44, 135, 136, 90, 1228, 1228, 1063,
/* 410 */ 1066, 1053, 1053, 133, 133, 134, 134, 134, 134, 295,
/* 420 */ 1149, 1658, 1040, 1658, 1204, 1147, 319, 567, 119, 119,
/* 430 */ 343, 466, 331, 343, 287, 287, 120, 556, 451, 577,
/* 440 */ 451, 1169, 1169, 1028, 319, 567, 438, 573, 210, 561,
/* 450 */ 1339, 1451, 546, 531, 1169, 1169, 1598, 1169, 1169, 416,
/* 460 */ 319, 567, 243, 132, 132, 132, 132, 131, 131, 130,
/* 470 */ 130, 130, 129, 126, 450, 1028, 1028, 1030, 1031, 35,
/* 480 */ 44, 1204, 1205, 1204, 472, 287, 287, 1328, 412, 1307,
/* 490 */ 372, 1595, 359, 225, 454, 1204, 195, 1328, 573, 1147,
/* 500 */ 561, 1333, 1333, 274, 576, 1188, 576, 340, 46, 196,
/* 510 */ 537, 217, 135, 136, 90, 1228, 1228, 1063, 1066, 1053,
/* 520 */ 1053, 133, 133, 134, 134, 134, 134, 19, 19, 19,
/* 530 */ 19, 412, 581, 1204, 1259, 511, 1204, 319, 567, 320,
/* 540 */ 944, 153, 425, 491, 430, 943, 1204, 488, 1341, 1450,
/* 550 */ 532, 1277, 1204, 1205, 1204, 135, 136, 90, 1228, 1228,
/* 560 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134,
/* 570 */ 575, 132, 132, 132, 132, 131, 131, 130, 130, 130,
/* 580 */ 129, 126, 450, 287, 287, 528, 287, 287, 372, 1595,
/* 590 */ 1204, 1205, 1204, 1204, 1205, 1204, 573, 486, 561, 573,
/* 600 */ 889, 561, 412, 1204, 1205, 1204, 886, 40, 22, 22,
/* 610 */ 220, 243, 525, 1449, 132, 132, 132, 132, 131, 131,
/* 620 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228,
/* 630 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 640 */ 134, 412, 180, 454, 1204, 879, 255, 287, 287, 510,
/* 650 */ 507, 506, 372, 1595, 1568, 1331, 1331, 576, 889, 505,
/* 660 */ 573, 44, 561, 559, 1207, 135, 136, 90, 1228, 1228,
/* 670 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134,
/* 680 */ 81, 81, 422, 576, 377, 132, 132, 132, 132, 131,
/* 690 */ 131, 130, 130, 130, 129, 126, 450, 297, 287, 287,
/* 700 */ 460, 1204, 1205, 1204, 1204, 534, 19, 19, 448, 448,
/* 710 */ 448, 573, 412, 561, 230, 436, 1187, 535, 319, 567,
/* 720 */ 363, 432, 1207, 1435, 132, 132, 132, 132, 131, 131,
/* 730 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228,
/* 740 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 750 */ 134, 412, 211, 949, 1169, 1041, 1110, 1110, 494, 547,
/* 760 */ 547, 1204, 1205, 1204, 7, 539, 1570, 1169, 376, 576,
/* 770 */ 1169, 5, 1204, 486, 3, 135, 136, 90, 1228, 1228,
/* 780 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134,
/* 790 */ 576, 513, 19, 19, 427, 132, 132, 132, 132, 131,
/* 800 */ 131, 130, 130, 130, 129, 126, 450, 305, 1204, 433,
/* 810 */ 225, 1204, 385, 19, 19, 273, 290, 371, 516, 366,
/* 820 */ 515, 260, 412, 538, 1568, 549, 1024, 362, 437, 1204,
/* 830 */ 1205, 1204, 902, 1552, 132, 132, 132, 132, 131, 131,
/* 840 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228,
/* 850 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 860 */ 134, 412, 1435, 514, 1281, 1204, 1205, 1204, 1204, 1205,
/* 870 */ 1204, 903, 48, 342, 1568, 1568, 1279, 1627, 1568, 911,
/* 880 */ 576, 129, 126, 450, 110, 135, 136, 90, 1228, 1228,
/* 890 */ 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134, 134,
/* 900 */ 265, 576, 459, 19, 19, 132, 132, 132, 132, 131,
/* 910 */ 131, 130, 130, 130, 129, 126, 450, 1345, 204, 576,
/* 920 */ 459, 458, 50, 47, 19, 19, 49, 434, 1105, 573,
/* 930 */ 497, 561, 412, 428, 108, 1224, 1569, 1554, 376, 205,
/* 940 */ 550, 550, 81, 81, 132, 132, 132, 132, 131, 131,
/* 950 */ 130, 130, 130, 129, 126, 450, 135, 136, 90, 1228,
/* 960 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 970 */ 134, 480, 576, 1204, 576, 1541, 412, 1435, 969, 315,
/* 980 */ 1659, 398, 284, 497, 969, 893, 1569, 1569, 376, 376,
/* 990 */ 1569, 461, 376, 1224, 459, 80, 80, 81, 81, 497,
/* 1000 */ 374, 114, 90, 1228, 1228, 1063, 1066, 1053, 1053, 133,
/* 1010 */ 133, 134, 134, 134, 134, 132, 132, 132, 132, 131,
/* 1020 */ 131, 130, 130, 130, 129, 126, 450, 1204, 1505, 576,
/* 1030 */ 1204, 1205, 1204, 1366, 316, 486, 281, 281, 497, 431,
/* 1040 */ 557, 288, 288, 402, 1340, 471, 345, 298, 429, 573,
/* 1050 */ 576, 561, 81, 81, 573, 374, 561, 971, 386, 132,
/* 1060 */ 132, 132, 132, 131, 131, 130, 130, 130, 129, 126,
/* 1070 */ 450, 231, 117, 81, 81, 287, 287, 231, 287, 287,
/* 1080 */ 576, 1511, 576, 1336, 1204, 1205, 1204, 139, 573, 556,
/* 1090 */ 561, 573, 412, 561, 441, 456, 969, 213, 558, 1511,
/* 1100 */ 1513, 1550, 969, 143, 143, 145, 145, 1368, 314, 478,
/* 1110 */ 444, 970, 412, 850, 851, 852, 135, 136, 90, 1228,
/* 1120 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 1130 */ 134, 357, 412, 397, 1148, 304, 135, 136, 90, 1228,
/* 1140 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 1150 */ 134, 1575, 323, 6, 862, 7, 135, 124, 90, 1228,
/* 1160 */ 1228, 1063, 1066, 1053, 1053, 133, 133, 134, 134, 134,
/* 1170 */ 134, 409, 408, 1511, 212, 132, 132, 132, 132, 131,
/* 1180 */ 131, 130, 130, 130, 129, 126, 450, 411, 118, 1204,
/* 1190 */ 116, 10, 352, 265, 355, 132, 132, 132, 132, 131,
/* 1200 */ 131, 130, 130, 130, 129, 126, 450, 576, 324, 306,
/* 1210 */ 576, 306, 1250, 469, 158, 132, 132, 132, 132, 131,
/* 1220 */ 131, 130, 130, 130, 129, 126, 450, 207, 1224, 1126,
/* 1230 */ 65, 65, 470, 66, 66, 412, 447, 446, 882, 531,
/* 1240 */ 335, 258, 257, 256, 1127, 1233, 1204, 1205, 1204, 327,
/* 1250 */ 1235, 874, 159, 576, 16, 480, 1085, 1040, 1234, 1128,
/* 1260 */ 136, 90, 1228, 1228, 1063, 1066, 1053, 1053, 133, 133,
/* 1270 */ 134, 134, 134, 134, 1029, 576, 81, 81, 1028, 1040,
/* 1280 */ 922, 576, 463, 1236, 576, 1236, 1224, 502, 107, 1435,
/* 1290 */ 923, 6, 576, 410, 1498, 882, 1029, 480, 21, 21,
/* 1300 */ 1028, 332, 1380, 334, 53, 53, 497, 81, 81, 874,
/* 1310 */ 1028, 1028, 1030, 445, 259, 19, 19, 533, 132, 132,
/* 1320 */ 132, 132, 131, 131, 130, 130, 130, 129, 126, 450,
/* 1330 */ 551, 301, 1028, 1028, 1030, 107, 532, 545, 121, 568,
/* 1340 */ 1188, 4, 1126, 1576, 449, 576, 462, 7, 1282, 418,
/* 1350 */ 462, 350, 1435, 576, 518, 571, 544, 1127, 121, 568,
/* 1360 */ 442, 4, 1188, 464, 533, 1180, 1223, 9, 67, 67,
/* 1370 */ 487, 576, 1128, 303, 410, 571, 54, 54, 451, 576,
/* 1380 */ 123, 944, 576, 417, 576, 333, 943, 1379, 576, 236,
/* 1390 */ 565, 576, 1574, 564, 68, 68, 7, 576, 451, 362,
/* 1400 */ 419, 182, 69, 69, 541, 70, 70, 71, 71, 540,
/* 1410 */ 565, 72, 72, 484, 55, 55, 473, 1180, 296, 1040,
/* 1420 */ 56, 56, 296, 493, 541, 119, 119, 410, 1573, 542,
/* 1430 */ 569, 418, 7, 120, 1244, 451, 577, 451, 465, 1040,
/* 1440 */ 1028, 576, 1557, 552, 476, 119, 119, 527, 259, 121,
/* 1450 */ 568, 240, 4, 120, 576, 451, 577, 451, 576, 477,
/* 1460 */ 1028, 576, 156, 576, 57, 57, 571, 576, 286, 229,
/* 1470 */ 410, 336, 1028, 1028, 1030, 1031, 35, 59, 59, 219,
/* 1480 */ 983, 60, 60, 220, 73, 73, 74, 74, 984, 451,
/* 1490 */ 75, 75, 1028, 1028, 1030, 1031, 35, 96, 216, 291,
/* 1500 */ 552, 565, 1188, 318, 395, 395, 394, 276, 392, 576,
/* 1510 */ 485, 859, 474, 1311, 410, 541, 576, 417, 1530, 1144,
/* 1520 */ 540, 399, 1188, 292, 237, 1153, 326, 38, 23, 576,
/* 1530 */ 1040, 576, 20, 20, 325, 299, 119, 119, 164, 76,
/* 1540 */ 76, 1529, 121, 568, 120, 4, 451, 577, 451, 203,
/* 1550 */ 576, 1028, 141, 141, 142, 142, 576, 322, 39, 571,
/* 1560 */ 341, 1021, 110, 264, 239, 901, 900, 423, 242, 908,
/* 1570 */ 909, 370, 173, 77, 77, 43, 479, 1310, 264, 62,
/* 1580 */ 62, 369, 451, 1028, 1028, 1030, 1031, 35, 1601, 1192,
/* 1590 */ 453, 1092, 238, 291, 565, 163, 1309, 110, 395, 395,
/* 1600 */ 394, 276, 392, 986, 987, 859, 481, 346, 264, 110,
/* 1610 */ 1032, 489, 576, 1188, 503, 1088, 261, 261, 237, 576,
/* 1620 */ 326, 121, 568, 1040, 4, 347, 1376, 413, 325, 119,
/* 1630 */ 119, 948, 319, 567, 351, 78, 78, 120, 571, 451,
/* 1640 */ 577, 451, 79, 79, 1028, 354, 356, 576, 360, 1092,
/* 1650 */ 110, 576, 974, 942, 264, 123, 457, 358, 239, 576,
/* 1660 */ 519, 451, 939, 1104, 123, 1104, 173, 576, 1032, 43,
/* 1670 */ 63, 63, 1324, 565, 168, 168, 1028, 1028, 1030, 1031,
/* 1680 */ 35, 576, 169, 169, 1308, 872, 238, 157, 1589, 576,
/* 1690 */ 86, 86, 365, 89, 568, 375, 4, 1103, 941, 1103,
/* 1700 */ 123, 576, 1040, 1389, 64, 64, 1188, 1434, 119, 119,
/* 1710 */ 571, 576, 82, 82, 563, 576, 120, 165, 451, 577,
/* 1720 */ 451, 413, 1362, 1028, 144, 144, 319, 567, 576, 1374,
/* 1730 */ 562, 498, 279, 451, 83, 83, 1439, 576, 166, 166,
/* 1740 */ 576, 1289, 554, 576, 1280, 565, 576, 12, 576, 1268,
/* 1750 */ 457, 146, 146, 1267, 576, 1028, 1028, 1030, 1031, 35,
/* 1760 */ 140, 140, 1269, 167, 167, 1609, 160, 160, 1359, 150,
/* 1770 */ 150, 149, 149, 311, 1040, 576, 312, 147, 147, 313,
/* 1780 */ 119, 119, 222, 235, 576, 1188, 396, 576, 120, 576,
/* 1790 */ 451, 577, 451, 1192, 453, 1028, 508, 291, 148, 148,
/* 1800 */ 1421, 1612, 395, 395, 394, 276, 392, 85, 85, 859,
/* 1810 */ 87, 87, 84, 84, 553, 576, 294, 576, 1426, 338,
/* 1820 */ 339, 1425, 237, 300, 326, 1416, 1409, 1028, 1028, 1030,
/* 1830 */ 1031, 35, 325, 344, 403, 483, 226, 1307, 52, 52,
/* 1840 */ 58, 58, 368, 1371, 1502, 566, 1501, 121, 568, 221,
/* 1850 */ 4, 208, 268, 209, 390, 1244, 1549, 1188, 1372, 1370,
/* 1860 */ 1369, 1547, 239, 184, 571, 233, 421, 1241, 95, 218,
/* 1870 */ 173, 1507, 193, 43, 91, 94, 178, 186, 467, 188,
/* 1880 */ 468, 1422, 13, 189, 190, 191, 501, 451, 245, 108,
/* 1890 */ 238, 401, 1428, 1427, 1430, 475, 404, 1496, 197, 565,
/* 1900 */ 14, 490, 249, 101, 1518, 496, 349, 280, 251, 201,
/* 1910 */ 353, 499, 252, 406, 1270, 253, 517, 1327, 1326, 435,
/* 1920 */ 1325, 1318, 103, 893, 1296, 413, 227, 407, 1040, 1626,
/* 1930 */ 319, 567, 1625, 1297, 119, 119, 439, 367, 1317, 1295,
/* 1940 */ 1624, 526, 120, 440, 451, 577, 451, 1594, 309, 1028,
/* 1950 */ 310, 373, 266, 267, 457, 1580, 1579, 443, 138, 1394,
/* 1960 */ 552, 1393, 11, 1483, 384, 115, 317, 1350, 109, 536,
/* 1970 */ 42, 579, 382, 214, 1349, 388, 1198, 389, 275, 277,
/* 1980 */ 278, 1028, 1028, 1030, 1031, 35, 580, 1265, 414, 1260,
/* 1990 */ 170, 415, 183, 1534, 1535, 1533, 171, 154, 307, 1532,
/* 2000 */ 846, 223, 224, 88, 452, 215, 172, 321, 234, 1102,
/* 2010 */ 152, 1188, 1100, 329, 185, 174, 1223, 925, 187, 241,
/* 2020 */ 337, 244, 1116, 192, 175, 176, 424, 426, 97, 194,
/* 2030 */ 98, 99, 100, 177, 1119, 1115, 246, 247, 161, 24,
/* 2040 */ 248, 348, 1238, 264, 1108, 250, 495, 199, 198, 15,
/* 2050 */ 861, 500, 369, 254, 504, 509, 512, 200, 102, 25,
/* 2060 */ 179, 361, 26, 364, 104, 891, 308, 162, 105, 904,
/* 2070 */ 520, 106, 1185, 1069, 1155, 17, 228, 27, 1154, 283,
/* 2080 */ 285, 263, 978, 202, 972, 123, 28, 1175, 29, 30,
/* 2090 */ 1179, 1171, 31, 1173, 1160, 41, 32, 206, 548, 33,
/* 2100 */ 110, 1178, 1083, 8, 112, 1070, 113, 1068, 1072, 34,
/* 2110 */ 1073, 560, 1125, 269, 1124, 270, 36, 18, 1194, 1033,
/* 2120 */ 873, 151, 122, 37, 393, 271, 272, 572, 181, 1193,
/* 2130 */ 1256, 1256, 1256, 935, 1256, 1256, 1256, 1256, 1256, 1256,
/* 2140 */ 1256, 1617,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 194, 276, 277, 278, 216, 194, 194, 217, 194, 194,
/* 10 */ 194, 194, 224, 194, 194, 276, 277, 278, 204, 19,
/* 20 */ 206, 202, 297, 217, 218, 205, 207, 217, 205, 217,
/* 30 */ 218, 31, 217, 218, 217, 218, 29, 217, 218, 39,
/* 40 */ 33, 217, 220, 43, 44, 45, 46, 47, 48, 49,
/* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 312, 19,
/* 60 */ 240, 241, 316, 240, 241, 194, 46, 47, 48, 49,
/* 70 */ 22, 254, 65, 253, 254, 255, 253, 194, 255, 194,
/* 80 */ 263, 258, 259, 43, 44, 45, 46, 47, 48, 49,
/* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 276, 277,
/* 100 */ 278, 285, 102, 103, 104, 105, 106, 107, 108, 109,
/* 110 */ 110, 111, 112, 113, 59, 186, 187, 188, 189, 190,
/* 120 */ 191, 310, 239, 317, 318, 196, 86, 198, 88, 317,
/* 130 */ 19, 319, 317, 318, 205, 264, 25, 211, 212, 213,
/* 140 */ 205, 121, 102, 103, 104, 105, 106, 107, 108, 109,
/* 150 */ 110, 111, 112, 113, 43, 44, 45, 46, 47, 48,
/* 160 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 240,
/* 170 */ 241, 116, 117, 118, 119, 240, 241, 122, 123, 124,
/* 180 */ 69, 298, 253, 194, 255, 106, 107, 132, 253, 141,
/* 190 */ 255, 54, 55, 56, 57, 58, 207, 268, 102, 103,
/* 200 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
/* 210 */ 214, 128, 129, 102, 103, 104, 105, 106, 107, 108,
/* 220 */ 109, 110, 111, 112, 113, 134, 25, 136, 137, 300,
/* 230 */ 165, 166, 153, 19, 155, 54, 55, 56, 57, 102,
/* 240 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
/* 250 */ 113, 108, 109, 110, 111, 112, 113, 43, 44, 45,
/* 260 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
/* 270 */ 56, 57, 276, 277, 278, 113, 194, 19, 22, 23,
/* 280 */ 194, 67, 24, 102, 103, 104, 105, 106, 107, 108,
/* 290 */ 109, 110, 111, 112, 113, 220, 250, 59, 252, 217,
/* 300 */ 218, 43, 44, 45, 46, 47, 48, 49, 50, 51,
/* 310 */ 52, 53, 54, 55, 56, 57, 102, 103, 104, 105,
/* 320 */ 106, 107, 108, 109, 110, 111, 112, 113, 106, 107,
/* 330 */ 108, 109, 110, 111, 112, 113, 254, 59, 205, 138,
/* 340 */ 139, 19, 20, 194, 22, 263, 22, 23, 231, 25,
/* 350 */ 72, 276, 277, 278, 116, 117, 118, 101, 36, 76,
/* 360 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
/* 370 */ 112, 113, 89, 240, 241, 92, 73, 194, 194, 73,
/* 380 */ 19, 59, 188, 189, 190, 191, 253, 81, 255, 151,
/* 390 */ 196, 25, 198, 71, 116, 117, 118, 311, 312, 205,
/* 400 */ 217, 218, 316, 81, 43, 44, 45, 46, 47, 48,
/* 410 */ 49, 50, 51, 52, 53, 54, 55, 56, 57, 270,
/* 420 */ 22, 23, 100, 25, 59, 101, 138, 139, 106, 107,
/* 430 */ 127, 128, 129, 127, 240, 241, 114, 254, 116, 117,
/* 440 */ 118, 76, 76, 121, 138, 139, 263, 253, 264, 255,
/* 450 */ 205, 275, 87, 19, 89, 89, 194, 92, 92, 199,
/* 460 */ 138, 139, 268, 102, 103, 104, 105, 106, 107, 108,
/* 470 */ 109, 110, 111, 112, 113, 153, 154, 155, 156, 157,
/* 480 */ 81, 116, 117, 118, 129, 240, 241, 224, 19, 226,
/* 490 */ 314, 315, 23, 25, 300, 59, 22, 234, 253, 101,
/* 500 */ 255, 236, 237, 26, 194, 183, 194, 152, 72, 22,
/* 510 */ 145, 150, 43, 44, 45, 46, 47, 48, 49, 50,
/* 520 */ 51, 52, 53, 54, 55, 56, 57, 217, 218, 217,
/* 530 */ 218, 19, 189, 59, 191, 23, 59, 138, 139, 196,
/* 540 */ 135, 198, 232, 283, 232, 140, 59, 287, 205, 275,
/* 550 */ 116, 205, 116, 117, 118, 43, 44, 45, 46, 47,
/* 560 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
/* 570 */ 194, 102, 103, 104, 105, 106, 107, 108, 109, 110,
/* 580 */ 111, 112, 113, 240, 241, 194, 240, 241, 314, 315,
/* 590 */ 116, 117, 118, 116, 117, 118, 253, 194, 255, 253,
/* 600 */ 59, 255, 19, 116, 117, 118, 23, 22, 217, 218,
/* 610 */ 142, 268, 205, 275, 102, 103, 104, 105, 106, 107,
/* 620 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
/* 630 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 640 */ 57, 19, 194, 300, 59, 23, 119, 240, 241, 122,
/* 650 */ 123, 124, 314, 315, 194, 236, 237, 194, 117, 132,
/* 660 */ 253, 81, 255, 205, 59, 43, 44, 45, 46, 47,
/* 670 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
/* 680 */ 217, 218, 194, 194, 194, 102, 103, 104, 105, 106,
/* 690 */ 107, 108, 109, 110, 111, 112, 113, 294, 240, 241,
/* 700 */ 120, 116, 117, 118, 59, 194, 217, 218, 211, 212,
/* 710 */ 213, 253, 19, 255, 194, 19, 23, 254, 138, 139,
/* 720 */ 24, 232, 117, 194, 102, 103, 104, 105, 106, 107,
/* 730 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
/* 740 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 750 */ 57, 19, 264, 108, 76, 23, 127, 128, 129, 311,
/* 760 */ 312, 116, 117, 118, 316, 87, 306, 89, 308, 194,
/* 770 */ 92, 22, 59, 194, 22, 43, 44, 45, 46, 47,
/* 780 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
/* 790 */ 194, 95, 217, 218, 265, 102, 103, 104, 105, 106,
/* 800 */ 107, 108, 109, 110, 111, 112, 113, 232, 59, 113,
/* 810 */ 25, 59, 194, 217, 218, 119, 120, 121, 122, 123,
/* 820 */ 124, 125, 19, 145, 194, 194, 23, 131, 232, 116,
/* 830 */ 117, 118, 35, 194, 102, 103, 104, 105, 106, 107,
/* 840 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
/* 850 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 860 */ 57, 19, 194, 66, 194, 116, 117, 118, 116, 117,
/* 870 */ 118, 74, 242, 294, 194, 194, 206, 23, 194, 25,
/* 880 */ 194, 111, 112, 113, 25, 43, 44, 45, 46, 47,
/* 890 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
/* 900 */ 24, 194, 194, 217, 218, 102, 103, 104, 105, 106,
/* 910 */ 107, 108, 109, 110, 111, 112, 113, 241, 232, 194,
/* 920 */ 212, 213, 242, 242, 217, 218, 242, 130, 11, 253,
/* 930 */ 194, 255, 19, 265, 149, 59, 306, 194, 308, 232,
/* 940 */ 309, 310, 217, 218, 102, 103, 104, 105, 106, 107,
/* 950 */ 108, 109, 110, 111, 112, 113, 43, 44, 45, 46,
/* 960 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 970 */ 57, 194, 194, 59, 194, 239, 19, 194, 25, 254,
/* 980 */ 303, 304, 23, 194, 25, 126, 306, 306, 308, 308,
/* 990 */ 306, 271, 308, 117, 286, 217, 218, 217, 218, 194,
/* 1000 */ 194, 159, 45, 46, 47, 48, 49, 50, 51, 52,
/* 1010 */ 53, 54, 55, 56, 57, 102, 103, 104, 105, 106,
/* 1020 */ 107, 108, 109, 110, 111, 112, 113, 59, 239, 194,
/* 1030 */ 116, 117, 118, 260, 254, 194, 240, 241, 194, 233,
/* 1040 */ 205, 240, 241, 205, 239, 128, 129, 270, 265, 253,
/* 1050 */ 194, 255, 217, 218, 253, 194, 255, 143, 280, 102,
/* 1060 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
/* 1070 */ 113, 118, 159, 217, 218, 240, 241, 118, 240, 241,
/* 1080 */ 194, 194, 194, 239, 116, 117, 118, 22, 253, 254,
/* 1090 */ 255, 253, 19, 255, 233, 194, 143, 24, 263, 212,
/* 1100 */ 213, 194, 143, 217, 218, 217, 218, 261, 262, 271,
/* 1110 */ 254, 143, 19, 7, 8, 9, 43, 44, 45, 46,
/* 1120 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 1130 */ 57, 16, 19, 22, 23, 294, 43, 44, 45, 46,
/* 1140 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 1150 */ 57, 312, 194, 214, 21, 316, 43, 44, 45, 46,
/* 1160 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
/* 1170 */ 57, 106, 107, 286, 194, 102, 103, 104, 105, 106,
/* 1180 */ 107, 108, 109, 110, 111, 112, 113, 207, 158, 59,
/* 1190 */ 160, 22, 77, 24, 79, 102, 103, 104, 105, 106,
/* 1200 */ 107, 108, 109, 110, 111, 112, 113, 194, 194, 229,
/* 1210 */ 194, 231, 101, 80, 22, 102, 103, 104, 105, 106,
/* 1220 */ 107, 108, 109, 110, 111, 112, 113, 288, 59, 12,
/* 1230 */ 217, 218, 293, 217, 218, 19, 106, 107, 59, 19,
/* 1240 */ 16, 127, 128, 129, 27, 115, 116, 117, 118, 194,
/* 1250 */ 120, 59, 22, 194, 24, 194, 123, 100, 128, 42,
/* 1260 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
/* 1270 */ 54, 55, 56, 57, 117, 194, 217, 218, 121, 100,
/* 1280 */ 63, 194, 245, 153, 194, 155, 117, 19, 115, 194,
/* 1290 */ 73, 214, 194, 256, 161, 116, 117, 194, 217, 218,
/* 1300 */ 121, 77, 194, 79, 217, 218, 194, 217, 218, 117,
/* 1310 */ 153, 154, 155, 254, 46, 217, 218, 144, 102, 103,
/* 1320 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
/* 1330 */ 232, 270, 153, 154, 155, 115, 116, 66, 19, 20,
/* 1340 */ 183, 22, 12, 312, 254, 194, 262, 316, 209, 210,
/* 1350 */ 266, 239, 194, 194, 108, 36, 85, 27, 19, 20,
/* 1360 */ 265, 22, 183, 245, 144, 94, 25, 48, 217, 218,
/* 1370 */ 293, 194, 42, 270, 256, 36, 217, 218, 59, 194,
/* 1380 */ 25, 135, 194, 115, 194, 161, 140, 194, 194, 15,
/* 1390 */ 71, 194, 312, 63, 217, 218, 316, 194, 59, 131,
/* 1400 */ 301, 302, 217, 218, 85, 217, 218, 217, 218, 90,
/* 1410 */ 71, 217, 218, 19, 217, 218, 245, 146, 262, 100,
/* 1420 */ 217, 218, 266, 265, 85, 106, 107, 256, 312, 90,
/* 1430 */ 209, 210, 316, 114, 60, 116, 117, 118, 194, 100,
/* 1440 */ 121, 194, 194, 145, 115, 106, 107, 19, 46, 19,
/* 1450 */ 20, 24, 22, 114, 194, 116, 117, 118, 194, 245,
/* 1460 */ 121, 194, 164, 194, 217, 218, 36, 194, 258, 259,
/* 1470 */ 256, 194, 153, 154, 155, 156, 157, 217, 218, 150,
/* 1480 */ 31, 217, 218, 142, 217, 218, 217, 218, 39, 59,
/* 1490 */ 217, 218, 153, 154, 155, 156, 157, 149, 150, 5,
/* 1500 */ 145, 71, 183, 245, 10, 11, 12, 13, 14, 194,
/* 1510 */ 116, 17, 129, 227, 256, 85, 194, 115, 194, 23,
/* 1520 */ 90, 25, 183, 99, 30, 97, 32, 22, 22, 194,
/* 1530 */ 100, 194, 217, 218, 40, 152, 106, 107, 23, 217,
/* 1540 */ 218, 194, 19, 20, 114, 22, 116, 117, 118, 257,
/* 1550 */ 194, 121, 217, 218, 217, 218, 194, 133, 53, 36,
/* 1560 */ 23, 23, 25, 25, 70, 120, 121, 61, 141, 7,
/* 1570 */ 8, 121, 78, 217, 218, 81, 23, 227, 25, 217,
/* 1580 */ 218, 131, 59, 153, 154, 155, 156, 157, 0, 1,
/* 1590 */ 2, 59, 98, 5, 71, 23, 227, 25, 10, 11,
/* 1600 */ 12, 13, 14, 83, 84, 17, 23, 23, 25, 25,
/* 1610 */ 59, 194, 194, 183, 23, 23, 25, 25, 30, 194,
/* 1620 */ 32, 19, 20, 100, 22, 194, 194, 133, 40, 106,
/* 1630 */ 107, 108, 138, 139, 194, 217, 218, 114, 36, 116,
/* 1640 */ 117, 118, 217, 218, 121, 194, 194, 194, 23, 117,
/* 1650 */ 25, 194, 23, 23, 25, 25, 162, 194, 70, 194,
/* 1660 */ 145, 59, 23, 153, 25, 155, 78, 194, 117, 81,
/* 1670 */ 217, 218, 194, 71, 217, 218, 153, 154, 155, 156,
/* 1680 */ 157, 194, 217, 218, 194, 23, 98, 25, 321, 194,
/* 1690 */ 217, 218, 194, 19, 20, 194, 22, 153, 23, 155,
/* 1700 */ 25, 194, 100, 194, 217, 218, 183, 194, 106, 107,
/* 1710 */ 36, 194, 217, 218, 237, 194, 114, 243, 116, 117,
/* 1720 */ 118, 133, 194, 121, 217, 218, 138, 139, 194, 194,
/* 1730 */ 194, 290, 289, 59, 217, 218, 194, 194, 217, 218,
/* 1740 */ 194, 194, 140, 194, 194, 71, 194, 244, 194, 194,
/* 1750 */ 162, 217, 218, 194, 194, 153, 154, 155, 156, 157,
/* 1760 */ 217, 218, 194, 217, 218, 194, 217, 218, 257, 217,
/* 1770 */ 218, 217, 218, 257, 100, 194, 257, 217, 218, 257,
/* 1780 */ 106, 107, 215, 299, 194, 183, 192, 194, 114, 194,
/* 1790 */ 116, 117, 118, 1, 2, 121, 221, 5, 217, 218,
/* 1800 */ 273, 197, 10, 11, 12, 13, 14, 217, 218, 17,
/* 1810 */ 217, 218, 217, 218, 140, 194, 246, 194, 273, 295,
/* 1820 */ 247, 273, 30, 247, 32, 269, 269, 153, 154, 155,
/* 1830 */ 156, 157, 40, 246, 273, 295, 230, 226, 217, 218,
/* 1840 */ 217, 218, 220, 261, 220, 282, 220, 19, 20, 244,
/* 1850 */ 22, 250, 141, 250, 246, 60, 201, 183, 261, 261,
/* 1860 */ 261, 201, 70, 299, 36, 299, 201, 38, 151, 150,
/* 1870 */ 78, 285, 22, 81, 296, 296, 43, 235, 18, 238,
/* 1880 */ 201, 274, 272, 238, 238, 238, 18, 59, 200, 149,
/* 1890 */ 98, 247, 274, 274, 235, 247, 247, 247, 235, 71,
/* 1900 */ 272, 201, 200, 158, 292, 62, 291, 201, 200, 22,
/* 1910 */ 201, 222, 200, 222, 201, 200, 115, 219, 219, 64,
/* 1920 */ 219, 228, 22, 126, 221, 133, 165, 222, 100, 225,
/* 1930 */ 138, 139, 225, 219, 106, 107, 24, 219, 228, 219,
/* 1940 */ 219, 307, 114, 113, 116, 117, 118, 315, 284, 121,
/* 1950 */ 284, 222, 201, 91, 162, 320, 320, 82, 148, 267,
/* 1960 */ 145, 267, 22, 279, 201, 158, 281, 251, 147, 146,
/* 1970 */ 25, 203, 250, 249, 251, 248, 13, 247, 195, 195,
/* 1980 */ 6, 153, 154, 155, 156, 157, 193, 193, 305, 193,
/* 1990 */ 208, 305, 302, 214, 214, 214, 208, 223, 223, 214,
/* 2000 */ 4, 215, 215, 214, 3, 22, 208, 163, 15, 23,
/* 2010 */ 16, 183, 23, 139, 151, 130, 25, 20, 142, 24,
/* 2020 */ 16, 144, 1, 142, 130, 130, 61, 37, 53, 151,
/* 2030 */ 53, 53, 53, 130, 116, 1, 34, 141, 5, 22,
/* 2040 */ 115, 161, 75, 25, 68, 141, 41, 115, 68, 24,
/* 2050 */ 20, 19, 131, 125, 67, 67, 96, 22, 22, 22,
/* 2060 */ 37, 23, 22, 24, 22, 59, 67, 23, 149, 28,
/* 2070 */ 22, 25, 23, 23, 23, 22, 141, 34, 97, 23,
/* 2080 */ 23, 34, 116, 22, 143, 25, 34, 75, 34, 34,
/* 2090 */ 75, 88, 34, 86, 23, 22, 34, 25, 24, 34,
/* 2100 */ 25, 93, 23, 44, 142, 23, 142, 23, 23, 22,
/* 2110 */ 11, 25, 23, 25, 23, 22, 22, 22, 1, 23,
/* 2120 */ 23, 23, 22, 22, 15, 141, 141, 25, 25, 1,
/* 2130 */ 322, 322, 322, 135, 322, 322, 322, 322, 322, 322,
/* 2140 */ 322, 141, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2150 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2160 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2170 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2180 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2190 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2200 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2210 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2220 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2230 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2240 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2250 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2260 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2270 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2280 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2290 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2300 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2310 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
/* 2320 */ 322, 322, 322, 322, 322, 322, 322, 322,
};
#define YY_SHIFT_COUNT (582)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (2128)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 1792, 1588, 1494, 322, 322, 399, 306, 1319, 1339, 1430,
/* 10 */ 1828, 1828, 1828, 580, 399, 399, 399, 399, 399, 0,
/* 20 */ 0, 214, 1093, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
/* 30 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1130, 1130,
/* 40 */ 365, 365, 55, 278, 436, 713, 713, 201, 201, 201,
/* 50 */ 201, 40, 111, 258, 361, 469, 512, 583, 622, 693,
/* 60 */ 732, 803, 842, 913, 1073, 1093, 1093, 1093, 1093, 1093,
/* 70 */ 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093,
/* 80 */ 1093, 1093, 1093, 1113, 1093, 1216, 957, 957, 1523, 1602,
/* 90 */ 1674, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
/* 100 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
/* 110 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
/* 120 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
/* 130 */ 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828,
/* 140 */ 137, 181, 181, 181, 181, 181, 181, 181, 96, 222,
/* 150 */ 143, 477, 713, 1133, 1268, 713, 713, 79, 79, 713,
/* 160 */ 770, 83, 65, 65, 65, 288, 162, 162, 2142, 2142,
/* 170 */ 696, 696, 696, 238, 474, 474, 474, 474, 1217, 1217,
/* 180 */ 678, 477, 324, 398, 713, 713, 713, 713, 713, 713,
/* 190 */ 713, 713, 713, 713, 713, 713, 713, 713, 713, 713,
/* 200 */ 713, 713, 713, 1220, 366, 366, 713, 917, 283, 283,
/* 210 */ 434, 434, 605, 605, 1298, 2142, 2142, 2142, 2142, 2142,
/* 220 */ 2142, 2142, 1179, 1157, 1157, 487, 527, 585, 645, 749,
/* 230 */ 914, 968, 752, 713, 713, 713, 713, 713, 713, 713,
/* 240 */ 713, 713, 713, 303, 713, 713, 713, 713, 713, 713,
/* 250 */ 713, 713, 713, 713, 713, 713, 797, 797, 797, 713,
/* 260 */ 713, 713, 959, 713, 713, 713, 1169, 1271, 713, 713,
/* 270 */ 1330, 713, 713, 713, 713, 713, 713, 713, 713, 629,
/* 280 */ 7, 91, 876, 876, 876, 876, 953, 91, 91, 1246,
/* 290 */ 1065, 1106, 1374, 1329, 1348, 468, 1348, 1394, 785, 1329,
/* 300 */ 1329, 785, 1329, 468, 1394, 859, 854, 1402, 1449, 1449,
/* 310 */ 1449, 1173, 1173, 1173, 1173, 1355, 1355, 1030, 1341, 405,
/* 320 */ 1230, 1795, 1795, 1711, 1711, 1829, 1829, 1711, 1717, 1719,
/* 330 */ 1850, 1833, 1860, 1860, 1860, 1860, 1711, 1868, 1740, 1719,
/* 340 */ 1719, 1740, 1850, 1833, 1740, 1833, 1740, 1711, 1868, 1745,
/* 350 */ 1843, 1711, 1868, 1887, 1711, 1868, 1711, 1868, 1887, 1801,
/* 360 */ 1801, 1801, 1855, 1900, 1900, 1887, 1801, 1797, 1801, 1855,
/* 370 */ 1801, 1801, 1761, 1912, 1830, 1830, 1887, 1711, 1862, 1862,
/* 380 */ 1875, 1875, 1810, 1815, 1940, 1711, 1807, 1810, 1821, 1823,
/* 390 */ 1740, 1945, 1963, 1963, 1974, 1974, 1974, 2142, 2142, 2142,
/* 400 */ 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142,
/* 410 */ 2142, 2142, 20, 1224, 256, 1111, 1115, 1114, 1192, 1496,
/* 420 */ 1424, 1505, 1427, 355, 1383, 1537, 1506, 1538, 1553, 1583,
/* 430 */ 1584, 1591, 1625, 541, 1445, 1562, 1450, 1572, 1515, 1428,
/* 440 */ 1532, 1592, 1629, 1520, 1630, 1639, 1510, 1544, 1662, 1675,
/* 450 */ 1551, 48, 1996, 2001, 1983, 1844, 1993, 1994, 1986, 1989,
/* 460 */ 1874, 1863, 1885, 1991, 1991, 1995, 1876, 1997, 1877, 2004,
/* 470 */ 2021, 1881, 1894, 1991, 1895, 1965, 1990, 1991, 1878, 1975,
/* 480 */ 1977, 1978, 1979, 1903, 1918, 2002, 1896, 2034, 2033, 2017,
/* 490 */ 1925, 1880, 1976, 2018, 1980, 1967, 2005, 1904, 1932, 2025,
/* 500 */ 2030, 2032, 1921, 1928, 2035, 1987, 2036, 2037, 2038, 2040,
/* 510 */ 1988, 2006, 2039, 1960, 2041, 2042, 1999, 2023, 2044, 2043,
/* 520 */ 1919, 2048, 2049, 2050, 2046, 2051, 2053, 1981, 1935, 2056,
/* 530 */ 2057, 1966, 2047, 2061, 1941, 2060, 2052, 2054, 2055, 2058,
/* 540 */ 2003, 2012, 2007, 2059, 2015, 2008, 2062, 2071, 2073, 2074,
/* 550 */ 2072, 2075, 2065, 1962, 1964, 2079, 2060, 2082, 2084, 2085,
/* 560 */ 2087, 2086, 2089, 2088, 2091, 2093, 2099, 2094, 2095, 2096,
/* 570 */ 2097, 2100, 2101, 2102, 1998, 1984, 1985, 2000, 2103, 2098,
/* 580 */ 2109, 2117, 2128,
};
#define YY_REDUCE_COUNT (411)
#define YY_REDUCE_MIN (-275)
#define YY_REDUCE_MAX (1798)
static const short yy_reduce_ofst[] = {
/* 0 */ -71, 194, 343, 835, -180, -177, 838, -194, -188, -185,
/* 10 */ -183, 82, 183, -65, 133, 245, 346, 407, 458, -178,
/* 20 */ 75, -275, -4, 310, 312, 489, 575, 596, 463, 686,
/* 30 */ 707, 725, 780, 1098, 856, 778, 1059, 1090, 708, 887,
/* 40 */ 86, 448, 980, 630, 680, 681, 684, 796, 801, 796,
/* 50 */ 801, -261, -261, -261, -261, -261, -261, -261, -261, -261,
/* 60 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
/* 70 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
/* 80 */ -261, -261, -261, -261, -261, -261, -261, -261, 391, 886,
/* 90 */ 888, 1013, 1016, 1081, 1087, 1151, 1159, 1177, 1185, 1188,
/* 100 */ 1190, 1194, 1197, 1203, 1247, 1260, 1264, 1267, 1269, 1273,
/* 110 */ 1315, 1322, 1335, 1337, 1356, 1362, 1418, 1425, 1453, 1457,
/* 120 */ 1465, 1473, 1487, 1495, 1507, 1517, 1521, 1534, 1543, 1546,
/* 130 */ 1549, 1552, 1554, 1560, 1581, 1590, 1593, 1595, 1621, 1623,
/* 140 */ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
/* 150 */ -261, -186, -117, 260, 263, 460, 631, -74, 497, -181,
/* 160 */ -261, 939, 176, 274, 338, 676, -261, -261, -261, -261,
/* 170 */ -212, -212, -212, -184, 149, 777, 1061, 1103, 265, 419,
/* 180 */ -254, 670, 677, 677, -11, -129, 184, 488, 736, 789,
/* 190 */ 805, 844, 403, 529, 579, 668, 783, 841, 1158, 1112,
/* 200 */ 806, 861, 1095, 846, 839, 1031, -189, 1077, 1080, 1116,
/* 210 */ 1084, 1156, 1139, 1221, 46, 1099, 1037, 1118, 1171, 1214,
/* 220 */ 1210, 1258, -210, -190, -176, -115, 117, 262, 376, 490,
/* 230 */ 511, 520, 618, 639, 743, 901, 907, 958, 1014, 1055,
/* 240 */ 1108, 1193, 1244, 720, 1248, 1277, 1324, 1347, 1417, 1431,
/* 250 */ 1432, 1440, 1451, 1452, 1463, 1478, 1286, 1350, 1369, 1490,
/* 260 */ 1498, 1501, 773, 1509, 1513, 1528, 1292, 1367, 1535, 1536,
/* 270 */ 1477, 1542, 376, 1547, 1550, 1555, 1559, 1568, 1571, 1441,
/* 280 */ 1443, 1474, 1511, 1516, 1519, 1522, 773, 1474, 1474, 1503,
/* 290 */ 1567, 1594, 1484, 1527, 1556, 1570, 1557, 1524, 1573, 1545,
/* 300 */ 1548, 1576, 1561, 1587, 1540, 1575, 1606, 1611, 1622, 1624,
/* 310 */ 1626, 1582, 1597, 1598, 1599, 1601, 1603, 1563, 1608, 1605,
/* 320 */ 1604, 1564, 1566, 1655, 1660, 1578, 1579, 1665, 1586, 1607,
/* 330 */ 1610, 1642, 1641, 1645, 1646, 1647, 1679, 1688, 1644, 1618,
/* 340 */ 1619, 1648, 1628, 1659, 1649, 1663, 1650, 1700, 1702, 1612,
/* 350 */ 1615, 1706, 1708, 1689, 1709, 1712, 1713, 1715, 1691, 1698,
/* 360 */ 1699, 1701, 1693, 1704, 1707, 1705, 1714, 1703, 1718, 1710,
/* 370 */ 1720, 1721, 1632, 1634, 1664, 1666, 1729, 1751, 1635, 1636,
/* 380 */ 1692, 1694, 1716, 1722, 1684, 1763, 1685, 1723, 1724, 1727,
/* 390 */ 1730, 1768, 1783, 1784, 1793, 1794, 1796, 1683, 1686, 1690,
/* 400 */ 1782, 1779, 1780, 1781, 1785, 1788, 1774, 1775, 1786, 1787,
/* 410 */ 1789, 1798,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254,
/* 10 */ 1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397,
/* 20 */ 1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 30 */ 1254, 1254, 1254, 1254, 1254, 1490, 1254, 1254, 1254, 1254,
/* 40 */ 1578, 1578, 1254, 1254, 1254, 1254, 1254, 1563, 1562, 1254,
/* 50 */ 1254, 1254, 1406, 1254, 1413, 1254, 1254, 1254, 1254, 1254,
/* 60 */ 1492, 1493, 1254, 1254, 1254, 1543, 1545, 1508, 1420, 1419,
/* 70 */ 1418, 1417, 1526, 1385, 1411, 1404, 1408, 1487, 1488, 1486,
/* 80 */ 1641, 1493, 1492, 1254, 1407, 1455, 1471, 1454, 1254, 1254,
/* 90 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 100 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 110 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 120 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 130 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 140 */ 1463, 1470, 1469, 1468, 1477, 1467, 1464, 1457, 1456, 1458,
/* 150 */ 1459, 1278, 1254, 1275, 1329, 1254, 1254, 1254, 1254, 1254,
/* 160 */ 1460, 1287, 1448, 1447, 1446, 1254, 1474, 1461, 1473, 1472,
/* 170 */ 1551, 1615, 1614, 1509, 1254, 1254, 1254, 1254, 1254, 1254,
/* 180 */ 1578, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 190 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 200 */ 1254, 1254, 1254, 1387, 1578, 1578, 1254, 1287, 1578, 1578,
/* 210 */ 1388, 1388, 1283, 1283, 1391, 1558, 1358, 1358, 1358, 1358,
/* 220 */ 1367, 1358, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 230 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1548, 1546, 1254,
/* 240 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 250 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 260 */ 1254, 1254, 1254, 1254, 1254, 1254, 1363, 1254, 1254, 1254,
/* 270 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1608, 1254,
/* 280 */ 1521, 1343, 1363, 1363, 1363, 1363, 1365, 1344, 1342, 1357,
/* 290 */ 1288, 1261, 1655, 1423, 1412, 1364, 1412, 1652, 1410, 1423,
/* 300 */ 1423, 1410, 1423, 1364, 1652, 1304, 1630, 1299, 1397, 1397,
/* 310 */ 1397, 1387, 1387, 1387, 1387, 1391, 1391, 1489, 1364, 1357,
/* 320 */ 1254, 1655, 1655, 1373, 1373, 1654, 1654, 1373, 1509, 1638,
/* 330 */ 1432, 1332, 1338, 1338, 1338, 1338, 1373, 1272, 1410, 1638,
/* 340 */ 1638, 1410, 1432, 1332, 1410, 1332, 1410, 1373, 1272, 1525,
/* 350 */ 1649, 1373, 1272, 1499, 1373, 1272, 1373, 1272, 1499, 1330,
/* 360 */ 1330, 1330, 1319, 1254, 1254, 1499, 1330, 1304, 1330, 1319,
/* 370 */ 1330, 1330, 1596, 1254, 1503, 1503, 1499, 1373, 1588, 1588,
/* 380 */ 1400, 1400, 1405, 1391, 1494, 1373, 1254, 1405, 1403, 1401,
/* 390 */ 1410, 1322, 1611, 1611, 1607, 1607, 1607, 1660, 1660, 1558,
/* 400 */ 1623, 1287, 1287, 1287, 1287, 1623, 1306, 1306, 1288, 1288,
/* 410 */ 1287, 1623, 1254, 1254, 1254, 1254, 1254, 1254, 1618, 1254,
/* 420 */ 1553, 1510, 1377, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 430 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1564,
/* 440 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 450 */ 1254, 1437, 1254, 1257, 1555, 1254, 1254, 1254, 1254, 1254,
/* 460 */ 1254, 1254, 1254, 1414, 1415, 1378, 1254, 1254, 1254, 1254,
/* 470 */ 1254, 1254, 1254, 1429, 1254, 1254, 1254, 1424, 1254, 1254,
/* 480 */ 1254, 1254, 1254, 1254, 1254, 1254, 1651, 1254, 1254, 1254,
/* 490 */ 1254, 1254, 1254, 1524, 1523, 1254, 1254, 1375, 1254, 1254,
/* 500 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 510 */ 1254, 1302, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 520 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 530 */ 1254, 1254, 1254, 1254, 1254, 1402, 1254, 1254, 1254, 1254,
/* 540 */ 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 550 */ 1593, 1392, 1254, 1254, 1254, 1254, 1642, 1254, 1254, 1254,
/* 560 */ 1254, 1352, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,
/* 570 */ 1254, 1254, 1254, 1634, 1346, 1438, 1254, 1441, 1276, 1254,
/* 580 */ 1266, 1254, 1254,
};
/********** End of lemon-generated parsing tables *****************************/
/* The next table maps tokens (terminal symbols) into fallback tokens.
** If a construct like the following:
**
** %fallback ID X Y Z.
|
| ︙ | ︙ | |||
173338 173339 173340 173341 173342 173343 173344 | /* 248 */ "groupby_opt", /* 249 */ "having_opt", /* 250 */ "orderby_opt", /* 251 */ "limit_opt", /* 252 */ "window_clause", /* 253 */ "values", /* 254 */ "nexprlist", | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > | 173625 173626 173627 173628 173629 173630 173631 173632 173633 173634 173635 173636 173637 173638 173639 173640 173641 173642 173643 173644 173645 173646 173647 173648 173649 173650 173651 173652 173653 173654 173655 173656 173657 173658 173659 173660 173661 173662 173663 173664 173665 173666 173667 173668 173669 173670 173671 173672 173673 173674 173675 173676 173677 173678 173679 173680 173681 173682 173683 173684 173685 173686 173687 173688 173689 173690 173691 173692 173693 173694 173695 173696 173697 173698 173699 173700 173701 173702 173703 173704 173705 |
/* 248 */ "groupby_opt",
/* 249 */ "having_opt",
/* 250 */ "orderby_opt",
/* 251 */ "limit_opt",
/* 252 */ "window_clause",
/* 253 */ "values",
/* 254 */ "nexprlist",
/* 255 */ "mvalues",
/* 256 */ "sclp",
/* 257 */ "as",
/* 258 */ "seltablist",
/* 259 */ "stl_prefix",
/* 260 */ "joinop",
/* 261 */ "on_using",
/* 262 */ "indexed_by",
/* 263 */ "exprlist",
/* 264 */ "xfullname",
/* 265 */ "idlist",
/* 266 */ "indexed_opt",
/* 267 */ "nulls",
/* 268 */ "with",
/* 269 */ "where_opt_ret",
/* 270 */ "setlist",
/* 271 */ "insert_cmd",
/* 272 */ "idlist_opt",
/* 273 */ "upsert",
/* 274 */ "returning",
/* 275 */ "filter_over",
/* 276 */ "likeop",
/* 277 */ "between_op",
/* 278 */ "in_op",
/* 279 */ "paren_exprlist",
/* 280 */ "case_operand",
/* 281 */ "case_exprlist",
/* 282 */ "case_else",
/* 283 */ "uniqueflag",
/* 284 */ "collate",
/* 285 */ "vinto",
/* 286 */ "nmnum",
/* 287 */ "trigger_decl",
/* 288 */ "trigger_cmd_list",
/* 289 */ "trigger_time",
/* 290 */ "trigger_event",
/* 291 */ "foreach_clause",
/* 292 */ "when_clause",
/* 293 */ "trigger_cmd",
/* 294 */ "trnm",
/* 295 */ "tridxby",
/* 296 */ "database_kw_opt",
/* 297 */ "key_opt",
/* 298 */ "add_column_fullname",
/* 299 */ "kwcolumn_opt",
/* 300 */ "create_vtab",
/* 301 */ "vtabarglist",
/* 302 */ "vtabarg",
/* 303 */ "vtabargtoken",
/* 304 */ "lp",
/* 305 */ "anylist",
/* 306 */ "wqitem",
/* 307 */ "wqas",
/* 308 */ "withnm",
/* 309 */ "windowdefn_list",
/* 310 */ "windowdefn",
/* 311 */ "window",
/* 312 */ "frame_opt",
/* 313 */ "part_opt",
/* 314 */ "filter_clause",
/* 315 */ "over_clause",
/* 316 */ "range_or_rows",
/* 317 */ "frame_bound",
/* 318 */ "frame_bound_s",
/* 319 */ "frame_bound_e",
/* 320 */ "frame_exclude_opt",
/* 321 */ "frame_exclude",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
|
| ︙ | ︙ | |||
173505 173506 173507 173508 173509 173510 173511 | /* 88 */ "selectnowith ::= selectnowith multiselect_op oneselect", /* 89 */ "multiselect_op ::= UNION", /* 90 */ "multiselect_op ::= UNION ALL", /* 91 */ "multiselect_op ::= EXCEPT|INTERSECT", /* 92 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt", /* 93 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt", /* 94 */ "values ::= VALUES LP nexprlist RP", | > | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | | | | > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | | > > | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 173794 173795 173796 173797 173798 173799 173800 173801 173802 173803 173804 173805 173806 173807 173808 173809 173810 173811 173812 173813 173814 173815 173816 173817 173818 173819 173820 173821 173822 173823 173824 173825 173826 173827 173828 173829 173830 173831 173832 173833 173834 173835 173836 173837 173838 173839 173840 173841 173842 173843 173844 173845 173846 173847 173848 173849 173850 173851 173852 173853 173854 173855 173856 173857 173858 173859 173860 173861 173862 173863 173864 173865 173866 173867 173868 173869 173870 173871 173872 173873 173874 173875 173876 173877 173878 173879 173880 173881 173882 173883 173884 173885 173886 173887 173888 173889 173890 173891 173892 173893 173894 173895 173896 173897 173898 173899 173900 173901 173902 173903 173904 173905 173906 173907 173908 173909 173910 173911 173912 173913 173914 173915 173916 173917 173918 173919 173920 173921 173922 173923 173924 173925 173926 173927 173928 173929 173930 173931 173932 173933 173934 173935 173936 173937 173938 173939 173940 173941 173942 173943 173944 173945 173946 173947 173948 173949 173950 173951 173952 173953 173954 173955 173956 173957 173958 173959 173960 173961 173962 173963 173964 173965 173966 173967 173968 173969 173970 173971 173972 173973 173974 173975 173976 173977 173978 173979 173980 173981 173982 173983 173984 173985 173986 173987 173988 173989 173990 173991 173992 173993 173994 173995 173996 173997 173998 173999 174000 174001 174002 174003 174004 174005 174006 174007 174008 174009 174010 174011 174012 174013 174014 174015 174016 174017 174018 174019 174020 174021 174022 174023 174024 174025 174026 174027 174028 174029 174030 174031 174032 174033 174034 174035 174036 174037 174038 174039 174040 174041 174042 174043 174044 174045 174046 174047 174048 174049 174050 174051 174052 174053 174054 174055 174056 174057 174058 174059 174060 174061 174062 174063 174064 174065 174066 174067 174068 174069 174070 174071 174072 174073 174074 174075 174076 174077 174078 174079 174080 174081 174082 174083 174084 174085 174086 174087 174088 174089 174090 174091 174092 174093 174094 174095 174096 174097 174098 174099 174100 174101 174102 174103 174104 174105 174106 174107 174108 174109 174110 174111 174112 174113 174114 174115 174116 174117 174118 174119 174120 174121 | /* 88 */ "selectnowith ::= selectnowith multiselect_op oneselect", /* 89 */ "multiselect_op ::= UNION", /* 90 */ "multiselect_op ::= UNION ALL", /* 91 */ "multiselect_op ::= EXCEPT|INTERSECT", /* 92 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt", /* 93 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt", /* 94 */ "values ::= VALUES LP nexprlist RP", /* 95 */ "oneselect ::= mvalues", /* 96 */ "mvalues ::= values COMMA LP nexprlist RP", /* 97 */ "mvalues ::= mvalues COMMA LP nexprlist RP", /* 98 */ "distinct ::= DISTINCT", /* 99 */ "distinct ::= ALL", /* 100 */ "distinct ::=", /* 101 */ "sclp ::=", /* 102 */ "selcollist ::= sclp scanpt expr scanpt as", /* 103 */ "selcollist ::= sclp scanpt STAR", /* 104 */ "selcollist ::= sclp scanpt nm DOT STAR", /* 105 */ "as ::= AS nm", /* 106 */ "as ::=", /* 107 */ "from ::=", /* 108 */ "from ::= FROM seltablist", /* 109 */ "stl_prefix ::= seltablist joinop", /* 110 */ "stl_prefix ::=", /* 111 */ "seltablist ::= stl_prefix nm dbnm as on_using", /* 112 */ "seltablist ::= stl_prefix nm dbnm as indexed_by on_using", /* 113 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using", /* 114 */ "seltablist ::= stl_prefix LP select RP as on_using", /* 115 */ "seltablist ::= stl_prefix LP seltablist RP as on_using", /* 116 */ "dbnm ::=", /* 117 */ "dbnm ::= DOT nm", /* 118 */ "fullname ::= nm", /* 119 */ "fullname ::= nm DOT nm", /* 120 */ "xfullname ::= nm", /* 121 */ "xfullname ::= nm DOT nm", /* 122 */ "xfullname ::= nm DOT nm AS nm", /* 123 */ "xfullname ::= nm AS nm", /* 124 */ "joinop ::= COMMA|JOIN", /* 125 */ "joinop ::= JOIN_KW JOIN", /* 126 */ "joinop ::= JOIN_KW nm JOIN", /* 127 */ "joinop ::= JOIN_KW nm nm JOIN", /* 128 */ "on_using ::= ON expr", /* 129 */ "on_using ::= USING LP idlist RP", /* 130 */ "on_using ::=", /* 131 */ "indexed_opt ::=", /* 132 */ "indexed_by ::= INDEXED BY nm", /* 133 */ "indexed_by ::= NOT INDEXED", /* 134 */ "orderby_opt ::=", /* 135 */ "orderby_opt ::= ORDER BY sortlist", /* 136 */ "sortlist ::= sortlist COMMA expr sortorder nulls", /* 137 */ "sortlist ::= expr sortorder nulls", /* 138 */ "sortorder ::= ASC", /* 139 */ "sortorder ::= DESC", /* 140 */ "sortorder ::=", /* 141 */ "nulls ::= NULLS FIRST", /* 142 */ "nulls ::= NULLS LAST", /* 143 */ "nulls ::=", /* 144 */ "groupby_opt ::=", /* 145 */ "groupby_opt ::= GROUP BY nexprlist", /* 146 */ "having_opt ::=", /* 147 */ "having_opt ::= HAVING expr", /* 148 */ "limit_opt ::=", /* 149 */ "limit_opt ::= LIMIT expr", /* 150 */ "limit_opt ::= LIMIT expr OFFSET expr", /* 151 */ "limit_opt ::= LIMIT expr COMMA expr", /* 152 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret", /* 153 */ "where_opt ::=", /* 154 */ "where_opt ::= WHERE expr", /* 155 */ "where_opt_ret ::=", /* 156 */ "where_opt_ret ::= WHERE expr", /* 157 */ "where_opt_ret ::= RETURNING selcollist", /* 158 */ "where_opt_ret ::= WHERE expr RETURNING selcollist", /* 159 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret", /* 160 */ "setlist ::= setlist COMMA nm EQ expr", /* 161 */ "setlist ::= setlist COMMA LP idlist RP EQ expr", /* 162 */ "setlist ::= nm EQ expr", /* 163 */ "setlist ::= LP idlist RP EQ expr", /* 164 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert", /* 165 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning", /* 166 */ "upsert ::=", /* 167 */ "upsert ::= RETURNING selcollist", /* 168 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert", /* 169 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert", /* 170 */ "upsert ::= ON CONFLICT DO NOTHING returning", /* 171 */ "upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning", /* 172 */ "returning ::= RETURNING selcollist", /* 173 */ "insert_cmd ::= INSERT orconf", /* 174 */ "insert_cmd ::= REPLACE", /* 175 */ "idlist_opt ::=", /* 176 */ "idlist_opt ::= LP idlist RP", /* 177 */ "idlist ::= idlist COMMA nm", /* 178 */ "idlist ::= nm", /* 179 */ "expr ::= LP expr RP", /* 180 */ "expr ::= ID|INDEXED|JOIN_KW", /* 181 */ "expr ::= nm DOT nm", /* 182 */ "expr ::= nm DOT nm DOT nm", /* 183 */ "term ::= NULL|FLOAT|BLOB", /* 184 */ "term ::= STRING", /* 185 */ "term ::= INTEGER", /* 186 */ "expr ::= VARIABLE", /* 187 */ "expr ::= expr COLLATE ID|STRING", /* 188 */ "expr ::= CAST LP expr AS typetoken RP", /* 189 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP", /* 190 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP", /* 191 */ "expr ::= ID|INDEXED|JOIN_KW LP STAR RP", /* 192 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over", /* 193 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over", /* 194 */ "expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over", /* 195 */ "term ::= CTIME_KW", /* 196 */ "expr ::= LP nexprlist COMMA expr RP", /* 197 */ "expr ::= expr AND expr", /* 198 */ "expr ::= expr OR expr", /* 199 */ "expr ::= expr LT|GT|GE|LE expr", /* 200 */ "expr ::= expr EQ|NE expr", /* 201 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr", /* 202 */ "expr ::= expr PLUS|MINUS expr", /* 203 */ "expr ::= expr STAR|SLASH|REM expr", /* 204 */ "expr ::= expr CONCAT expr", /* 205 */ "likeop ::= NOT LIKE_KW|MATCH", /* 206 */ "expr ::= expr likeop expr", /* 207 */ "expr ::= expr likeop expr ESCAPE expr", /* 208 */ "expr ::= expr ISNULL|NOTNULL", /* 209 */ "expr ::= expr NOT NULL", /* 210 */ "expr ::= expr IS expr", /* 211 */ "expr ::= expr IS NOT expr", /* 212 */ "expr ::= expr IS NOT DISTINCT FROM expr", /* 213 */ "expr ::= expr IS DISTINCT FROM expr", /* 214 */ "expr ::= NOT expr", /* 215 */ "expr ::= BITNOT expr", /* 216 */ "expr ::= PLUS|MINUS expr", /* 217 */ "expr ::= expr PTR expr", /* 218 */ "between_op ::= BETWEEN", /* 219 */ "between_op ::= NOT BETWEEN", /* 220 */ "expr ::= expr between_op expr AND expr", /* 221 */ "in_op ::= IN", /* 222 */ "in_op ::= NOT IN", /* 223 */ "expr ::= expr in_op LP exprlist RP", /* 224 */ "expr ::= LP select RP", /* 225 */ "expr ::= expr in_op LP select RP", /* 226 */ "expr ::= expr in_op nm dbnm paren_exprlist", /* 227 */ "expr ::= EXISTS LP select RP", /* 228 */ "expr ::= CASE case_operand case_exprlist case_else END", /* 229 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", /* 230 */ "case_exprlist ::= WHEN expr THEN expr", /* 231 */ "case_else ::= ELSE expr", /* 232 */ "case_else ::=", /* 233 */ "case_operand ::=", /* 234 */ "exprlist ::=", /* 235 */ "nexprlist ::= nexprlist COMMA expr", /* 236 */ "nexprlist ::= expr", /* 237 */ "paren_exprlist ::=", /* 238 */ "paren_exprlist ::= LP exprlist RP", /* 239 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", /* 240 */ "uniqueflag ::= UNIQUE", /* 241 */ "uniqueflag ::=", /* 242 */ "eidlist_opt ::=", /* 243 */ "eidlist_opt ::= LP eidlist RP", /* 244 */ "eidlist ::= eidlist COMMA nm collate sortorder", /* 245 */ "eidlist ::= nm collate sortorder", /* 246 */ "collate ::=", /* 247 */ "collate ::= COLLATE ID|STRING", /* 248 */ "cmd ::= DROP INDEX ifexists fullname", /* 249 */ "cmd ::= VACUUM vinto", /* 250 */ "cmd ::= VACUUM nm vinto", /* 251 */ "vinto ::= INTO expr", /* 252 */ "vinto ::=", /* 253 */ "cmd ::= PRAGMA nm dbnm", /* 254 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", /* 255 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", /* 256 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", /* 257 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", /* 258 */ "plus_num ::= PLUS INTEGER|FLOAT", /* 259 */ "minus_num ::= MINUS INTEGER|FLOAT", /* 260 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END", /* 261 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause", /* 262 */ "trigger_time ::= BEFORE|AFTER", /* 263 */ "trigger_time ::= INSTEAD OF", /* 264 */ "trigger_time ::=", /* 265 */ "trigger_event ::= DELETE|INSERT", /* 266 */ "trigger_event ::= UPDATE", /* 267 */ "trigger_event ::= UPDATE OF idlist", /* 268 */ "when_clause ::=", /* 269 */ "when_clause ::= WHEN expr", /* 270 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", /* 271 */ "trigger_cmd_list ::= trigger_cmd SEMI", /* 272 */ "trnm ::= nm DOT nm", /* 273 */ "tridxby ::= INDEXED BY nm", /* 274 */ "tridxby ::= NOT INDEXED", /* 275 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt", /* 276 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", /* 277 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", /* 278 */ "trigger_cmd ::= scanpt select scanpt", /* 279 */ "expr ::= RAISE LP IGNORE RP", /* 280 */ "expr ::= RAISE LP raisetype COMMA nm RP", /* 281 */ "raisetype ::= ROLLBACK", /* 282 */ "raisetype ::= ABORT", /* 283 */ "raisetype ::= FAIL", /* 284 */ "cmd ::= DROP TRIGGER ifexists fullname", /* 285 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", /* 286 */ "cmd ::= DETACH database_kw_opt expr", /* 287 */ "key_opt ::=", /* 288 */ "key_opt ::= KEY expr", /* 289 */ "cmd ::= REINDEX", /* 290 */ "cmd ::= REINDEX nm dbnm", /* 291 */ "cmd ::= ANALYZE", /* 292 */ "cmd ::= ANALYZE nm dbnm", /* 293 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", /* 294 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", /* 295 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm", /* 296 */ "add_column_fullname ::= fullname", /* 297 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm", /* 298 */ "cmd ::= create_vtab", /* 299 */ "cmd ::= create_vtab LP vtabarglist RP", /* 300 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", /* 301 */ "vtabarg ::=", /* 302 */ "vtabargtoken ::= ANY", /* 303 */ "vtabargtoken ::= lp anylist RP", /* 304 */ "lp ::= LP", /* 305 */ "with ::= WITH wqlist", /* 306 */ "with ::= WITH RECURSIVE wqlist", /* 307 */ "wqas ::= AS", /* 308 */ "wqas ::= AS MATERIALIZED", /* 309 */ "wqas ::= AS NOT MATERIALIZED", /* 310 */ "wqitem ::= withnm eidlist_opt wqas LP select RP", /* 311 */ "withnm ::= nm", /* 312 */ "wqlist ::= wqitem", /* 313 */ "wqlist ::= wqlist COMMA wqitem", /* 314 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", /* 315 */ "windowdefn ::= nm AS LP window RP", /* 316 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt", /* 317 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt", /* 318 */ "window ::= ORDER BY sortlist frame_opt", /* 319 */ "window ::= nm ORDER BY sortlist frame_opt", /* 320 */ "window ::= nm frame_opt", /* 321 */ "frame_opt ::=", /* 322 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt", /* 323 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt", /* 324 */ "range_or_rows ::= RANGE|ROWS|GROUPS", /* 325 */ "frame_bound_s ::= frame_bound", /* 326 */ "frame_bound_s ::= UNBOUNDED PRECEDING", /* 327 */ "frame_bound_e ::= frame_bound", /* 328 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", /* 329 */ "frame_bound ::= expr PRECEDING|FOLLOWING", /* 330 */ "frame_bound ::= CURRENT ROW", /* 331 */ "frame_exclude_opt ::=", /* 332 */ "frame_exclude_opt ::= EXCLUDE frame_exclude", /* 333 */ "frame_exclude ::= NO OTHERS", /* 334 */ "frame_exclude ::= CURRENT ROW", /* 335 */ "frame_exclude ::= GROUP|TIES", /* 336 */ "window_clause ::= WINDOW windowdefn_list", /* 337 */ "filter_over ::= filter_clause over_clause", /* 338 */ "filter_over ::= over_clause", /* 339 */ "filter_over ::= filter_clause", /* 340 */ "over_clause ::= OVER LP window RP", /* 341 */ "over_clause ::= OVER nm", /* 342 */ "filter_clause ::= FILTER LP WHERE expr RP", /* 343 */ "term ::= QNUMBER", /* 344 */ "input ::= cmdlist", /* 345 */ "cmdlist ::= cmdlist ecmd", /* 346 */ "cmdlist ::= ecmd", /* 347 */ "ecmd ::= SEMI", /* 348 */ "ecmd ::= cmdx SEMI", /* 349 */ "ecmd ::= explain cmdx SEMI", /* 350 */ "trans_opt ::=", /* 351 */ "trans_opt ::= TRANSACTION", /* 352 */ "trans_opt ::= TRANSACTION nm", /* 353 */ "savepoint_opt ::= SAVEPOINT", /* 354 */ "savepoint_opt ::=", /* 355 */ "cmd ::= create_table create_table_args", /* 356 */ "table_option_set ::= table_option", /* 357 */ "columnlist ::= columnlist COMMA columnname carglist", /* 358 */ "columnlist ::= columnname carglist", /* 359 */ "nm ::= ID|INDEXED|JOIN_KW", /* 360 */ "nm ::= STRING", /* 361 */ "typetoken ::= typename", /* 362 */ "typename ::= ID|STRING", /* 363 */ "signed ::= plus_num", /* 364 */ "signed ::= minus_num", /* 365 */ "carglist ::= carglist ccons", /* 366 */ "carglist ::=", /* 367 */ "ccons ::= NULL onconf", /* 368 */ "ccons ::= GENERATED ALWAYS AS generated", /* 369 */ "ccons ::= AS generated", /* 370 */ "conslist_opt ::= COMMA conslist", /* 371 */ "conslist ::= conslist tconscomma tcons", /* 372 */ "conslist ::= tcons", /* 373 */ "tconscomma ::=", /* 374 */ "defer_subclause_opt ::= defer_subclause", /* 375 */ "resolvetype ::= raisetype", /* 376 */ "selectnowith ::= oneselect", /* 377 */ "oneselect ::= values", /* 378 */ "sclp ::= selcollist COMMA", /* 379 */ "as ::= ID|STRING", /* 380 */ "indexed_opt ::= indexed_by", /* 381 */ "returning ::=", /* 382 */ "expr ::= term", /* 383 */ "likeop ::= LIKE_KW|MATCH", /* 384 */ "case_operand ::= expr", /* 385 */ "exprlist ::= nexprlist", /* 386 */ "nmnum ::= plus_num", /* 387 */ "nmnum ::= nm", /* 388 */ "nmnum ::= ON", /* 389 */ "nmnum ::= DELETE", /* 390 */ "nmnum ::= DEFAULT", /* 391 */ "plus_num ::= INTEGER|FLOAT", /* 392 */ "foreach_clause ::=", /* 393 */ "foreach_clause ::= FOR EACH ROW", /* 394 */ "trnm ::= nm", /* 395 */ "tridxby ::=", /* 396 */ "database_kw_opt ::= DATABASE", /* 397 */ "database_kw_opt ::=", /* 398 */ "kwcolumn_opt ::=", /* 399 */ "kwcolumn_opt ::= COLUMNKW", /* 400 */ "vtabarglist ::= vtabarg", /* 401 */ "vtabarglist ::= vtabarglist COMMA vtabarg", /* 402 */ "vtabarg ::= vtabarg vtabargtoken", /* 403 */ "anylist ::=", /* 404 */ "anylist ::= anylist LP anylist RP", /* 405 */ "anylist ::= anylist ANY", /* 406 */ "with ::=", /* 407 */ "windowdefn_list ::= windowdefn", /* 408 */ "window ::= frame_opt", }; #endif /* NDEBUG */ #if YYGROWABLESTACK /* ** Try to increase the size of the parser stack. Return the number |
| ︙ | ︙ | |||
173943 173944 173945 173946 173947 173948 173949 173950 |
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
case 205: /* select */
case 240: /* selectnowith */
case 241: /* oneselect */
case 253: /* values */
{
| > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 174235 174236 174237 174238 174239 174240 174241 174242 174243 174244 174245 174246 174247 174248 174249 174250 174251 174252 174253 174254 174255 174256 174257 174258 174259 174260 174261 174262 174263 174264 174265 174266 174267 174268 174269 174270 174271 174272 174273 174274 174275 174276 174277 174278 174279 174280 174281 174282 174283 174284 174285 174286 174287 174288 174289 174290 174291 174292 174293 174294 174295 174296 174297 174298 174299 174300 174301 174302 174303 174304 174305 174306 174307 174308 174309 174310 174311 174312 174313 174314 174315 174316 174317 174318 174319 174320 174321 174322 174323 174324 174325 174326 174327 174328 174329 174330 174331 174332 174333 174334 174335 174336 |
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
case 205: /* select */
case 240: /* selectnowith */
case 241: /* oneselect */
case 253: /* values */
case 255: /* mvalues */
{
sqlite3SelectDelete(pParse->db, (yypminor->yy555));
}
break;
case 217: /* term */
case 218: /* expr */
case 247: /* where_opt */
case 249: /* having_opt */
case 269: /* where_opt_ret */
case 280: /* case_operand */
case 282: /* case_else */
case 285: /* vinto */
case 292: /* when_clause */
case 297: /* key_opt */
case 314: /* filter_clause */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy454));
}
break;
case 222: /* eidlist_opt */
case 232: /* sortlist */
case 233: /* eidlist */
case 245: /* selcollist */
case 248: /* groupby_opt */
case 250: /* orderby_opt */
case 254: /* nexprlist */
case 256: /* sclp */
case 263: /* exprlist */
case 270: /* setlist */
case 279: /* paren_exprlist */
case 281: /* case_exprlist */
case 313: /* part_opt */
{
sqlite3ExprListDelete(pParse->db, (yypminor->yy14));
}
break;
case 239: /* fullname */
case 246: /* from */
case 258: /* seltablist */
case 259: /* stl_prefix */
case 264: /* xfullname */
{
sqlite3SrcListDelete(pParse->db, (yypminor->yy203));
}
break;
case 242: /* wqlist */
{
sqlite3WithDelete(pParse->db, (yypminor->yy59));
}
break;
case 252: /* window_clause */
case 309: /* windowdefn_list */
{
sqlite3WindowListDelete(pParse->db, (yypminor->yy211));
}
break;
case 265: /* idlist */
case 272: /* idlist_opt */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy132));
}
break;
case 275: /* filter_over */
case 310: /* windowdefn */
case 311: /* window */
case 312: /* frame_opt */
case 315: /* over_clause */
{
sqlite3WindowDelete(pParse->db, (yypminor->yy211));
}
break;
case 288: /* trigger_cmd_list */
case 293: /* trigger_cmd */
{
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy427));
}
break;
case 290: /* trigger_event */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy286).b);
}
break;
case 317: /* frame_bound */
case 318: /* frame_bound_s */
case 319: /* frame_bound_e */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy509).pExpr);
}
break;
/********* End destructor definitions *****************************************/
default: break; /* If no destructor action specified: do nothing */
}
}
|
| ︙ | ︙ | |||
174426 174427 174428 174429 174430 174431 174432 | 240, /* (88) selectnowith ::= selectnowith multiselect_op oneselect */ 243, /* (89) multiselect_op ::= UNION */ 243, /* (90) multiselect_op ::= UNION ALL */ 243, /* (91) multiselect_op ::= EXCEPT|INTERSECT */ 241, /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ 241, /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ 253, /* (94) values ::= VALUES LP nexprlist RP */ | > | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | | | | | | | | | | | | | | | | | | | | | > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | | | > > | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 174719 174720 174721 174722 174723 174724 174725 174726 174727 174728 174729 174730 174731 174732 174733 174734 174735 174736 174737 174738 174739 174740 174741 174742 174743 174744 174745 174746 174747 174748 174749 174750 174751 174752 174753 174754 174755 174756 174757 174758 174759 174760 174761 174762 174763 174764 174765 174766 174767 174768 174769 174770 174771 174772 174773 174774 174775 174776 174777 174778 174779 174780 174781 174782 174783 174784 174785 174786 174787 174788 174789 174790 174791 174792 174793 174794 174795 174796 174797 174798 174799 174800 174801 174802 174803 174804 174805 174806 174807 174808 174809 174810 174811 174812 174813 174814 174815 174816 174817 174818 174819 174820 174821 174822 174823 174824 174825 174826 174827 174828 174829 174830 174831 174832 174833 174834 174835 174836 174837 174838 174839 174840 174841 174842 174843 174844 174845 174846 174847 174848 174849 174850 174851 174852 174853 174854 174855 174856 174857 174858 174859 174860 174861 174862 174863 174864 174865 174866 174867 174868 174869 174870 174871 174872 174873 174874 174875 174876 174877 174878 174879 174880 174881 174882 174883 174884 174885 174886 174887 174888 174889 174890 174891 174892 174893 174894 174895 174896 174897 174898 174899 174900 174901 174902 174903 174904 174905 174906 174907 174908 174909 174910 174911 174912 174913 174914 174915 174916 174917 174918 174919 174920 174921 174922 174923 174924 174925 174926 174927 174928 174929 174930 174931 174932 174933 174934 174935 174936 174937 174938 174939 174940 174941 174942 174943 174944 174945 174946 174947 174948 174949 174950 174951 174952 174953 174954 174955 174956 174957 174958 174959 174960 174961 174962 174963 174964 174965 174966 174967 174968 174969 174970 174971 174972 174973 174974 174975 174976 174977 174978 174979 174980 174981 174982 174983 174984 174985 174986 174987 174988 174989 174990 174991 174992 174993 174994 174995 174996 174997 174998 174999 175000 175001 175002 175003 175004 175005 175006 175007 175008 175009 175010 175011 175012 175013 175014 175015 175016 175017 175018 175019 175020 175021 175022 175023 175024 175025 175026 175027 175028 175029 175030 175031 175032 175033 175034 175035 175036 175037 175038 175039 175040 175041 175042 175043 175044 175045 175046 |
240, /* (88) selectnowith ::= selectnowith multiselect_op oneselect */
243, /* (89) multiselect_op ::= UNION */
243, /* (90) multiselect_op ::= UNION ALL */
243, /* (91) multiselect_op ::= EXCEPT|INTERSECT */
241, /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
241, /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
253, /* (94) values ::= VALUES LP nexprlist RP */
241, /* (95) oneselect ::= mvalues */
255, /* (96) mvalues ::= values COMMA LP nexprlist RP */
255, /* (97) mvalues ::= mvalues COMMA LP nexprlist RP */
244, /* (98) distinct ::= DISTINCT */
244, /* (99) distinct ::= ALL */
244, /* (100) distinct ::= */
256, /* (101) sclp ::= */
245, /* (102) selcollist ::= sclp scanpt expr scanpt as */
245, /* (103) selcollist ::= sclp scanpt STAR */
245, /* (104) selcollist ::= sclp scanpt nm DOT STAR */
257, /* (105) as ::= AS nm */
257, /* (106) as ::= */
246, /* (107) from ::= */
246, /* (108) from ::= FROM seltablist */
259, /* (109) stl_prefix ::= seltablist joinop */
259, /* (110) stl_prefix ::= */
258, /* (111) seltablist ::= stl_prefix nm dbnm as on_using */
258, /* (112) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
258, /* (113) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
258, /* (114) seltablist ::= stl_prefix LP select RP as on_using */
258, /* (115) seltablist ::= stl_prefix LP seltablist RP as on_using */
201, /* (116) dbnm ::= */
201, /* (117) dbnm ::= DOT nm */
239, /* (118) fullname ::= nm */
239, /* (119) fullname ::= nm DOT nm */
264, /* (120) xfullname ::= nm */
264, /* (121) xfullname ::= nm DOT nm */
264, /* (122) xfullname ::= nm DOT nm AS nm */
264, /* (123) xfullname ::= nm AS nm */
260, /* (124) joinop ::= COMMA|JOIN */
260, /* (125) joinop ::= JOIN_KW JOIN */
260, /* (126) joinop ::= JOIN_KW nm JOIN */
260, /* (127) joinop ::= JOIN_KW nm nm JOIN */
261, /* (128) on_using ::= ON expr */
261, /* (129) on_using ::= USING LP idlist RP */
261, /* (130) on_using ::= */
266, /* (131) indexed_opt ::= */
262, /* (132) indexed_by ::= INDEXED BY nm */
262, /* (133) indexed_by ::= NOT INDEXED */
250, /* (134) orderby_opt ::= */
250, /* (135) orderby_opt ::= ORDER BY sortlist */
232, /* (136) sortlist ::= sortlist COMMA expr sortorder nulls */
232, /* (137) sortlist ::= expr sortorder nulls */
220, /* (138) sortorder ::= ASC */
220, /* (139) sortorder ::= DESC */
220, /* (140) sortorder ::= */
267, /* (141) nulls ::= NULLS FIRST */
267, /* (142) nulls ::= NULLS LAST */
267, /* (143) nulls ::= */
248, /* (144) groupby_opt ::= */
248, /* (145) groupby_opt ::= GROUP BY nexprlist */
249, /* (146) having_opt ::= */
249, /* (147) having_opt ::= HAVING expr */
251, /* (148) limit_opt ::= */
251, /* (149) limit_opt ::= LIMIT expr */
251, /* (150) limit_opt ::= LIMIT expr OFFSET expr */
251, /* (151) limit_opt ::= LIMIT expr COMMA expr */
191, /* (152) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
247, /* (153) where_opt ::= */
247, /* (154) where_opt ::= WHERE expr */
269, /* (155) where_opt_ret ::= */
269, /* (156) where_opt_ret ::= WHERE expr */
269, /* (157) where_opt_ret ::= RETURNING selcollist */
269, /* (158) where_opt_ret ::= WHERE expr RETURNING selcollist */
191, /* (159) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
270, /* (160) setlist ::= setlist COMMA nm EQ expr */
270, /* (161) setlist ::= setlist COMMA LP idlist RP EQ expr */
270, /* (162) setlist ::= nm EQ expr */
270, /* (163) setlist ::= LP idlist RP EQ expr */
191, /* (164) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
191, /* (165) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
273, /* (166) upsert ::= */
273, /* (167) upsert ::= RETURNING selcollist */
273, /* (168) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
273, /* (169) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
273, /* (170) upsert ::= ON CONFLICT DO NOTHING returning */
273, /* (171) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
274, /* (172) returning ::= RETURNING selcollist */
271, /* (173) insert_cmd ::= INSERT orconf */
271, /* (174) insert_cmd ::= REPLACE */
272, /* (175) idlist_opt ::= */
272, /* (176) idlist_opt ::= LP idlist RP */
265, /* (177) idlist ::= idlist COMMA nm */
265, /* (178) idlist ::= nm */
218, /* (179) expr ::= LP expr RP */
218, /* (180) expr ::= ID|INDEXED|JOIN_KW */
218, /* (181) expr ::= nm DOT nm */
218, /* (182) expr ::= nm DOT nm DOT nm */
217, /* (183) term ::= NULL|FLOAT|BLOB */
217, /* (184) term ::= STRING */
217, /* (185) term ::= INTEGER */
218, /* (186) expr ::= VARIABLE */
218, /* (187) expr ::= expr COLLATE ID|STRING */
218, /* (188) expr ::= CAST LP expr AS typetoken RP */
218, /* (189) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
218, /* (190) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
218, /* (191) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
218, /* (192) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
218, /* (193) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
218, /* (194) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
217, /* (195) term ::= CTIME_KW */
218, /* (196) expr ::= LP nexprlist COMMA expr RP */
218, /* (197) expr ::= expr AND expr */
218, /* (198) expr ::= expr OR expr */
218, /* (199) expr ::= expr LT|GT|GE|LE expr */
218, /* (200) expr ::= expr EQ|NE expr */
218, /* (201) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
218, /* (202) expr ::= expr PLUS|MINUS expr */
218, /* (203) expr ::= expr STAR|SLASH|REM expr */
218, /* (204) expr ::= expr CONCAT expr */
276, /* (205) likeop ::= NOT LIKE_KW|MATCH */
218, /* (206) expr ::= expr likeop expr */
218, /* (207) expr ::= expr likeop expr ESCAPE expr */
218, /* (208) expr ::= expr ISNULL|NOTNULL */
218, /* (209) expr ::= expr NOT NULL */
218, /* (210) expr ::= expr IS expr */
218, /* (211) expr ::= expr IS NOT expr */
218, /* (212) expr ::= expr IS NOT DISTINCT FROM expr */
218, /* (213) expr ::= expr IS DISTINCT FROM expr */
218, /* (214) expr ::= NOT expr */
218, /* (215) expr ::= BITNOT expr */
218, /* (216) expr ::= PLUS|MINUS expr */
218, /* (217) expr ::= expr PTR expr */
277, /* (218) between_op ::= BETWEEN */
277, /* (219) between_op ::= NOT BETWEEN */
218, /* (220) expr ::= expr between_op expr AND expr */
278, /* (221) in_op ::= IN */
278, /* (222) in_op ::= NOT IN */
218, /* (223) expr ::= expr in_op LP exprlist RP */
218, /* (224) expr ::= LP select RP */
218, /* (225) expr ::= expr in_op LP select RP */
218, /* (226) expr ::= expr in_op nm dbnm paren_exprlist */
218, /* (227) expr ::= EXISTS LP select RP */
218, /* (228) expr ::= CASE case_operand case_exprlist case_else END */
281, /* (229) case_exprlist ::= case_exprlist WHEN expr THEN expr */
281, /* (230) case_exprlist ::= WHEN expr THEN expr */
282, /* (231) case_else ::= ELSE expr */
282, /* (232) case_else ::= */
280, /* (233) case_operand ::= */
263, /* (234) exprlist ::= */
254, /* (235) nexprlist ::= nexprlist COMMA expr */
254, /* (236) nexprlist ::= expr */
279, /* (237) paren_exprlist ::= */
279, /* (238) paren_exprlist ::= LP exprlist RP */
191, /* (239) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
283, /* (240) uniqueflag ::= UNIQUE */
283, /* (241) uniqueflag ::= */
222, /* (242) eidlist_opt ::= */
222, /* (243) eidlist_opt ::= LP eidlist RP */
233, /* (244) eidlist ::= eidlist COMMA nm collate sortorder */
233, /* (245) eidlist ::= nm collate sortorder */
284, /* (246) collate ::= */
284, /* (247) collate ::= COLLATE ID|STRING */
191, /* (248) cmd ::= DROP INDEX ifexists fullname */
191, /* (249) cmd ::= VACUUM vinto */
191, /* (250) cmd ::= VACUUM nm vinto */
285, /* (251) vinto ::= INTO expr */
285, /* (252) vinto ::= */
191, /* (253) cmd ::= PRAGMA nm dbnm */
191, /* (254) cmd ::= PRAGMA nm dbnm EQ nmnum */
191, /* (255) cmd ::= PRAGMA nm dbnm LP nmnum RP */
191, /* (256) cmd ::= PRAGMA nm dbnm EQ minus_num */
191, /* (257) cmd ::= PRAGMA nm dbnm LP minus_num RP */
212, /* (258) plus_num ::= PLUS INTEGER|FLOAT */
213, /* (259) minus_num ::= MINUS INTEGER|FLOAT */
191, /* (260) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
287, /* (261) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
289, /* (262) trigger_time ::= BEFORE|AFTER */
289, /* (263) trigger_time ::= INSTEAD OF */
289, /* (264) trigger_time ::= */
290, /* (265) trigger_event ::= DELETE|INSERT */
290, /* (266) trigger_event ::= UPDATE */
290, /* (267) trigger_event ::= UPDATE OF idlist */
292, /* (268) when_clause ::= */
292, /* (269) when_clause ::= WHEN expr */
288, /* (270) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
288, /* (271) trigger_cmd_list ::= trigger_cmd SEMI */
294, /* (272) trnm ::= nm DOT nm */
295, /* (273) tridxby ::= INDEXED BY nm */
295, /* (274) tridxby ::= NOT INDEXED */
293, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
293, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
293, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
293, /* (278) trigger_cmd ::= scanpt select scanpt */
218, /* (279) expr ::= RAISE LP IGNORE RP */
218, /* (280) expr ::= RAISE LP raisetype COMMA nm RP */
237, /* (281) raisetype ::= ROLLBACK */
237, /* (282) raisetype ::= ABORT */
237, /* (283) raisetype ::= FAIL */
191, /* (284) cmd ::= DROP TRIGGER ifexists fullname */
191, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
191, /* (286) cmd ::= DETACH database_kw_opt expr */
297, /* (287) key_opt ::= */
297, /* (288) key_opt ::= KEY expr */
191, /* (289) cmd ::= REINDEX */
191, /* (290) cmd ::= REINDEX nm dbnm */
191, /* (291) cmd ::= ANALYZE */
191, /* (292) cmd ::= ANALYZE nm dbnm */
191, /* (293) cmd ::= ALTER TABLE fullname RENAME TO nm */
191, /* (294) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
191, /* (295) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
298, /* (296) add_column_fullname ::= fullname */
191, /* (297) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
191, /* (298) cmd ::= create_vtab */
191, /* (299) cmd ::= create_vtab LP vtabarglist RP */
300, /* (300) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
302, /* (301) vtabarg ::= */
303, /* (302) vtabargtoken ::= ANY */
303, /* (303) vtabargtoken ::= lp anylist RP */
304, /* (304) lp ::= LP */
268, /* (305) with ::= WITH wqlist */
268, /* (306) with ::= WITH RECURSIVE wqlist */
307, /* (307) wqas ::= AS */
307, /* (308) wqas ::= AS MATERIALIZED */
307, /* (309) wqas ::= AS NOT MATERIALIZED */
306, /* (310) wqitem ::= withnm eidlist_opt wqas LP select RP */
308, /* (311) withnm ::= nm */
242, /* (312) wqlist ::= wqitem */
242, /* (313) wqlist ::= wqlist COMMA wqitem */
309, /* (314) windowdefn_list ::= windowdefn_list COMMA windowdefn */
310, /* (315) windowdefn ::= nm AS LP window RP */
311, /* (316) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
311, /* (317) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
311, /* (318) window ::= ORDER BY sortlist frame_opt */
311, /* (319) window ::= nm ORDER BY sortlist frame_opt */
311, /* (320) window ::= nm frame_opt */
312, /* (321) frame_opt ::= */
312, /* (322) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
312, /* (323) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
316, /* (324) range_or_rows ::= RANGE|ROWS|GROUPS */
318, /* (325) frame_bound_s ::= frame_bound */
318, /* (326) frame_bound_s ::= UNBOUNDED PRECEDING */
319, /* (327) frame_bound_e ::= frame_bound */
319, /* (328) frame_bound_e ::= UNBOUNDED FOLLOWING */
317, /* (329) frame_bound ::= expr PRECEDING|FOLLOWING */
317, /* (330) frame_bound ::= CURRENT ROW */
320, /* (331) frame_exclude_opt ::= */
320, /* (332) frame_exclude_opt ::= EXCLUDE frame_exclude */
321, /* (333) frame_exclude ::= NO OTHERS */
321, /* (334) frame_exclude ::= CURRENT ROW */
321, /* (335) frame_exclude ::= GROUP|TIES */
252, /* (336) window_clause ::= WINDOW windowdefn_list */
275, /* (337) filter_over ::= filter_clause over_clause */
275, /* (338) filter_over ::= over_clause */
275, /* (339) filter_over ::= filter_clause */
315, /* (340) over_clause ::= OVER LP window RP */
315, /* (341) over_clause ::= OVER nm */
314, /* (342) filter_clause ::= FILTER LP WHERE expr RP */
217, /* (343) term ::= QNUMBER */
186, /* (344) input ::= cmdlist */
187, /* (345) cmdlist ::= cmdlist ecmd */
187, /* (346) cmdlist ::= ecmd */
188, /* (347) ecmd ::= SEMI */
188, /* (348) ecmd ::= cmdx SEMI */
188, /* (349) ecmd ::= explain cmdx SEMI */
193, /* (350) trans_opt ::= */
193, /* (351) trans_opt ::= TRANSACTION */
193, /* (352) trans_opt ::= TRANSACTION nm */
195, /* (353) savepoint_opt ::= SAVEPOINT */
195, /* (354) savepoint_opt ::= */
191, /* (355) cmd ::= create_table create_table_args */
204, /* (356) table_option_set ::= table_option */
202, /* (357) columnlist ::= columnlist COMMA columnname carglist */
202, /* (358) columnlist ::= columnname carglist */
194, /* (359) nm ::= ID|INDEXED|JOIN_KW */
194, /* (360) nm ::= STRING */
209, /* (361) typetoken ::= typename */
210, /* (362) typename ::= ID|STRING */
211, /* (363) signed ::= plus_num */
211, /* (364) signed ::= minus_num */
208, /* (365) carglist ::= carglist ccons */
208, /* (366) carglist ::= */
216, /* (367) ccons ::= NULL onconf */
216, /* (368) ccons ::= GENERATED ALWAYS AS generated */
216, /* (369) ccons ::= AS generated */
203, /* (370) conslist_opt ::= COMMA conslist */
229, /* (371) conslist ::= conslist tconscomma tcons */
229, /* (372) conslist ::= tcons */
230, /* (373) tconscomma ::= */
234, /* (374) defer_subclause_opt ::= defer_subclause */
236, /* (375) resolvetype ::= raisetype */
240, /* (376) selectnowith ::= oneselect */
241, /* (377) oneselect ::= values */
256, /* (378) sclp ::= selcollist COMMA */
257, /* (379) as ::= ID|STRING */
266, /* (380) indexed_opt ::= indexed_by */
274, /* (381) returning ::= */
218, /* (382) expr ::= term */
276, /* (383) likeop ::= LIKE_KW|MATCH */
280, /* (384) case_operand ::= expr */
263, /* (385) exprlist ::= nexprlist */
286, /* (386) nmnum ::= plus_num */
286, /* (387) nmnum ::= nm */
286, /* (388) nmnum ::= ON */
286, /* (389) nmnum ::= DELETE */
286, /* (390) nmnum ::= DEFAULT */
212, /* (391) plus_num ::= INTEGER|FLOAT */
291, /* (392) foreach_clause ::= */
291, /* (393) foreach_clause ::= FOR EACH ROW */
294, /* (394) trnm ::= nm */
295, /* (395) tridxby ::= */
296, /* (396) database_kw_opt ::= DATABASE */
296, /* (397) database_kw_opt ::= */
299, /* (398) kwcolumn_opt ::= */
299, /* (399) kwcolumn_opt ::= COLUMNKW */
301, /* (400) vtabarglist ::= vtabarg */
301, /* (401) vtabarglist ::= vtabarglist COMMA vtabarg */
302, /* (402) vtabarg ::= vtabarg vtabargtoken */
305, /* (403) anylist ::= */
305, /* (404) anylist ::= anylist LP anylist RP */
305, /* (405) anylist ::= anylist ANY */
268, /* (406) with ::= */
309, /* (407) windowdefn_list ::= windowdefn */
311, /* (408) window ::= frame_opt */
};
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
-1, /* (0) explain ::= EXPLAIN */
-3, /* (1) explain ::= EXPLAIN QUERY PLAN */
|
| ︙ | ︙ | |||
174837 174838 174839 174840 174841 174842 174843 | -3, /* (88) selectnowith ::= selectnowith multiselect_op oneselect */ -1, /* (89) multiselect_op ::= UNION */ -2, /* (90) multiselect_op ::= UNION ALL */ -1, /* (91) multiselect_op ::= EXCEPT|INTERSECT */ -9, /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ -10, /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ -4, /* (94) values ::= VALUES LP nexprlist RP */ | > | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | | > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 175133 175134 175135 175136 175137 175138 175139 175140 175141 175142 175143 175144 175145 175146 175147 175148 175149 175150 175151 175152 175153 175154 175155 175156 175157 175158 175159 175160 175161 175162 175163 175164 175165 175166 175167 175168 175169 175170 175171 175172 175173 175174 175175 175176 175177 175178 175179 175180 175181 175182 175183 175184 175185 175186 175187 175188 175189 175190 175191 175192 175193 175194 175195 175196 175197 175198 175199 175200 175201 175202 175203 175204 175205 175206 175207 175208 175209 175210 175211 175212 175213 175214 175215 175216 175217 175218 175219 175220 175221 175222 175223 175224 175225 175226 175227 175228 175229 175230 175231 175232 175233 175234 175235 175236 175237 175238 175239 175240 175241 175242 175243 175244 175245 175246 175247 175248 175249 175250 175251 175252 175253 175254 175255 175256 175257 175258 175259 175260 175261 175262 175263 175264 175265 175266 175267 175268 175269 175270 175271 175272 175273 175274 175275 175276 175277 175278 175279 175280 175281 175282 175283 175284 175285 175286 175287 175288 175289 175290 175291 175292 175293 175294 175295 175296 175297 175298 175299 175300 175301 175302 175303 175304 175305 175306 175307 175308 175309 175310 175311 175312 175313 175314 175315 175316 175317 175318 175319 175320 175321 175322 175323 175324 175325 175326 175327 175328 175329 175330 175331 175332 175333 175334 175335 175336 175337 175338 175339 175340 175341 175342 175343 175344 175345 175346 175347 175348 175349 175350 175351 175352 175353 175354 175355 175356 175357 175358 175359 175360 175361 175362 175363 175364 175365 175366 175367 175368 175369 175370 175371 175372 175373 175374 175375 175376 175377 175378 175379 175380 175381 175382 175383 175384 175385 175386 175387 175388 175389 175390 175391 175392 175393 175394 175395 175396 175397 175398 175399 175400 175401 175402 175403 175404 175405 175406 175407 175408 175409 175410 175411 175412 175413 175414 175415 175416 175417 175418 175419 175420 175421 175422 175423 175424 175425 175426 175427 175428 175429 175430 175431 175432 175433 175434 175435 175436 175437 175438 175439 175440 175441 175442 175443 175444 175445 175446 175447 175448 175449 175450 175451 175452 175453 175454 175455 175456 175457 175458 175459 175460 |
-3, /* (88) selectnowith ::= selectnowith multiselect_op oneselect */
-1, /* (89) multiselect_op ::= UNION */
-2, /* (90) multiselect_op ::= UNION ALL */
-1, /* (91) multiselect_op ::= EXCEPT|INTERSECT */
-9, /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
-10, /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
-4, /* (94) values ::= VALUES LP nexprlist RP */
-1, /* (95) oneselect ::= mvalues */
-5, /* (96) mvalues ::= values COMMA LP nexprlist RP */
-5, /* (97) mvalues ::= mvalues COMMA LP nexprlist RP */
-1, /* (98) distinct ::= DISTINCT */
-1, /* (99) distinct ::= ALL */
0, /* (100) distinct ::= */
0, /* (101) sclp ::= */
-5, /* (102) selcollist ::= sclp scanpt expr scanpt as */
-3, /* (103) selcollist ::= sclp scanpt STAR */
-5, /* (104) selcollist ::= sclp scanpt nm DOT STAR */
-2, /* (105) as ::= AS nm */
0, /* (106) as ::= */
0, /* (107) from ::= */
-2, /* (108) from ::= FROM seltablist */
-2, /* (109) stl_prefix ::= seltablist joinop */
0, /* (110) stl_prefix ::= */
-5, /* (111) seltablist ::= stl_prefix nm dbnm as on_using */
-6, /* (112) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
-8, /* (113) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
-6, /* (114) seltablist ::= stl_prefix LP select RP as on_using */
-6, /* (115) seltablist ::= stl_prefix LP seltablist RP as on_using */
0, /* (116) dbnm ::= */
-2, /* (117) dbnm ::= DOT nm */
-1, /* (118) fullname ::= nm */
-3, /* (119) fullname ::= nm DOT nm */
-1, /* (120) xfullname ::= nm */
-3, /* (121) xfullname ::= nm DOT nm */
-5, /* (122) xfullname ::= nm DOT nm AS nm */
-3, /* (123) xfullname ::= nm AS nm */
-1, /* (124) joinop ::= COMMA|JOIN */
-2, /* (125) joinop ::= JOIN_KW JOIN */
-3, /* (126) joinop ::= JOIN_KW nm JOIN */
-4, /* (127) joinop ::= JOIN_KW nm nm JOIN */
-2, /* (128) on_using ::= ON expr */
-4, /* (129) on_using ::= USING LP idlist RP */
0, /* (130) on_using ::= */
0, /* (131) indexed_opt ::= */
-3, /* (132) indexed_by ::= INDEXED BY nm */
-2, /* (133) indexed_by ::= NOT INDEXED */
0, /* (134) orderby_opt ::= */
-3, /* (135) orderby_opt ::= ORDER BY sortlist */
-5, /* (136) sortlist ::= sortlist COMMA expr sortorder nulls */
-3, /* (137) sortlist ::= expr sortorder nulls */
-1, /* (138) sortorder ::= ASC */
-1, /* (139) sortorder ::= DESC */
0, /* (140) sortorder ::= */
-2, /* (141) nulls ::= NULLS FIRST */
-2, /* (142) nulls ::= NULLS LAST */
0, /* (143) nulls ::= */
0, /* (144) groupby_opt ::= */
-3, /* (145) groupby_opt ::= GROUP BY nexprlist */
0, /* (146) having_opt ::= */
-2, /* (147) having_opt ::= HAVING expr */
0, /* (148) limit_opt ::= */
-2, /* (149) limit_opt ::= LIMIT expr */
-4, /* (150) limit_opt ::= LIMIT expr OFFSET expr */
-4, /* (151) limit_opt ::= LIMIT expr COMMA expr */
-6, /* (152) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
0, /* (153) where_opt ::= */
-2, /* (154) where_opt ::= WHERE expr */
0, /* (155) where_opt_ret ::= */
-2, /* (156) where_opt_ret ::= WHERE expr */
-2, /* (157) where_opt_ret ::= RETURNING selcollist */
-4, /* (158) where_opt_ret ::= WHERE expr RETURNING selcollist */
-9, /* (159) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
-5, /* (160) setlist ::= setlist COMMA nm EQ expr */
-7, /* (161) setlist ::= setlist COMMA LP idlist RP EQ expr */
-3, /* (162) setlist ::= nm EQ expr */
-5, /* (163) setlist ::= LP idlist RP EQ expr */
-7, /* (164) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
-8, /* (165) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
0, /* (166) upsert ::= */
-2, /* (167) upsert ::= RETURNING selcollist */
-12, /* (168) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
-9, /* (169) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
-5, /* (170) upsert ::= ON CONFLICT DO NOTHING returning */
-8, /* (171) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
-2, /* (172) returning ::= RETURNING selcollist */
-2, /* (173) insert_cmd ::= INSERT orconf */
-1, /* (174) insert_cmd ::= REPLACE */
0, /* (175) idlist_opt ::= */
-3, /* (176) idlist_opt ::= LP idlist RP */
-3, /* (177) idlist ::= idlist COMMA nm */
-1, /* (178) idlist ::= nm */
-3, /* (179) expr ::= LP expr RP */
-1, /* (180) expr ::= ID|INDEXED|JOIN_KW */
-3, /* (181) expr ::= nm DOT nm */
-5, /* (182) expr ::= nm DOT nm DOT nm */
-1, /* (183) term ::= NULL|FLOAT|BLOB */
-1, /* (184) term ::= STRING */
-1, /* (185) term ::= INTEGER */
-1, /* (186) expr ::= VARIABLE */
-3, /* (187) expr ::= expr COLLATE ID|STRING */
-6, /* (188) expr ::= CAST LP expr AS typetoken RP */
-5, /* (189) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
-8, /* (190) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
-4, /* (191) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
-6, /* (192) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
-9, /* (193) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
-5, /* (194) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
-1, /* (195) term ::= CTIME_KW */
-5, /* (196) expr ::= LP nexprlist COMMA expr RP */
-3, /* (197) expr ::= expr AND expr */
-3, /* (198) expr ::= expr OR expr */
-3, /* (199) expr ::= expr LT|GT|GE|LE expr */
-3, /* (200) expr ::= expr EQ|NE expr */
-3, /* (201) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
-3, /* (202) expr ::= expr PLUS|MINUS expr */
-3, /* (203) expr ::= expr STAR|SLASH|REM expr */
-3, /* (204) expr ::= expr CONCAT expr */
-2, /* (205) likeop ::= NOT LIKE_KW|MATCH */
-3, /* (206) expr ::= expr likeop expr */
-5, /* (207) expr ::= expr likeop expr ESCAPE expr */
-2, /* (208) expr ::= expr ISNULL|NOTNULL */
-3, /* (209) expr ::= expr NOT NULL */
-3, /* (210) expr ::= expr IS expr */
-4, /* (211) expr ::= expr IS NOT expr */
-6, /* (212) expr ::= expr IS NOT DISTINCT FROM expr */
-5, /* (213) expr ::= expr IS DISTINCT FROM expr */
-2, /* (214) expr ::= NOT expr */
-2, /* (215) expr ::= BITNOT expr */
-2, /* (216) expr ::= PLUS|MINUS expr */
-3, /* (217) expr ::= expr PTR expr */
-1, /* (218) between_op ::= BETWEEN */
-2, /* (219) between_op ::= NOT BETWEEN */
-5, /* (220) expr ::= expr between_op expr AND expr */
-1, /* (221) in_op ::= IN */
-2, /* (222) in_op ::= NOT IN */
-5, /* (223) expr ::= expr in_op LP exprlist RP */
-3, /* (224) expr ::= LP select RP */
-5, /* (225) expr ::= expr in_op LP select RP */
-5, /* (226) expr ::= expr in_op nm dbnm paren_exprlist */
-4, /* (227) expr ::= EXISTS LP select RP */
-5, /* (228) expr ::= CASE case_operand case_exprlist case_else END */
-5, /* (229) case_exprlist ::= case_exprlist WHEN expr THEN expr */
-4, /* (230) case_exprlist ::= WHEN expr THEN expr */
-2, /* (231) case_else ::= ELSE expr */
0, /* (232) case_else ::= */
0, /* (233) case_operand ::= */
0, /* (234) exprlist ::= */
-3, /* (235) nexprlist ::= nexprlist COMMA expr */
-1, /* (236) nexprlist ::= expr */
0, /* (237) paren_exprlist ::= */
-3, /* (238) paren_exprlist ::= LP exprlist RP */
-12, /* (239) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
-1, /* (240) uniqueflag ::= UNIQUE */
0, /* (241) uniqueflag ::= */
0, /* (242) eidlist_opt ::= */
-3, /* (243) eidlist_opt ::= LP eidlist RP */
-5, /* (244) eidlist ::= eidlist COMMA nm collate sortorder */
-3, /* (245) eidlist ::= nm collate sortorder */
0, /* (246) collate ::= */
-2, /* (247) collate ::= COLLATE ID|STRING */
-4, /* (248) cmd ::= DROP INDEX ifexists fullname */
-2, /* (249) cmd ::= VACUUM vinto */
-3, /* (250) cmd ::= VACUUM nm vinto */
-2, /* (251) vinto ::= INTO expr */
0, /* (252) vinto ::= */
-3, /* (253) cmd ::= PRAGMA nm dbnm */
-5, /* (254) cmd ::= PRAGMA nm dbnm EQ nmnum */
-6, /* (255) cmd ::= PRAGMA nm dbnm LP nmnum RP */
-5, /* (256) cmd ::= PRAGMA nm dbnm EQ minus_num */
-6, /* (257) cmd ::= PRAGMA nm dbnm LP minus_num RP */
-2, /* (258) plus_num ::= PLUS INTEGER|FLOAT */
-2, /* (259) minus_num ::= MINUS INTEGER|FLOAT */
-5, /* (260) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
-11, /* (261) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
-1, /* (262) trigger_time ::= BEFORE|AFTER */
-2, /* (263) trigger_time ::= INSTEAD OF */
0, /* (264) trigger_time ::= */
-1, /* (265) trigger_event ::= DELETE|INSERT */
-1, /* (266) trigger_event ::= UPDATE */
-3, /* (267) trigger_event ::= UPDATE OF idlist */
0, /* (268) when_clause ::= */
-2, /* (269) when_clause ::= WHEN expr */
-3, /* (270) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
-2, /* (271) trigger_cmd_list ::= trigger_cmd SEMI */
-3, /* (272) trnm ::= nm DOT nm */
-3, /* (273) tridxby ::= INDEXED BY nm */
-2, /* (274) tridxby ::= NOT INDEXED */
-9, /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
-8, /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
-6, /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
-3, /* (278) trigger_cmd ::= scanpt select scanpt */
-4, /* (279) expr ::= RAISE LP IGNORE RP */
-6, /* (280) expr ::= RAISE LP raisetype COMMA nm RP */
-1, /* (281) raisetype ::= ROLLBACK */
-1, /* (282) raisetype ::= ABORT */
-1, /* (283) raisetype ::= FAIL */
-4, /* (284) cmd ::= DROP TRIGGER ifexists fullname */
-6, /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
-3, /* (286) cmd ::= DETACH database_kw_opt expr */
0, /* (287) key_opt ::= */
-2, /* (288) key_opt ::= KEY expr */
-1, /* (289) cmd ::= REINDEX */
-3, /* (290) cmd ::= REINDEX nm dbnm */
-1, /* (291) cmd ::= ANALYZE */
-3, /* (292) cmd ::= ANALYZE nm dbnm */
-6, /* (293) cmd ::= ALTER TABLE fullname RENAME TO nm */
-7, /* (294) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
-6, /* (295) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
-1, /* (296) add_column_fullname ::= fullname */
-8, /* (297) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
-1, /* (298) cmd ::= create_vtab */
-4, /* (299) cmd ::= create_vtab LP vtabarglist RP */
-8, /* (300) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
0, /* (301) vtabarg ::= */
-1, /* (302) vtabargtoken ::= ANY */
-3, /* (303) vtabargtoken ::= lp anylist RP */
-1, /* (304) lp ::= LP */
-2, /* (305) with ::= WITH wqlist */
-3, /* (306) with ::= WITH RECURSIVE wqlist */
-1, /* (307) wqas ::= AS */
-2, /* (308) wqas ::= AS MATERIALIZED */
-3, /* (309) wqas ::= AS NOT MATERIALIZED */
-6, /* (310) wqitem ::= withnm eidlist_opt wqas LP select RP */
-1, /* (311) withnm ::= nm */
-1, /* (312) wqlist ::= wqitem */
-3, /* (313) wqlist ::= wqlist COMMA wqitem */
-3, /* (314) windowdefn_list ::= windowdefn_list COMMA windowdefn */
-5, /* (315) windowdefn ::= nm AS LP window RP */
-5, /* (316) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
-6, /* (317) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
-4, /* (318) window ::= ORDER BY sortlist frame_opt */
-5, /* (319) window ::= nm ORDER BY sortlist frame_opt */
-2, /* (320) window ::= nm frame_opt */
0, /* (321) frame_opt ::= */
-3, /* (322) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
-6, /* (323) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
-1, /* (324) range_or_rows ::= RANGE|ROWS|GROUPS */
-1, /* (325) frame_bound_s ::= frame_bound */
-2, /* (326) frame_bound_s ::= UNBOUNDED PRECEDING */
-1, /* (327) frame_bound_e ::= frame_bound */
-2, /* (328) frame_bound_e ::= UNBOUNDED FOLLOWING */
-2, /* (329) frame_bound ::= expr PRECEDING|FOLLOWING */
-2, /* (330) frame_bound ::= CURRENT ROW */
0, /* (331) frame_exclude_opt ::= */
-2, /* (332) frame_exclude_opt ::= EXCLUDE frame_exclude */
-2, /* (333) frame_exclude ::= NO OTHERS */
-2, /* (334) frame_exclude ::= CURRENT ROW */
-1, /* (335) frame_exclude ::= GROUP|TIES */
-2, /* (336) window_clause ::= WINDOW windowdefn_list */
-2, /* (337) filter_over ::= filter_clause over_clause */
-1, /* (338) filter_over ::= over_clause */
-1, /* (339) filter_over ::= filter_clause */
-4, /* (340) over_clause ::= OVER LP window RP */
-2, /* (341) over_clause ::= OVER nm */
-5, /* (342) filter_clause ::= FILTER LP WHERE expr RP */
-1, /* (343) term ::= QNUMBER */
-1, /* (344) input ::= cmdlist */
-2, /* (345) cmdlist ::= cmdlist ecmd */
-1, /* (346) cmdlist ::= ecmd */
-1, /* (347) ecmd ::= SEMI */
-2, /* (348) ecmd ::= cmdx SEMI */
-3, /* (349) ecmd ::= explain cmdx SEMI */
0, /* (350) trans_opt ::= */
-1, /* (351) trans_opt ::= TRANSACTION */
-2, /* (352) trans_opt ::= TRANSACTION nm */
-1, /* (353) savepoint_opt ::= SAVEPOINT */
0, /* (354) savepoint_opt ::= */
-2, /* (355) cmd ::= create_table create_table_args */
-1, /* (356) table_option_set ::= table_option */
-4, /* (357) columnlist ::= columnlist COMMA columnname carglist */
-2, /* (358) columnlist ::= columnname carglist */
-1, /* (359) nm ::= ID|INDEXED|JOIN_KW */
-1, /* (360) nm ::= STRING */
-1, /* (361) typetoken ::= typename */
-1, /* (362) typename ::= ID|STRING */
-1, /* (363) signed ::= plus_num */
-1, /* (364) signed ::= minus_num */
-2, /* (365) carglist ::= carglist ccons */
0, /* (366) carglist ::= */
-2, /* (367) ccons ::= NULL onconf */
-4, /* (368) ccons ::= GENERATED ALWAYS AS generated */
-2, /* (369) ccons ::= AS generated */
-2, /* (370) conslist_opt ::= COMMA conslist */
-3, /* (371) conslist ::= conslist tconscomma tcons */
-1, /* (372) conslist ::= tcons */
0, /* (373) tconscomma ::= */
-1, /* (374) defer_subclause_opt ::= defer_subclause */
-1, /* (375) resolvetype ::= raisetype */
-1, /* (376) selectnowith ::= oneselect */
-1, /* (377) oneselect ::= values */
-2, /* (378) sclp ::= selcollist COMMA */
-1, /* (379) as ::= ID|STRING */
-1, /* (380) indexed_opt ::= indexed_by */
0, /* (381) returning ::= */
-1, /* (382) expr ::= term */
-1, /* (383) likeop ::= LIKE_KW|MATCH */
-1, /* (384) case_operand ::= expr */
-1, /* (385) exprlist ::= nexprlist */
-1, /* (386) nmnum ::= plus_num */
-1, /* (387) nmnum ::= nm */
-1, /* (388) nmnum ::= ON */
-1, /* (389) nmnum ::= DELETE */
-1, /* (390) nmnum ::= DEFAULT */
-1, /* (391) plus_num ::= INTEGER|FLOAT */
0, /* (392) foreach_clause ::= */
-3, /* (393) foreach_clause ::= FOR EACH ROW */
-1, /* (394) trnm ::= nm */
0, /* (395) tridxby ::= */
-1, /* (396) database_kw_opt ::= DATABASE */
0, /* (397) database_kw_opt ::= */
0, /* (398) kwcolumn_opt ::= */
-1, /* (399) kwcolumn_opt ::= COLUMNKW */
-1, /* (400) vtabarglist ::= vtabarg */
-3, /* (401) vtabarglist ::= vtabarglist COMMA vtabarg */
-2, /* (402) vtabarg ::= vtabarg vtabargtoken */
0, /* (403) anylist ::= */
-4, /* (404) anylist ::= anylist LP anylist RP */
-2, /* (405) anylist ::= anylist ANY */
0, /* (406) with ::= */
-1, /* (407) windowdefn_list ::= windowdefn */
-1, /* (408) window ::= frame_opt */
};
static void yy_accept(yyParser*); /* Forward Declaration */
/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
|
| ︙ | ︙ | |||
175199 175200 175201 175202 175203 175204 175205 |
case 1: /* explain ::= EXPLAIN QUERY PLAN */
{ if( pParse->pReprepare==0 ) pParse->explain = 2; }
break;
case 2: /* cmdx ::= cmd */
{ sqlite3FinishCoding(pParse); }
break;
case 3: /* cmd ::= BEGIN transtype trans_opt */
| | | | | | 175498 175499 175500 175501 175502 175503 175504 175505 175506 175507 175508 175509 175510 175511 175512 175513 175514 175515 175516 175517 175518 175519 175520 175521 |
case 1: /* explain ::= EXPLAIN QUERY PLAN */
{ if( pParse->pReprepare==0 ) pParse->explain = 2; }
break;
case 2: /* cmdx ::= cmd */
{ sqlite3FinishCoding(pParse); }
break;
case 3: /* cmd ::= BEGIN transtype trans_opt */
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy144);}
break;
case 4: /* transtype ::= */
{yymsp[1].minor.yy144 = TK_DEFERRED;}
break;
case 5: /* transtype ::= DEFERRED */
case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
case 324: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==324);
{yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/}
break;
case 8: /* cmd ::= COMMIT|END trans_opt */
case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
break;
case 10: /* cmd ::= SAVEPOINT nm */
{
|
| ︙ | ︙ | |||
175231 175232 175233 175234 175235 175236 175237 |
case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
{
sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
break;
case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
{
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < < < < < | < < | > > > > > | > > > | < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 175530 175531 175532 175533 175534 175535 175536 175537 175538 175539 175540 175541 175542 175543 175544 175545 175546 175547 175548 175549 175550 175551 175552 175553 175554 175555 175556 175557 175558 175559 175560 175561 175562 175563 175564 175565 175566 175567 175568 175569 175570 175571 175572 175573 175574 175575 175576 175577 175578 175579 175580 175581 175582 175583 175584 175585 175586 175587 175588 175589 175590 175591 175592 175593 175594 175595 175596 175597 175598 175599 175600 175601 175602 175603 175604 175605 175606 175607 175608 175609 175610 175611 175612 175613 175614 175615 175616 175617 175618 175619 175620 175621 175622 175623 175624 175625 175626 175627 175628 175629 175630 175631 175632 175633 175634 175635 175636 175637 175638 175639 175640 175641 175642 175643 175644 175645 175646 175647 175648 175649 175650 175651 175652 175653 175654 175655 175656 175657 175658 175659 175660 175661 175662 175663 175664 175665 175666 175667 175668 175669 175670 175671 175672 175673 175674 175675 175676 175677 175678 175679 175680 175681 175682 175683 175684 175685 175686 175687 175688 175689 175690 175691 175692 175693 175694 175695 175696 175697 175698 175699 175700 175701 175702 175703 175704 175705 175706 175707 175708 175709 175710 175711 175712 175713 175714 175715 175716 175717 175718 175719 175720 175721 175722 175723 175724 175725 175726 175727 175728 175729 175730 175731 175732 175733 175734 175735 175736 175737 175738 175739 175740 175741 175742 175743 175744 175745 175746 175747 175748 175749 175750 175751 175752 175753 175754 175755 175756 175757 175758 175759 175760 175761 175762 175763 175764 175765 175766 175767 175768 175769 175770 175771 175772 175773 175774 175775 175776 175777 175778 175779 175780 175781 175782 175783 175784 175785 175786 175787 175788 175789 175790 175791 175792 175793 175794 175795 175796 175797 175798 175799 175800 175801 175802 175803 175804 175805 175806 175807 175808 175809 175810 175811 175812 175813 175814 175815 175816 175817 175818 175819 175820 175821 175822 175823 175824 175825 175826 175827 175828 175829 175830 175831 175832 175833 175834 175835 175836 175837 175838 175839 175840 175841 175842 175843 175844 175845 175846 175847 175848 175849 175850 175851 175852 175853 175854 175855 175856 175857 175858 175859 175860 175861 175862 175863 175864 175865 175866 175867 175868 175869 175870 175871 175872 175873 175874 175875 175876 175877 175878 175879 175880 175881 175882 175883 175884 175885 175886 175887 175888 175889 175890 175891 175892 175893 175894 175895 175896 175897 175898 175899 175900 175901 175902 175903 175904 175905 175906 175907 175908 175909 175910 175911 175912 175913 175914 175915 175916 175917 175918 175919 175920 175921 175922 175923 175924 175925 175926 175927 175928 175929 175930 175931 175932 175933 175934 175935 175936 175937 175938 175939 175940 175941 175942 175943 175944 175945 175946 175947 175948 175949 175950 175951 175952 175953 175954 175955 175956 175957 175958 175959 175960 175961 175962 175963 175964 175965 175966 175967 175968 175969 175970 175971 175972 175973 175974 175975 175976 175977 175978 175979 175980 175981 175982 175983 175984 175985 175986 175987 175988 175989 175990 175991 175992 175993 175994 175995 175996 175997 175998 175999 176000 176001 176002 176003 176004 176005 176006 176007 176008 176009 176010 176011 176012 176013 176014 176015 176016 176017 176018 176019 176020 176021 176022 176023 176024 176025 176026 176027 176028 176029 176030 176031 176032 176033 176034 176035 176036 176037 176038 176039 176040 176041 176042 176043 176044 176045 176046 176047 176048 176049 176050 176051 176052 176053 176054 176055 176056 176057 176058 176059 176060 176061 176062 176063 176064 176065 176066 176067 176068 176069 176070 176071 176072 176073 176074 176075 176076 176077 176078 176079 176080 176081 176082 176083 176084 176085 176086 176087 176088 176089 176090 176091 176092 176093 176094 176095 176096 176097 176098 176099 176100 176101 176102 176103 176104 176105 176106 176107 176108 176109 176110 176111 176112 176113 176114 176115 176116 176117 176118 176119 176120 176121 176122 176123 176124 176125 176126 176127 176128 176129 176130 176131 176132 176133 176134 176135 176136 176137 176138 176139 176140 176141 176142 176143 176144 176145 176146 176147 176148 176149 176150 176151 176152 176153 176154 176155 176156 176157 176158 176159 176160 176161 176162 176163 176164 176165 176166 176167 176168 176169 176170 176171 176172 176173 176174 176175 176176 176177 176178 176179 176180 176181 176182 176183 176184 176185 176186 176187 176188 176189 176190 176191 176192 176193 176194 176195 176196 176197 176198 176199 176200 176201 176202 176203 176204 176205 176206 176207 176208 176209 176210 176211 176212 176213 176214 176215 176216 176217 176218 176219 176220 176221 176222 176223 176224 176225 176226 176227 176228 176229 176230 176231 176232 176233 176234 176235 176236 176237 176238 176239 176240 176241 176242 176243 176244 176245 176246 176247 176248 176249 176250 176251 176252 176253 176254 176255 176256 176257 176258 176259 176260 176261 176262 176263 176264 176265 176266 176267 176268 176269 176270 176271 176272 176273 176274 176275 176276 176277 176278 176279 176280 176281 176282 176283 176284 176285 176286 176287 176288 176289 176290 176291 176292 176293 176294 176295 176296 176297 176298 176299 176300 176301 176302 176303 176304 176305 176306 176307 176308 176309 176310 176311 176312 176313 176314 176315 176316 176317 176318 176319 176320 176321 176322 176323 176324 176325 176326 176327 176328 176329 176330 176331 176332 176333 176334 176335 176336 176337 176338 176339 176340 176341 176342 176343 176344 176345 176346 176347 176348 176349 176350 176351 176352 176353 176354 176355 176356 176357 176358 176359 176360 176361 176362 176363 176364 176365 176366 176367 176368 176369 176370 176371 176372 176373 176374 176375 176376 176377 176378 176379 176380 176381 176382 176383 176384 176385 176386 176387 176388 176389 176390 176391 176392 176393 176394 176395 176396 176397 176398 176399 176400 176401 176402 176403 176404 176405 176406 176407 176408 176409 176410 176411 176412 176413 176414 176415 176416 176417 176418 176419 176420 176421 176422 176423 176424 176425 176426 176427 176428 176429 176430 176431 176432 176433 176434 176435 176436 176437 176438 176439 176440 176441 176442 176443 176444 176445 176446 176447 176448 176449 176450 176451 176452 176453 176454 176455 176456 176457 176458 176459 176460 176461 176462 176463 176464 176465 176466 176467 176468 176469 176470 176471 176472 176473 176474 176475 176476 176477 176478 176479 176480 176481 176482 176483 176484 176485 176486 176487 176488 176489 176490 176491 176492 176493 176494 176495 176496 176497 176498 176499 176500 176501 176502 176503 176504 176505 176506 176507 176508 176509 176510 176511 176512 176513 176514 176515 176516 176517 176518 176519 176520 176521 176522 176523 176524 176525 176526 176527 176528 176529 176530 176531 176532 176533 176534 176535 176536 176537 176538 176539 176540 176541 176542 176543 176544 176545 176546 176547 176548 176549 176550 176551 176552 176553 176554 176555 176556 176557 176558 176559 176560 176561 176562 176563 176564 176565 176566 176567 176568 176569 176570 176571 176572 176573 176574 176575 176576 176577 176578 176579 176580 176581 176582 176583 176584 176585 176586 176587 176588 176589 176590 176591 176592 176593 176594 176595 176596 176597 176598 176599 176600 176601 176602 176603 176604 176605 176606 176607 176608 176609 176610 176611 176612 176613 176614 176615 176616 176617 176618 176619 176620 176621 176622 176623 176624 176625 176626 176627 176628 176629 176630 176631 176632 176633 176634 176635 176636 176637 176638 176639 176640 176641 176642 176643 176644 176645 176646 176647 176648 176649 176650 176651 176652 176653 176654 176655 176656 176657 176658 176659 176660 176661 176662 176663 176664 176665 176666 176667 176668 176669 176670 176671 176672 176673 176674 176675 176676 176677 176678 176679 176680 176681 176682 176683 176684 176685 176686 176687 176688 176689 176690 176691 176692 176693 176694 176695 176696 176697 176698 176699 176700 176701 176702 176703 176704 176705 176706 176707 176708 176709 176710 176711 176712 176713 176714 176715 176716 176717 176718 176719 176720 176721 176722 176723 176724 176725 176726 176727 176728 176729 176730 176731 176732 176733 176734 176735 176736 176737 176738 176739 176740 176741 176742 176743 176744 176745 176746 176747 176748 176749 176750 176751 176752 176753 176754 176755 176756 176757 176758 176759 176760 176761 176762 176763 176764 176765 176766 176767 176768 176769 176770 176771 176772 176773 176774 176775 176776 176777 176778 176779 176780 176781 176782 176783 176784 176785 176786 176787 176788 176789 176790 176791 176792 176793 176794 176795 176796 176797 176798 176799 176800 176801 176802 176803 176804 176805 176806 176807 176808 176809 176810 176811 176812 176813 176814 176815 176816 176817 176818 176819 176820 176821 176822 176823 176824 176825 176826 176827 176828 176829 176830 176831 176832 176833 176834 176835 176836 176837 176838 176839 176840 176841 176842 176843 176844 176845 176846 176847 176848 176849 176850 176851 176852 176853 176854 176855 176856 176857 176858 176859 176860 176861 176862 176863 176864 176865 176866 176867 176868 176869 176870 176871 176872 176873 176874 176875 176876 176877 176878 176879 176880 176881 176882 176883 176884 176885 176886 176887 176888 176889 176890 176891 176892 176893 176894 176895 176896 176897 176898 176899 176900 176901 176902 176903 176904 176905 176906 176907 176908 176909 176910 176911 176912 176913 176914 176915 176916 176917 176918 176919 176920 176921 176922 176923 176924 176925 176926 176927 176928 176929 176930 176931 176932 176933 176934 176935 176936 176937 176938 176939 176940 176941 176942 176943 176944 176945 176946 176947 176948 176949 176950 176951 176952 176953 176954 176955 176956 176957 176958 176959 176960 176961 176962 176963 176964 176965 176966 176967 176968 176969 176970 176971 176972 176973 176974 176975 176976 176977 176978 176979 176980 176981 176982 176983 176984 176985 176986 176987 176988 176989 176990 176991 176992 176993 176994 176995 176996 176997 176998 176999 177000 177001 177002 177003 177004 177005 177006 177007 177008 177009 177010 177011 177012 177013 177014 177015 177016 177017 177018 177019 177020 177021 177022 177023 177024 177025 177026 177027 177028 177029 177030 177031 177032 177033 177034 177035 177036 177037 177038 |
case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
{
sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
break;
case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
{
sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy144,0,0,yymsp[-2].minor.yy144);
}
break;
case 14: /* createkw ::= CREATE */
{disableLookaside(pParse);}
break;
case 15: /* ifnotexists ::= */
case 18: /* temp ::= */ yytestcase(yyruleno==18);
case 47: /* autoinc ::= */ yytestcase(yyruleno==47);
case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);
case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);
case 81: /* ifexists ::= */ yytestcase(yyruleno==81);
case 100: /* distinct ::= */ yytestcase(yyruleno==100);
case 246: /* collate ::= */ yytestcase(yyruleno==246);
{yymsp[1].minor.yy144 = 0;}
break;
case 16: /* ifnotexists ::= IF NOT EXISTS */
{yymsp[-2].minor.yy144 = 1;}
break;
case 17: /* temp ::= TEMP */
{yymsp[0].minor.yy144 = pParse->db->init.busy==0;}
break;
case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */
{
sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy391,0);
}
break;
case 20: /* create_table_args ::= AS select */
{
sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy555);
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
}
break;
case 21: /* table_option_set ::= */
{yymsp[1].minor.yy391 = 0;}
break;
case 22: /* table_option_set ::= table_option_set COMMA table_option */
{yylhsminor.yy391 = yymsp[-2].minor.yy391|yymsp[0].minor.yy391;}
yymsp[-2].minor.yy391 = yylhsminor.yy391;
break;
case 23: /* table_option ::= WITHOUT nm */
{
if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
yymsp[-1].minor.yy391 = TF_WithoutRowid | TF_NoVisibleRowid;
}else{
yymsp[-1].minor.yy391 = 0;
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
}
}
break;
case 24: /* table_option ::= nm */
{
if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"strict",6)==0 ){
yylhsminor.yy391 = TF_Strict;
}else{
yylhsminor.yy391 = 0;
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
}
}
yymsp[0].minor.yy391 = yylhsminor.yy391;
break;
case 25: /* columnname ::= nm typetoken */
{sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
break;
case 26: /* typetoken ::= */
case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);
case 106: /* as ::= */ yytestcase(yyruleno==106);
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
break;
case 27: /* typetoken ::= typename LP signed RP */
{
yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
break;
case 28: /* typetoken ::= typename LP signed COMMA signed RP */
{
yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
break;
case 29: /* typename ::= typename ID|STRING */
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
break;
case 30: /* scanpt ::= */
{
assert( yyLookahead!=YYNOCODE );
yymsp[1].minor.yy168 = yyLookaheadToken.z;
}
break;
case 31: /* scantok ::= */
{
assert( yyLookahead!=YYNOCODE );
yymsp[1].minor.yy0 = yyLookaheadToken;
}
break;
case 32: /* ccons ::= CONSTRAINT nm */
case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);
{pParse->constraintName = yymsp[0].minor.yy0;}
break;
case 33: /* ccons ::= DEFAULT scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
break;
case 34: /* ccons ::= DEFAULT LP expr RP */
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
break;
case 35: /* ccons ::= DEFAULT PLUS scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy454,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
break;
case 36: /* ccons ::= DEFAULT MINUS scantok term */
{
Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy454, 0);
sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
}
break;
case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */
{
Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
if( p ){
sqlite3ExprIdToTrueFalse(p);
testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
}
sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
}
break;
case 38: /* ccons ::= NOT NULL onconf */
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy144);}
break;
case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy144,yymsp[0].minor.yy144,yymsp[-2].minor.yy144);}
break;
case 40: /* ccons ::= UNIQUE onconf */
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy144,0,0,0,0,
SQLITE_IDXTYPE_UNIQUE);}
break;
case 41: /* ccons ::= CHECK LP expr RP */
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy454,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
break;
case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy14,yymsp[0].minor.yy144);}
break;
case 43: /* ccons ::= defer_subclause */
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy144);}
break;
case 44: /* ccons ::= COLLATE ID|STRING */
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
break;
case 45: /* generated ::= LP expr RP */
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy454,0);}
break;
case 46: /* generated ::= LP expr RP ID */
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy454,&yymsp[0].minor.yy0);}
break;
case 48: /* autoinc ::= AUTOINCR */
{yymsp[0].minor.yy144 = 1;}
break;
case 49: /* refargs ::= */
{ yymsp[1].minor.yy144 = OE_None*0x0101; /* EV: R-19803-45884 */}
break;
case 50: /* refargs ::= refargs refarg */
{ yymsp[-1].minor.yy144 = (yymsp[-1].minor.yy144 & ~yymsp[0].minor.yy383.mask) | yymsp[0].minor.yy383.value; }
break;
case 51: /* refarg ::= MATCH nm */
{ yymsp[-1].minor.yy383.value = 0; yymsp[-1].minor.yy383.mask = 0x000000; }
break;
case 52: /* refarg ::= ON INSERT refact */
{ yymsp[-2].minor.yy383.value = 0; yymsp[-2].minor.yy383.mask = 0x000000; }
break;
case 53: /* refarg ::= ON DELETE refact */
{ yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144; yymsp[-2].minor.yy383.mask = 0x0000ff; }
break;
case 54: /* refarg ::= ON UPDATE refact */
{ yymsp[-2].minor.yy383.value = yymsp[0].minor.yy144<<8; yymsp[-2].minor.yy383.mask = 0x00ff00; }
break;
case 55: /* refact ::= SET NULL */
{ yymsp[-1].minor.yy144 = OE_SetNull; /* EV: R-33326-45252 */}
break;
case 56: /* refact ::= SET DEFAULT */
{ yymsp[-1].minor.yy144 = OE_SetDflt; /* EV: R-33326-45252 */}
break;
case 57: /* refact ::= CASCADE */
{ yymsp[0].minor.yy144 = OE_Cascade; /* EV: R-33326-45252 */}
break;
case 58: /* refact ::= RESTRICT */
{ yymsp[0].minor.yy144 = OE_Restrict; /* EV: R-33326-45252 */}
break;
case 59: /* refact ::= NO ACTION */
{ yymsp[-1].minor.yy144 = OE_None; /* EV: R-33326-45252 */}
break;
case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
{yymsp[-2].minor.yy144 = 0;}
break;
case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);
case 173: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==173);
{yymsp[-1].minor.yy144 = yymsp[0].minor.yy144;}
break;
case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);
case 219: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==219);
case 222: /* in_op ::= NOT IN */ yytestcase(yyruleno==222);
case 247: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==247);
{yymsp[-1].minor.yy144 = 1;}
break;
case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
{yymsp[-1].minor.yy144 = 0;}
break;
case 66: /* tconscomma ::= COMMA */
{pParse->constraintName.n = 0;}
break;
case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy14,yymsp[0].minor.yy144,yymsp[-2].minor.yy144,0);}
break;
case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy14,yymsp[0].minor.yy144,0,0,0,0,
SQLITE_IDXTYPE_UNIQUE);}
break;
case 70: /* tcons ::= CHECK LP expr RP onconf */
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy454,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
break;
case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
{
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy144);
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy144);
}
break;
case 73: /* onconf ::= */
case 75: /* orconf ::= */ yytestcase(yyruleno==75);
{yymsp[1].minor.yy144 = OE_Default;}
break;
case 74: /* onconf ::= ON CONFLICT resolvetype */
{yymsp[-2].minor.yy144 = yymsp[0].minor.yy144;}
break;
case 77: /* resolvetype ::= IGNORE */
{yymsp[0].minor.yy144 = OE_Ignore;}
break;
case 78: /* resolvetype ::= REPLACE */
case 174: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==174);
{yymsp[0].minor.yy144 = OE_Replace;}
break;
case 79: /* cmd ::= DROP TABLE ifexists fullname */
{
sqlite3DropTable(pParse, yymsp[0].minor.yy203, 0, yymsp[-1].minor.yy144);
}
break;
case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
{
sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[0].minor.yy555, yymsp[-7].minor.yy144, yymsp[-5].minor.yy144);
}
break;
case 83: /* cmd ::= DROP VIEW ifexists fullname */
{
sqlite3DropTable(pParse, yymsp[0].minor.yy203, 1, yymsp[-1].minor.yy144);
}
break;
case 84: /* cmd ::= select */
{
SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
sqlite3Select(pParse, yymsp[0].minor.yy555, &dest);
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy555);
}
break;
case 85: /* select ::= WITH wqlist selectnowith */
{yymsp[-2].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
break;
case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */
{yymsp[-3].minor.yy555 = attachWithToSelect(pParse,yymsp[0].minor.yy555,yymsp[-1].minor.yy59);}
break;
case 87: /* select ::= selectnowith */
{
Select *p = yymsp[0].minor.yy555;
if( p ){
parserDoubleLinkSelect(pParse, p);
}
}
break;
case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */
{
Select *pRhs = yymsp[0].minor.yy555;
Select *pLhs = yymsp[-2].minor.yy555;
if( pRhs && pRhs->pPrior ){
SrcList *pFrom;
Token x;
x.n = 0;
parserDoubleLinkSelect(pParse, pRhs);
pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0);
pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
}
if( pRhs ){
pRhs->op = (u8)yymsp[-1].minor.yy144;
pRhs->pPrior = pLhs;
if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
pRhs->selFlags &= ~SF_MultiValue;
if( yymsp[-1].minor.yy144!=TK_ALL ) pParse->hasCompound = 1;
}else{
sqlite3SelectDelete(pParse->db, pLhs);
}
yymsp[-2].minor.yy555 = pRhs;
}
break;
case 89: /* multiselect_op ::= UNION */
case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);
{yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-OP*/}
break;
case 90: /* multiselect_op ::= UNION ALL */
{yymsp[-1].minor.yy144 = TK_ALL;}
break;
case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
{
yymsp[-8].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy14,yymsp[-5].minor.yy203,yymsp[-4].minor.yy454,yymsp[-3].minor.yy14,yymsp[-2].minor.yy454,yymsp[-1].minor.yy14,yymsp[-7].minor.yy144,yymsp[0].minor.yy454);
}
break;
case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
{
yymsp[-9].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy14,yymsp[-6].minor.yy203,yymsp[-5].minor.yy454,yymsp[-4].minor.yy14,yymsp[-3].minor.yy454,yymsp[-1].minor.yy14,yymsp[-8].minor.yy144,yymsp[0].minor.yy454);
if( yymsp[-9].minor.yy555 ){
yymsp[-9].minor.yy555->pWinDefn = yymsp[-2].minor.yy211;
}else{
sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy211);
}
}
break;
case 94: /* values ::= VALUES LP nexprlist RP */
{
yymsp[-3].minor.yy555 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy14,0,0,0,0,0,SF_Values,0);
}
break;
case 95: /* oneselect ::= mvalues */
{
sqlite3MultiValuesEnd(pParse, yymsp[0].minor.yy555);
}
break;
case 96: /* mvalues ::= values COMMA LP nexprlist RP */
case 97: /* mvalues ::= mvalues COMMA LP nexprlist RP */ yytestcase(yyruleno==97);
{
yymsp[-4].minor.yy555 = sqlite3MultiValues(pParse, yymsp[-4].minor.yy555, yymsp[-1].minor.yy14);
}
break;
case 98: /* distinct ::= DISTINCT */
{yymsp[0].minor.yy144 = SF_Distinct;}
break;
case 99: /* distinct ::= ALL */
{yymsp[0].minor.yy144 = SF_All;}
break;
case 101: /* sclp ::= */
case 134: /* orderby_opt ::= */ yytestcase(yyruleno==134);
case 144: /* groupby_opt ::= */ yytestcase(yyruleno==144);
case 234: /* exprlist ::= */ yytestcase(yyruleno==234);
case 237: /* paren_exprlist ::= */ yytestcase(yyruleno==237);
case 242: /* eidlist_opt ::= */ yytestcase(yyruleno==242);
{yymsp[1].minor.yy14 = 0;}
break;
case 102: /* selcollist ::= sclp scanpt expr scanpt as */
{
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[0].minor.yy0, 1);
sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy14,yymsp[-3].minor.yy168,yymsp[-1].minor.yy168);
}
break;
case 103: /* selcollist ::= sclp scanpt STAR */
{
Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
sqlite3ExprSetErrorOffset(p, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, p);
}
break;
case 104: /* selcollist ::= sclp scanpt nm DOT STAR */
{
Expr *pRight, *pLeft, *pDot;
pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0);
pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, pDot);
}
break;
case 105: /* as ::= AS nm */
case 117: /* dbnm ::= DOT nm */ yytestcase(yyruleno==117);
case 258: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==258);
case 259: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==259);
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
break;
case 107: /* from ::= */
case 110: /* stl_prefix ::= */ yytestcase(yyruleno==110);
{yymsp[1].minor.yy203 = 0;}
break;
case 108: /* from ::= FROM seltablist */
{
yymsp[-1].minor.yy203 = yymsp[0].minor.yy203;
sqlite3SrcListShiftJoinType(pParse,yymsp[-1].minor.yy203);
}
break;
case 109: /* stl_prefix ::= seltablist joinop */
{
if( ALWAYS(yymsp[-1].minor.yy203 && yymsp[-1].minor.yy203->nSrc>0) ) yymsp[-1].minor.yy203->a[yymsp[-1].minor.yy203->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy144;
}
break;
case 111: /* seltablist ::= stl_prefix nm dbnm as on_using */
{
yymsp[-4].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-4].minor.yy203,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
}
break;
case 112: /* seltablist ::= stl_prefix nm dbnm as indexed_by on_using */
{
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy269);
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-1].minor.yy0);
}
break;
case 113: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */
{
yymsp[-7].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy203,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy203, yymsp[-3].minor.yy14);
}
break;
case 114: /* seltablist ::= stl_prefix LP select RP as on_using */
{
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,yymsp[-3].minor.yy555,&yymsp[0].minor.yy269);
}
break;
case 115: /* seltablist ::= stl_prefix LP seltablist RP as on_using */
{
if( yymsp[-5].minor.yy203==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy269.pOn==0 && yymsp[0].minor.yy269.pUsing==0 ){
yymsp[-5].minor.yy203 = yymsp[-3].minor.yy203;
}else if( ALWAYS(yymsp[-3].minor.yy203!=0) && yymsp[-3].minor.yy203->nSrc==1 ){
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy269);
if( yymsp[-5].minor.yy203 ){
SrcItem *pNew = &yymsp[-5].minor.yy203->a[yymsp[-5].minor.yy203->nSrc-1];
SrcItem *pOld = yymsp[-3].minor.yy203->a;
pNew->zName = pOld->zName;
pNew->zDatabase = pOld->zDatabase;
pNew->pSelect = pOld->pSelect;
if( pNew->pSelect && (pNew->pSelect->selFlags & SF_NestedFrom)!=0 ){
pNew->fg.isNestedFrom = 1;
}
if( pOld->fg.isTabFunc ){
pNew->u1.pFuncArg = pOld->u1.pFuncArg;
pOld->u1.pFuncArg = 0;
pOld->fg.isTabFunc = 0;
pNew->fg.isTabFunc = 1;
}
pOld->zName = pOld->zDatabase = 0;
pOld->pSelect = 0;
}
sqlite3SrcListDelete(pParse->db, yymsp[-3].minor.yy203);
}else{
Select *pSubquery;
sqlite3SrcListShiftJoinType(pParse,yymsp[-3].minor.yy203);
pSubquery = sqlite3SelectNew(pParse,0,yymsp[-3].minor.yy203,0,0,0,0,SF_NestedFrom,0);
yymsp[-5].minor.yy203 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy203,0,0,&yymsp[-1].minor.yy0,pSubquery,&yymsp[0].minor.yy269);
}
}
break;
case 116: /* dbnm ::= */
case 131: /* indexed_opt ::= */ yytestcase(yyruleno==131);
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
break;
case 118: /* fullname ::= nm */
{
yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
}
yymsp[0].minor.yy203 = yylhsminor.yy203;
break;
case 119: /* fullname ::= nm DOT nm */
{
yylhsminor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
if( IN_RENAME_OBJECT && yylhsminor.yy203 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy203->a[0].zName, &yymsp[0].minor.yy0);
}
yymsp[-2].minor.yy203 = yylhsminor.yy203;
break;
case 120: /* xfullname ::= nm */
{yymsp[0].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
break;
case 121: /* xfullname ::= nm DOT nm */
{yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
break;
case 122: /* xfullname ::= nm DOT nm AS nm */
{
yymsp[-4].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
if( yymsp[-4].minor.yy203 ) yymsp[-4].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
break;
case 123: /* xfullname ::= nm AS nm */
{
yymsp[-2].minor.yy203 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
if( yymsp[-2].minor.yy203 ) yymsp[-2].minor.yy203->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
break;
case 124: /* joinop ::= COMMA|JOIN */
{ yymsp[0].minor.yy144 = JT_INNER; }
break;
case 125: /* joinop ::= JOIN_KW JOIN */
{yymsp[-1].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/}
break;
case 126: /* joinop ::= JOIN_KW nm JOIN */
{yymsp[-2].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
break;
case 127: /* joinop ::= JOIN_KW nm nm JOIN */
{yymsp[-3].minor.yy144 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
break;
case 128: /* on_using ::= ON expr */
{yymsp[-1].minor.yy269.pOn = yymsp[0].minor.yy454; yymsp[-1].minor.yy269.pUsing = 0;}
break;
case 129: /* on_using ::= USING LP idlist RP */
{yymsp[-3].minor.yy269.pOn = 0; yymsp[-3].minor.yy269.pUsing = yymsp[-1].minor.yy132;}
break;
case 130: /* on_using ::= */
{yymsp[1].minor.yy269.pOn = 0; yymsp[1].minor.yy269.pUsing = 0;}
break;
case 132: /* indexed_by ::= INDEXED BY nm */
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
break;
case 133: /* indexed_by ::= NOT INDEXED */
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
break;
case 135: /* orderby_opt ::= ORDER BY sortlist */
case 145: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==145);
{yymsp[-2].minor.yy14 = yymsp[0].minor.yy14;}
break;
case 136: /* sortlist ::= sortlist COMMA expr sortorder nulls */
{
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14,yymsp[-2].minor.yy454);
sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
}
break;
case 137: /* sortlist ::= expr sortorder nulls */
{
yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy454); /*A-overwrites-Y*/
sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy14,yymsp[-1].minor.yy144,yymsp[0].minor.yy144);
}
break;
case 138: /* sortorder ::= ASC */
{yymsp[0].minor.yy144 = SQLITE_SO_ASC;}
break;
case 139: /* sortorder ::= DESC */
{yymsp[0].minor.yy144 = SQLITE_SO_DESC;}
break;
case 140: /* sortorder ::= */
case 143: /* nulls ::= */ yytestcase(yyruleno==143);
{yymsp[1].minor.yy144 = SQLITE_SO_UNDEFINED;}
break;
case 141: /* nulls ::= NULLS FIRST */
{yymsp[-1].minor.yy144 = SQLITE_SO_ASC;}
break;
case 142: /* nulls ::= NULLS LAST */
{yymsp[-1].minor.yy144 = SQLITE_SO_DESC;}
break;
case 146: /* having_opt ::= */
case 148: /* limit_opt ::= */ yytestcase(yyruleno==148);
case 153: /* where_opt ::= */ yytestcase(yyruleno==153);
case 155: /* where_opt_ret ::= */ yytestcase(yyruleno==155);
case 232: /* case_else ::= */ yytestcase(yyruleno==232);
case 233: /* case_operand ::= */ yytestcase(yyruleno==233);
case 252: /* vinto ::= */ yytestcase(yyruleno==252);
{yymsp[1].minor.yy454 = 0;}
break;
case 147: /* having_opt ::= HAVING expr */
case 154: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==154);
case 156: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==156);
case 231: /* case_else ::= ELSE expr */ yytestcase(yyruleno==231);
case 251: /* vinto ::= INTO expr */ yytestcase(yyruleno==251);
{yymsp[-1].minor.yy454 = yymsp[0].minor.yy454;}
break;
case 149: /* limit_opt ::= LIMIT expr */
{yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,0);}
break;
case 150: /* limit_opt ::= LIMIT expr OFFSET expr */
{yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
break;
case 151: /* limit_opt ::= LIMIT expr COMMA expr */
{yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy454,yymsp[-2].minor.yy454);}
break;
case 152: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
{
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy203, &yymsp[-1].minor.yy0);
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy203,yymsp[0].minor.yy454,0,0);
}
break;
case 157: /* where_opt_ret ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-1].minor.yy454 = 0;}
break;
case 158: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy14); yymsp[-3].minor.yy454 = yymsp[-2].minor.yy454;}
break;
case 159: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
{
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy203, &yymsp[-4].minor.yy0);
sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy14,"set list");
if( yymsp[-1].minor.yy203 ){
SrcList *pFromClause = yymsp[-1].minor.yy203;
if( pFromClause->nSrc>1 ){
Select *pSubquery;
Token as;
pSubquery = sqlite3SelectNew(pParse,0,pFromClause,0,0,0,0,SF_NestedFrom,0);
as.n = 0;
as.z = 0;
pFromClause = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&as,pSubquery,0);
}
yymsp[-5].minor.yy203 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy203, pFromClause);
}
sqlite3Update(pParse,yymsp[-5].minor.yy203,yymsp[-2].minor.yy14,yymsp[0].minor.yy454,yymsp[-6].minor.yy144,0,0,0);
}
break;
case 160: /* setlist ::= setlist COMMA nm EQ expr */
{
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, 1);
}
break;
case 161: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
{
yymsp[-6].minor.yy14 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy14, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
}
break;
case 162: /* setlist ::= nm EQ expr */
{
yylhsminor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy454);
sqlite3ExprListSetName(pParse, yylhsminor.yy14, &yymsp[-2].minor.yy0, 1);
}
yymsp[-2].minor.yy14 = yylhsminor.yy14;
break;
case 163: /* setlist ::= LP idlist RP EQ expr */
{
yymsp[-4].minor.yy14 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy132, yymsp[0].minor.yy454);
}
break;
case 164: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
{
sqlite3Insert(pParse, yymsp[-3].minor.yy203, yymsp[-1].minor.yy555, yymsp[-2].minor.yy132, yymsp[-5].minor.yy144, yymsp[0].minor.yy122);
}
break;
case 165: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
{
sqlite3Insert(pParse, yymsp[-4].minor.yy203, 0, yymsp[-3].minor.yy132, yymsp[-6].minor.yy144, 0);
}
break;
case 166: /* upsert ::= */
{ yymsp[1].minor.yy122 = 0; }
break;
case 167: /* upsert ::= RETURNING selcollist */
{ yymsp[-1].minor.yy122 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy14); }
break;
case 168: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
{ yymsp[-11].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy14,yymsp[-6].minor.yy454,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,yymsp[0].minor.yy122);}
break;
case 169: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
{ yymsp[-8].minor.yy122 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy14,yymsp[-3].minor.yy454,0,0,yymsp[0].minor.yy122); }
break;
case 170: /* upsert ::= ON CONFLICT DO NOTHING returning */
{ yymsp[-4].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
break;
case 171: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
{ yymsp[-7].minor.yy122 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454,0);}
break;
case 172: /* returning ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy14);}
break;
case 175: /* idlist_opt ::= */
{yymsp[1].minor.yy132 = 0;}
break;
case 176: /* idlist_opt ::= LP idlist RP */
{yymsp[-2].minor.yy132 = yymsp[-1].minor.yy132;}
break;
case 177: /* idlist ::= idlist COMMA nm */
{yymsp[-2].minor.yy132 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy132,&yymsp[0].minor.yy0);}
break;
case 178: /* idlist ::= nm */
{yymsp[0].minor.yy132 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
break;
case 179: /* expr ::= LP expr RP */
{yymsp[-2].minor.yy454 = yymsp[-1].minor.yy454;}
break;
case 180: /* expr ::= ID|INDEXED|JOIN_KW */
{yymsp[0].minor.yy454=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
break;
case 181: /* expr ::= nm DOT nm */
{
Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
yymsp[-2].minor.yy454 = yylhsminor.yy454;
break;
case 182: /* expr ::= nm DOT nm DOT nm */
{
Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0);
Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);
Expr *temp3 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);
Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
if( IN_RENAME_OBJECT ){
sqlite3RenameTokenRemap(pParse, 0, temp1);
}
yylhsminor.yy454 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
yymsp[-4].minor.yy454 = yylhsminor.yy454;
break;
case 183: /* term ::= NULL|FLOAT|BLOB */
case 184: /* term ::= STRING */ yytestcase(yyruleno==184);
{yymsp[0].minor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
break;
case 185: /* term ::= INTEGER */
{
yylhsminor.yy454 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
if( yylhsminor.yy454 ) yylhsminor.yy454->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail);
}
yymsp[0].minor.yy454 = yylhsminor.yy454;
break;
case 186: /* expr ::= VARIABLE */
{
if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
u32 n = yymsp[0].minor.yy0.n;
yymsp[0].minor.yy454 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy454, n);
}else{
/* When doing a nested parse, one can include terms in an expression
** that look like this: #1 #2 ... These terms refer to registers
** in the virtual machine. #N is the N-th register. */
Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
assert( t.n>=2 );
if( pParse->nested==0 ){
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
yymsp[0].minor.yy454 = 0;
}else{
yymsp[0].minor.yy454 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
if( yymsp[0].minor.yy454 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy454->iTable);
}
}
}
break;
case 187: /* expr ::= expr COLLATE ID|STRING */
{
yymsp[-2].minor.yy454 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy454, &yymsp[0].minor.yy0, 1);
}
break;
case 188: /* expr ::= CAST LP expr AS typetoken RP */
{
yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy454, yymsp[-3].minor.yy454, 0);
}
break;
case 189: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy144);
}
yymsp[-4].minor.yy454 = yylhsminor.yy454;
break;
case 190: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-4].minor.yy14, &yymsp[-7].minor.yy0, yymsp[-5].minor.yy144);
sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-1].minor.yy14);
}
yymsp[-7].minor.yy454 = yylhsminor.yy454;
break;
case 191: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
}
yymsp[-3].minor.yy454 = yylhsminor.yy454;
break;
case 192: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy14, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy144);
sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
}
yymsp[-5].minor.yy454 = yylhsminor.yy454;
break;
case 193: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, yymsp[-5].minor.yy14, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy144);
sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy454, yymsp[-2].minor.yy14);
}
yymsp[-8].minor.yy454 = yylhsminor.yy454;
break;
case 194: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
sqlite3WindowAttach(pParse, yylhsminor.yy454, yymsp[0].minor.yy211);
}
yymsp[-4].minor.yy454 = yylhsminor.yy454;
break;
case 195: /* term ::= CTIME_KW */
{
yylhsminor.yy454 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
}
yymsp[0].minor.yy454 = yylhsminor.yy454;
break;
case 196: /* expr ::= LP nexprlist COMMA expr RP */
{
ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454);
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
if( yymsp[-4].minor.yy454 ){
yymsp[-4].minor.yy454->x.pList = pList;
if( ALWAYS(pList->nExpr) ){
yymsp[-4].minor.yy454->flags |= pList->a[0].pExpr->flags & EP_Propagate;
}
}else{
sqlite3ExprListDelete(pParse->db, pList);
}
}
break;
case 197: /* expr ::= expr AND expr */
{yymsp[-2].minor.yy454=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
break;
case 198: /* expr ::= expr OR expr */
case 199: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==199);
case 200: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==200);
case 201: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==201);
case 202: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==202);
case 203: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==203);
case 204: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==204);
{yymsp[-2].minor.yy454=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);}
break;
case 205: /* likeop ::= NOT LIKE_KW|MATCH */
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
break;
case 206: /* expr ::= expr likeop expr */
{
ExprList *pList;
int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
yymsp[-1].minor.yy0.n &= 0x7fffffff;
pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy454);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy454);
yymsp[-2].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
if( bNot ) yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy454, 0);
if( yymsp[-2].minor.yy454 ) yymsp[-2].minor.yy454->flags |= EP_InfixFunc;
}
break;
case 207: /* expr ::= expr likeop expr ESCAPE expr */
{
ExprList *pList;
int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
yymsp[-3].minor.yy0.n &= 0x7fffffff;
pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy454);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
yymsp[-4].minor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
if( bNot ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
if( yymsp[-4].minor.yy454 ) yymsp[-4].minor.yy454->flags |= EP_InfixFunc;
}
break;
case 208: /* expr ::= expr ISNULL|NOTNULL */
{yymsp[-1].minor.yy454 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy454,0);}
break;
case 209: /* expr ::= expr NOT NULL */
{yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy454,0);}
break;
case 210: /* expr ::= expr IS expr */
{
yymsp[-2].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy454,yymsp[0].minor.yy454);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-2].minor.yy454, TK_ISNULL);
}
break;
case 211: /* expr ::= expr IS NOT expr */
{
yymsp[-3].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy454,yymsp[0].minor.yy454);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-3].minor.yy454, TK_NOTNULL);
}
break;
case 212: /* expr ::= expr IS NOT DISTINCT FROM expr */
{
yymsp[-5].minor.yy454 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy454,yymsp[0].minor.yy454);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-5].minor.yy454, TK_ISNULL);
}
break;
case 213: /* expr ::= expr IS DISTINCT FROM expr */
{
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy454,yymsp[0].minor.yy454);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy454, yymsp[-4].minor.yy454, TK_NOTNULL);
}
break;
case 214: /* expr ::= NOT expr */
case 215: /* expr ::= BITNOT expr */ yytestcase(yyruleno==215);
{yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy454, 0);/*A-overwrites-B*/}
break;
case 216: /* expr ::= PLUS|MINUS expr */
{
yymsp[-1].minor.yy454 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy454, 0);
/*A-overwrites-B*/
}
break;
case 217: /* expr ::= expr PTR expr */
{
ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy454);
pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy454);
yylhsminor.yy454 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
}
yymsp[-2].minor.yy454 = yylhsminor.yy454;
break;
case 218: /* between_op ::= BETWEEN */
case 221: /* in_op ::= IN */ yytestcase(yyruleno==221);
{yymsp[0].minor.yy144 = 0;}
break;
case 220: /* expr ::= expr between_op expr AND expr */
{
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy454);
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy454, 0);
if( yymsp[-4].minor.yy454 ){
yymsp[-4].minor.yy454->x.pList = pList;
}else{
sqlite3ExprListDelete(pParse->db, pList);
}
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
}
break;
case 223: /* expr ::= expr in_op LP exprlist RP */
{
if( yymsp[-1].minor.yy14==0 ){
/* Expressions of the form
**
** expr1 IN ()
** expr1 NOT IN ()
**
** simplify to constants 0 (false) and 1 (true), respectively,
** regardless of the value of expr1.
*/
sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy454);
yymsp[-4].minor.yy454 = sqlite3Expr(pParse->db, TK_STRING, yymsp[-3].minor.yy144 ? "true" : "false");
if( yymsp[-4].minor.yy454 ) sqlite3ExprIdToTrueFalse(yymsp[-4].minor.yy454);
}else{
Expr *pRHS = yymsp[-1].minor.yy14->a[0].pExpr;
if( yymsp[-1].minor.yy14->nExpr==1 && sqlite3ExprIsConstant(pParse,pRHS) && yymsp[-4].minor.yy454->op!=TK_VECTOR ){
yymsp[-1].minor.yy14->a[0].pExpr = 0;
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy14);
pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy454, pRHS);
}else if( yymsp[-1].minor.yy14->nExpr==1 && pRHS->op==TK_SELECT ){
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, pRHS->x.pSelect);
pRHS->x.pSelect = 0;
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy14);
}else{
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
if( yymsp[-4].minor.yy454==0 ){
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy14);
}else if( yymsp[-4].minor.yy454->pLeft->op==TK_VECTOR ){
int nExpr = yymsp[-4].minor.yy454->pLeft->x.pList->nExpr;
Select *pSelectRHS = sqlite3ExprListToValues(pParse, nExpr, yymsp[-1].minor.yy14);
if( pSelectRHS ){
parserDoubleLinkSelect(pParse, pSelectRHS);
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, pSelectRHS);
}
}else{
yymsp[-4].minor.yy454->x.pList = yymsp[-1].minor.yy14;
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy454);
}
}
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
}
}
break;
case 224: /* expr ::= LP select RP */
{
yymsp[-2].minor.yy454 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy454, yymsp[-1].minor.yy555);
}
break;
case 225: /* expr ::= expr in_op LP select RP */
{
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, yymsp[-1].minor.yy555);
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
}
break;
case 226: /* expr ::= expr in_op nm dbnm paren_exprlist */
{
SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
if( yymsp[0].minor.yy14 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy14);
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy454, 0);
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy454, pSelect);
if( yymsp[-3].minor.yy144 ) yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy454, 0);
}
break;
case 227: /* expr ::= EXISTS LP select RP */
{
Expr *p;
p = yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy555);
}
break;
case 228: /* expr ::= CASE case_operand case_exprlist case_else END */
{
yymsp[-4].minor.yy454 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy454, 0);
if( yymsp[-4].minor.yy454 ){
yymsp[-4].minor.yy454->x.pList = yymsp[-1].minor.yy454 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[-1].minor.yy454) : yymsp[-2].minor.yy14;
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy454);
}else{
sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy14);
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
}
}
break;
case 229: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
{
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[-2].minor.yy454);
yymsp[-4].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[0].minor.yy454);
}
break;
case 230: /* case_exprlist ::= WHEN expr THEN expr */
{
yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy454);
yymsp[-3].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14, yymsp[0].minor.yy454);
}
break;
case 235: /* nexprlist ::= nexprlist COMMA expr */
{yymsp[-2].minor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[0].minor.yy454);}
break;
case 236: /* nexprlist ::= expr */
{yymsp[0].minor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy454); /*A-overwrites-Y*/}
break;
case 238: /* paren_exprlist ::= LP exprlist RP */
case 243: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==243);
{yymsp[-2].minor.yy14 = yymsp[-1].minor.yy14;}
break;
case 239: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
{
sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy14, yymsp[-10].minor.yy144,
&yymsp[-11].minor.yy0, yymsp[0].minor.yy454, SQLITE_SO_ASC, yymsp[-8].minor.yy144, SQLITE_IDXTYPE_APPDEF);
if( IN_RENAME_OBJECT && pParse->pNewIndex ){
sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
}
}
break;
case 240: /* uniqueflag ::= UNIQUE */
case 282: /* raisetype ::= ABORT */ yytestcase(yyruleno==282);
{yymsp[0].minor.yy144 = OE_Abort;}
break;
case 241: /* uniqueflag ::= */
{yymsp[1].minor.yy144 = OE_None;}
break;
case 244: /* eidlist ::= eidlist COMMA nm collate sortorder */
{
yymsp[-4].minor.yy14 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144);
}
break;
case 245: /* eidlist ::= nm collate sortorder */
{
yymsp[-2].minor.yy14 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy144, yymsp[0].minor.yy144); /*A-overwrites-Y*/
}
break;
case 248: /* cmd ::= DROP INDEX ifexists fullname */
{sqlite3DropIndex(pParse, yymsp[0].minor.yy203, yymsp[-1].minor.yy144);}
break;
case 249: /* cmd ::= VACUUM vinto */
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy454);}
break;
case 250: /* cmd ::= VACUUM nm vinto */
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy454);}
break;
case 253: /* cmd ::= PRAGMA nm dbnm */
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
break;
case 254: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
break;
case 255: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
break;
case 256: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
break;
case 257: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
break;
case 260: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
{
Token all;
all.z = yymsp[-3].minor.yy0.z;
all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy427, &all);
}
break;
case 261: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
{
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy144, yymsp[-4].minor.yy286.a, yymsp[-4].minor.yy286.b, yymsp[-2].minor.yy203, yymsp[0].minor.yy454, yymsp[-10].minor.yy144, yymsp[-8].minor.yy144);
yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
break;
case 262: /* trigger_time ::= BEFORE|AFTER */
{ yymsp[0].minor.yy144 = yymsp[0].major; /*A-overwrites-X*/ }
break;
case 263: /* trigger_time ::= INSTEAD OF */
{ yymsp[-1].minor.yy144 = TK_INSTEAD;}
break;
case 264: /* trigger_time ::= */
{ yymsp[1].minor.yy144 = TK_BEFORE; }
break;
case 265: /* trigger_event ::= DELETE|INSERT */
case 266: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==266);
{yymsp[0].minor.yy286.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy286.b = 0;}
break;
case 267: /* trigger_event ::= UPDATE OF idlist */
{yymsp[-2].minor.yy286.a = TK_UPDATE; yymsp[-2].minor.yy286.b = yymsp[0].minor.yy132;}
break;
case 268: /* when_clause ::= */
case 287: /* key_opt ::= */ yytestcase(yyruleno==287);
{ yymsp[1].minor.yy454 = 0; }
break;
case 269: /* when_clause ::= WHEN expr */
case 288: /* key_opt ::= KEY expr */ yytestcase(yyruleno==288);
{ yymsp[-1].minor.yy454 = yymsp[0].minor.yy454; }
break;
case 270: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
{
assert( yymsp[-2].minor.yy427!=0 );
yymsp[-2].minor.yy427->pLast->pNext = yymsp[-1].minor.yy427;
yymsp[-2].minor.yy427->pLast = yymsp[-1].minor.yy427;
}
break;
case 271: /* trigger_cmd_list ::= trigger_cmd SEMI */
{
assert( yymsp[-1].minor.yy427!=0 );
yymsp[-1].minor.yy427->pLast = yymsp[-1].minor.yy427;
}
break;
case 272: /* trnm ::= nm DOT nm */
{
yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
sqlite3ErrorMsg(pParse,
"qualified table names are not allowed on INSERT, UPDATE, and DELETE "
"statements within triggers");
}
break;
case 273: /* tridxby ::= INDEXED BY nm */
{
sqlite3ErrorMsg(pParse,
"the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
"within triggers");
}
break;
case 274: /* tridxby ::= NOT INDEXED */
{
sqlite3ErrorMsg(pParse,
"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
"within triggers");
}
break;
case 275: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
{yylhsminor.yy427 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy203, yymsp[-3].minor.yy14, yymsp[-1].minor.yy454, yymsp[-7].minor.yy144, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy168);}
yymsp[-8].minor.yy427 = yylhsminor.yy427;
break;
case 276: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
{
yylhsminor.yy427 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy132,yymsp[-2].minor.yy555,yymsp[-6].minor.yy144,yymsp[-1].minor.yy122,yymsp[-7].minor.yy168,yymsp[0].minor.yy168);/*yylhsminor.yy427-overwrites-yymsp[-6].minor.yy144*/
}
yymsp[-7].minor.yy427 = yylhsminor.yy427;
break;
case 277: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
{yylhsminor.yy427 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy454, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy168);}
yymsp[-5].minor.yy427 = yylhsminor.yy427;
break;
case 278: /* trigger_cmd ::= scanpt select scanpt */
{yylhsminor.yy427 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy555, yymsp[-2].minor.yy168, yymsp[0].minor.yy168); /*yylhsminor.yy427-overwrites-yymsp[-1].minor.yy555*/}
yymsp[-2].minor.yy427 = yylhsminor.yy427;
break;
case 279: /* expr ::= RAISE LP IGNORE RP */
{
yymsp[-3].minor.yy454 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
if( yymsp[-3].minor.yy454 ){
yymsp[-3].minor.yy454->affExpr = OE_Ignore;
}
}
break;
case 280: /* expr ::= RAISE LP raisetype COMMA nm RP */
{
yymsp[-5].minor.yy454 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1);
if( yymsp[-5].minor.yy454 ) {
yymsp[-5].minor.yy454->affExpr = (char)yymsp[-3].minor.yy144;
}
}
break;
case 281: /* raisetype ::= ROLLBACK */
{yymsp[0].minor.yy144 = OE_Rollback;}
break;
case 283: /* raisetype ::= FAIL */
{yymsp[0].minor.yy144 = OE_Fail;}
break;
case 284: /* cmd ::= DROP TRIGGER ifexists fullname */
{
sqlite3DropTrigger(pParse,yymsp[0].minor.yy203,yymsp[-1].minor.yy144);
}
break;
case 285: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
{
sqlite3Attach(pParse, yymsp[-3].minor.yy454, yymsp[-1].minor.yy454, yymsp[0].minor.yy454);
}
break;
case 286: /* cmd ::= DETACH database_kw_opt expr */
{
sqlite3Detach(pParse, yymsp[0].minor.yy454);
}
break;
case 289: /* cmd ::= REINDEX */
{sqlite3Reindex(pParse, 0, 0);}
break;
case 290: /* cmd ::= REINDEX nm dbnm */
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
break;
case 291: /* cmd ::= ANALYZE */
{sqlite3Analyze(pParse, 0, 0);}
break;
case 292: /* cmd ::= ANALYZE nm dbnm */
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
break;
case 293: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
{
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy203,&yymsp[0].minor.yy0);
}
break;
case 294: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
{
yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
}
break;
case 295: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
{
sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy203, &yymsp[0].minor.yy0);
}
break;
case 296: /* add_column_fullname ::= fullname */
{
disableLookaside(pParse);
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy203);
}
break;
case 297: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
{
sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy203, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
break;
case 298: /* cmd ::= create_vtab */
{sqlite3VtabFinishParse(pParse,0);}
break;
case 299: /* cmd ::= create_vtab LP vtabarglist RP */
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
break;
case 300: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
{
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy144);
}
break;
case 301: /* vtabarg ::= */
{sqlite3VtabArgInit(pParse);}
break;
case 302: /* vtabargtoken ::= ANY */
case 303: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==303);
case 304: /* lp ::= LP */ yytestcase(yyruleno==304);
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
break;
case 305: /* with ::= WITH wqlist */
case 306: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==306);
{ sqlite3WithPush(pParse, yymsp[0].minor.yy59, 1); }
break;
case 307: /* wqas ::= AS */
{yymsp[0].minor.yy462 = M10d_Any;}
break;
case 308: /* wqas ::= AS MATERIALIZED */
{yymsp[-1].minor.yy462 = M10d_Yes;}
break;
case 309: /* wqas ::= AS NOT MATERIALIZED */
{yymsp[-2].minor.yy462 = M10d_No;}
break;
case 310: /* wqitem ::= withnm eidlist_opt wqas LP select RP */
{
yymsp[-5].minor.yy67 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy14, yymsp[-1].minor.yy555, yymsp[-3].minor.yy462); /*A-overwrites-X*/
}
break;
case 311: /* withnm ::= nm */
{pParse->bHasWith = 1;}
break;
case 312: /* wqlist ::= wqitem */
{
yymsp[0].minor.yy59 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy67); /*A-overwrites-X*/
}
break;
case 313: /* wqlist ::= wqlist COMMA wqitem */
{
yymsp[-2].minor.yy59 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy59, yymsp[0].minor.yy67);
}
break;
case 314: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
{
assert( yymsp[0].minor.yy211!=0 );
sqlite3WindowChain(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy211);
yymsp[0].minor.yy211->pNextWin = yymsp[-2].minor.yy211;
yylhsminor.yy211 = yymsp[0].minor.yy211;
}
yymsp[-2].minor.yy211 = yylhsminor.yy211;
break;
case 315: /* windowdefn ::= nm AS LP window RP */
{
if( ALWAYS(yymsp[-1].minor.yy211) ){
yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
}
yylhsminor.yy211 = yymsp[-1].minor.yy211;
}
yymsp[-4].minor.yy211 = yylhsminor.yy211;
break;
case 316: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
{
yymsp[-4].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, 0);
}
break;
case 317: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
{
yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, yymsp[-2].minor.yy14, yymsp[-1].minor.yy14, &yymsp[-5].minor.yy0);
}
yymsp[-5].minor.yy211 = yylhsminor.yy211;
break;
case 318: /* window ::= ORDER BY sortlist frame_opt */
{
yymsp[-3].minor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, 0);
}
break;
case 319: /* window ::= nm ORDER BY sortlist frame_opt */
{
yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0);
}
yymsp[-4].minor.yy211 = yylhsminor.yy211;
break;
case 320: /* window ::= nm frame_opt */
{
yylhsminor.yy211 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy211, 0, 0, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy211 = yylhsminor.yy211;
break;
case 321: /* frame_opt ::= */
{
yymsp[1].minor.yy211 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
}
break;
case 322: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
{
yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy144, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy462);
}
yymsp[-2].minor.yy211 = yylhsminor.yy211;
break;
case 323: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
{
yylhsminor.yy211 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy144, yymsp[-3].minor.yy509.eType, yymsp[-3].minor.yy509.pExpr, yymsp[-1].minor.yy509.eType, yymsp[-1].minor.yy509.pExpr, yymsp[0].minor.yy462);
}
yymsp[-5].minor.yy211 = yylhsminor.yy211;
break;
case 325: /* frame_bound_s ::= frame_bound */
case 327: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==327);
{yylhsminor.yy509 = yymsp[0].minor.yy509;}
yymsp[0].minor.yy509 = yylhsminor.yy509;
break;
case 326: /* frame_bound_s ::= UNBOUNDED PRECEDING */
case 328: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==328);
case 330: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==330);
{yylhsminor.yy509.eType = yymsp[-1].major; yylhsminor.yy509.pExpr = 0;}
yymsp[-1].minor.yy509 = yylhsminor.yy509;
break;
case 329: /* frame_bound ::= expr PRECEDING|FOLLOWING */
{yylhsminor.yy509.eType = yymsp[0].major; yylhsminor.yy509.pExpr = yymsp[-1].minor.yy454;}
yymsp[-1].minor.yy509 = yylhsminor.yy509;
break;
case 331: /* frame_exclude_opt ::= */
{yymsp[1].minor.yy462 = 0;}
break;
case 332: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
{yymsp[-1].minor.yy462 = yymsp[0].minor.yy462;}
break;
case 333: /* frame_exclude ::= NO OTHERS */
case 334: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==334);
{yymsp[-1].minor.yy462 = yymsp[-1].major; /*A-overwrites-X*/}
break;
case 335: /* frame_exclude ::= GROUP|TIES */
{yymsp[0].minor.yy462 = yymsp[0].major; /*A-overwrites-X*/}
break;
case 336: /* window_clause ::= WINDOW windowdefn_list */
{ yymsp[-1].minor.yy211 = yymsp[0].minor.yy211; }
break;
case 337: /* filter_over ::= filter_clause over_clause */
{
if( yymsp[0].minor.yy211 ){
yymsp[0].minor.yy211->pFilter = yymsp[-1].minor.yy454;
}else{
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy454);
}
yylhsminor.yy211 = yymsp[0].minor.yy211;
}
yymsp[-1].minor.yy211 = yylhsminor.yy211;
break;
case 338: /* filter_over ::= over_clause */
{
yylhsminor.yy211 = yymsp[0].minor.yy211;
}
yymsp[0].minor.yy211 = yylhsminor.yy211;
break;
case 339: /* filter_over ::= filter_clause */
{
yylhsminor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
if( yylhsminor.yy211 ){
yylhsminor.yy211->eFrmType = TK_FILTER;
yylhsminor.yy211->pFilter = yymsp[0].minor.yy454;
}else{
sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy454);
}
}
yymsp[0].minor.yy211 = yylhsminor.yy211;
break;
case 340: /* over_clause ::= OVER LP window RP */
{
yymsp[-3].minor.yy211 = yymsp[-1].minor.yy211;
assert( yymsp[-3].minor.yy211!=0 );
}
break;
case 341: /* over_clause ::= OVER nm */
{
yymsp[-1].minor.yy211 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
if( yymsp[-1].minor.yy211 ){
yymsp[-1].minor.yy211->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
}
}
break;
case 342: /* filter_clause ::= FILTER LP WHERE expr RP */
{ yymsp[-4].minor.yy454 = yymsp[-1].minor.yy454; }
break;
case 343: /* term ::= QNUMBER */
{
yylhsminor.yy454=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0);
sqlite3DequoteNumber(pParse, yylhsminor.yy454);
}
yymsp[0].minor.yy454 = yylhsminor.yy454;
break;
default:
/* (344) input ::= cmdlist */ yytestcase(yyruleno==344);
/* (345) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==345);
/* (346) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=346);
/* (347) ecmd ::= SEMI */ yytestcase(yyruleno==347);
/* (348) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==348);
/* (349) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=349);
/* (350) trans_opt ::= */ yytestcase(yyruleno==350);
/* (351) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==351);
/* (352) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==352);
/* (353) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==353);
/* (354) savepoint_opt ::= */ yytestcase(yyruleno==354);
/* (355) cmd ::= create_table create_table_args */ yytestcase(yyruleno==355);
/* (356) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=356);
/* (357) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==357);
/* (358) columnlist ::= columnname carglist */ yytestcase(yyruleno==358);
/* (359) nm ::= ID|INDEXED|JOIN_KW */ yytestcase(yyruleno==359);
/* (360) nm ::= STRING */ yytestcase(yyruleno==360);
/* (361) typetoken ::= typename */ yytestcase(yyruleno==361);
/* (362) typename ::= ID|STRING */ yytestcase(yyruleno==362);
/* (363) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=363);
/* (364) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=364);
/* (365) carglist ::= carglist ccons */ yytestcase(yyruleno==365);
/* (366) carglist ::= */ yytestcase(yyruleno==366);
/* (367) ccons ::= NULL onconf */ yytestcase(yyruleno==367);
/* (368) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==368);
/* (369) ccons ::= AS generated */ yytestcase(yyruleno==369);
/* (370) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==370);
/* (371) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==371);
/* (372) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=372);
/* (373) tconscomma ::= */ yytestcase(yyruleno==373);
/* (374) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=374);
/* (375) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=375);
/* (376) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=376);
/* (377) oneselect ::= values */ yytestcase(yyruleno==377);
/* (378) sclp ::= selcollist COMMA */ yytestcase(yyruleno==378);
/* (379) as ::= ID|STRING */ yytestcase(yyruleno==379);
/* (380) indexed_opt ::= indexed_by (OPTIMIZED OUT) */ assert(yyruleno!=380);
/* (381) returning ::= */ yytestcase(yyruleno==381);
/* (382) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=382);
/* (383) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==383);
/* (384) case_operand ::= expr */ yytestcase(yyruleno==384);
/* (385) exprlist ::= nexprlist */ yytestcase(yyruleno==385);
/* (386) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=386);
/* (387) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=387);
/* (388) nmnum ::= ON */ yytestcase(yyruleno==388);
/* (389) nmnum ::= DELETE */ yytestcase(yyruleno==389);
/* (390) nmnum ::= DEFAULT */ yytestcase(yyruleno==390);
/* (391) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==391);
/* (392) foreach_clause ::= */ yytestcase(yyruleno==392);
/* (393) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==393);
/* (394) trnm ::= nm */ yytestcase(yyruleno==394);
/* (395) tridxby ::= */ yytestcase(yyruleno==395);
/* (396) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==396);
/* (397) database_kw_opt ::= */ yytestcase(yyruleno==397);
/* (398) kwcolumn_opt ::= */ yytestcase(yyruleno==398);
/* (399) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==399);
/* (400) vtabarglist ::= vtabarg */ yytestcase(yyruleno==400);
/* (401) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==401);
/* (402) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==402);
/* (403) anylist ::= */ yytestcase(yyruleno==403);
/* (404) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==404);
/* (405) anylist ::= anylist ANY */ yytestcase(yyruleno==405);
/* (406) with ::= */ yytestcase(yyruleno==406);
/* (407) windowdefn_list ::= windowdefn (OPTIMIZED OUT) */ assert(yyruleno!=407);
/* (408) window ::= frame_opt (OPTIMIZED OUT) */ assert(yyruleno!=408);
break;
/********** End reduce actions ************************************************/
};
assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
yygoto = yyRuleInfoLhs[yyruleno];
yysize = yyRuleInfoNRhs[yyruleno];
yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
|
| ︙ | ︙ | |||
251501 251502 251503 251504 251505 251506 251507 |
static void fts5SourceIdFunc(
sqlite3_context *pCtx, /* Function call context */
int nArg, /* Number of args */
sqlite3_value **apUnused /* Function arguments */
){
assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused);
| | | 251800 251801 251802 251803 251804 251805 251806 251807 251808 251809 251810 251811 251812 251813 251814 |
static void fts5SourceIdFunc(
sqlite3_context *pCtx, /* Function call context */
int nArg, /* Number of args */
sqlite3_value **apUnused /* Function arguments */
){
assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused);
sqlite3_result_text(pCtx, "fts5: 2024-03-18 18:03:17 76fb3a908f45230b956cb659c754e47603e80aa72a2aad50d479437a9c013f61", -1, SQLITE_TRANSIENT);
}
/*
** Return true if zName is the extension on one of the shadow tables used
** by this module.
*/
static int fts5ShadowName(const char *zName){
|
| ︙ | ︙ |
Changes to extsrc/sqlite3.h.
| ︙ | ︙ | |||
144 145 146 147 148 149 150 | ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.46.0" #define SQLITE_VERSION_NUMBER 3046000 | | | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.46.0" #define SQLITE_VERSION_NUMBER 3046000 #define SQLITE_SOURCE_ID "2024-03-18 18:03:17 76fb3a908f45230b956cb659c754e47603e80aa72a2aad50d479437a9c013f61" /* ** CAPI3REF: Run-Time Library Version Numbers ** KEYWORDS: sqlite3_version sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
| ︙ | ︙ |