| | @@ -1171,11 +1171,11 @@ |
| 1171 | 1171 | ** be held constant and Z will be incremented or else Y will be incremented |
| 1172 | 1172 | ** and Z will be reset to zero. |
| 1173 | 1173 | ** |
| 1174 | 1174 | ** Since [version 3.6.18] ([dateof:3.6.18]), |
| 1175 | 1175 | ** SQLite source code has been stored in the |
| 1176 | | -** <a href="http://fossil-scm.org/">Fossil configuration management |
| 1176 | +** <a href="http://www.fossil-scm.org/">Fossil configuration management |
| 1177 | 1177 | ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to |
| 1178 | 1178 | ** a string which identifies a particular check-in of SQLite |
| 1179 | 1179 | ** within its configuration management system. ^The SQLITE_SOURCE_ID |
| 1180 | 1180 | ** string contains the date and time of the check-in (UTC) and a SHA1 |
| 1181 | 1181 | ** or SHA3-256 hash of the entire source tree. If the source code has |
| | @@ -1186,11 +1186,11 @@ |
| 1186 | 1186 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1187 | 1187 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1188 | 1188 | */ |
| 1189 | 1189 | #define SQLITE_VERSION "3.35.0" |
| 1190 | 1190 | #define SQLITE_VERSION_NUMBER 3035000 |
| 1191 | | -#define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d" |
| 1191 | +#define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f130e1" |
| 1192 | 1192 | |
| 1193 | 1193 | /* |
| 1194 | 1194 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1195 | 1195 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1196 | 1196 | ** |
| | @@ -15966,11 +15966,11 @@ |
| 15966 | 15966 | #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN) |
| 15967 | 15967 | SQLITE_PRIVATE void sqlite3ExplainBreakpoint(const char*,const char*); |
| 15968 | 15968 | #else |
| 15969 | 15969 | # define sqlite3ExplainBreakpoint(A,B) /*no-op*/ |
| 15970 | 15970 | #endif |
| 15971 | | -SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*); |
| 15971 | +SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*, int, char*, u16); |
| 15972 | 15972 | SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, int addr, u8); |
| 15973 | 15973 | SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1); |
| 15974 | 15974 | SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2); |
| 15975 | 15975 | SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3); |
| 15976 | 15976 | SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u16 P5); |
| | @@ -17475,11 +17475,16 @@ |
| 17475 | 17475 | u8 szEst; /* Estimated size of value in this column. sizeof(INT)==1 */ |
| 17476 | 17476 | u8 hName; /* Column name hash for faster lookup */ |
| 17477 | 17477 | u16 colFlags; /* Boolean properties. See COLFLAG_ defines below */ |
| 17478 | 17478 | }; |
| 17479 | 17479 | |
| 17480 | | -/* Allowed values for Column.colFlags: |
| 17480 | +/* Allowed values for Column.colFlags. |
| 17481 | +** |
| 17482 | +** Constraints: |
| 17483 | +** TF_HasVirtual == COLFLAG_VIRTUAL |
| 17484 | +** TF_HasStored == COLFLAG_STORED |
| 17485 | +** TF_HasHidden == COLFLAG_HIDDEN |
| 17481 | 17486 | */ |
| 17482 | 17487 | #define COLFLAG_PRIMKEY 0x0001 /* Column is part of the primary key */ |
| 17483 | 17488 | #define COLFLAG_HIDDEN 0x0002 /* A hidden column in a virtual table */ |
| 17484 | 17489 | #define COLFLAG_HASTYPE 0x0004 /* Type name follows column name */ |
| 17485 | 17490 | #define COLFLAG_UNIQUE 0x0008 /* Column def contains "UNIQUE" or "PK" */ |
| | @@ -17664,15 +17669,16 @@ |
| 17664 | 17669 | ** the TF_OOOHidden attribute would apply in this case. Such tables require |
| 17665 | 17670 | ** special handling during INSERT processing. The "OOO" means "Out Of Order". |
| 17666 | 17671 | ** |
| 17667 | 17672 | ** Constraints: |
| 17668 | 17673 | ** |
| 17669 | | -** TF_HasVirtual == COLFLAG_Virtual |
| 17670 | | -** TF_HasStored == COLFLAG_Stored |
| 17674 | +** TF_HasVirtual == COLFLAG_VIRTUAL |
| 17675 | +** TF_HasStored == COLFLAG_STORED |
| 17676 | +** TF_HasHidden == COLFLAG_HIDDEN |
| 17671 | 17677 | */ |
| 17672 | 17678 | #define TF_Readonly 0x0001 /* Read-only system table */ |
| 17673 | | -#define TF_Ephemeral 0x0002 /* An ephemeral table */ |
| 17679 | +#define TF_HasHidden 0x0002 /* Has one or more hidden columns */ |
| 17674 | 17680 | #define TF_HasPrimaryKey 0x0004 /* Table has a primary key */ |
| 17675 | 17681 | #define TF_Autoincrement 0x0008 /* Integer primary key is autoincrement */ |
| 17676 | 17682 | #define TF_HasStat1 0x0010 /* nRowLogEst set from sqlite_stat1 */ |
| 17677 | 17683 | #define TF_HasVirtual 0x0020 /* Has one or more VIRTUAL columns */ |
| 17678 | 17684 | #define TF_HasStored 0x0040 /* Has one or more STORED columns */ |
| | @@ -17683,10 +17689,11 @@ |
| 17683 | 17689 | #define TF_NoVisibleRowid 0x0200 /* No user-visible "rowid" column */ |
| 17684 | 17690 | #define TF_OOOHidden 0x0400 /* Out-of-Order hidden columns */ |
| 17685 | 17691 | #define TF_HasNotNull 0x0800 /* Contains NOT NULL constraints */ |
| 17686 | 17692 | #define TF_Shadow 0x1000 /* True for a shadow table */ |
| 17687 | 17693 | #define TF_HasStat4 0x2000 /* STAT4 info available for this table */ |
| 17694 | +#define TF_Ephemeral 0x4000 /* An ephemeral table */ |
| 17688 | 17695 | |
| 17689 | 17696 | /* |
| 17690 | 17697 | ** Test to see whether or not a table is a virtual table. This is |
| 17691 | 17698 | ** done as a macro so that it will be optimized out when virtual |
| 17692 | 17699 | ** table support is omitted from the build. |
| | @@ -18051,11 +18058,10 @@ |
| 18051 | 18058 | int iMem; /* Memory location that acts as accumulator */ |
| 18052 | 18059 | int iDistinct; /* Ephemeral table used to enforce DISTINCT */ |
| 18053 | 18060 | } *aFunc; |
| 18054 | 18061 | int nFunc; /* Number of entries in aFunc[] */ |
| 18055 | 18062 | u32 selId; /* Select to which this AggInfo belongs */ |
| 18056 | | - AggInfo *pNext; /* Next in list of them all */ |
| 18057 | 18063 | }; |
| 18058 | 18064 | |
| 18059 | 18065 | /* |
| 18060 | 18066 | ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. |
| 18061 | 18067 | ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater |
| | @@ -18644,10 +18650,11 @@ |
| 18644 | 18650 | #define SF_WhereBegin 0x0080000 /* Really a WhereBegin() call. Debug Only */ |
| 18645 | 18651 | #define SF_WinRewrite 0x0100000 /* Window function rewrite accomplished */ |
| 18646 | 18652 | #define SF_View 0x0200000 /* SELECT statement is a view */ |
| 18647 | 18653 | #define SF_NoopOrderBy 0x0400000 /* ORDER BY is ignored for this query */ |
| 18648 | 18654 | #define SF_UpdateFrom 0x0800000 /* Statement is an UPDATE...FROM */ |
| 18655 | +#define SF_PushDown 0x1000000 /* SELECT has be modified by push-down opt */ |
| 18649 | 18656 | |
| 18650 | 18657 | /* |
| 18651 | 18658 | ** The results of a SELECT can be distributed in several ways, as defined |
| 18652 | 18659 | ** by one of the following macros. The "SRT" prefix means "SELECT Result |
| 18653 | 18660 | ** Type". |
| | @@ -18886,11 +18893,10 @@ |
| 18886 | 18893 | #endif |
| 18887 | 18894 | AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */ |
| 18888 | 18895 | Parse *pToplevel; /* Parse structure for main program (or NULL) */ |
| 18889 | 18896 | Table *pTriggerTab; /* Table triggers are being coded for */ |
| 18890 | 18897 | Parse *pParentParse; /* Parent parser if this parser is nested */ |
| 18891 | | - AggInfo *pAggList; /* List of all AggInfo objects */ |
| 18892 | 18898 | union { |
| 18893 | 18899 | int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */ |
| 18894 | 18900 | Returning *pReturning; /* The RETURNING clause */ |
| 18895 | 18901 | } u1; |
| 18896 | 18902 | u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ |
| | @@ -19170,11 +19176,12 @@ |
| 19170 | 19176 | } InitData; |
| 19171 | 19177 | |
| 19172 | 19178 | /* |
| 19173 | 19179 | ** Allowed values for mInitFlags |
| 19174 | 19180 | */ |
| 19175 | | -#define INITFLAG_AlterTable 0x0001 /* This is a reparse after ALTER TABLE */ |
| 19181 | +#define INITFLAG_AlterRename 0x0001 /* Reparse after a RENAME */ |
| 19182 | +#define INITFLAG_AlterDrop 0x0002 /* Reparse after a DROP COLUMN */ |
| 19176 | 19183 | |
| 19177 | 19184 | /* |
| 19178 | 19185 | ** Structure containing global configuration data for the SQLite library. |
| 19179 | 19186 | ** |
| 19180 | 19187 | ** This structure also contains some state information. |
| | @@ -19990,10 +19997,11 @@ |
| 19990 | 19997 | # define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0 |
| 19991 | 19998 | # define sqlite3TriggerStepSrc(A,B) 0 |
| 19992 | 19999 | #endif |
| 19993 | 20000 | |
| 19994 | 20001 | SQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*); |
| 20002 | +SQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol); |
| 19995 | 20003 | SQLITE_PRIVATE void sqlite3SetJoinExpr(Expr*,int); |
| 19996 | 20004 | SQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int); |
| 19997 | 20005 | SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int); |
| 19998 | 20006 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| 19999 | 20007 | SQLITE_PRIVATE void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*); |
| | @@ -20174,10 +20182,11 @@ |
| 20174 | 20182 | SQLITE_PRIVATE int sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*); |
| 20175 | 20183 | SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*); |
| 20176 | 20184 | SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int); |
| 20177 | 20185 | SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *); |
| 20178 | 20186 | SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *); |
| 20187 | +SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse*, SrcList*, Token*); |
| 20179 | 20188 | SQLITE_PRIVATE void *sqlite3RenameTokenMap(Parse*, void*, Token*); |
| 20180 | 20189 | SQLITE_PRIVATE void sqlite3RenameTokenRemap(Parse*, void *pTo, void *pFrom); |
| 20181 | 20190 | SQLITE_PRIVATE void sqlite3RenameExprUnmap(Parse*, Expr*); |
| 20182 | 20191 | SQLITE_PRIVATE void sqlite3RenameExprlistUnmap(Parse*, ExprList*); |
| 20183 | 20192 | SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(Parse*, u8, CollSeq *, const char*); |
| | @@ -78733,13 +78742,14 @@ |
| 78733 | 78742 | ** as having been used. |
| 78734 | 78743 | ** |
| 78735 | 78744 | ** The zWhere string must have been obtained from sqlite3_malloc(). |
| 78736 | 78745 | ** This routine will take ownership of the allocated memory. |
| 78737 | 78746 | */ |
| 78738 | | -SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere){ |
| 78747 | +SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere, u16 p5){ |
| 78739 | 78748 | int j; |
| 78740 | 78749 | sqlite3VdbeAddOp4(p, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC); |
| 78750 | + sqlite3VdbeChangeP5(p, p5); |
| 78741 | 78751 | for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j); |
| 78742 | 78752 | sqlite3MayAbort(p->pParse); |
| 78743 | 78753 | } |
| 78744 | 78754 | |
| 78745 | 78755 | /* |
| | @@ -92185,11 +92195,11 @@ |
| 92185 | 92195 | |
| 92186 | 92196 | #ifndef SQLITE_OMIT_ALTERTABLE |
| 92187 | 92197 | if( pOp->p4.z==0 ){ |
| 92188 | 92198 | sqlite3SchemaClear(db->aDb[iDb].pSchema); |
| 92189 | 92199 | db->mDbFlags &= ~DBFLAG_SchemaKnownOk; |
| 92190 | | - rc = sqlite3InitOne(db, iDb, &p->zErrMsg, INITFLAG_AlterTable); |
| 92200 | + rc = sqlite3InitOne(db, iDb, &p->zErrMsg, pOp->p5); |
| 92191 | 92201 | db->mDbFlags |= DBFLAG_SchemaChange; |
| 92192 | 92202 | p->expired = 0; |
| 92193 | 92203 | }else |
| 92194 | 92204 | #endif |
| 92195 | 92205 | { |
| | @@ -98575,11 +98585,10 @@ |
| 98575 | 98585 | static void resolveAlias( |
| 98576 | 98586 | Parse *pParse, /* Parsing context */ |
| 98577 | 98587 | ExprList *pEList, /* A result set */ |
| 98578 | 98588 | int iCol, /* A column in the result set. 0..pEList->nExpr-1 */ |
| 98579 | 98589 | Expr *pExpr, /* Transform this into an alias to the result set */ |
| 98580 | | - const char *zType, /* "GROUP" or "ORDER" or "" */ |
| 98581 | 98590 | int nSubquery /* Number of subqueries that the label is moving */ |
| 98582 | 98591 | ){ |
| 98583 | 98592 | Expr *pOrig; /* The iCol-th column of the result set */ |
| 98584 | 98593 | Expr *pDup; /* Copy of pOrig */ |
| 98585 | 98594 | sqlite3 *db; /* The database connection */ |
| | @@ -98588,11 +98597,11 @@ |
| 98588 | 98597 | pOrig = pEList->a[iCol].pExpr; |
| 98589 | 98598 | assert( pOrig!=0 ); |
| 98590 | 98599 | db = pParse->db; |
| 98591 | 98600 | pDup = sqlite3ExprDup(db, pOrig, 0); |
| 98592 | 98601 | if( pDup!=0 ){ |
| 98593 | | - if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery); |
| 98602 | + incrAggFunctionDepth(pDup, nSubquery); |
| 98594 | 98603 | if( pExpr->op==TK_COLLATE ){ |
| 98595 | 98604 | pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken); |
| 98596 | 98605 | } |
| 98597 | 98606 | |
| 98598 | 98607 | /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This |
| | @@ -98873,13 +98882,14 @@ |
| 98873 | 98882 | } /* if( pSrcList ) */ |
| 98874 | 98883 | |
| 98875 | 98884 | #if !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_UPSERT) |
| 98876 | 98885 | /* If we have not already resolved the name, then maybe |
| 98877 | 98886 | ** it is a new.* or old.* trigger argument reference. Or |
| 98878 | | - ** maybe it is an excluded.* from an upsert. |
| 98887 | + ** maybe it is an excluded.* from an upsert. Or maybe it is |
| 98888 | + ** a reference in the RETURNING clause to a table being modified. |
| 98879 | 98889 | */ |
| 98880 | | - if( cntTab==0 && zDb==0 ){ |
| 98890 | + if( cnt==0 && zDb==0 ){ |
| 98881 | 98891 | pTab = 0; |
| 98882 | 98892 | #ifndef SQLITE_OMIT_TRIGGER |
| 98883 | 98893 | if( pParse->pTriggerTab!=0 ){ |
| 98884 | 98894 | int op = pParse->eTriggerOp; |
| 98885 | 98895 | assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT ); |
| | @@ -98887,18 +98897,18 @@ |
| 98887 | 98897 | pExpr->iTable = 1; |
| 98888 | 98898 | pTab = pParse->pTriggerTab; |
| 98889 | 98899 | }else if( op!=TK_INSERT && zTab && sqlite3StrICmp("old",zTab)==0 ){ |
| 98890 | 98900 | pExpr->iTable = 0; |
| 98891 | 98901 | pTab = pParse->pTriggerTab; |
| 98892 | | - }else if( pParse->bReturning ){ |
| 98902 | + }else if( pParse->bReturning && (pNC->ncFlags & NC_UBaseReg)!=0 ){ |
| 98893 | 98903 | pExpr->iTable = op!=TK_DELETE; |
| 98894 | 98904 | pTab = pParse->pTriggerTab; |
| 98895 | 98905 | } |
| 98896 | 98906 | } |
| 98897 | 98907 | #endif /* SQLITE_OMIT_TRIGGER */ |
| 98898 | 98908 | #ifndef SQLITE_OMIT_UPSERT |
| 98899 | | - if( (pNC->ncFlags & NC_UUpsert)!=0 && ALWAYS(zTab) ){ |
| 98909 | + if( (pNC->ncFlags & NC_UUpsert)!=0 && zTab!=0 ){ |
| 98900 | 98910 | Upsert *pUpsert = pNC->uNC.pUpsert; |
| 98901 | 98911 | if( pUpsert && sqlite3StrICmp("excluded",zTab)==0 ){ |
| 98902 | 98912 | pTab = pUpsert->pUpsertSrc->a[0].pTab; |
| 98903 | 98913 | pExpr->iTable = EXCLUDED_TABLE_NUMBER; |
| 98904 | 98914 | } |
| | @@ -98941,11 +98951,11 @@ |
| 98941 | 98951 | { |
| 98942 | 98952 | pExpr->y.pTab = pTab; |
| 98943 | 98953 | if( pParse->bReturning ){ |
| 98944 | 98954 | eNewExprOp = TK_REGISTER; |
| 98945 | 98955 | pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable |
| 98946 | | - + iCol + 1; |
| 98956 | + + iCol + 1; |
| 98947 | 98957 | }else{ |
| 98948 | 98958 | pExpr->iColumn = (i16)iCol; |
| 98949 | 98959 | eNewExprOp = TK_TRIGGER; |
| 98950 | 98960 | #ifndef SQLITE_OMIT_TRIGGER |
| 98951 | 98961 | if( iCol<0 ){ |
| | @@ -99028,11 +99038,11 @@ |
| 99028 | 99038 | } |
| 99029 | 99039 | if( sqlite3ExprVectorSize(pOrig)!=1 ){ |
| 99030 | 99040 | sqlite3ErrorMsg(pParse, "row value misused"); |
| 99031 | 99041 | return WRC_Abort; |
| 99032 | 99042 | } |
| 99033 | | - resolveAlias(pParse, pEList, j, pExpr, "", nSubquery); |
| 99043 | + resolveAlias(pParse, pEList, j, pExpr, nSubquery); |
| 99034 | 99044 | cnt = 1; |
| 99035 | 99045 | pMatch = 0; |
| 99036 | 99046 | assert( zTab==0 && zDb==0 ); |
| 99037 | 99047 | if( IN_RENAME_OBJECT ){ |
| 99038 | 99048 | sqlite3RenameTokenRemap(pParse, 0, (void*)pExpr); |
| | @@ -99130,14 +99140,16 @@ |
| 99130 | 99140 | pMatch->colUsed |= sqlite3ExprColUsed(pExpr); |
| 99131 | 99141 | } |
| 99132 | 99142 | |
| 99133 | 99143 | /* Clean up and return |
| 99134 | 99144 | */ |
| 99135 | | - sqlite3ExprDelete(db, pExpr->pLeft); |
| 99136 | | - pExpr->pLeft = 0; |
| 99137 | | - sqlite3ExprDelete(db, pExpr->pRight); |
| 99138 | | - pExpr->pRight = 0; |
| 99145 | + if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){ |
| 99146 | + sqlite3ExprDelete(db, pExpr->pLeft); |
| 99147 | + pExpr->pLeft = 0; |
| 99148 | + sqlite3ExprDelete(db, pExpr->pRight); |
| 99149 | + pExpr->pRight = 0; |
| 99150 | + } |
| 99139 | 99151 | pExpr->op = eNewExprOp; |
| 99140 | 99152 | ExprSetProperty(pExpr, EP_Leaf); |
| 99141 | 99153 | lookupname_end: |
| 99142 | 99154 | if( cnt==1 ){ |
| 99143 | 99155 | assert( pNC!=0 ); |
| | @@ -99905,12 +99917,11 @@ |
| 99905 | 99917 | if( pItem->u.x.iOrderByCol ){ |
| 99906 | 99918 | if( pItem->u.x.iOrderByCol>pEList->nExpr ){ |
| 99907 | 99919 | resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr); |
| 99908 | 99920 | return 1; |
| 99909 | 99921 | } |
| 99910 | | - resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr, |
| 99911 | | - zType,0); |
| 99922 | + resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr,0); |
| 99912 | 99923 | } |
| 99913 | 99924 | } |
| 99914 | 99925 | return 0; |
| 99915 | 99926 | } |
| 99916 | 99927 | |
| | @@ -100153,11 +100164,11 @@ |
| 100153 | 100164 | ** aliases in the result set. |
| 100154 | 100165 | ** |
| 100155 | 100166 | ** Minor point: If this is the case, then the expression will be |
| 100156 | 100167 | ** re-evaluated for each reference to it. |
| 100157 | 100168 | */ |
| 100158 | | - assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert))==0 ); |
| 100169 | + assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert|NC_UBaseReg))==0 ); |
| 100159 | 100170 | sNC.uNC.pEList = p->pEList; |
| 100160 | 100171 | sNC.ncFlags |= NC_UEList; |
| 100161 | 100172 | if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort; |
| 100162 | 100173 | if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort; |
| 100163 | 100174 | |
| | @@ -106625,43 +106636,49 @@ |
| 106625 | 106636 | ** bTemp is not true, database "temp", can still be parsed. This is |
| 106626 | 106637 | ** called at the end of the generation of an ALTER TABLE ... RENAME ... |
| 106627 | 106638 | ** statement to ensure that the operation has not rendered any schema |
| 106628 | 106639 | ** objects unusable. |
| 106629 | 106640 | */ |
| 106630 | | -static void renameTestSchema(Parse *pParse, const char *zDb, int bTemp){ |
| 106641 | +static void renameTestSchema( |
| 106642 | + Parse *pParse, /* Parse context */ |
| 106643 | + const char *zDb, /* Name of db to verify schema of */ |
| 106644 | + int bTemp, /* True if this is the temp db */ |
| 106645 | + const char *zWhen /* "when" part of error message */ |
| 106646 | +){ |
| 106647 | + pParse->colNamesSet = 1; |
| 106631 | 106648 | sqlite3NestedParse(pParse, |
| 106632 | 106649 | "SELECT 1 " |
| 106633 | 106650 | "FROM \"%w\"." DFLT_SCHEMA_TABLE " " |
| 106634 | 106651 | "WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'" |
| 106635 | 106652 | " AND sql NOT LIKE 'create virtual%%'" |
| 106636 | | - " AND sqlite_rename_test(%Q, sql, type, name, %d)=NULL ", |
| 106653 | + " AND sqlite_rename_test(%Q, sql, type, name, %d, %Q)=NULL ", |
| 106637 | 106654 | zDb, |
| 106638 | | - zDb, bTemp |
| 106655 | + zDb, bTemp, zWhen |
| 106639 | 106656 | ); |
| 106640 | 106657 | |
| 106641 | 106658 | if( bTemp==0 ){ |
| 106642 | 106659 | sqlite3NestedParse(pParse, |
| 106643 | 106660 | "SELECT 1 " |
| 106644 | 106661 | "FROM temp." DFLT_SCHEMA_TABLE " " |
| 106645 | 106662 | "WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'" |
| 106646 | 106663 | " AND sql NOT LIKE 'create virtual%%'" |
| 106647 | | - " AND sqlite_rename_test(%Q, sql, type, name, 1)=NULL ", |
| 106648 | | - zDb |
| 106664 | + " AND sqlite_rename_test(%Q, sql, type, name, 1, %Q)=NULL ", |
| 106665 | + zDb, zWhen |
| 106649 | 106666 | ); |
| 106650 | 106667 | } |
| 106651 | 106668 | } |
| 106652 | 106669 | |
| 106653 | 106670 | /* |
| 106654 | 106671 | ** Generate code to reload the schema for database iDb. And, if iDb!=1, for |
| 106655 | 106672 | ** the temp database as well. |
| 106656 | 106673 | */ |
| 106657 | | -static void renameReloadSchema(Parse *pParse, int iDb){ |
| 106674 | +static void renameReloadSchema(Parse *pParse, int iDb, u16 p5){ |
| 106658 | 106675 | Vdbe *v = pParse->pVdbe; |
| 106659 | 106676 | if( v ){ |
| 106660 | 106677 | sqlite3ChangeCookie(pParse, iDb); |
| 106661 | | - sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0); |
| 106662 | | - if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0); |
| 106678 | + sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0, p5); |
| 106679 | + if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0, p5); |
| 106663 | 106680 | } |
| 106664 | 106681 | } |
| 106665 | 106682 | |
| 106666 | 106683 | /* |
| 106667 | 106684 | ** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" |
| | @@ -106806,11 +106823,11 @@ |
| 106806 | 106823 | sqlite3NestedParse(pParse, |
| 106807 | 106824 | "UPDATE sqlite_temp_schema SET " |
| 106808 | 106825 | "sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), " |
| 106809 | 106826 | "tbl_name = " |
| 106810 | 106827 | "CASE WHEN tbl_name=%Q COLLATE nocase AND " |
| 106811 | | - " sqlite_rename_test(%Q, sql, type, name, 1) " |
| 106828 | + " sqlite_rename_test(%Q, sql, type, name, 1, 'after rename') " |
| 106812 | 106829 | "THEN %Q ELSE tbl_name END " |
| 106813 | 106830 | "WHERE type IN ('view', 'trigger')" |
| 106814 | 106831 | , zDb, zTabName, zName, zTabName, zDb, zName); |
| 106815 | 106832 | } |
| 106816 | 106833 | |
| | @@ -106825,12 +106842,12 @@ |
| 106825 | 106842 | sqlite3VdbeLoadString(v, i, zName); |
| 106826 | 106843 | sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB); |
| 106827 | 106844 | } |
| 106828 | 106845 | #endif |
| 106829 | 106846 | |
| 106830 | | - renameReloadSchema(pParse, iDb); |
| 106831 | | - renameTestSchema(pParse, zDb, iDb==1); |
| 106847 | + renameReloadSchema(pParse, iDb, INITFLAG_AlterRename); |
| 106848 | + renameTestSchema(pParse, zDb, iDb==1, "after rename"); |
| 106832 | 106849 | |
| 106833 | 106850 | exit_rename_table: |
| 106834 | 106851 | sqlite3SrcListDelete(db, pSrc); |
| 106835 | 106852 | sqlite3DbFree(db, zName); |
| 106836 | 106853 | db->mDbFlags = savedDbFlags; |
| | @@ -106988,11 +107005,11 @@ |
| 106988 | 107005 | sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3); |
| 106989 | 107006 | sqlite3ReleaseTempReg(pParse, r1); |
| 106990 | 107007 | } |
| 106991 | 107008 | |
| 106992 | 107009 | /* Reload the table definition */ |
| 106993 | | - renameReloadSchema(pParse, iDb); |
| 107010 | + renameReloadSchema(pParse, iDb, INITFLAG_AlterRename); |
| 106994 | 107011 | } |
| 106995 | 107012 | |
| 106996 | 107013 | /* |
| 106997 | 107014 | ** This function is called by the parser after the table-name in |
| 106998 | 107015 | ** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument |
| | @@ -107088,11 +107105,11 @@ |
| 107088 | 107105 | ** it loads an error message into pParse and returns non-zero. |
| 107089 | 107106 | ** |
| 107090 | 107107 | ** Or, if pTab is not a view or virtual table, zero is returned. |
| 107091 | 107108 | */ |
| 107092 | 107109 | #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) |
| 107093 | | -static int isRealTable(Parse *pParse, Table *pTab){ |
| 107110 | +static int isRealTable(Parse *pParse, Table *pTab, int bDrop){ |
| 107094 | 107111 | const char *zType = 0; |
| 107095 | 107112 | #ifndef SQLITE_OMIT_VIEW |
| 107096 | 107113 | if( pTab->pSelect ){ |
| 107097 | 107114 | zType = "view"; |
| 107098 | 107115 | } |
| | @@ -107101,19 +107118,20 @@ |
| 107101 | 107118 | if( IsVirtual(pTab) ){ |
| 107102 | 107119 | zType = "virtual table"; |
| 107103 | 107120 | } |
| 107104 | 107121 | #endif |
| 107105 | 107122 | if( zType ){ |
| 107106 | | - sqlite3ErrorMsg( |
| 107107 | | - pParse, "cannot rename columns of %s \"%s\"", zType, pTab->zName |
| 107123 | + sqlite3ErrorMsg(pParse, "cannot %s %s \"%s\"", |
| 107124 | + (bDrop ? "drop column from" : "rename columns of"), |
| 107125 | + zType, pTab->zName |
| 107108 | 107126 | ); |
| 107109 | 107127 | return 1; |
| 107110 | 107128 | } |
| 107111 | 107129 | return 0; |
| 107112 | 107130 | } |
| 107113 | 107131 | #else /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */ |
| 107114 | | -# define isRealTable(x,y) (0) |
| 107132 | +# define isRealTable(x,y,z) (0) |
| 107115 | 107133 | #endif |
| 107116 | 107134 | |
| 107117 | 107135 | /* |
| 107118 | 107136 | ** Handles the following parser reduction: |
| 107119 | 107137 | ** |
| | @@ -107138,11 +107156,11 @@ |
| 107138 | 107156 | pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]); |
| 107139 | 107157 | if( !pTab ) goto exit_rename_column; |
| 107140 | 107158 | |
| 107141 | 107159 | /* Cannot alter a system table */ |
| 107142 | 107160 | if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_rename_column; |
| 107143 | | - if( SQLITE_OK!=isRealTable(pParse, pTab) ) goto exit_rename_column; |
| 107161 | + if( SQLITE_OK!=isRealTable(pParse, pTab, 0) ) goto exit_rename_column; |
| 107144 | 107162 | |
| 107145 | 107163 | /* Which schema holds the table to be altered */ |
| 107146 | 107164 | iSchema = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 107147 | 107165 | assert( iSchema>=0 ); |
| 107148 | 107166 | zDb = db->aDb[iSchema].zDbSName; |
| | @@ -107192,12 +107210,12 @@ |
| 107192 | 107210 | "WHERE type IN ('trigger', 'view')", |
| 107193 | 107211 | zDb, pTab->zName, iCol, zNew, bQuote |
| 107194 | 107212 | ); |
| 107195 | 107213 | |
| 107196 | 107214 | /* Drop and reload the database schema. */ |
| 107197 | | - renameReloadSchema(pParse, iSchema); |
| 107198 | | - renameTestSchema(pParse, zDb, iSchema==1); |
| 107215 | + renameReloadSchema(pParse, iSchema, INITFLAG_AlterRename); |
| 107216 | + renameTestSchema(pParse, zDb, iSchema==1, "after rename"); |
| 107199 | 107217 | |
| 107200 | 107218 | exit_rename_column: |
| 107201 | 107219 | sqlite3SrcListDelete(db, pSrc); |
| 107202 | 107220 | sqlite3DbFree(db, zOld); |
| 107203 | 107221 | sqlite3DbFree(db, zNew); |
| | @@ -107445,27 +107463,37 @@ |
| 107445 | 107463 | } |
| 107446 | 107464 | } |
| 107447 | 107465 | |
| 107448 | 107466 | /* |
| 107449 | 107467 | ** Search the Parse object passed as the first argument for a RenameToken |
| 107450 | | -** object associated with parse tree element pPtr. If found, remove it |
| 107451 | | -** from the Parse object and add it to the list maintained by the |
| 107452 | | -** RenameCtx object passed as the second argument. |
| 107468 | +** object associated with parse tree element pPtr. If found, return a pointer |
| 107469 | +** to it. Otherwise, return NULL. |
| 107470 | +** |
| 107471 | +** If the second argument passed to this function is not NULL and a matching |
| 107472 | +** RenameToken object is found, remove it from the Parse object and add it to |
| 107473 | +** the list maintained by the RenameCtx object. |
| 107453 | 107474 | */ |
| 107454 | | -static void renameTokenFind(Parse *pParse, struct RenameCtx *pCtx, void *pPtr){ |
| 107475 | +static RenameToken *renameTokenFind( |
| 107476 | + Parse *pParse, |
| 107477 | + struct RenameCtx *pCtx, |
| 107478 | + void *pPtr |
| 107479 | +){ |
| 107455 | 107480 | RenameToken **pp; |
| 107456 | 107481 | assert( pPtr!=0 ); |
| 107457 | 107482 | for(pp=&pParse->pRename; (*pp); pp=&(*pp)->pNext){ |
| 107458 | 107483 | if( (*pp)->p==pPtr ){ |
| 107459 | 107484 | RenameToken *pToken = *pp; |
| 107460 | | - *pp = pToken->pNext; |
| 107461 | | - pToken->pNext = pCtx->pList; |
| 107462 | | - pCtx->pList = pToken; |
| 107463 | | - pCtx->nList++; |
| 107464 | | - break; |
| 107485 | + if( pCtx ){ |
| 107486 | + *pp = pToken->pNext; |
| 107487 | + pToken->pNext = pCtx->pList; |
| 107488 | + pCtx->pList = pToken; |
| 107489 | + pCtx->nList++; |
| 107490 | + } |
| 107491 | + return pToken; |
| 107465 | 107492 | } |
| 107466 | 107493 | } |
| 107494 | + return 0; |
| 107467 | 107495 | } |
| 107468 | 107496 | |
| 107469 | 107497 | /* |
| 107470 | 107498 | ** This is a Walker select callback. It does nothing. It is only required |
| 107471 | 107499 | ** because without a dummy callback, sqlite3WalkExpr() and similar do not |
| | @@ -107532,21 +107560,21 @@ |
| 107532 | 107560 | ** sub-routine is currently stored in pParse->zErrMsg. This function |
| 107533 | 107561 | ** adds context to the error message and then stores it in pCtx. |
| 107534 | 107562 | */ |
| 107535 | 107563 | static void renameColumnParseError( |
| 107536 | 107564 | sqlite3_context *pCtx, |
| 107537 | | - int bPost, |
| 107565 | + const char *zWhen, |
| 107538 | 107566 | sqlite3_value *pType, |
| 107539 | 107567 | sqlite3_value *pObject, |
| 107540 | 107568 | Parse *pParse |
| 107541 | 107569 | ){ |
| 107542 | 107570 | const char *zT = (const char*)sqlite3_value_text(pType); |
| 107543 | 107571 | const char *zN = (const char*)sqlite3_value_text(pObject); |
| 107544 | 107572 | char *zErr; |
| 107545 | 107573 | |
| 107546 | | - zErr = sqlite3_mprintf("error in %s %s%s: %s", |
| 107547 | | - zT, zN, (bPost ? " after rename" : ""), |
| 107574 | + zErr = sqlite3_mprintf("error in %s %s%s%s: %s", |
| 107575 | + zT, zN, (zWhen[0] ? " " : ""), zWhen, |
| 107548 | 107576 | pParse->zErrMsg |
| 107549 | 107577 | ); |
| 107550 | 107578 | sqlite3_result_error(pCtx, zErr, -1); |
| 107551 | 107579 | sqlite3_free(zErr); |
| 107552 | 107580 | } |
| | @@ -107621,11 +107649,11 @@ |
| 107621 | 107649 | ** trigger object, the database must be corrupt. */ |
| 107622 | 107650 | memset(p, 0, sizeof(Parse)); |
| 107623 | 107651 | p->eParseMode = PARSE_MODE_RENAME; |
| 107624 | 107652 | p->db = db; |
| 107625 | 107653 | p->nQueryLoop = 1; |
| 107626 | | - rc = sqlite3RunParser(p, zSql, &zErr); |
| 107654 | + rc = zSql ? sqlite3RunParser(p, zSql, &zErr) : SQLITE_NOMEM; |
| 107627 | 107655 | assert( p->zErrMsg==0 ); |
| 107628 | 107656 | assert( rc!=SQLITE_OK || zErr==0 ); |
| 107629 | 107657 | p->zErrMsg = zErr; |
| 107630 | 107658 | if( db->mallocFailed ) rc = SQLITE_NOMEM; |
| 107631 | 107659 | if( rc==SQLITE_OK |
| | @@ -108048,11 +108076,11 @@ |
| 108048 | 108076 | rc = renameEditSql(context, &sCtx, zSql, zNew, bQuote); |
| 108049 | 108077 | |
| 108050 | 108078 | renameColumnFunc_done: |
| 108051 | 108079 | if( rc!=SQLITE_OK ){ |
| 108052 | 108080 | if( sParse.zErrMsg ){ |
| 108053 | | - renameColumnParseError(context, 0, argv[1], argv[2], &sParse); |
| 108081 | + renameColumnParseError(context, "", argv[1], argv[2], &sParse); |
| 108054 | 108082 | }else{ |
| 108055 | 108083 | sqlite3_result_error_code(context, rc); |
| 108056 | 108084 | } |
| 108057 | 108085 | } |
| 108058 | 108086 | |
| | @@ -108237,11 +108265,11 @@ |
| 108237 | 108265 | if( rc==SQLITE_OK ){ |
| 108238 | 108266 | rc = renameEditSql(context, &sCtx, zInput, zNew, bQuote); |
| 108239 | 108267 | } |
| 108240 | 108268 | if( rc!=SQLITE_OK ){ |
| 108241 | 108269 | if( sParse.zErrMsg ){ |
| 108242 | | - renameColumnParseError(context, 0, argv[1], argv[2], &sParse); |
| 108270 | + renameColumnParseError(context, "", argv[1], argv[2], &sParse); |
| 108243 | 108271 | }else{ |
| 108244 | 108272 | sqlite3_result_error_code(context, rc); |
| 108245 | 108273 | } |
| 108246 | 108274 | } |
| 108247 | 108275 | |
| | @@ -108266,10 +108294,11 @@ |
| 108266 | 108294 | ** 0: Database name ("main", "temp" etc.). |
| 108267 | 108295 | ** 1: SQL statement. |
| 108268 | 108296 | ** 2: Object type ("view", "table", "trigger" or "index"). |
| 108269 | 108297 | ** 3: Object name. |
| 108270 | 108298 | ** 4: True if object is from temp schema. |
| 108299 | +** 5: "when" part of error message. |
| 108271 | 108300 | ** |
| 108272 | 108301 | ** Unless it finds an error, this function normally returns NULL. However, it |
| 108273 | 108302 | ** returns integer value 1 if: |
| 108274 | 108303 | ** |
| 108275 | 108304 | ** * the SQL argument creates a trigger, and |
| | @@ -108283,10 +108312,11 @@ |
| 108283 | 108312 | sqlite3 *db = sqlite3_context_db_handle(context); |
| 108284 | 108313 | char const *zDb = (const char*)sqlite3_value_text(argv[0]); |
| 108285 | 108314 | char const *zInput = (const char*)sqlite3_value_text(argv[1]); |
| 108286 | 108315 | int bTemp = sqlite3_value_int(argv[4]); |
| 108287 | 108316 | int isLegacy = (db->flags & SQLITE_LegacyAlter); |
| 108317 | + char const *zWhen = (const char*)sqlite3_value_text(argv[5]); |
| 108288 | 108318 | |
| 108289 | 108319 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| 108290 | 108320 | sqlite3_xauth xAuth = db->xAuth; |
| 108291 | 108321 | db->xAuth = 0; |
| 108292 | 108322 | #endif |
| | @@ -108315,29 +108345,222 @@ |
| 108315 | 108345 | if( i1==i2 ) sqlite3_result_int(context, 1); |
| 108316 | 108346 | } |
| 108317 | 108347 | } |
| 108318 | 108348 | } |
| 108319 | 108349 | |
| 108320 | | - if( rc!=SQLITE_OK ){ |
| 108321 | | - renameColumnParseError(context, 1, argv[2], argv[3], &sParse); |
| 108350 | + if( rc!=SQLITE_OK && zWhen ){ |
| 108351 | + renameColumnParseError(context, zWhen, argv[2], argv[3],&sParse); |
| 108322 | 108352 | } |
| 108323 | 108353 | renameParseCleanup(&sParse); |
| 108324 | 108354 | } |
| 108325 | 108355 | |
| 108326 | 108356 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| 108327 | 108357 | db->xAuth = xAuth; |
| 108328 | 108358 | #endif |
| 108329 | 108359 | } |
| 108360 | + |
| 108361 | +/* |
| 108362 | +** The implementation of internal UDF sqlite_drop_column(). |
| 108363 | +** |
| 108364 | +** Arguments: |
| 108365 | +** |
| 108366 | +** argv[0]: An integer - the index of the schema containing the table |
| 108367 | +** argv[1]: CREATE TABLE statement to modify. |
| 108368 | +** argv[2]: An integer - the index of the column to remove. |
| 108369 | +** argv[3]: Byte offset of first byte after last column definition in argv[1] |
| 108370 | +** |
| 108371 | +** The value returned is a string containing the CREATE TABLE statement |
| 108372 | +** with column argv[2] removed. |
| 108373 | +*/ |
| 108374 | +static void dropColumnFunc( |
| 108375 | + sqlite3_context *context, |
| 108376 | + int NotUsed, |
| 108377 | + sqlite3_value **argv |
| 108378 | +){ |
| 108379 | + sqlite3 *db = sqlite3_context_db_handle(context); |
| 108380 | + int iSchema = sqlite3_value_int(argv[0]); |
| 108381 | + const char *zSql = (const char*)sqlite3_value_text(argv[1]); |
| 108382 | + int iCol = sqlite3_value_int(argv[2]); |
| 108383 | + int iAddColOffset = sqlite3_value_int(argv[3]); |
| 108384 | + const char *zDb = db->aDb[iSchema].zDbSName; |
| 108385 | + int rc; |
| 108386 | + Parse sParse; |
| 108387 | + RenameToken *pCol; |
| 108388 | + Table *pTab; |
| 108389 | + const char *zEnd; |
| 108390 | + char *zNew = 0; |
| 108391 | + |
| 108392 | +#ifndef SQLITE_OMIT_AUTHORIZATION |
| 108393 | + sqlite3_xauth xAuth = db->xAuth; |
| 108394 | + db->xAuth = 0; |
| 108395 | +#endif |
| 108396 | + |
| 108397 | + rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1); |
| 108398 | + if( rc!=SQLITE_OK ) goto drop_column_done; |
| 108399 | + pTab = sParse.pNewTable; |
| 108400 | + if( iCol>=pTab->nCol ){ |
| 108401 | + /* This can happen if the sqlite_schema table is corrupt */ |
| 108402 | + rc = SQLITE_CORRUPT_BKPT; |
| 108403 | + goto drop_column_done; |
| 108404 | + } |
| 108405 | + |
| 108406 | + pCol = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol].zName); |
| 108407 | + if( iCol<pTab->nCol-1 ){ |
| 108408 | + RenameToken *pEnd; |
| 108409 | + pEnd = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol+1].zName); |
| 108410 | + zEnd = (const char*)pEnd->t.z; |
| 108411 | + }else{ |
| 108412 | + zEnd = (const char*)&zSql[iAddColOffset]; |
| 108413 | + while( ALWAYS(pCol->t.z[0]!=0) && pCol->t.z[0]!=',' ) pCol->t.z--; |
| 108414 | + } |
| 108415 | + |
| 108416 | + zNew = sqlite3MPrintf(db, "%.*s%s", pCol->t.z-zSql, zSql, zEnd); |
| 108417 | + sqlite3_result_text(context, zNew, -1, SQLITE_TRANSIENT); |
| 108418 | + sqlite3_free(zNew); |
| 108419 | + |
| 108420 | +drop_column_done: |
| 108421 | + renameParseCleanup(&sParse); |
| 108422 | +#ifndef SQLITE_OMIT_AUTHORIZATION |
| 108423 | + db->xAuth = xAuth; |
| 108424 | +#endif |
| 108425 | + if( rc!=SQLITE_OK ){ |
| 108426 | + sqlite3_result_error_code(context, rc); |
| 108427 | + } |
| 108428 | +} |
| 108429 | + |
| 108430 | +/* |
| 108431 | +** This function is called by the parser upon parsing an |
| 108432 | +** |
| 108433 | +** ALTER TABLE pSrc DROP COLUMN pName |
| 108434 | +** |
| 108435 | +** statement. Argument pSrc contains the possibly qualified name of the |
| 108436 | +** table being edited, and token pName the name of the column to drop. |
| 108437 | +*/ |
| 108438 | +SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *pName){ |
| 108439 | + sqlite3 *db = pParse->db; /* Database handle */ |
| 108440 | + Table *pTab; /* Table to modify */ |
| 108441 | + int iDb; /* Index of db containing pTab in aDb[] */ |
| 108442 | + const char *zDb; /* Database containing pTab ("main" etc.) */ |
| 108443 | + char *zCol = 0; /* Name of column to drop */ |
| 108444 | + int iCol; /* Index of column zCol in pTab->aCol[] */ |
| 108445 | + |
| 108446 | + /* Look up the table being altered. */ |
| 108447 | + assert( pParse->pNewTable==0 ); |
| 108448 | + assert( sqlite3BtreeHoldsAllMutexes(db) ); |
| 108449 | + if( NEVER(db->mallocFailed) ) goto exit_drop_column; |
| 108450 | + pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]); |
| 108451 | + if( !pTab ) goto exit_drop_column; |
| 108452 | + |
| 108453 | + /* Make sure this is not an attempt to ALTER a view, virtual table or |
| 108454 | + ** system table. */ |
| 108455 | + if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_drop_column; |
| 108456 | + if( SQLITE_OK!=isRealTable(pParse, pTab, 1) ) goto exit_drop_column; |
| 108457 | + |
| 108458 | + /* Find the index of the column being dropped. */ |
| 108459 | + zCol = sqlite3NameFromToken(db, pName); |
| 108460 | + if( zCol==0 ){ |
| 108461 | + assert( db->mallocFailed ); |
| 108462 | + goto exit_drop_column; |
| 108463 | + } |
| 108464 | + iCol = sqlite3ColumnIndex(pTab, zCol); |
| 108465 | + if( iCol<0 ){ |
| 108466 | + sqlite3ErrorMsg(pParse, "no such column: \"%s\"", zCol); |
| 108467 | + goto exit_drop_column; |
| 108468 | + } |
| 108469 | + |
| 108470 | + /* Do not allow the user to drop a PRIMARY KEY column or a column |
| 108471 | + ** constrained by a UNIQUE constraint. */ |
| 108472 | + if( pTab->aCol[iCol].colFlags & (COLFLAG_PRIMKEY|COLFLAG_UNIQUE) ){ |
| 108473 | + sqlite3ErrorMsg(pParse, "cannot drop %s column: \"%s\"", |
| 108474 | + (pTab->aCol[iCol].colFlags&COLFLAG_PRIMKEY) ? "PRIMARY KEY" : "UNIQUE", |
| 108475 | + zCol |
| 108476 | + ); |
| 108477 | + goto exit_drop_column; |
| 108478 | + } |
| 108479 | + |
| 108480 | + /* Do not allow the number of columns to go to zero */ |
| 108481 | + if( pTab->nCol<=1 ){ |
| 108482 | + sqlite3ErrorMsg(pParse, "cannot drop column \"%s\": no other columns exist",zCol); |
| 108483 | + goto exit_drop_column; |
| 108484 | + } |
| 108485 | + |
| 108486 | + /* Edit the sqlite_schema table */ |
| 108487 | + iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 108488 | + assert( iDb>=0 ); |
| 108489 | + zDb = db->aDb[iDb].zDbSName; |
| 108490 | + renameTestSchema(pParse, zDb, iDb==1, ""); |
| 108491 | + sqlite3NestedParse(pParse, |
| 108492 | + "UPDATE \"%w\"." DFLT_SCHEMA_TABLE " SET " |
| 108493 | + "sql = sqlite_drop_column(%d, sql, %d, %d) " |
| 108494 | + "WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)" |
| 108495 | + , zDb, iDb, iCol, pTab->addColOffset, pTab->zName |
| 108496 | + ); |
| 108497 | + |
| 108498 | + /* Drop and reload the database schema. */ |
| 108499 | + renameReloadSchema(pParse, iDb, INITFLAG_AlterDrop); |
| 108500 | + renameTestSchema(pParse, zDb, iDb==1, "after drop column"); |
| 108501 | + |
| 108502 | + /* Edit rows of table on disk */ |
| 108503 | + if( pParse->nErr==0 && (pTab->aCol[iCol].colFlags & COLFLAG_VIRTUAL)==0 ){ |
| 108504 | + int i; |
| 108505 | + int addr; |
| 108506 | + int reg; |
| 108507 | + int regRec; |
| 108508 | + Index *pPk = 0; |
| 108509 | + int nField = 0; /* Number of non-virtual columns after drop */ |
| 108510 | + int iCur; |
| 108511 | + Vdbe *v = sqlite3GetVdbe(pParse); |
| 108512 | + iCur = pParse->nTab++; |
| 108513 | + sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite); |
| 108514 | + addr = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v); |
| 108515 | + reg = ++pParse->nMem; |
| 108516 | + pParse->nMem += pTab->nCol; |
| 108517 | + if( HasRowid(pTab) ){ |
| 108518 | + sqlite3VdbeAddOp2(v, OP_Rowid, iCur, reg); |
| 108519 | + }else{ |
| 108520 | + pPk = sqlite3PrimaryKeyIndex(pTab); |
| 108521 | + } |
| 108522 | + for(i=0; i<pTab->nCol; i++){ |
| 108523 | + if( i!=iCol && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){ |
| 108524 | + int regOut; |
| 108525 | + if( pPk ){ |
| 108526 | + int iPos = sqlite3TableColumnToIndex(pPk, i); |
| 108527 | + int iColPos = sqlite3TableColumnToIndex(pPk, iCol); |
| 108528 | + regOut = reg+1+iPos-(iPos>iColPos); |
| 108529 | + }else{ |
| 108530 | + regOut = reg+1+nField; |
| 108531 | + } |
| 108532 | + sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOut); |
| 108533 | + nField++; |
| 108534 | + } |
| 108535 | + } |
| 108536 | + regRec = reg + pTab->nCol; |
| 108537 | + sqlite3VdbeAddOp3(v, OP_MakeRecord, reg+1, nField, regRec); |
| 108538 | + if( pPk ){ |
| 108539 | + sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iCur, regRec, reg+1, pPk->nKeyCol); |
| 108540 | + }else{ |
| 108541 | + sqlite3VdbeAddOp3(v, OP_Insert, iCur, regRec, reg); |
| 108542 | + } |
| 108543 | + |
| 108544 | + sqlite3VdbeAddOp2(v, OP_Next, iCur, addr+1); VdbeCoverage(v); |
| 108545 | + sqlite3VdbeJumpHere(v, addr); |
| 108546 | + } |
| 108547 | + |
| 108548 | +exit_drop_column: |
| 108549 | + sqlite3DbFree(db, zCol); |
| 108550 | + sqlite3SrcListDelete(db, pSrc); |
| 108551 | +} |
| 108330 | 108552 | |
| 108331 | 108553 | /* |
| 108332 | 108554 | ** Register built-in functions used to help implement ALTER TABLE |
| 108333 | 108555 | */ |
| 108334 | 108556 | SQLITE_PRIVATE void sqlite3AlterFunctions(void){ |
| 108335 | 108557 | static FuncDef aAlterTableFuncs[] = { |
| 108336 | | - INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc), |
| 108337 | | - INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc), |
| 108338 | | - INTERNAL_FUNCTION(sqlite_rename_test, 5, renameTableTest), |
| 108558 | + INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc), |
| 108559 | + INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc), |
| 108560 | + INTERNAL_FUNCTION(sqlite_rename_test, 6, renameTableTest), |
| 108561 | + INTERNAL_FUNCTION(sqlite_drop_column, 4, dropColumnFunc), |
| 108339 | 108562 | }; |
| 108340 | 108563 | sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs)); |
| 108341 | 108564 | } |
| 108342 | 108565 | #endif /* SQLITE_ALTER_TABLE */ |
| 108343 | 108566 | |
| | @@ -111318,16 +111541,18 @@ |
| 111318 | 111541 | int i; |
| 111319 | 111542 | int reg; |
| 111320 | 111543 | |
| 111321 | 111544 | addrRewind = |
| 111322 | 111545 | sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur); |
| 111546 | + VdbeCoverage(v); |
| 111323 | 111547 | reg = pReturning->iRetReg; |
| 111324 | 111548 | for(i=0; i<pReturning->nRetCol; i++){ |
| 111325 | 111549 | sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i); |
| 111326 | 111550 | } |
| 111327 | 111551 | sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i); |
| 111328 | 111552 | sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1); |
| 111553 | + VdbeCoverage(v); |
| 111329 | 111554 | sqlite3VdbeJumpHere(v, addrRewind); |
| 111330 | 111555 | } |
| 111331 | 111556 | sqlite3VdbeAddOp0(v, OP_Halt); |
| 111332 | 111557 | |
| 111333 | 111558 | #if SQLITE_USER_AUTHENTICATION |
| | @@ -112417,10 +112642,11 @@ |
| 112417 | 112642 | */ |
| 112418 | 112643 | #if SQLITE_ENABLE_HIDDEN_COLUMNS |
| 112419 | 112644 | SQLITE_PRIVATE void sqlite3ColumnPropertiesFromName(Table *pTab, Column *pCol){ |
| 112420 | 112645 | if( sqlite3_strnicmp(pCol->zName, "__hidden__", 10)==0 ){ |
| 112421 | 112646 | pCol->colFlags |= COLFLAG_HIDDEN; |
| 112647 | + if( pTab ) pTab->tabFlags |= TF_HasHidden; |
| 112422 | 112648 | }else if( pTab && pCol!=pTab->aCol && (pCol[-1].colFlags & COLFLAG_HIDDEN) ){ |
| 112423 | 112649 | pTab->tabFlags |= TF_OOOHidden; |
| 112424 | 112650 | } |
| 112425 | 112651 | } |
| 112426 | 112652 | #endif |
| | @@ -112461,11 +112687,15 @@ |
| 112461 | 112687 | */ |
| 112462 | 112688 | SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ |
| 112463 | 112689 | Returning *pRet; |
| 112464 | 112690 | Hash *pHash; |
| 112465 | 112691 | sqlite3 *db = pParse->db; |
| 112466 | | - assert( !pParse->bReturning ); |
| 112692 | + if( pParse->pNewTrigger ){ |
| 112693 | + sqlite3ErrorMsg(pParse, "cannot use RETURNING in a trigger"); |
| 112694 | + }else{ |
| 112695 | + assert( pParse->bReturning==0 ); |
| 112696 | + } |
| 112467 | 112697 | pParse->bReturning = 1; |
| 112468 | 112698 | pRet = sqlite3DbMallocZero(db, sizeof(*pRet)); |
| 112469 | 112699 | if( pRet==0 ){ |
| 112470 | 112700 | sqlite3ExprListDelete(db, pList); |
| 112471 | 112701 | return; |
| | @@ -112484,11 +112714,11 @@ |
| 112484 | 112714 | pRet->retTrig.step_list = &pRet->retTStep; |
| 112485 | 112715 | pRet->retTStep.op = TK_RETURNING; |
| 112486 | 112716 | pRet->retTStep.pTrig = &pRet->retTrig; |
| 112487 | 112717 | pRet->retTStep.pExprList = pList; |
| 112488 | 112718 | pHash = &(db->aDb[1].pSchema->trigHash); |
| 112489 | | - assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 ); |
| 112719 | + assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 || pParse->nErr ); |
| 112490 | 112720 | if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig) |
| 112491 | 112721 | ==&pRet->retTrig ){ |
| 112492 | 112722 | sqlite3OomFault(db); |
| 112493 | 112723 | } |
| 112494 | 112724 | } |
| | @@ -113789,11 +114019,11 @@ |
| 113789 | 114019 | } |
| 113790 | 114020 | #endif |
| 113791 | 114021 | |
| 113792 | 114022 | /* Reparse everything to update our internal data structures */ |
| 113793 | 114023 | sqlite3VdbeAddParseSchemaOp(v, iDb, |
| 113794 | | - sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName)); |
| 114024 | + sqlite3MPrintf(db, "tbl_name='%q' AND type!='trigger'", p->zName),0); |
| 113795 | 114025 | } |
| 113796 | 114026 | |
| 113797 | 114027 | /* Add the table to the in-memory representation of the database. |
| 113798 | 114028 | */ |
| 113799 | 114029 | if( db->init.busy ){ |
| | @@ -115277,11 +115507,11 @@ |
| 115277 | 115507 | */ |
| 115278 | 115508 | if( pTblName ){ |
| 115279 | 115509 | sqlite3RefillIndex(pParse, pIndex, iMem); |
| 115280 | 115510 | sqlite3ChangeCookie(pParse, iDb); |
| 115281 | 115511 | sqlite3VdbeAddParseSchemaOp(v, iDb, |
| 115282 | | - sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName)); |
| 115512 | + sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName), 0); |
| 115283 | 115513 | sqlite3VdbeAddOp2(v, OP_Expire, 0, 1); |
| 115284 | 115514 | } |
| 115285 | 115515 | |
| 115286 | 115516 | sqlite3VdbeJumpHere(v, (int)pIndex->tnum); |
| 115287 | 115517 | } |
| | @@ -118623,11 +118853,12 @@ |
| 118623 | 118853 | while( (c = Utf8Read(zPattern))!=0 ){ |
| 118624 | 118854 | if( c==matchAll ){ /* Match "*" */ |
| 118625 | 118855 | /* Skip over multiple "*" characters in the pattern. If there |
| 118626 | 118856 | ** are also "?" characters, skip those as well, but consume a |
| 118627 | 118857 | ** single character of the input string for each "?" skipped */ |
| 118628 | | - while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){ |
| 118858 | + while( (c=Utf8Read(zPattern)) == matchAll |
| 118859 | + || (c == matchOne && matchOne!=0) ){ |
| 118629 | 118860 | if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){ |
| 118630 | 118861 | return SQLITE_NOWILDCARDMATCH; |
| 118631 | 118862 | } |
| 118632 | 118863 | } |
| 118633 | 118864 | if( c==0 ){ |
| | @@ -122603,23 +122834,28 @@ |
| 122603 | 122834 | ipkColumn--; |
| 122604 | 122835 | } |
| 122605 | 122836 | } |
| 122606 | 122837 | } |
| 122607 | 122838 | #endif |
| 122608 | | - } |
| 122609 | | - |
| 122610 | | - /* Make sure the number of columns in the source data matches the number |
| 122611 | | - ** of columns to be inserted into the table. |
| 122612 | | - */ |
| 122613 | | - for(i=0; i<pTab->nCol; i++){ |
| 122614 | | - if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++; |
| 122615 | | - } |
| 122616 | | - if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){ |
| 122617 | | - sqlite3ErrorMsg(pParse, |
| 122618 | | - "table %S has %d columns but %d values were supplied", |
| 122619 | | - pTabList, 0, pTab->nCol-nHidden, nColumn); |
| 122620 | | - goto insert_cleanup; |
| 122839 | + |
| 122840 | + /* Make sure the number of columns in the source data matches the number |
| 122841 | + ** of columns to be inserted into the table. |
| 122842 | + */ |
| 122843 | + assert( TF_HasHidden==COLFLAG_HIDDEN ); |
| 122844 | + assert( TF_HasGenerated==COLFLAG_GENERATED ); |
| 122845 | + assert( COLFLAG_NOINSERT==(COLFLAG_GENERATED|COLFLAG_HIDDEN) ); |
| 122846 | + if( (pTab->tabFlags & (TF_HasGenerated|TF_HasHidden))!=0 ){ |
| 122847 | + for(i=0; i<pTab->nCol; i++){ |
| 122848 | + if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++; |
| 122849 | + } |
| 122850 | + } |
| 122851 | + if( nColumn!=(pTab->nCol-nHidden) ){ |
| 122852 | + sqlite3ErrorMsg(pParse, |
| 122853 | + "table %S has %d columns but %d values were supplied", |
| 122854 | + pTabList, 0, pTab->nCol-nHidden, nColumn); |
| 122855 | + goto insert_cleanup; |
| 122856 | + } |
| 122621 | 122857 | } |
| 122622 | 122858 | if( pColumn!=0 && nColumn!=pColumn->nId ){ |
| 122623 | 122859 | sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId); |
| 122624 | 122860 | goto insert_cleanup; |
| 122625 | 122861 | } |
| | @@ -124078,10 +124314,36 @@ |
| 124078 | 124314 | } |
| 124079 | 124315 | sqlite3VdbeChangeP5(v, i+1); |
| 124080 | 124316 | } |
| 124081 | 124317 | #endif |
| 124082 | 124318 | |
| 124319 | +/* |
| 124320 | +** Table pTab is a WITHOUT ROWID table that is being written to. The cursor |
| 124321 | +** number is iCur, and register regData contains the new record for the |
| 124322 | +** PK index. This function adds code to invoke the pre-update hook, |
| 124323 | +** if one is registered. |
| 124324 | +*/ |
| 124325 | +#ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 124326 | +static void codeWithoutRowidPreupdate( |
| 124327 | + Parse *pParse, /* Parse context */ |
| 124328 | + Table *pTab, /* Table being updated */ |
| 124329 | + int iCur, /* Cursor number for table */ |
| 124330 | + int regData /* Data containing new record */ |
| 124331 | +){ |
| 124332 | + Vdbe *v = pParse->pVdbe; |
| 124333 | + int r = sqlite3GetTempReg(pParse); |
| 124334 | + assert( !HasRowid(pTab) ); |
| 124335 | + assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) ); |
| 124336 | + sqlite3VdbeAddOp2(v, OP_Integer, 0, r); |
| 124337 | + sqlite3VdbeAddOp4(v, OP_Insert, iCur, regData, r, (char*)pTab, P4_TABLE); |
| 124338 | + sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP); |
| 124339 | + sqlite3ReleaseTempReg(pParse, r); |
| 124340 | +} |
| 124341 | +#else |
| 124342 | +# define codeWithoutRowidPreupdate(a,b,c,d) |
| 124343 | +#endif |
| 124344 | + |
| 124083 | 124345 | /* |
| 124084 | 124346 | ** This routine generates code to finish the INSERT or UPDATE operation |
| 124085 | 124347 | ** that was started by a prior call to sqlite3GenerateConstraintChecks. |
| 124086 | 124348 | ** A consecutive range of registers starting at regNewData contains the |
| 124087 | 124349 | ** rowid and the content to be inserted. |
| | @@ -124126,21 +124388,13 @@ |
| 124126 | 124388 | pik_flags = (useSeekResult ? OPFLAG_USESEEKRESULT : 0); |
| 124127 | 124389 | if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ |
| 124128 | 124390 | assert( pParse->nested==0 ); |
| 124129 | 124391 | pik_flags |= OPFLAG_NCHANGE; |
| 124130 | 124392 | pik_flags |= (update_flags & OPFLAG_SAVEPOSITION); |
| 124131 | | -#ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 124132 | 124393 | if( update_flags==0 ){ |
| 124133 | | - int r = sqlite3GetTempReg(pParse); |
| 124134 | | - sqlite3VdbeAddOp2(v, OP_Integer, 0, r); |
| 124135 | | - sqlite3VdbeAddOp4(v, OP_Insert, |
| 124136 | | - iIdxCur+i, aRegIdx[i], r, (char*)pTab, P4_TABLE |
| 124137 | | - ); |
| 124138 | | - sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP); |
| 124139 | | - sqlite3ReleaseTempReg(pParse, r); |
| 124140 | | - } |
| 124141 | | -#endif |
| 124394 | + codeWithoutRowidPreupdate(pParse, pTab, iIdxCur+i, aRegIdx[i]); |
| 124395 | + } |
| 124142 | 124396 | } |
| 124143 | 124397 | sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iIdxCur+i, aRegIdx[i], |
| 124144 | 124398 | aRegIdx[i]+1, |
| 124145 | 124399 | pIdx->uniqNotNull ? pIdx->nKeyCol: pIdx->nColumn); |
| 124146 | 124400 | sqlite3VdbeChangeP5(v, pik_flags); |
| | @@ -124609,20 +124863,22 @@ |
| 124609 | 124863 | insFlags = OPFLAG_APPEND|OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT; |
| 124610 | 124864 | }else{ |
| 124611 | 124865 | insFlags = OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND|OPFLAG_PREFORMAT; |
| 124612 | 124866 | } |
| 124613 | 124867 | #ifdef SQLITE_ENABLE_PREUPDATE_HOOK |
| 124614 | | - if( db->xPreUpdateCallback ){ |
| 124868 | + if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){ |
| 124615 | 124869 | sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1); |
| 124616 | 124870 | insFlags &= ~OPFLAG_PREFORMAT; |
| 124617 | 124871 | }else |
| 124618 | 124872 | #endif |
| 124619 | 124873 | { |
| 124620 | 124874 | sqlite3VdbeAddOp3(v, OP_RowCell, iDest, iSrc, regRowid); |
| 124621 | 124875 | } |
| 124622 | | - sqlite3VdbeAddOp4(v, OP_Insert, iDest, regData, regRowid, |
| 124623 | | - (char*)pDest, P4_TABLE); |
| 124876 | + sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid); |
| 124877 | + if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){ |
| 124878 | + sqlite3VdbeChangeP4(v, -1, (char*)pDest, P4_TABLE); |
| 124879 | + } |
| 124624 | 124880 | sqlite3VdbeChangeP5(v, insFlags); |
| 124625 | 124881 | |
| 124626 | 124882 | sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1); VdbeCoverage(v); |
| 124627 | 124883 | sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0); |
| 124628 | 124884 | sqlite3VdbeAddOp2(v, OP_Close, iDest, 0); |
| | @@ -124671,10 +124927,16 @@ |
| 124671 | 124927 | }else if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){ |
| 124672 | 124928 | idxInsFlags |= OPFLAG_NCHANGE; |
| 124673 | 124929 | } |
| 124674 | 124930 | if( idxInsFlags!=(OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT) ){ |
| 124675 | 124931 | sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1); |
| 124932 | + if( (db->mDbFlags & DBFLAG_Vacuum)==0 |
| 124933 | + && !HasRowid(pDest) |
| 124934 | + && IsPrimaryKeyIndex(pDestIdx) |
| 124935 | + ){ |
| 124936 | + codeWithoutRowidPreupdate(pParse, pDest, iDest, regData); |
| 124937 | + } |
| 124676 | 124938 | } |
| 124677 | 124939 | sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData); |
| 124678 | 124940 | sqlite3VdbeChangeP5(v, idxInsFlags|OPFLAG_APPEND); |
| 124679 | 124941 | sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v); |
| 124680 | 124942 | sqlite3VdbeJumpHere(v, addr1); |
| | @@ -129635,26 +129897,30 @@ |
| 129635 | 129897 | ** Fill the InitData structure with an error message that indicates |
| 129636 | 129898 | ** that the database is corrupt. |
| 129637 | 129899 | */ |
| 129638 | 129900 | static void corruptSchema( |
| 129639 | 129901 | InitData *pData, /* Initialization context */ |
| 129640 | | - const char *zObj, /* Object being parsed at the point of error */ |
| 129902 | + char **azObj, /* Type and name of object being parsed */ |
| 129641 | 129903 | const char *zExtra /* Error information */ |
| 129642 | 129904 | ){ |
| 129643 | 129905 | sqlite3 *db = pData->db; |
| 129644 | 129906 | if( db->mallocFailed ){ |
| 129645 | 129907 | pData->rc = SQLITE_NOMEM_BKPT; |
| 129646 | 129908 | }else if( pData->pzErrMsg[0]!=0 ){ |
| 129647 | 129909 | /* A error message has already been generated. Do not overwrite it */ |
| 129648 | | - }else if( pData->mInitFlags & INITFLAG_AlterTable ){ |
| 129649 | | - *pData->pzErrMsg = sqlite3DbStrDup(db, zExtra); |
| 129910 | + }else if( pData->mInitFlags & (INITFLAG_AlterRename|INITFLAG_AlterDrop) ){ |
| 129911 | + *pData->pzErrMsg = sqlite3MPrintf(db, |
| 129912 | + "error in %s %s after %s: %s", azObj[0], azObj[1], |
| 129913 | + (pData->mInitFlags & INITFLAG_AlterRename) ? "rename" : "drop column", |
| 129914 | + zExtra |
| 129915 | + ); |
| 129650 | 129916 | pData->rc = SQLITE_ERROR; |
| 129651 | 129917 | }else if( db->flags & SQLITE_WriteSchema ){ |
| 129652 | 129918 | pData->rc = SQLITE_CORRUPT_BKPT; |
| 129653 | 129919 | }else{ |
| 129654 | 129920 | char *z; |
| 129655 | | - if( zObj==0 ) zObj = "?"; |
| 129921 | + const char *zObj = azObj[1] ? azObj[1] : "?"; |
| 129656 | 129922 | z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj); |
| 129657 | 129923 | if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); |
| 129658 | 129924 | *pData->pzErrMsg = z; |
| 129659 | 129925 | pData->rc = SQLITE_CORRUPT_BKPT; |
| 129660 | 129926 | } |
| | @@ -129708,18 +129974,18 @@ |
| 129708 | 129974 | UNUSED_PARAMETER2(NotUsed, argc); |
| 129709 | 129975 | assert( sqlite3_mutex_held(db->mutex) ); |
| 129710 | 129976 | db->mDbFlags |= DBFLAG_EncodingFixed; |
| 129711 | 129977 | pData->nInitRow++; |
| 129712 | 129978 | if( db->mallocFailed ){ |
| 129713 | | - corruptSchema(pData, argv[1], 0); |
| 129979 | + corruptSchema(pData, argv, 0); |
| 129714 | 129980 | return 1; |
| 129715 | 129981 | } |
| 129716 | 129982 | |
| 129717 | 129983 | assert( iDb>=0 && iDb<db->nDb ); |
| 129718 | 129984 | if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */ |
| 129719 | 129985 | if( argv[3]==0 ){ |
| 129720 | | - corruptSchema(pData, argv[1], 0); |
| 129986 | + corruptSchema(pData, argv, 0); |
| 129721 | 129987 | }else if( argv[4] |
| 129722 | 129988 | && 'c'==sqlite3UpperToLower[(unsigned char)argv[4][0]] |
| 129723 | 129989 | && 'r'==sqlite3UpperToLower[(unsigned char)argv[4][1]] ){ |
| 129724 | 129990 | /* Call the parser to process a CREATE TABLE, INDEX or VIEW. |
| 129725 | 129991 | ** But because db->init.busy is set to 1, no VDBE code is generated |
| | @@ -129740,11 +130006,11 @@ |
| 129740 | 130006 | db->init.iDb = iDb; |
| 129741 | 130007 | if( sqlite3GetUInt32(argv[3], &db->init.newTnum)==0 |
| 129742 | 130008 | || (db->init.newTnum>pData->mxPage && pData->mxPage>0) |
| 129743 | 130009 | ){ |
| 129744 | 130010 | if( sqlite3Config.bExtraSchemaChecks ){ |
| 129745 | | - corruptSchema(pData, argv[1], "invalid rootpage"); |
| 130011 | + corruptSchema(pData, argv, "invalid rootpage"); |
| 129746 | 130012 | } |
| 129747 | 130013 | } |
| 129748 | 130014 | db->init.orphanTrigger = 0; |
| 129749 | 130015 | db->init.azInit = argv; |
| 129750 | 130016 | pStmt = 0; |
| | @@ -129759,17 +130025,17 @@ |
| 129759 | 130025 | }else{ |
| 129760 | 130026 | if( rc > pData->rc ) pData->rc = rc; |
| 129761 | 130027 | if( rc==SQLITE_NOMEM ){ |
| 129762 | 130028 | sqlite3OomFault(db); |
| 129763 | 130029 | }else if( rc!=SQLITE_INTERRUPT && (rc&0xFF)!=SQLITE_LOCKED ){ |
| 129764 | | - corruptSchema(pData, argv[1], sqlite3_errmsg(db)); |
| 130030 | + corruptSchema(pData, argv, sqlite3_errmsg(db)); |
| 129765 | 130031 | } |
| 129766 | 130032 | } |
| 129767 | 130033 | } |
| 129768 | 130034 | sqlite3_finalize(pStmt); |
| 129769 | 130035 | }else if( argv[1]==0 || (argv[4]!=0 && argv[4][0]!=0) ){ |
| 129770 | | - corruptSchema(pData, argv[1], 0); |
| 130036 | + corruptSchema(pData, argv, 0); |
| 129771 | 130037 | }else{ |
| 129772 | 130038 | /* If the SQL column is blank it means this is an index that |
| 129773 | 130039 | ** was created to be the PRIMARY KEY or to fulfill a UNIQUE |
| 129774 | 130040 | ** constraint for a CREATE TABLE. The index should have already |
| 129775 | 130041 | ** been created when we processed the CREATE TABLE. All we have |
| | @@ -129776,19 +130042,19 @@ |
| 129776 | 130042 | ** to do here is record the root page number for that index. |
| 129777 | 130043 | */ |
| 129778 | 130044 | Index *pIndex; |
| 129779 | 130045 | pIndex = sqlite3FindIndex(db, argv[1], db->aDb[iDb].zDbSName); |
| 129780 | 130046 | if( pIndex==0 ){ |
| 129781 | | - corruptSchema(pData, argv[1], "orphan index"); |
| 130047 | + corruptSchema(pData, argv, "orphan index"); |
| 129782 | 130048 | }else |
| 129783 | 130049 | if( sqlite3GetUInt32(argv[3],&pIndex->tnum)==0 |
| 129784 | 130050 | || pIndex->tnum<2 |
| 129785 | 130051 | || pIndex->tnum>pData->mxPage |
| 129786 | 130052 | || sqlite3IndexHasDuplicateRootPage(pIndex) |
| 129787 | 130053 | ){ |
| 129788 | 130054 | if( sqlite3Config.bExtraSchemaChecks ){ |
| 129789 | | - corruptSchema(pData, argv[1], "invalid rootpage"); |
| 130055 | + corruptSchema(pData, argv, "invalid rootpage"); |
| 129790 | 130056 | } |
| 129791 | 130057 | } |
| 129792 | 130058 | } |
| 129793 | 130059 | return 0; |
| 129794 | 130060 | } |
| | @@ -130164,35 +130430,20 @@ |
| 130164 | 130430 | assert( i>=0 && i<db->nDb ); |
| 130165 | 130431 | } |
| 130166 | 130432 | return i; |
| 130167 | 130433 | } |
| 130168 | 130434 | |
| 130169 | | -/* |
| 130170 | | -** Deallocate a single AggInfo object |
| 130171 | | -*/ |
| 130172 | | -static void agginfoFree(sqlite3 *db, AggInfo *p){ |
| 130173 | | - sqlite3DbFree(db, p->aCol); |
| 130174 | | - sqlite3DbFree(db, p->aFunc); |
| 130175 | | - sqlite3DbFree(db, p); |
| 130176 | | -} |
| 130177 | | - |
| 130178 | 130435 | /* |
| 130179 | 130436 | ** Free all memory allocations in the pParse object |
| 130180 | 130437 | */ |
| 130181 | 130438 | SQLITE_PRIVATE void sqlite3ParserReset(Parse *pParse){ |
| 130182 | 130439 | sqlite3 *db = pParse->db; |
| 130183 | | - AggInfo *pThis = pParse->pAggList; |
| 130184 | | - while( pThis ){ |
| 130185 | | - AggInfo *pNext = pThis->pNext; |
| 130186 | | - agginfoFree(db, pThis); |
| 130187 | | - pThis = pNext; |
| 130188 | | - } |
| 130189 | 130440 | while( pParse->pCleanup ){ |
| 130190 | 130441 | ParseCleanup *pCleanup = pParse->pCleanup; |
| 130191 | 130442 | pParse->pCleanup = pCleanup->pNext; |
| 130192 | 130443 | pCleanup->xCleanup(db, pCleanup->pPtr); |
| 130193 | | - sqlite3DbFree(db, pCleanup); |
| 130444 | + sqlite3DbFreeNN(db, pCleanup); |
| 130194 | 130445 | } |
| 130195 | 130446 | sqlite3DbFree(db, pParse->aLabel); |
| 130196 | 130447 | if( pParse->pConstExpr ){ |
| 130197 | 130448 | sqlite3ExprListDelete(db, pParse->pConstExpr); |
| 130198 | 130449 | } |
| | @@ -130893,11 +131144,11 @@ |
| 130893 | 131144 | |
| 130894 | 131145 | /* |
| 130895 | 131146 | ** Return the index of a column in a table. Return -1 if the column |
| 130896 | 131147 | ** is not contained in the table. |
| 130897 | 131148 | */ |
| 130898 | | -static int columnIndex(Table *pTab, const char *zCol){ |
| 131149 | +SQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol){ |
| 130899 | 131150 | int i; |
| 130900 | 131151 | u8 h = sqlite3StrIHash(zCol); |
| 130901 | 131152 | Column *pCol; |
| 130902 | 131153 | for(pCol=pTab->aCol, i=0; i<pTab->nCol; pCol++, i++){ |
| 130903 | 131154 | if( pCol->hName==h && sqlite3StrICmp(pCol->zName, zCol)==0 ) return i; |
| | @@ -130925,11 +131176,11 @@ |
| 130925 | 131176 | int i; /* For looping over tables in pSrc */ |
| 130926 | 131177 | int iCol; /* Index of column matching zCol */ |
| 130927 | 131178 | |
| 130928 | 131179 | assert( (piTab==0)==(piCol==0) ); /* Both or neither are NULL */ |
| 130929 | 131180 | for(i=0; i<N; i++){ |
| 130930 | | - iCol = columnIndex(pSrc->a[i].pTab, zCol); |
| 131181 | + iCol = sqlite3ColumnIndex(pSrc->a[i].pTab, zCol); |
| 130931 | 131182 | if( iCol>=0 |
| 130932 | 131183 | && (bIgnoreHidden==0 || IsHiddenColumn(&pSrc->a[i].pTab->aCol[iCol])==0) |
| 130933 | 131184 | ){ |
| 130934 | 131185 | if( piTab ){ |
| 130935 | 131186 | *piTab = i; |
| | @@ -131135,11 +131386,11 @@ |
| 131135 | 131386 | int iLeft; /* Table on the left with matching column name */ |
| 131136 | 131387 | int iLeftCol; /* Column number of matching column on the left */ |
| 131137 | 131388 | int iRightCol; /* Column number of matching column on the right */ |
| 131138 | 131389 | |
| 131139 | 131390 | zName = pList->a[j].zName; |
| 131140 | | - iRightCol = columnIndex(pRightTab, zName); |
| 131391 | + iRightCol = sqlite3ColumnIndex(pRightTab, zName); |
| 131141 | 131392 | if( iRightCol<0 |
| 131142 | 131393 | || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol, 0) |
| 131143 | 131394 | ){ |
| 131144 | 131395 | sqlite3ErrorMsg(pParse, "cannot join using column %s - column " |
| 131145 | 131396 | "not present in both tables", zName); |
| | @@ -132717,10 +132968,11 @@ |
| 132717 | 132968 | sNC.pSrcList = pSelect->pSrc; |
| 132718 | 132969 | a = pSelect->pEList->a; |
| 132719 | 132970 | for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){ |
| 132720 | 132971 | const char *zType; |
| 132721 | 132972 | int n, m; |
| 132973 | + pTab->tabFlags |= (pCol->colFlags & COLFLAG_NOINSERT); |
| 132722 | 132974 | p = a[i].pExpr; |
| 132723 | 132975 | zType = columnType(&sNC, p, 0, 0, 0); |
| 132724 | 132976 | /* pCol->szEst = ... // Column size est for SELECT tables never used */ |
| 132725 | 132977 | pCol->affinity = sqlite3ExprAffinity(p); |
| 132726 | 132978 | if( zType ){ |
| | @@ -134319,11 +134571,12 @@ |
| 134319 | 134571 | ** Expression walker callback used by renumberCursors() to update |
| 134320 | 134572 | ** Expr objects to match newly assigned cursor numbers. |
| 134321 | 134573 | */ |
| 134322 | 134574 | static int renumberCursorsCb(Walker *pWalker, Expr *pExpr){ |
| 134323 | 134575 | int *aCsrMap = pWalker->u.aiCol; |
| 134324 | | - if( pExpr->op==TK_COLUMN && aCsrMap[pExpr->iTable] ){ |
| 134576 | + int op = pExpr->op; |
| 134577 | + if( (op==TK_COLUMN || op==TK_IF_NULL_ROW) && aCsrMap[pExpr->iTable] ){ |
| 134325 | 134578 | pExpr->iTable = aCsrMap[pExpr->iTable]; |
| 134326 | 134579 | } |
| 134327 | 134580 | if( ExprHasProperty(pExpr, EP_FromJoin) && aCsrMap[pExpr->iRightJoinTable] ){ |
| 134328 | 134581 | pExpr->iRightJoinTable = aCsrMap[pExpr->iRightJoinTable]; |
| 134329 | 134582 | } |
| | @@ -135223,10 +135476,11 @@ |
| 135223 | 135476 | if( ExprHasProperty(pWhere,EP_FromJoin) && pWhere->iRightJoinTable!=iCursor ){ |
| 135224 | 135477 | return 0; /* restriction (5) */ |
| 135225 | 135478 | } |
| 135226 | 135479 | if( sqlite3ExprIsTableConstant(pWhere, iCursor) ){ |
| 135227 | 135480 | nChng++; |
| 135481 | + pSubq->selFlags |= SF_PushDown; |
| 135228 | 135482 | while( pSubq ){ |
| 135229 | 135483 | SubstContext x; |
| 135230 | 135484 | pNew = sqlite3ExprDup(pParse->db, pWhere, 0); |
| 135231 | 135485 | unsetJoinExpr(pNew, -1); |
| 135232 | 135486 | x.pParse = pParse; |
| | @@ -136395,10 +136649,12 @@ |
| 136395 | 136649 | static struct SrcList_item *isSelfJoinView( |
| 136396 | 136650 | SrcList *pTabList, /* Search for self-joins in this FROM clause */ |
| 136397 | 136651 | struct SrcList_item *pThis /* Search for prior reference to this subquery */ |
| 136398 | 136652 | ){ |
| 136399 | 136653 | struct SrcList_item *pItem; |
| 136654 | + assert( pThis->pSelect!=0 ); |
| 136655 | + if( pThis->pSelect->selFlags & SF_PushDown ) return 0; |
| 136400 | 136656 | for(pItem = pTabList->a; pItem<pThis; pItem++){ |
| 136401 | 136657 | Select *pS1; |
| 136402 | 136658 | if( pItem->pSelect==0 ) continue; |
| 136403 | 136659 | if( pItem->fg.viaCoroutine ) continue; |
| 136404 | 136660 | if( pItem->zName==0 ) continue; |
| | @@ -136410,21 +136666,28 @@ |
| 136410 | 136666 | if( pItem->pTab->pSchema==0 && pThis->pSelect->selId!=pS1->selId ){ |
| 136411 | 136667 | /* The query flattener left two different CTE tables with identical |
| 136412 | 136668 | ** names in the same FROM clause. */ |
| 136413 | 136669 | continue; |
| 136414 | 136670 | } |
| 136415 | | - if( sqlite3ExprCompare(0, pThis->pSelect->pWhere, pS1->pWhere, -1) |
| 136416 | | - || sqlite3ExprCompare(0, pThis->pSelect->pHaving, pS1->pHaving, -1) |
| 136417 | | - ){ |
| 136671 | + if( pItem->pSelect->selFlags & SF_PushDown ){ |
| 136418 | 136672 | /* The view was modified by some other optimization such as |
| 136419 | 136673 | ** pushDownWhereTerms() */ |
| 136420 | 136674 | continue; |
| 136421 | 136675 | } |
| 136422 | 136676 | return pItem; |
| 136423 | 136677 | } |
| 136424 | 136678 | return 0; |
| 136425 | 136679 | } |
| 136680 | + |
| 136681 | +/* |
| 136682 | +** Deallocate a single AggInfo object |
| 136683 | +*/ |
| 136684 | +static void agginfoFree(sqlite3 *db, AggInfo *p){ |
| 136685 | + sqlite3DbFree(db, p->aCol); |
| 136686 | + sqlite3DbFree(db, p->aFunc); |
| 136687 | + sqlite3DbFreeNN(db, p); |
| 136688 | +} |
| 136426 | 136689 | |
| 136427 | 136690 | #ifdef SQLITE_COUNTOFVIEW_OPTIMIZATION |
| 136428 | 136691 | /* |
| 136429 | 136692 | ** Attempt to transform a query of the form |
| 136430 | 136693 | ** |
| | @@ -136833,10 +137096,11 @@ |
| 136833 | 137096 | SELECTTRACE(0x100,pParse,p, |
| 136834 | 137097 | ("After WHERE-clause push-down into subquery %d:\n", pSub->selId)); |
| 136835 | 137098 | sqlite3TreeViewSelect(0, p, 0); |
| 136836 | 137099 | } |
| 136837 | 137100 | #endif |
| 137101 | + assert( pItem->pSelect && (pItem->pSelect->selFlags & SF_PushDown)!=0 ); |
| 136838 | 137102 | }else{ |
| 136839 | 137103 | SELECTTRACE(0x100,pParse,p,("Push-down not possible\n")); |
| 136840 | 137104 | } |
| 136841 | 137105 | |
| 136842 | 137106 | zSavedAuthContext = pParse->zAuthContext; |
| | @@ -137055,10 +137319,11 @@ |
| 137055 | 137319 | sSort.labelOBLopt = sqlite3WhereOrderByLimitOptLabel(pWInfo); |
| 137056 | 137320 | if( sSort.nOBSat==sSort.pOrderBy->nExpr ){ |
| 137057 | 137321 | sSort.pOrderBy = 0; |
| 137058 | 137322 | } |
| 137059 | 137323 | } |
| 137324 | + SELECTTRACE(1,pParse,p,("WhereBegin returns\n")); |
| 137060 | 137325 | |
| 137061 | 137326 | /* If sorting index that was created by a prior OP_OpenEphemeral |
| 137062 | 137327 | ** instruction ended up not being needed, then change the OP_OpenEphemeral |
| 137063 | 137328 | ** into an OP_Noop. |
| 137064 | 137329 | */ |
| | @@ -137093,10 +137358,11 @@ |
| 137093 | 137358 | sqlite3WhereContinueLabel(pWInfo), |
| 137094 | 137359 | sqlite3WhereBreakLabel(pWInfo)); |
| 137095 | 137360 | |
| 137096 | 137361 | /* End the database scan loop. |
| 137097 | 137362 | */ |
| 137363 | + SELECTTRACE(1,pParse,p,("WhereEnd\n")); |
| 137098 | 137364 | sqlite3WhereEnd(pWInfo); |
| 137099 | 137365 | } |
| 137100 | 137366 | }else{ |
| 137101 | 137367 | /* This case when there exist aggregate functions or a GROUP BY clause |
| 137102 | 137368 | ** or both */ |
| | @@ -137163,15 +137429,17 @@ |
| 137163 | 137429 | /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in |
| 137164 | 137430 | ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the |
| 137165 | 137431 | ** SELECT statement. |
| 137166 | 137432 | */ |
| 137167 | 137433 | pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) ); |
| 137168 | | - if( pAggInfo==0 ){ |
| 137434 | + if( pAggInfo ){ |
| 137435 | + sqlite3ParserAddCleanup(pParse, |
| 137436 | + (void(*)(sqlite3*,void*))agginfoFree, pAggInfo); |
| 137437 | + } |
| 137438 | + if( db->mallocFailed ){ |
| 137169 | 137439 | goto select_end; |
| 137170 | 137440 | } |
| 137171 | | - pAggInfo->pNext = pParse->pAggList; |
| 137172 | | - pParse->pAggList = pAggInfo; |
| 137173 | 137441 | pAggInfo->selId = p->selId; |
| 137174 | 137442 | memset(&sNC, 0, sizeof(sNC)); |
| 137175 | 137443 | sNC.pParse = pParse; |
| 137176 | 137444 | sNC.pSrcList = pTabList; |
| 137177 | 137445 | sNC.uNC.pAggInfo = pAggInfo; |
| | @@ -137286,10 +137554,11 @@ |
| 137286 | 137554 | SELECTTRACE(1,pParse,p,("WhereBegin\n")); |
| 137287 | 137555 | pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pGroupBy, 0, |
| 137288 | 137556 | WHERE_GROUPBY | (orderByGrp ? WHERE_SORTBYGROUP : 0), 0 |
| 137289 | 137557 | ); |
| 137290 | 137558 | if( pWInfo==0 ) goto select_end; |
| 137559 | + SELECTTRACE(1,pParse,p,("WhereBegin returns\n")); |
| 137291 | 137560 | if( sqlite3WhereIsOrdered(pWInfo)==pGroupBy->nExpr ){ |
| 137292 | 137561 | /* The optimizer is able to deliver rows in group by order so |
| 137293 | 137562 | ** we do not have to sort. The OP_OpenEphemeral table will be |
| 137294 | 137563 | ** cancelled later because we still need to use the pKeyInfo |
| 137295 | 137564 | */ |
| | @@ -137334,10 +137603,11 @@ |
| 137334 | 137603 | regRecord = sqlite3GetTempReg(pParse); |
| 137335 | 137604 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord); |
| 137336 | 137605 | sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord); |
| 137337 | 137606 | sqlite3ReleaseTempReg(pParse, regRecord); |
| 137338 | 137607 | sqlite3ReleaseTempRange(pParse, regBase, nCol); |
| 137608 | + SELECTTRACE(1,pParse,p,("WhereEnd\n")); |
| 137339 | 137609 | sqlite3WhereEnd(pWInfo); |
| 137340 | 137610 | pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++; |
| 137341 | 137611 | sortOut = sqlite3GetTempReg(pParse); |
| 137342 | 137612 | sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol); |
| 137343 | 137613 | sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd); |
| | @@ -137411,10 +137681,11 @@ |
| 137411 | 137681 | */ |
| 137412 | 137682 | if( groupBySort ){ |
| 137413 | 137683 | sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx,addrTopOfLoop); |
| 137414 | 137684 | VdbeCoverage(v); |
| 137415 | 137685 | }else{ |
| 137686 | + SELECTTRACE(1,pParse,p,("WhereEnd\n")); |
| 137416 | 137687 | sqlite3WhereEnd(pWInfo); |
| 137417 | 137688 | sqlite3VdbeChangeToNoop(v, addrSortingIdx); |
| 137418 | 137689 | } |
| 137419 | 137690 | |
| 137420 | 137691 | /* Output the final row of result |
| | @@ -137566,15 +137837,17 @@ |
| 137566 | 137837 | pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy, |
| 137567 | 137838 | 0, minMaxFlag, 0); |
| 137568 | 137839 | if( pWInfo==0 ){ |
| 137569 | 137840 | goto select_end; |
| 137570 | 137841 | } |
| 137842 | + SELECTTRACE(1,pParse,p,("WhereBegin returns\n")); |
| 137571 | 137843 | updateAccumulator(pParse, regAcc, pAggInfo); |
| 137572 | 137844 | if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc); |
| 137573 | 137845 | if( minMaxFlag ){ |
| 137574 | 137846 | sqlite3WhereMinMaxOptEarlyOut(v, pWInfo); |
| 137575 | 137847 | } |
| 137848 | + SELECTTRACE(1,pParse,p,("WhereEnd\n")); |
| 137576 | 137849 | sqlite3WhereEnd(pWInfo); |
| 137577 | 137850 | finalizeAggFunctions(pParse, pAggInfo); |
| 137578 | 137851 | } |
| 137579 | 137852 | |
| 137580 | 137853 | sSort.pOrderBy = 0; |
| | @@ -138199,11 +138472,11 @@ |
| 138199 | 138472 | db->aDb[iDb].zDbSName, zName, |
| 138200 | 138473 | pTrig->table, z); |
| 138201 | 138474 | sqlite3DbFree(db, z); |
| 138202 | 138475 | sqlite3ChangeCookie(pParse, iDb); |
| 138203 | 138476 | sqlite3VdbeAddParseSchemaOp(v, iDb, |
| 138204 | | - sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName)); |
| 138477 | + sqlite3MPrintf(db, "type='trigger' AND name='%q'", zName), 0); |
| 138205 | 138478 | } |
| 138206 | 138479 | |
| 138207 | 138480 | if( db->init.busy ){ |
| 138208 | 138481 | Trigger *pLink = pTrig; |
| 138209 | 138482 | Hash *pHash = &db->aDb[iDb].pSchema->trigHash; |
| | @@ -141764,11 +142037,11 @@ |
| 141764 | 142037 | v = sqlite3GetVdbe(pParse); |
| 141765 | 142038 | sqlite3ChangeCookie(pParse, iDb); |
| 141766 | 142039 | |
| 141767 | 142040 | sqlite3VdbeAddOp0(v, OP_Expire); |
| 141768 | 142041 | zWhere = sqlite3MPrintf(db, "name=%Q AND sql=%Q", pTab->zName, zStmt); |
| 141769 | | - sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere); |
| 142042 | + sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere, 0); |
| 141770 | 142043 | sqlite3DbFree(db, zStmt); |
| 141771 | 142044 | |
| 141772 | 142045 | iReg = ++pParse->nMem; |
| 141773 | 142046 | sqlite3VdbeLoadString(v, iReg, pTab->zName); |
| 141774 | 142047 | sqlite3VdbeAddOp2(v, OP_VCreate, iDb, iReg); |
| | @@ -141935,10 +142208,11 @@ |
| 141935 | 142208 | if( zType[i]=='\0' && i>0 ){ |
| 141936 | 142209 | assert(zType[i-1]==' '); |
| 141937 | 142210 | zType[i-1] = '\0'; |
| 141938 | 142211 | } |
| 141939 | 142212 | pTab->aCol[iCol].colFlags |= COLFLAG_HIDDEN; |
| 142213 | + pTab->tabFlags |= TF_HasHidden; |
| 141940 | 142214 | oooHidden = TF_OOOHidden; |
| 141941 | 142215 | }else{ |
| 141942 | 142216 | pTab->tabFlags |= oooHidden; |
| 141943 | 142217 | } |
| 141944 | 142218 | } |
| | @@ -156754,22 +157028,22 @@ |
| 156754 | 157028 | #define sqlite3ParserCTX_PDECL ,Parse *pParse |
| 156755 | 157029 | #define sqlite3ParserCTX_PARAM ,pParse |
| 156756 | 157030 | #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse; |
| 156757 | 157031 | #define sqlite3ParserCTX_STORE yypParser->pParse=pParse; |
| 156758 | 157032 | #define YYFALLBACK 1 |
| 156759 | | -#define YYNSTATE 571 |
| 156760 | | -#define YYNRULE 393 |
| 156761 | | -#define YYNRULE_WITH_ACTION 332 |
| 157033 | +#define YYNSTATE 573 |
| 157034 | +#define YYNRULE 394 |
| 157035 | +#define YYNRULE_WITH_ACTION 333 |
| 156762 | 157036 | #define YYNTOKEN 182 |
| 156763 | | -#define YY_MAX_SHIFT 570 |
| 156764 | | -#define YY_MIN_SHIFTREDUCE 822 |
| 156765 | | -#define YY_MAX_SHIFTREDUCE 1214 |
| 156766 | | -#define YY_ERROR_ACTION 1215 |
| 156767 | | -#define YY_ACCEPT_ACTION 1216 |
| 156768 | | -#define YY_NO_ACTION 1217 |
| 156769 | | -#define YY_MIN_REDUCE 1218 |
| 156770 | | -#define YY_MAX_REDUCE 1610 |
| 157037 | +#define YY_MAX_SHIFT 572 |
| 157038 | +#define YY_MIN_SHIFTREDUCE 825 |
| 157039 | +#define YY_MAX_SHIFTREDUCE 1218 |
| 157040 | +#define YY_ERROR_ACTION 1219 |
| 157041 | +#define YY_ACCEPT_ACTION 1220 |
| 157042 | +#define YY_NO_ACTION 1221 |
| 157043 | +#define YY_MIN_REDUCE 1222 |
| 157044 | +#define YY_MAX_REDUCE 1615 |
| 156771 | 157045 | /************* End control #defines *******************************************/ |
| 156772 | 157046 | #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) |
| 156773 | 157047 | |
| 156774 | 157048 | /* Define the yytestcase() macro to be a no-op if is not already defined |
| 156775 | 157049 | ** otherwise. |
| | @@ -156834,212 +157108,212 @@ |
| 156834 | 157108 | ** yy_default[] Default action for each state. |
| 156835 | 157109 | ** |
| 156836 | 157110 | *********** Begin parsing tables **********************************************/ |
| 156837 | 157111 | #define YY_ACTTAB_COUNT (2017) |
| 156838 | 157112 | static const YYACTIONTYPE yy_action[] = { |
| 156839 | | - /* 0 */ 564, 1249, 564, 197, 1571, 564, 1252, 564, 116, 113, |
| 156840 | | - /* 10 */ 218, 564, 1259, 564, 486, 393, 116, 113, 218, 405, |
| 156841 | | - /* 20 */ 357, 357, 42, 42, 42, 42, 469, 42, 42, 72, |
| 156842 | | - /* 30 */ 72, 956, 1251, 72, 72, 72, 72, 1496, 1576, 957, |
| 156843 | | - /* 40 */ 9, 886, 251, 123, 124, 114, 1192, 1192, 1032, 1035, |
| 156844 | | - /* 50 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 445, 405, |
| 156845 | | - /* 60 */ 471, 1551, 570, 2, 1220, 1577, 546, 145, 147, 305, |
| 156846 | | - /* 70 */ 546, 138, 546, 1292, 1292, 522, 564, 1189, 1300, 545, |
| 156847 | | - /* 80 */ 521, 511, 167, 123, 124, 114, 1192, 1192, 1032, 1035, |
| 156848 | | - /* 90 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 72, 72, |
| 156849 | | - /* 100 */ 281, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156850 | | - /* 110 */ 117, 438, 273, 273, 273, 273, 443, 1168, 1532, 371, |
| 156851 | | - /* 120 */ 1534, 1168, 370, 1532, 535, 561, 1140, 561, 1140, 405, |
| 156852 | | - /* 130 */ 1075, 248, 215, 1189, 174, 527, 100, 304, 555, 228, |
| 156853 | | - /* 140 */ 438, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156854 | | - /* 150 */ 117, 438, 448, 123, 124, 114, 1192, 1192, 1032, 1035, |
| 156855 | | - /* 160 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 541, 448, |
| 156856 | | - /* 170 */ 447, 442, 1168, 1169, 1170, 395, 1168, 1169, 1170, 125, |
| 157113 | + /* 0 */ 566, 1253, 566, 197, 1576, 566, 1256, 566, 116, 113, |
| 157114 | + /* 10 */ 218, 566, 1263, 566, 488, 395, 116, 113, 218, 407, |
| 157115 | + /* 20 */ 359, 359, 42, 42, 42, 42, 471, 42, 42, 72, |
| 157116 | + /* 30 */ 72, 959, 1255, 72, 72, 72, 72, 1500, 1581, 960, |
| 157117 | + /* 40 */ 9, 889, 252, 123, 124, 114, 1196, 1196, 1035, 1038, |
| 157118 | + /* 50 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 415, 407, |
| 157119 | + /* 60 */ 473, 1556, 572, 2, 1224, 1582, 548, 145, 147, 306, |
| 157120 | + /* 70 */ 548, 138, 548, 1296, 1296, 524, 566, 1193, 1304, 547, |
| 157121 | + /* 80 */ 523, 513, 167, 123, 124, 114, 1196, 1196, 1035, 1038, |
| 157122 | + /* 90 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 72, 72, |
| 157123 | + /* 100 */ 282, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 157124 | + /* 110 */ 117, 441, 274, 274, 274, 274, 446, 1172, 1537, 373, |
| 157125 | + /* 120 */ 1539, 1172, 372, 1537, 537, 563, 1144, 563, 1144, 407, |
| 157126 | + /* 130 */ 1078, 249, 215, 1193, 174, 529, 100, 305, 557, 229, |
| 157127 | + /* 140 */ 441, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 157128 | + /* 150 */ 117, 441, 450, 123, 124, 114, 1196, 1196, 1035, 1038, |
| 157129 | + /* 160 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 543, 450, |
| 157130 | + /* 170 */ 449, 445, 1172, 1173, 1174, 397, 1172, 1173, 1174, 125, |
| 156857 | 157131 | /* 180 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117, |
| 156858 | | - /* 190 */ 438, 119, 119, 118, 118, 118, 117, 438, 268, 405, |
| 156859 | | - /* 200 */ 1548, 122, 122, 122, 122, 115, 379, 84, 375, 273, |
| 156860 | | - /* 210 */ 273, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156861 | | - /* 220 */ 117, 438, 561, 123, 124, 114, 1192, 1192, 1032, 1035, |
| 156862 | | - /* 230 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 405, 467, |
| 156863 | | - /* 240 */ 1118, 1604, 448, 82, 1604, 460, 329, 81, 120, 120, |
| 156864 | | - /* 250 */ 120, 120, 119, 119, 118, 118, 118, 117, 438, 116, |
| 156865 | | - /* 260 */ 113, 218, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, |
| 156866 | | - /* 270 */ 1025, 121, 121, 122, 122, 122, 122, 564, 542, 1519, |
| 156867 | | - /* 280 */ 877, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156868 | | - /* 290 */ 117, 438, 118, 118, 118, 117, 438, 12, 197, 71, |
| 156869 | | - /* 300 */ 71, 1135, 122, 122, 122, 122, 384, 405, 428, 1168, |
| 156870 | | - /* 310 */ 398, 503, 531, 347, 1135, 166, 312, 1135, 1116, 878, |
| 157132 | + /* 190 */ 441, 119, 119, 118, 118, 118, 117, 441, 269, 407, |
| 157133 | + /* 200 */ 1553, 122, 122, 122, 122, 115, 381, 84, 377, 274, |
| 157134 | + /* 210 */ 274, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 157135 | + /* 220 */ 117, 441, 563, 123, 124, 114, 1196, 1196, 1035, 1038, |
| 157136 | + /* 230 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 407, 469, |
| 157137 | + /* 240 */ 1122, 1609, 450, 82, 1609, 462, 331, 81, 120, 120, |
| 157138 | + /* 250 */ 120, 120, 119, 119, 118, 118, 118, 117, 441, 116, |
| 157139 | + /* 260 */ 113, 218, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, |
| 157140 | + /* 270 */ 1028, 121, 121, 122, 122, 122, 122, 566, 544, 1524, |
| 157141 | + /* 280 */ 880, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 157142 | + /* 290 */ 117, 441, 118, 118, 118, 117, 441, 12, 197, 71, |
| 157143 | + /* 300 */ 71, 1139, 122, 122, 122, 122, 386, 407, 431, 1172, |
| 157144 | + /* 310 */ 400, 505, 533, 349, 1139, 166, 314, 1139, 1120, 881, |
| 156871 | 157145 | /* 320 */ 120, 120, 120, 120, 119, 119, 118, 118, 118, 117, |
| 156872 | | - /* 330 */ 438, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, |
| 156873 | | - /* 340 */ 121, 121, 122, 122, 122, 122, 1168, 267, 267, 120, |
| 156874 | | - /* 350 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438, |
| 156875 | | - /* 360 */ 561, 378, 1012, 1135, 1168, 1169, 1170, 240, 530, 563, |
| 156876 | | - /* 370 */ 499, 496, 495, 426, 538, 476, 1135, 1527, 1003, 1135, |
| 156877 | | - /* 380 */ 494, 6, 1002, 1392, 502, 1022, 1022, 1033, 1036, 120, |
| 156878 | | - /* 390 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438, |
| 156879 | | - /* 400 */ 425, 1168, 1169, 1170, 1096, 1460, 259, 276, 355, 505, |
| 156880 | | - /* 410 */ 350, 504, 245, 405, 1002, 1002, 1004, 343, 346, 1097, |
| 156881 | | - /* 420 */ 240, 460, 329, 499, 496, 495, 369, 510, 1526, 357, |
| 156882 | | - /* 430 */ 529, 358, 6, 494, 1098, 450, 203, 123, 124, 114, |
| 156883 | | - /* 440 */ 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122, |
| 156884 | | - /* 450 */ 122, 122, 520, 419, 1168, 897, 405, 569, 1026, 1220, |
| 156885 | | - /* 460 */ 500, 319, 1270, 992, 305, 898, 138, 188, 1287, 423, |
| 156886 | | - /* 470 */ 1266, 167, 486, 1300, 16, 16, 144, 857, 1287, 1269, |
| 156887 | | - /* 480 */ 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, |
| 157146 | + /* 330 */ 441, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, |
| 157147 | + /* 340 */ 121, 121, 122, 122, 122, 122, 1172, 268, 268, 120, |
| 157148 | + /* 350 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441, |
| 157149 | + /* 360 */ 563, 380, 1015, 1139, 1172, 1173, 1174, 241, 532, 565, |
| 157150 | + /* 370 */ 501, 498, 497, 429, 540, 478, 1139, 1532, 1006, 1139, |
| 157151 | + /* 380 */ 496, 6, 1005, 1396, 504, 1025, 1025, 1036, 1039, 120, |
| 157152 | + /* 390 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441, |
| 157153 | + /* 400 */ 428, 1172, 1173, 1174, 1099, 1464, 260, 277, 357, 507, |
| 157154 | + /* 410 */ 352, 506, 246, 407, 1005, 1005, 1007, 345, 348, 1100, |
| 157155 | + /* 420 */ 241, 462, 331, 501, 498, 497, 371, 512, 1531, 359, |
| 157156 | + /* 430 */ 531, 360, 6, 496, 1101, 452, 203, 123, 124, 114, |
| 157157 | + /* 440 */ 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122, |
| 157158 | + /* 450 */ 122, 122, 522, 422, 1172, 900, 407, 571, 1029, 1224, |
| 157159 | + /* 460 */ 502, 321, 1274, 995, 306, 901, 138, 188, 1291, 426, |
| 157160 | + /* 470 */ 1270, 167, 488, 1304, 16, 16, 144, 860, 1291, 1273, |
| 157161 | + /* 480 */ 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, |
| 156888 | 157162 | /* 490 */ 121, 122, 122, 122, 122, 120, 120, 120, 120, 119, |
| 156889 | | - /* 500 */ 119, 118, 118, 118, 117, 438, 526, 273, 273, 1168, |
| 156890 | | - /* 510 */ 1169, 1170, 1392, 564, 166, 327, 1495, 1012, 414, 372, |
| 156891 | | - /* 520 */ 561, 486, 316, 1168, 318, 405, 304, 555, 373, 861, |
| 156892 | | - /* 530 */ 182, 216, 857, 1003, 228, 72, 72, 1002, 120, 120, |
| 156893 | | - /* 540 */ 120, 120, 119, 119, 118, 118, 118, 117, 438, 123, |
| 156894 | | - /* 550 */ 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, |
| 156895 | | - /* 560 */ 122, 122, 122, 122, 405, 1459, 442, 1168, 854, 1002, |
| 156896 | | - /* 570 */ 1002, 1004, 300, 1524, 116, 113, 218, 6, 1168, 1169, |
| 156897 | | - /* 580 */ 1170, 183, 420, 116, 113, 218, 1168, 314, 123, 124, |
| 156898 | | - /* 590 */ 114, 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, |
| 156899 | | - /* 600 */ 122, 122, 122, 1465, 317, 943, 469, 120, 120, 120, |
| 156900 | | - /* 610 */ 120, 119, 119, 118, 118, 118, 117, 438, 1168, 211, |
| 156901 | | - /* 620 */ 1465, 1467, 1168, 1169, 1170, 917, 539, 1526, 475, 1168, |
| 156902 | | - /* 630 */ 916, 6, 1168, 405, 922, 435, 434, 1153, 213, 509, |
| 156903 | | - /* 640 */ 32, 1168, 1169, 1170, 279, 5, 120, 120, 120, 120, |
| 156904 | | - /* 650 */ 119, 119, 118, 118, 118, 117, 438, 123, 124, 114, |
| 156905 | | - /* 660 */ 1192, 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122, |
| 156906 | | - /* 670 */ 122, 122, 405, 1168, 1169, 1170, 1013, 1168, 273, 273, |
| 156907 | | - /* 680 */ 286, 1199, 1168, 1199, 1168, 1169, 1170, 1168, 1169, 1170, |
| 156908 | | - /* 690 */ 564, 561, 167, 1465, 117, 438, 123, 124, 114, 1192, |
| 156909 | | - /* 700 */ 1192, 1032, 1035, 1025, 1025, 121, 121, 122, 122, 122, |
| 156910 | | - /* 710 */ 122, 942, 13, 13, 127, 120, 120, 120, 120, 119, |
| 156911 | | - /* 720 */ 119, 118, 118, 118, 117, 438, 285, 417, 564, 449, |
| 156912 | | - /* 730 */ 564, 1392, 1168, 1169, 1170, 1290, 1290, 1168, 1169, 1170, |
| 156913 | | - /* 740 */ 97, 405, 992, 1606, 391, 997, 486, 304, 555, 17, |
| 157163 | + /* 500 */ 119, 118, 118, 118, 117, 441, 528, 274, 274, 1172, |
| 157164 | + /* 510 */ 1173, 1174, 1396, 566, 166, 329, 1499, 1015, 417, 374, |
| 157165 | + /* 520 */ 563, 488, 318, 1172, 320, 407, 305, 557, 375, 864, |
| 157166 | + /* 530 */ 182, 216, 860, 1006, 229, 72, 72, 1005, 120, 120, |
| 157167 | + /* 540 */ 120, 120, 119, 119, 118, 118, 118, 117, 441, 123, |
| 157168 | + /* 550 */ 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, |
| 157169 | + /* 560 */ 122, 122, 122, 122, 407, 1463, 445, 1172, 857, 1005, |
| 157170 | + /* 570 */ 1005, 1007, 301, 1529, 116, 113, 218, 6, 1172, 1173, |
| 157171 | + /* 580 */ 1174, 183, 423, 116, 113, 218, 1172, 316, 123, 124, |
| 157172 | + /* 590 */ 114, 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, |
| 157173 | + /* 600 */ 122, 122, 122, 1469, 319, 946, 471, 120, 120, 120, |
| 157174 | + /* 610 */ 120, 119, 119, 118, 118, 118, 117, 441, 1172, 211, |
| 157175 | + /* 620 */ 1469, 1471, 1172, 1173, 1174, 920, 541, 1531, 477, 1172, |
| 157176 | + /* 630 */ 919, 6, 1172, 407, 925, 438, 437, 1157, 213, 511, |
| 157177 | + /* 640 */ 32, 1172, 1173, 1174, 280, 5, 120, 120, 120, 120, |
| 157178 | + /* 650 */ 119, 119, 118, 118, 118, 117, 441, 123, 124, 114, |
| 157179 | + /* 660 */ 1196, 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122, |
| 157180 | + /* 670 */ 122, 122, 407, 1172, 1173, 1174, 1016, 1172, 274, 274, |
| 157181 | + /* 680 */ 287, 1203, 1172, 1203, 1172, 1173, 1174, 1172, 1173, 1174, |
| 157182 | + /* 690 */ 566, 563, 167, 1469, 117, 441, 123, 124, 114, 1196, |
| 157183 | + /* 700 */ 1196, 1035, 1038, 1028, 1028, 121, 121, 122, 122, 122, |
| 157184 | + /* 710 */ 122, 945, 13, 13, 127, 120, 120, 120, 120, 119, |
| 157185 | + /* 720 */ 119, 118, 118, 118, 117, 441, 286, 420, 566, 451, |
| 157186 | + /* 730 */ 566, 1396, 1172, 1173, 1174, 1294, 1294, 1172, 1173, 1174, |
| 157187 | + /* 740 */ 97, 407, 995, 1611, 393, 1000, 488, 305, 557, 17, |
| 156914 | 157188 | /* 750 */ 72, 72, 72, 72, 120, 120, 120, 120, 119, 119, |
| 156915 | | - /* 760 */ 118, 118, 118, 117, 438, 123, 124, 114, 1192, 1192, |
| 156916 | | - /* 770 */ 1032, 1035, 1025, 1025, 121, 121, 122, 122, 122, 122, |
| 156917 | | - /* 780 */ 405, 1216, 1, 1, 570, 2, 1220, 301, 415, 433, |
| 156918 | | - /* 790 */ 1299, 305, 839, 138, 327, 455, 315, 402, 401, 564, |
| 156919 | | - /* 800 */ 1300, 421, 3, 290, 123, 124, 114, 1192, 1192, 1032, |
| 156920 | | - /* 810 */ 1035, 1025, 1025, 121, 121, 122, 122, 122, 122, 377, |
| 156921 | | - /* 820 */ 564, 13, 13, 120, 120, 120, 120, 119, 119, 118, |
| 156922 | | - /* 830 */ 118, 118, 117, 438, 273, 273, 422, 273, 273, 1168, |
| 156923 | | - /* 840 */ 1304, 357, 13, 13, 1118, 1605, 12, 561, 1605, 405, |
| 156924 | | - /* 850 */ 561, 458, 561, 1168, 558, 558, 558, 424, 436, 436, |
| 156925 | | - /* 860 */ 436, 228, 120, 120, 120, 120, 119, 119, 118, 118, |
| 156926 | | - /* 870 */ 118, 117, 438, 123, 124, 114, 1192, 1192, 1032, 1035, |
| 156927 | | - /* 880 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 146, 197, |
| 156928 | | - /* 890 */ 414, 564, 1055, 442, 1168, 1169, 1170, 414, 469, 435, |
| 156929 | | - /* 900 */ 434, 404, 562, 247, 911, 911, 564, 1196, 1168, 1169, |
| 156930 | | - /* 910 */ 1170, 486, 1198, 72, 72, 491, 1507, 547, 102, 194, |
| 156931 | | - /* 920 */ 1197, 564, 1116, 294, 459, 294, 1298, 251, 72, 72, |
| 156932 | | - /* 930 */ 1452, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156933 | | - /* 940 */ 117, 438, 244, 56, 56, 1199, 564, 1199, 564, 1238, |
| 156934 | | - /* 950 */ 437, 273, 273, 564, 514, 1295, 564, 512, 564, 282, |
| 156935 | | - /* 960 */ 273, 273, 1189, 517, 561, 546, 284, 341, 52, 52, |
| 156936 | | - /* 970 */ 13, 13, 289, 561, 548, 13, 13, 564, 13, 13, |
| 156937 | | - /* 980 */ 13, 13, 549, 273, 273, 293, 1407, 105, 273, 273, |
| 156938 | | - /* 990 */ 191, 273, 273, 192, 444, 543, 561, 273, 273, 57, |
| 156939 | | - /* 1000 */ 57, 561, 274, 274, 561, 513, 1504, 405, 270, 410, |
| 156940 | | - /* 1010 */ 561, 941, 198, 304, 555, 561, 273, 273, 1189, 106, |
| 156941 | | - /* 1020 */ 409, 104, 356, 1545, 307, 346, 564, 405, 336, 561, |
| 156942 | | - /* 1030 */ 339, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, |
| 156943 | | - /* 1040 */ 121, 121, 122, 122, 122, 122, 469, 405, 15, 15, |
| 156944 | | - /* 1050 */ 475, 123, 124, 114, 1192, 1192, 1032, 1035, 1025, 1025, |
| 156945 | | - /* 1060 */ 121, 121, 122, 122, 122, 122, 1080, 1080, 483, 358, |
| 156946 | | - /* 1070 */ 475, 123, 112, 114, 1192, 1192, 1032, 1035, 1025, 1025, |
| 156947 | | - /* 1080 */ 121, 121, 122, 122, 122, 122, 390, 1212, 308, 120, |
| 156948 | | - /* 1090 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438, |
| 156949 | | - /* 1100 */ 99, 217, 480, 1172, 1406, 564, 477, 430, 541, 120, |
| 156950 | | - /* 1110 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438, |
| 156951 | | - /* 1120 */ 291, 1077, 564, 1392, 564, 1077, 941, 44, 44, 120, |
| 156952 | | - /* 1130 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 438, |
| 156953 | | - /* 1140 */ 356, 1545, 537, 1096, 58, 58, 45, 45, 326, 405, |
| 156954 | | - /* 1150 */ 1135, 827, 828, 829, 243, 242, 241, 481, 1097, 1172, |
| 156955 | | - /* 1160 */ 1392, 536, 311, 1135, 1213, 486, 1135, 564, 292, 405, |
| 156956 | | - /* 1170 */ 1146, 1241, 411, 1098, 124, 114, 1192, 1192, 1032, 1035, |
| 156957 | | - /* 1180 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 564, 59, |
| 156958 | | - /* 1190 */ 59, 564, 507, 482, 552, 114, 1192, 1192, 1032, 1035, |
| 156959 | | - /* 1200 */ 1025, 1025, 121, 121, 122, 122, 122, 122, 1525, 334, |
| 156960 | | - /* 1210 */ 60, 60, 6, 61, 61, 390, 1117, 1523, 917, 1520, |
| 156961 | | - /* 1220 */ 1146, 6, 564, 916, 564, 109, 556, 564, 4, 941, |
| 156962 | | - /* 1230 */ 431, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156963 | | - /* 1240 */ 117, 438, 559, 864, 62, 62, 63, 63, 564, 46, |
| 157189 | + /* 760 */ 118, 118, 118, 117, 441, 123, 124, 114, 1196, 1196, |
| 157190 | + /* 770 */ 1035, 1038, 1028, 1028, 121, 121, 122, 122, 122, 122, |
| 157191 | + /* 780 */ 407, 1220, 1, 1, 572, 2, 1224, 302, 418, 436, |
| 157192 | + /* 790 */ 1303, 306, 842, 138, 329, 457, 317, 404, 403, 566, |
| 157193 | + /* 800 */ 1304, 424, 3, 291, 123, 124, 114, 1196, 1196, 1035, |
| 157194 | + /* 810 */ 1038, 1028, 1028, 121, 121, 122, 122, 122, 122, 379, |
| 157195 | + /* 820 */ 566, 13, 13, 120, 120, 120, 120, 119, 119, 118, |
| 157196 | + /* 830 */ 118, 118, 117, 441, 274, 274, 425, 274, 274, 1172, |
| 157197 | + /* 840 */ 1308, 359, 13, 13, 1122, 1610, 12, 563, 1610, 407, |
| 157198 | + /* 850 */ 563, 460, 563, 1172, 560, 560, 560, 427, 439, 439, |
| 157199 | + /* 860 */ 439, 229, 120, 120, 120, 120, 119, 119, 118, 118, |
| 157200 | + /* 870 */ 118, 117, 441, 123, 124, 114, 1196, 1196, 1035, 1038, |
| 157201 | + /* 880 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 146, 197, |
| 157202 | + /* 890 */ 417, 566, 1058, 445, 1172, 1173, 1174, 417, 471, 438, |
| 157203 | + /* 900 */ 437, 406, 564, 248, 914, 914, 566, 1200, 1172, 1173, |
| 157204 | + /* 910 */ 1174, 488, 1202, 72, 72, 493, 1510, 549, 102, 194, |
| 157205 | + /* 920 */ 1201, 566, 1120, 295, 461, 295, 1302, 252, 72, 72, |
| 157206 | + /* 930 */ 1456, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 157207 | + /* 940 */ 117, 441, 245, 56, 56, 1203, 566, 1203, 566, 1242, |
| 157208 | + /* 950 */ 440, 274, 274, 566, 516, 1299, 566, 514, 566, 283, |
| 157209 | + /* 960 */ 274, 274, 1193, 519, 563, 548, 285, 343, 52, 52, |
| 157210 | + /* 970 */ 13, 13, 290, 563, 550, 13, 13, 566, 13, 13, |
| 157211 | + /* 980 */ 13, 13, 551, 274, 274, 294, 1411, 105, 274, 274, |
| 157212 | + /* 990 */ 191, 274, 274, 192, 1512, 545, 563, 274, 274, 57, |
| 157213 | + /* 1000 */ 57, 563, 275, 275, 563, 515, 447, 407, 271, 412, |
| 157214 | + /* 1010 */ 563, 944, 198, 305, 557, 563, 274, 274, 1193, 106, |
| 157215 | + /* 1020 */ 411, 104, 358, 1550, 1508, 348, 566, 407, 338, 563, |
| 157216 | + /* 1030 */ 341, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, |
| 157217 | + /* 1040 */ 121, 121, 122, 122, 122, 122, 471, 407, 15, 15, |
| 157218 | + /* 1050 */ 477, 123, 124, 114, 1196, 1196, 1035, 1038, 1028, 1028, |
| 157219 | + /* 1060 */ 121, 121, 122, 122, 122, 122, 1083, 1083, 485, 360, |
| 157220 | + /* 1070 */ 477, 123, 112, 114, 1196, 1196, 1035, 1038, 1028, 1028, |
| 157221 | + /* 1080 */ 121, 121, 122, 122, 122, 122, 392, 1216, 309, 120, |
| 157222 | + /* 1090 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441, |
| 157223 | + /* 1100 */ 99, 217, 482, 1176, 1410, 566, 479, 433, 543, 120, |
| 157224 | + /* 1110 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441, |
| 157225 | + /* 1120 */ 292, 1080, 566, 1396, 566, 1080, 944, 44, 44, 120, |
| 157226 | + /* 1130 */ 120, 120, 120, 119, 119, 118, 118, 118, 117, 441, |
| 157227 | + /* 1140 */ 358, 1550, 539, 1099, 58, 58, 45, 45, 328, 407, |
| 157228 | + /* 1150 */ 1139, 830, 831, 832, 244, 243, 242, 483, 1100, 1176, |
| 157229 | + /* 1160 */ 1396, 538, 310, 1139, 1217, 488, 1139, 566, 293, 407, |
| 157230 | + /* 1170 */ 1150, 1245, 413, 1101, 124, 114, 1196, 1196, 1035, 1038, |
| 157231 | + /* 1180 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 566, 59, |
| 157232 | + /* 1190 */ 59, 566, 509, 484, 554, 114, 1196, 1196, 1035, 1038, |
| 157233 | + /* 1200 */ 1028, 1028, 121, 121, 122, 122, 122, 122, 1530, 336, |
| 157234 | + /* 1210 */ 60, 60, 6, 61, 61, 392, 1121, 1528, 920, 1525, |
| 157235 | + /* 1220 */ 1150, 6, 566, 919, 566, 109, 558, 566, 4, 944, |
| 157236 | + /* 1230 */ 434, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 157237 | + /* 1240 */ 117, 441, 561, 867, 62, 62, 63, 63, 566, 46, |
| 156964 | 157238 | /* 1250 */ 46, 120, 120, 120, 120, 119, 119, 118, 118, 118, |
| 156965 | | - /* 1260 */ 117, 438, 564, 1135, 1522, 439, 1323, 564, 6, 564, |
| 156966 | | - /* 1270 */ 47, 47, 564, 557, 411, 1268, 1135, 553, 142, 1135, |
| 156967 | | - /* 1280 */ 564, 465, 304, 555, 48, 48, 564, 167, 544, 50, |
| 156968 | | - /* 1290 */ 50, 51, 51, 1213, 64, 64, 956, 109, 556, 864, |
| 156969 | | - /* 1300 */ 4, 564, 65, 65, 957, 1012, 564, 140, 66, 66, |
| 156970 | | - /* 1310 */ 564, 107, 107, 564, 559, 849, 205, 564, 108, 217, |
| 156971 | | - /* 1320 */ 439, 566, 565, 14, 14, 1002, 8, 523, 67, 67, |
| 156972 | | - /* 1330 */ 564, 452, 129, 129, 221, 68, 68, 439, 453, 53, |
| 156973 | | - /* 1340 */ 53, 403, 304, 555, 941, 412, 168, 211, 403, 553, |
| 156974 | | - /* 1350 */ 111, 1188, 69, 69, 99, 462, 244, 1002, 1002, 1004, |
| 156975 | | - /* 1360 */ 1005, 27, 466, 533, 564, 403, 564, 1336, 532, 272, |
| 156976 | | - /* 1370 */ 215, 849, 403, 564, 85, 202, 564, 1012, 564, 1207, |
| 156977 | | - /* 1380 */ 564, 303, 564, 107, 107, 564, 70, 70, 54, 54, |
| 156978 | | - /* 1390 */ 108, 403, 439, 566, 565, 153, 153, 1002, 154, 154, |
| 156979 | | - /* 1400 */ 77, 77, 55, 55, 73, 73, 1113, 130, 130, 392, |
| 156980 | | - /* 1410 */ 109, 556, 143, 4, 38, 564, 473, 299, 564, 461, |
| 156981 | | - /* 1420 */ 225, 1335, 524, 410, 30, 876, 875, 559, 454, 1002, |
| 156982 | | - /* 1430 */ 1002, 1004, 1005, 27, 1550, 1157, 441, 74, 74, 277, |
| 156983 | | - /* 1440 */ 131, 131, 324, 1510, 388, 388, 387, 262, 385, 564, |
| 156984 | | - /* 1450 */ 439, 836, 868, 320, 463, 31, 564, 883, 884, 354, |
| 156985 | | - /* 1460 */ 325, 206, 553, 99, 222, 206, 310, 544, 1539, 353, |
| 156986 | | - /* 1470 */ 994, 132, 132, 250, 309, 1484, 533, 287, 128, 128, |
| 156987 | | - /* 1480 */ 1062, 534, 109, 556, 468, 4, 564, 250, 1483, 470, |
| 156988 | | - /* 1490 */ 1012, 564, 250, 275, 564, 330, 107, 107, 99, 559, |
| 156989 | | - /* 1500 */ 1074, 564, 1074, 108, 224, 439, 566, 565, 152, 152, |
| 156990 | | - /* 1510 */ 1002, 474, 158, 151, 151, 160, 136, 136, 492, 959, |
| 156991 | | - /* 1520 */ 960, 246, 439, 135, 135, 344, 478, 564, 99, 1058, |
| 156992 | | - /* 1530 */ 487, 223, 246, 564, 553, 227, 1062, 950, 914, 1006, |
| 156993 | | - /* 1540 */ 250, 111, 1002, 1002, 1004, 1005, 27, 331, 533, 133, |
| 156994 | | - /* 1550 */ 133, 564, 1073, 532, 1073, 134, 134, 847, 915, 1332, |
| 156995 | | - /* 1560 */ 141, 111, 1012, 335, 338, 406, 340, 342, 107, 107, |
| 156996 | | - /* 1570 */ 304, 555, 1283, 76, 76, 108, 564, 439, 566, 565, |
| 156997 | | - /* 1580 */ 1157, 441, 1002, 564, 277, 109, 556, 551, 4, 388, |
| 156998 | | - /* 1590 */ 388, 387, 262, 385, 446, 1006, 836, 1267, 78, 78, |
| 156999 | | - /* 1600 */ 349, 564, 559, 359, 564, 75, 75, 360, 1330, 222, |
| 157000 | | - /* 1610 */ 1564, 310, 1344, 1391, 1002, 1002, 1004, 1005, 27, 309, |
| 157001 | | - /* 1620 */ 1319, 550, 1397, 43, 43, 439, 49, 49, 1248, 1240, |
| 157002 | | - /* 1630 */ 1229, 1228, 1230, 1558, 265, 1316, 200, 553, 362, 364, |
| 157003 | | - /* 1640 */ 366, 389, 11, 208, 1373, 220, 1378, 280, 1366, 224, |
| 157004 | | - /* 1650 */ 451, 322, 472, 328, 283, 1561, 1266, 158, 323, 1383, |
| 157005 | | - /* 1660 */ 160, 1382, 288, 368, 497, 1012, 352, 396, 382, 212, |
| 157006 | | - /* 1670 */ 1456, 107, 107, 921, 1455, 1207, 223, 254, 108, 1503, |
| 157007 | | - /* 1680 */ 439, 566, 565, 1501, 1204, 1002, 413, 204, 207, 84, |
| 157008 | | - /* 1690 */ 195, 109, 556, 1379, 4, 554, 180, 196, 170, 80, |
| 157009 | | - /* 1700 */ 164, 456, 175, 1461, 172, 83, 176, 457, 559, 177, |
| 157010 | | - /* 1710 */ 406, 178, 35, 490, 230, 304, 555, 1002, 1002, 1004, |
| 157011 | | - /* 1720 */ 1005, 27, 97, 394, 1385, 1384, 464, 1387, 184, 397, |
| 157012 | | - /* 1730 */ 36, 439, 1450, 479, 90, 485, 189, 234, 236, 446, |
| 157013 | | - /* 1740 */ 1472, 266, 488, 553, 337, 333, 237, 399, 1231, 238, |
| 157014 | | - /* 1750 */ 506, 1286, 427, 92, 1277, 868, 1276, 1285, 213, 101, |
| 157015 | | - /* 1760 */ 556, 429, 4, 1284, 1255, 1575, 1574, 525, 1256, 400, |
| 157016 | | - /* 1770 */ 351, 1012, 1254, 1573, 1544, 96, 559, 107, 107, 516, |
| 157017 | | - /* 1780 */ 519, 297, 298, 1327, 108, 361, 439, 566, 565, 1328, |
| 157018 | | - /* 1790 */ 252, 1002, 253, 432, 1530, 126, 1529, 544, 10, 439, |
| 157019 | | - /* 1800 */ 1436, 376, 528, 103, 98, 260, 1237, 34, 567, 1163, |
| 157020 | | - /* 1810 */ 374, 553, 1326, 363, 199, 1309, 365, 1308, 1325, 380, |
| 157021 | | - /* 1820 */ 367, 261, 381, 1002, 1002, 1004, 1005, 27, 1351, 1350, |
| 157022 | | - /* 1830 */ 263, 264, 568, 1226, 1221, 155, 1488, 1489, 1487, 1012, |
| 157023 | | - /* 1840 */ 139, 156, 1486, 79, 295, 107, 107, 302, 823, 440, |
| 157024 | | - /* 1850 */ 209, 210, 108, 201, 439, 566, 565, 306, 157, 1002, |
| 157025 | | - /* 1860 */ 219, 277, 278, 137, 1072, 1070, 388, 388, 387, 262, |
| 157026 | | - /* 1870 */ 385, 313, 407, 836, 171, 159, 408, 169, 1188, 226, |
| 157027 | | - /* 1880 */ 900, 173, 321, 1086, 229, 179, 222, 161, 310, 162, |
| 157028 | | - /* 1890 */ 416, 1002, 1002, 1004, 1005, 27, 309, 181, 418, 163, |
| 157029 | | - /* 1900 */ 1089, 86, 87, 88, 89, 231, 232, 1085, 148, 18, |
| 157030 | | - /* 1910 */ 233, 332, 250, 1201, 484, 186, 235, 37, 838, 489, |
| 157031 | | - /* 1920 */ 353, 1078, 185, 239, 187, 493, 224, 91, 866, 19, |
| 157032 | | - /* 1930 */ 498, 345, 20, 348, 158, 501, 93, 160, 165, 879, |
| 157033 | | - /* 1940 */ 149, 296, 94, 508, 95, 1151, 150, 1038, 1121, 39, |
| 157034 | | - /* 1950 */ 515, 1122, 40, 223, 214, 518, 269, 271, 190, 944, |
| 157035 | | - /* 1960 */ 1137, 111, 1139, 249, 1141, 1145, 21, 1125, 1144, 33, |
| 157036 | | - /* 1970 */ 540, 949, 22, 23, 24, 25, 193, 99, 1053, 26, |
| 157037 | | - /* 1980 */ 1039, 7, 1037, 1041, 1095, 1042, 1094, 406, 255, 256, |
| 157038 | | - /* 1990 */ 28, 41, 304, 555, 1007, 848, 560, 110, 29, 386, |
| 157039 | | - /* 2000 */ 910, 257, 383, 258, 1566, 1159, 1158, 1565, 1217, 1217, |
| 157040 | | - /* 2010 */ 1217, 1217, 1217, 1217, 1217, 1217, 446, |
| 157239 | + /* 1260 */ 117, 441, 566, 1139, 1527, 442, 1327, 566, 6, 566, |
| 157240 | + /* 1270 */ 47, 47, 566, 559, 413, 1272, 1139, 555, 142, 1139, |
| 157241 | + /* 1280 */ 566, 467, 305, 557, 48, 48, 566, 167, 546, 50, |
| 157242 | + /* 1290 */ 50, 51, 51, 1217, 64, 64, 959, 109, 558, 867, |
| 157243 | + /* 1300 */ 4, 566, 65, 65, 960, 1015, 566, 140, 66, 66, |
| 157244 | + /* 1310 */ 566, 107, 107, 566, 561, 852, 205, 566, 108, 217, |
| 157245 | + /* 1320 */ 442, 568, 567, 14, 14, 1005, 8, 525, 67, 67, |
| 157246 | + /* 1330 */ 566, 454, 129, 129, 222, 68, 68, 442, 455, 53, |
| 157247 | + /* 1340 */ 53, 405, 305, 557, 944, 414, 168, 211, 405, 555, |
| 157248 | + /* 1350 */ 111, 1192, 69, 69, 99, 464, 245, 1005, 1005, 1007, |
| 157249 | + /* 1360 */ 1008, 27, 468, 535, 566, 405, 566, 313, 534, 273, |
| 157250 | + /* 1370 */ 215, 852, 405, 566, 85, 202, 566, 1015, 566, 1211, |
| 157251 | + /* 1380 */ 566, 304, 566, 107, 107, 566, 70, 70, 54, 54, |
| 157252 | + /* 1390 */ 108, 405, 442, 568, 567, 153, 153, 1005, 154, 154, |
| 157253 | + /* 1400 */ 77, 77, 55, 55, 73, 73, 1117, 130, 130, 394, |
| 157254 | + /* 1410 */ 109, 558, 143, 4, 38, 566, 475, 300, 566, 463, |
| 157255 | + /* 1420 */ 279, 1340, 526, 412, 30, 226, 1077, 561, 1077, 1005, |
| 157256 | + /* 1430 */ 1005, 1007, 1008, 27, 1555, 1161, 444, 74, 74, 278, |
| 157257 | + /* 1440 */ 131, 131, 326, 1339, 390, 390, 389, 263, 387, 566, |
| 157258 | + /* 1450 */ 442, 839, 871, 308, 465, 31, 566, 879, 878, 356, |
| 157259 | + /* 1460 */ 327, 206, 555, 99, 223, 206, 312, 546, 1544, 355, |
| 157260 | + /* 1470 */ 997, 132, 132, 251, 311, 456, 535, 288, 128, 128, |
| 157261 | + /* 1480 */ 1065, 536, 109, 558, 470, 4, 566, 251, 1515, 472, |
| 157262 | + /* 1490 */ 1015, 566, 251, 276, 566, 332, 107, 107, 99, 561, |
| 157263 | + /* 1500 */ 1076, 566, 1076, 108, 225, 442, 568, 567, 152, 152, |
| 157264 | + /* 1510 */ 1005, 476, 158, 151, 151, 160, 136, 136, 494, 886, |
| 157265 | + /* 1520 */ 887, 247, 442, 135, 135, 346, 322, 566, 99, 1061, |
| 157266 | + /* 1530 */ 489, 224, 247, 566, 555, 1488, 1065, 1487, 953, 1009, |
| 157267 | + /* 1540 */ 228, 251, 1005, 1005, 1007, 1008, 27, 480, 535, 133, |
| 157268 | + /* 1550 */ 133, 566, 333, 534, 1336, 134, 134, 962, 963, 337, |
| 157269 | + /* 1560 */ 917, 340, 1015, 111, 850, 408, 342, 141, 107, 107, |
| 157270 | + /* 1570 */ 305, 557, 344, 76, 76, 108, 566, 442, 568, 567, |
| 157271 | + /* 1580 */ 1161, 444, 1005, 566, 278, 109, 558, 553, 4, 390, |
| 157272 | + /* 1590 */ 390, 389, 263, 387, 448, 1009, 839, 918, 78, 78, |
| 157273 | + /* 1600 */ 111, 566, 561, 1287, 566, 75, 75, 1271, 1334, 223, |
| 157274 | + /* 1610 */ 1569, 312, 351, 361, 1005, 1005, 1007, 1008, 27, 311, |
| 157275 | + /* 1620 */ 362, 1348, 1395, 43, 43, 442, 49, 49, 1323, 552, |
| 157276 | + /* 1630 */ 1401, 1252, 1244, 1233, 1232, 1234, 1563, 555, 200, 266, |
| 157277 | + /* 1640 */ 1320, 391, 11, 364, 221, 366, 368, 1382, 1377, 225, |
| 157278 | + /* 1650 */ 281, 453, 324, 330, 284, 1387, 474, 158, 208, 370, |
| 157279 | + /* 1660 */ 160, 1370, 325, 556, 195, 1015, 289, 499, 384, 354, |
| 157280 | + /* 1670 */ 1270, 107, 107, 924, 1386, 398, 224, 212, 108, 1460, |
| 157281 | + /* 1680 */ 442, 568, 567, 1459, 1566, 1005, 1211, 255, 1208, 1507, |
| 157282 | + /* 1690 */ 1505, 109, 558, 416, 4, 196, 207, 204, 170, 219, |
| 157283 | + /* 1700 */ 80, 84, 180, 1383, 1465, 83, 164, 172, 561, 458, |
| 157284 | + /* 1710 */ 408, 175, 176, 459, 177, 305, 557, 1005, 1005, 1007, |
| 157285 | + /* 1720 */ 1008, 27, 35, 178, 492, 231, 396, 97, 1389, 466, |
| 157286 | + /* 1730 */ 1388, 442, 481, 36, 1391, 184, 399, 90, 235, 448, |
| 157287 | + /* 1740 */ 1454, 1476, 267, 555, 487, 189, 237, 490, 339, 238, |
| 157288 | + /* 1750 */ 335, 1235, 239, 401, 508, 1281, 430, 1290, 1289, 101, |
| 157289 | + /* 1760 */ 558, 1288, 4, 92, 871, 213, 1580, 432, 1331, 527, |
| 157290 | + /* 1770 */ 96, 1015, 1260, 353, 402, 1579, 561, 107, 107, 1259, |
| 157291 | + /* 1780 */ 363, 1258, 1578, 1280, 108, 298, 442, 568, 567, 1549, |
| 157292 | + /* 1790 */ 518, 1005, 299, 521, 253, 1332, 365, 1535, 254, 442, |
| 157293 | + /* 1800 */ 1534, 435, 546, 10, 126, 378, 1440, 103, 530, 303, |
| 157294 | + /* 1810 */ 98, 555, 261, 1241, 34, 569, 199, 1313, 1330, 1329, |
| 157295 | + /* 1820 */ 367, 369, 376, 1005, 1005, 1007, 1008, 27, 1312, 382, |
| 157296 | + /* 1830 */ 1355, 1354, 383, 1167, 262, 264, 265, 570, 1230, 1015, |
| 157297 | + /* 1840 */ 155, 1225, 1492, 1493, 1491, 107, 107, 1490, 156, 139, |
| 157298 | + /* 1850 */ 296, 79, 108, 826, 442, 568, 567, 209, 157, 1005, |
| 157299 | + /* 1860 */ 443, 278, 201, 210, 307, 220, 390, 390, 389, 263, |
| 157300 | + /* 1870 */ 387, 137, 315, 839, 409, 1075, 1073, 410, 171, 169, |
| 157301 | + /* 1880 */ 159, 903, 173, 227, 1192, 230, 223, 323, 312, 1089, |
| 157302 | + /* 1890 */ 179, 1005, 1005, 1007, 1008, 27, 311, 161, 162, 419, |
| 157303 | + /* 1900 */ 421, 86, 181, 163, 87, 1092, 232, 88, 1088, 148, |
| 157304 | + /* 1910 */ 233, 18, 234, 89, 334, 1081, 251, 1205, 486, 236, |
| 157305 | + /* 1920 */ 186, 37, 841, 355, 491, 240, 225, 869, 187, 503, |
| 157306 | + /* 1930 */ 185, 495, 91, 19, 158, 347, 20, 160, 93, 350, |
| 157307 | + /* 1940 */ 500, 882, 297, 149, 94, 165, 510, 95, 1155, 150, |
| 157308 | + /* 1950 */ 1041, 1125, 39, 224, 40, 517, 1126, 214, 520, 270, |
| 157309 | + /* 1960 */ 272, 190, 947, 250, 111, 1143, 1141, 1145, 1149, 21, |
| 157310 | + /* 1970 */ 1129, 33, 542, 1148, 22, 23, 24, 25, 193, 952, |
| 157311 | + /* 1980 */ 99, 1056, 1042, 1040, 26, 1044, 1098, 408, 7, 1097, |
| 157312 | + /* 1990 */ 256, 257, 305, 557, 1045, 28, 41, 562, 1010, 851, |
| 157313 | + /* 2000 */ 110, 29, 913, 385, 388, 258, 259, 1163, 1162, 1571, |
| 157314 | + /* 2010 */ 1221, 1221, 1221, 1570, 1221, 1221, 448, |
| 157041 | 157315 | }; |
| 157042 | 157316 | static const YYCODETYPE yy_lookahead[] = { |
| 157043 | 157317 | /* 0 */ 190, 212, 190, 190, 211, 190, 212, 190, 270, 271, |
| 157044 | 157318 | /* 10 */ 272, 190, 219, 190, 190, 202, 270, 271, 272, 19, |
| 157045 | 157319 | /* 20 */ 190, 190, 212, 213, 212, 213, 190, 212, 213, 212, |
| | @@ -157180,70 +157454,70 @@ |
| 157180 | 157454 | /* 1370 */ 253, 115, 250, 190, 147, 148, 190, 99, 190, 60, |
| 157181 | 157455 | /* 1380 */ 190, 240, 190, 105, 106, 190, 212, 213, 212, 213, |
| 157182 | 157456 | /* 1390 */ 112, 250, 114, 115, 116, 212, 213, 119, 212, 213, |
| 157183 | 157457 | /* 1400 */ 212, 213, 212, 213, 212, 213, 23, 212, 213, 26, |
| 157184 | 157458 | /* 1410 */ 19, 20, 22, 22, 24, 190, 19, 251, 190, 127, |
| 157185 | | - /* 1420 */ 24, 190, 114, 113, 22, 118, 119, 36, 190, 151, |
| 157459 | + /* 1420 */ 98, 190, 114, 113, 22, 24, 151, 36, 153, 151, |
| 157186 | 157460 | /* 1430 */ 152, 153, 154, 155, 0, 1, 2, 212, 213, 5, |
| 157187 | 157461 | /* 1440 */ 212, 213, 150, 190, 10, 11, 12, 13, 14, 190, |
| 157188 | | - /* 1450 */ 59, 17, 124, 190, 127, 53, 190, 7, 8, 119, |
| 157462 | + /* 1450 */ 59, 17, 124, 131, 127, 53, 190, 118, 119, 119, |
| 157189 | 157463 | /* 1460 */ 23, 140, 71, 26, 30, 140, 32, 143, 312, 129, |
| 157190 | 157464 | /* 1470 */ 23, 212, 213, 26, 40, 190, 85, 150, 212, 213, |
| 157191 | 157465 | /* 1480 */ 59, 90, 19, 20, 23, 22, 190, 26, 190, 23, |
| 157192 | 157466 | /* 1490 */ 99, 190, 26, 22, 190, 23, 105, 106, 26, 36, |
| 157193 | 157467 | /* 1500 */ 151, 190, 153, 112, 70, 114, 115, 116, 212, 213, |
| 157194 | | - /* 1510 */ 119, 114, 78, 212, 213, 81, 212, 213, 23, 83, |
| 157195 | | - /* 1520 */ 84, 26, 59, 212, 213, 23, 190, 190, 26, 23, |
| 157196 | | - /* 1530 */ 284, 97, 26, 190, 71, 139, 115, 23, 23, 59, |
| 157197 | | - /* 1540 */ 26, 26, 151, 152, 153, 154, 155, 190, 85, 212, |
| 157198 | | - /* 1550 */ 213, 190, 151, 90, 153, 212, 213, 23, 23, 190, |
| 157199 | | - /* 1560 */ 26, 26, 99, 190, 190, 131, 190, 190, 105, 106, |
| 157468 | + /* 1510 */ 119, 114, 78, 212, 213, 81, 212, 213, 23, 7, |
| 157469 | + /* 1520 */ 8, 26, 59, 212, 213, 23, 190, 190, 26, 23, |
| 157470 | + /* 1530 */ 284, 97, 26, 190, 71, 190, 115, 190, 23, 59, |
| 157471 | + /* 1540 */ 139, 26, 151, 152, 153, 154, 155, 190, 85, 212, |
| 157472 | + /* 1550 */ 213, 190, 190, 90, 190, 212, 213, 83, 84, 190, |
| 157473 | + /* 1560 */ 23, 190, 99, 26, 23, 131, 190, 26, 105, 106, |
| 157200 | 157474 | /* 1570 */ 136, 137, 190, 212, 213, 112, 190, 114, 115, 116, |
| 157201 | 157475 | /* 1580 */ 1, 2, 119, 190, 5, 19, 20, 232, 22, 10, |
| 157202 | | - /* 1590 */ 11, 12, 13, 14, 160, 115, 17, 190, 212, 213, |
| 157203 | | - /* 1600 */ 190, 190, 36, 190, 190, 212, 213, 190, 190, 30, |
| 157476 | + /* 1590 */ 11, 12, 13, 14, 160, 115, 17, 23, 212, 213, |
| 157477 | + /* 1600 */ 26, 190, 36, 190, 190, 212, 213, 190, 190, 30, |
| 157204 | 157478 | /* 1610 */ 139, 32, 190, 190, 151, 152, 153, 154, 155, 40, |
| 157205 | 157479 | /* 1620 */ 190, 190, 190, 212, 213, 59, 212, 213, 190, 190, |
| 157206 | | - /* 1630 */ 190, 190, 190, 190, 283, 251, 238, 71, 251, 251, |
| 157207 | | - /* 1640 */ 251, 188, 239, 210, 263, 293, 267, 241, 263, 70, |
| 157208 | | - /* 1650 */ 255, 289, 289, 241, 255, 193, 221, 78, 242, 267, |
| 157209 | | - /* 1660 */ 81, 267, 242, 255, 216, 99, 215, 267, 241, 225, |
| 157210 | | - /* 1670 */ 215, 105, 106, 107, 215, 60, 97, 139, 112, 197, |
| 157211 | | - /* 1680 */ 114, 115, 116, 197, 38, 119, 197, 148, 239, 149, |
| 157212 | | - /* 1690 */ 245, 19, 20, 268, 22, 276, 22, 245, 293, 290, |
| 157213 | | - /* 1700 */ 43, 18, 233, 279, 230, 290, 233, 197, 36, 233, |
| 157214 | | - /* 1710 */ 131, 233, 266, 18, 196, 136, 137, 151, 152, 153, |
| 157215 | | - /* 1720 */ 154, 155, 147, 242, 268, 268, 242, 230, 230, 242, |
| 157216 | | - /* 1730 */ 266, 59, 242, 197, 156, 62, 22, 196, 196, 160, |
| 157217 | | - /* 1740 */ 286, 197, 217, 71, 197, 285, 196, 217, 197, 196, |
| 157218 | | - /* 1750 */ 113, 214, 64, 22, 223, 124, 223, 214, 163, 19, |
| 157219 | | - /* 1760 */ 20, 111, 22, 214, 216, 220, 220, 142, 214, 217, |
| 157220 | | - /* 1770 */ 214, 99, 214, 214, 306, 113, 36, 105, 106, 217, |
| 157221 | | - /* 1780 */ 217, 278, 278, 257, 112, 256, 114, 115, 116, 257, |
| 157222 | | - /* 1790 */ 197, 119, 91, 82, 311, 146, 311, 143, 22, 59, |
| 157223 | | - /* 1800 */ 273, 197, 144, 156, 145, 25, 200, 26, 199, 13, |
| 157224 | | - /* 1810 */ 245, 71, 257, 256, 244, 246, 256, 246, 257, 243, |
| 157225 | | - /* 1820 */ 256, 191, 242, 151, 152, 153, 154, 155, 261, 261, |
| 157226 | | - /* 1830 */ 191, 6, 189, 189, 189, 203, 209, 209, 209, 99, |
| 157227 | | - /* 1840 */ 218, 203, 209, 209, 218, 105, 106, 275, 4, 3, |
| 157228 | | - /* 1850 */ 210, 210, 112, 22, 114, 115, 116, 161, 203, 119, |
| 157229 | | - /* 1860 */ 15, 5, 98, 16, 23, 23, 10, 11, 12, 13, |
| 157230 | | - /* 1870 */ 14, 137, 299, 17, 149, 128, 299, 296, 26, 24, |
| 157231 | | - /* 1880 */ 20, 140, 16, 1, 142, 140, 30, 128, 32, 128, |
| 157232 | | - /* 1890 */ 61, 151, 152, 153, 154, 155, 40, 149, 37, 128, |
| 157233 | | - /* 1900 */ 114, 53, 53, 53, 53, 34, 139, 1, 5, 22, |
| 157234 | | - /* 1910 */ 113, 159, 26, 75, 41, 113, 139, 24, 20, 19, |
| 157235 | | - /* 1920 */ 129, 68, 68, 123, 22, 67, 70, 22, 59, 22, |
| 157236 | | - /* 1930 */ 67, 23, 22, 24, 78, 96, 22, 81, 37, 28, |
| 157237 | | - /* 1940 */ 23, 67, 147, 22, 26, 23, 23, 23, 23, 22, |
| 157238 | | - /* 1950 */ 24, 23, 22, 97, 139, 24, 23, 23, 22, 141, |
| 157239 | | - /* 1960 */ 88, 26, 86, 34, 75, 75, 34, 23, 93, 22, |
| 157240 | | - /* 1970 */ 24, 114, 34, 34, 34, 34, 26, 26, 23, 34, |
| 157241 | | - /* 1980 */ 23, 44, 23, 23, 23, 11, 23, 131, 26, 22, |
| 157242 | | - /* 1990 */ 22, 22, 136, 137, 23, 23, 26, 22, 22, 15, |
| 157243 | | - /* 2000 */ 133, 139, 23, 139, 139, 1, 1, 139, 313, 313, |
| 157244 | | - /* 2010 */ 313, 313, 313, 313, 313, 313, 160, 313, 313, 313, |
| 157480 | + /* 1630 */ 190, 190, 190, 190, 190, 190, 190, 71, 238, 283, |
| 157481 | + /* 1640 */ 251, 188, 239, 251, 293, 251, 251, 267, 263, 70, |
| 157482 | + /* 1650 */ 241, 255, 289, 241, 255, 267, 289, 78, 210, 255, |
| 157483 | + /* 1660 */ 81, 263, 242, 276, 245, 99, 242, 216, 241, 215, |
| 157484 | + /* 1670 */ 221, 105, 106, 107, 267, 267, 97, 225, 112, 215, |
| 157485 | + /* 1680 */ 114, 115, 116, 215, 193, 119, 60, 139, 38, 197, |
| 157486 | + /* 1690 */ 197, 19, 20, 197, 22, 245, 239, 148, 293, 293, |
| 157487 | + /* 1700 */ 290, 149, 22, 268, 279, 290, 43, 230, 36, 18, |
| 157488 | + /* 1710 */ 131, 233, 233, 197, 233, 136, 137, 151, 152, 153, |
| 157489 | + /* 1720 */ 154, 155, 266, 233, 18, 196, 242, 147, 268, 242, |
| 157490 | + /* 1730 */ 268, 59, 197, 266, 230, 230, 242, 156, 196, 160, |
| 157491 | + /* 1740 */ 242, 286, 197, 71, 62, 22, 196, 217, 197, 196, |
| 157492 | + /* 1750 */ 285, 197, 196, 217, 113, 223, 64, 214, 214, 19, |
| 157493 | + /* 1760 */ 20, 214, 22, 22, 124, 163, 220, 111, 257, 142, |
| 157494 | + /* 1770 */ 113, 99, 214, 214, 217, 220, 36, 105, 106, 216, |
| 157495 | + /* 1780 */ 256, 214, 214, 223, 112, 278, 114, 115, 116, 306, |
| 157496 | + /* 1790 */ 217, 119, 278, 217, 197, 257, 256, 311, 91, 59, |
| 157497 | + /* 1800 */ 311, 82, 143, 22, 146, 197, 273, 156, 144, 275, |
| 157498 | + /* 1810 */ 145, 71, 25, 200, 26, 199, 244, 246, 257, 257, |
| 157499 | + /* 1820 */ 256, 256, 245, 151, 152, 153, 154, 155, 246, 243, |
| 157500 | + /* 1830 */ 261, 261, 242, 13, 191, 191, 6, 189, 189, 99, |
| 157501 | + /* 1840 */ 203, 189, 209, 209, 209, 105, 106, 209, 203, 218, |
| 157502 | + /* 1850 */ 218, 209, 112, 4, 114, 115, 116, 210, 203, 119, |
| 157503 | + /* 1860 */ 3, 5, 22, 210, 161, 15, 10, 11, 12, 13, |
| 157504 | + /* 1870 */ 14, 16, 137, 17, 299, 23, 23, 299, 149, 296, |
| 157505 | + /* 1880 */ 128, 20, 140, 24, 26, 142, 30, 16, 32, 1, |
| 157506 | + /* 1890 */ 140, 151, 152, 153, 154, 155, 40, 128, 128, 61, |
| 157507 | + /* 1900 */ 37, 53, 149, 128, 53, 114, 34, 53, 1, 5, |
| 157508 | + /* 1910 */ 139, 22, 113, 53, 159, 68, 26, 75, 41, 139, |
| 157509 | + /* 1920 */ 113, 24, 20, 129, 19, 123, 70, 59, 22, 96, |
| 157510 | + /* 1930 */ 68, 67, 22, 22, 78, 23, 22, 81, 22, 24, |
| 157511 | + /* 1940 */ 67, 28, 67, 23, 147, 37, 22, 26, 23, 23, |
| 157512 | + /* 1950 */ 23, 23, 22, 97, 22, 24, 23, 139, 24, 23, |
| 157513 | + /* 1960 */ 23, 22, 141, 34, 26, 86, 88, 75, 75, 34, |
| 157514 | + /* 1970 */ 23, 22, 24, 93, 34, 34, 34, 34, 26, 114, |
| 157515 | + /* 1980 */ 26, 23, 23, 23, 34, 23, 23, 131, 44, 23, |
| 157516 | + /* 1990 */ 26, 22, 136, 137, 11, 22, 22, 26, 23, 23, |
| 157517 | + /* 2000 */ 22, 22, 133, 23, 15, 139, 139, 1, 1, 139, |
| 157518 | + /* 2010 */ 313, 313, 313, 139, 313, 313, 160, 313, 313, 313, |
| 157245 | 157519 | /* 2020 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157246 | 157520 | /* 2030 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157247 | 157521 | /* 2040 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157248 | 157522 | /* 2050 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157249 | 157523 | /* 2060 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| | @@ -157257,15 +157531,15 @@ |
| 157257 | 157531 | /* 2140 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157258 | 157532 | /* 2150 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157259 | 157533 | /* 2160 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157260 | 157534 | /* 2170 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157261 | 157535 | /* 2180 */ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, |
| 157262 | | - /* 2190 */ 182, 182, 182, 182, 182, 182, 182, 182, 182, |
| 157536 | + /* 2190 */ 313, 313, 313, 313, 313, 313, 182, 182, 182, |
| 157263 | 157537 | }; |
| 157264 | | -#define YY_SHIFT_COUNT (570) |
| 157538 | +#define YY_SHIFT_COUNT (572) |
| 157265 | 157539 | #define YY_SHIFT_MIN (0) |
| 157266 | | -#define YY_SHIFT_MAX (2005) |
| 157540 | +#define YY_SHIFT_MAX (2007) |
| 157267 | 157541 | static const unsigned short int yy_shift_ofst[] = { |
| 157268 | 157542 | /* 0 */ 1579, 1434, 1856, 1206, 1206, 1, 1278, 1391, 1463, 1672, |
| 157269 | 157543 | /* 10 */ 1672, 1672, 390, 0, 0, 180, 1008, 1672, 1672, 1672, |
| 157270 | 157544 | /* 20 */ 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672, |
| 157271 | 157545 | /* 30 */ 794, 794, 287, 287, 250, 611, 1, 1, 1, 1, |
| | @@ -157285,48 +157559,48 @@ |
| 157285 | 157559 | /* 170 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, |
| 157286 | 157560 | /* 180 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, |
| 157287 | 157561 | /* 190 */ 573, 1074, 1074, 573, 119, 1187, 1187, 1044, 1044, 1145, |
| 157288 | 157562 | /* 200 */ 1146, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 418, 263, |
| 157289 | 157563 | /* 210 */ 263, 559, 303, 618, 527, 623, 464, 570, 780, 573, |
| 157290 | | - /* 220 */ 573, 573, 573, 573, 573, 573, 573, 573, 669, 573, |
| 157564 | + /* 220 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 669, |
| 157291 | 157565 | /* 230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, |
| 157292 | | - /* 240 */ 573, 245, 245, 245, 573, 573, 573, 573, 985, 573, |
| 157293 | | - /* 250 */ 573, 573, 18, 1076, 573, 573, 1131, 573, 573, 573, |
| 157294 | | - /* 260 */ 573, 573, 573, 573, 573, 941, 1092, 770, 903, 903, |
| 157295 | | - /* 270 */ 903, 903, 1203, 770, 770, 1085, 692, 1144, 1319, 1168, |
| 157296 | | - /* 280 */ 1227, 1321, 1308, 1227, 1308, 1397, 593, 1168, 1168, 593, |
| 157297 | | - /* 290 */ 1168, 1321, 1397, 1328, 15, 1310, 1265, 1265, 1265, 1308, |
| 157298 | | - /* 300 */ 1324, 1324, 863, 1325, 492, 1390, 1615, 1538, 1538, 1646, |
| 157299 | | - /* 310 */ 1646, 1538, 1540, 1539, 1674, 1657, 1683, 1683, 1683, 1683, |
| 157300 | | - /* 320 */ 1538, 1695, 1575, 1539, 1539, 1575, 1674, 1657, 1575, 1657, |
| 157301 | | - /* 330 */ 1575, 1538, 1695, 1578, 1673, 1538, 1695, 1714, 1538, 1695, |
| 157302 | | - /* 340 */ 1538, 1695, 1714, 1637, 1637, 1637, 1688, 1731, 1731, 1714, |
| 157303 | | - /* 350 */ 1637, 1631, 1637, 1688, 1637, 1637, 1595, 1714, 1650, 1650, |
| 157304 | | - /* 360 */ 1714, 1625, 1662, 1625, 1662, 1625, 1662, 1625, 1662, 1538, |
| 157305 | | - /* 370 */ 1701, 1701, 1711, 1711, 1649, 1654, 1776, 1538, 1647, 1649, |
| 157306 | | - /* 380 */ 1659, 1658, 1575, 1780, 1781, 1796, 1796, 1825, 1825, 1825, |
| 157307 | | - /* 390 */ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, |
| 157308 | | - /* 400 */ 2017, 2017, 2017, 2017, 2017, 339, 445, 1064, 1193, 951, |
| 157309 | | - /* 410 */ 1029, 1256, 1383, 1402, 1396, 1292, 1327, 1437, 727, 1447, |
| 157310 | | - /* 420 */ 1461, 1466, 1472, 1495, 1502, 1184, 1307, 1450, 1340, 1421, |
| 157311 | | - /* 430 */ 1506, 1514, 1436, 1515, 1349, 1401, 1534, 1535, 1480, 1471, |
| 157312 | | - /* 440 */ 1844, 1846, 1831, 1696, 1845, 1764, 1847, 1841, 1842, 1734, |
| 157313 | | - /* 450 */ 1725, 1747, 1852, 1852, 1855, 1741, 1860, 1742, 1866, 1882, |
| 157314 | | - /* 460 */ 1745, 1759, 1852, 1761, 1829, 1861, 1852, 1748, 1848, 1849, |
| 157315 | | - /* 470 */ 1850, 1851, 1771, 1786, 1871, 1767, 1906, 1903, 1887, 1797, |
| 157316 | | - /* 480 */ 1752, 1853, 1886, 1854, 1838, 1873, 1777, 1802, 1893, 1898, |
| 157317 | | - /* 490 */ 1900, 1791, 1800, 1902, 1858, 1905, 1907, 1908, 1910, 1863, |
| 157318 | | - /* 500 */ 1869, 1909, 1839, 1911, 1914, 1874, 1901, 1917, 1795, 1921, |
| 157319 | | - /* 510 */ 1922, 1923, 1924, 1918, 1925, 1927, 1926, 1928, 1930, 1931, |
| 157320 | | - /* 520 */ 1815, 1933, 1934, 1857, 1929, 1936, 1818, 1935, 1932, 1938, |
| 157321 | | - /* 530 */ 1939, 1940, 1872, 1889, 1876, 1937, 1890, 1875, 1941, 1944, |
| 157322 | | - /* 540 */ 1947, 1946, 1950, 1951, 1945, 1955, 1935, 1957, 1959, 1960, |
| 157323 | | - /* 550 */ 1961, 1962, 1963, 1967, 1974, 1968, 1969, 1971, 1972, 1975, |
| 157324 | | - /* 560 */ 1976, 1970, 1867, 1862, 1864, 1865, 1868, 1979, 1984, 2004, |
| 157325 | | - /* 570 */ 2005, |
| 157566 | + /* 240 */ 573, 573, 245, 245, 245, 573, 573, 573, 573, 985, |
| 157567 | + /* 250 */ 573, 573, 573, 18, 1076, 573, 573, 1131, 573, 573, |
| 157568 | + /* 260 */ 573, 573, 573, 573, 573, 573, 941, 1092, 770, 903, |
| 157569 | + /* 270 */ 903, 903, 903, 1203, 770, 770, 1085, 692, 1144, 1319, |
| 157570 | + /* 280 */ 1168, 1227, 1321, 1308, 1227, 1308, 1397, 593, 1168, 1168, |
| 157571 | + /* 290 */ 593, 1168, 1321, 1397, 1328, 15, 1310, 1265, 1265, 1265, |
| 157572 | + /* 300 */ 1308, 1324, 1324, 863, 1325, 492, 1390, 1626, 1626, 1548, |
| 157573 | + /* 310 */ 1548, 1650, 1650, 1548, 1552, 1549, 1680, 1663, 1691, 1691, |
| 157574 | + /* 320 */ 1691, 1691, 1548, 1706, 1580, 1549, 1549, 1580, 1680, 1663, |
| 157575 | + /* 330 */ 1580, 1663, 1580, 1548, 1706, 1581, 1682, 1548, 1706, 1723, |
| 157576 | + /* 340 */ 1548, 1706, 1548, 1706, 1723, 1641, 1641, 1641, 1692, 1741, |
| 157577 | + /* 350 */ 1741, 1723, 1641, 1640, 1641, 1692, 1641, 1641, 1602, 1723, |
| 157578 | + /* 360 */ 1656, 1656, 1723, 1627, 1657, 1627, 1657, 1627, 1657, 1627, |
| 157579 | + /* 370 */ 1657, 1548, 1707, 1707, 1719, 1719, 1658, 1659, 1781, 1548, |
| 157580 | + /* 380 */ 1651, 1658, 1665, 1664, 1580, 1787, 1788, 1820, 1820, 1830, |
| 157581 | + /* 390 */ 1830, 1830, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, |
| 157582 | + /* 400 */ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 339, 445, 1064, |
| 157583 | + /* 410 */ 1193, 951, 1029, 1256, 1383, 1322, 1402, 1401, 1292, 1327, |
| 157584 | + /* 420 */ 1437, 727, 1447, 1461, 1466, 1472, 1495, 1502, 1184, 1339, |
| 157585 | + /* 430 */ 1512, 1340, 1421, 1506, 1515, 1474, 1537, 1275, 1349, 1541, |
| 157586 | + /* 440 */ 1574, 1480, 1471, 1849, 1857, 1840, 1703, 1850, 1855, 1852, |
| 157587 | + /* 450 */ 1853, 1735, 1729, 1752, 1858, 1858, 1859, 1742, 1861, 1743, |
| 157588 | + /* 460 */ 1871, 1888, 1750, 1769, 1858, 1770, 1838, 1863, 1858, 1753, |
| 157589 | + /* 470 */ 1848, 1851, 1854, 1860, 1775, 1791, 1872, 1771, 1907, 1904, |
| 157590 | + /* 480 */ 1889, 1799, 1755, 1847, 1890, 1862, 1842, 1877, 1780, 1807, |
| 157591 | + /* 490 */ 1897, 1902, 1905, 1794, 1802, 1906, 1864, 1910, 1911, 1912, |
| 157592 | + /* 500 */ 1914, 1873, 1868, 1915, 1833, 1913, 1916, 1875, 1908, 1920, |
| 157593 | + /* 510 */ 1797, 1924, 1925, 1926, 1927, 1921, 1928, 1930, 1931, 1933, |
| 157594 | + /* 520 */ 1932, 1934, 1818, 1936, 1937, 1865, 1929, 1939, 1821, 1938, |
| 157595 | + /* 530 */ 1935, 1940, 1941, 1942, 1878, 1892, 1879, 1944, 1893, 1880, |
| 157596 | + /* 540 */ 1943, 1947, 1949, 1948, 1952, 1954, 1950, 1958, 1938, 1959, |
| 157597 | + /* 550 */ 1960, 1962, 1963, 1964, 1966, 1969, 1983, 1973, 1974, 1975, |
| 157598 | + /* 560 */ 1976, 1978, 1979, 1971, 1869, 1866, 1867, 1870, 1874, 1980, |
| 157599 | + /* 570 */ 1989, 2006, 2007, |
| 157326 | 157600 | }; |
| 157327 | | -#define YY_REDUCE_COUNT (404) |
| 157601 | +#define YY_REDUCE_COUNT (406) |
| 157328 | 157602 | #define YY_REDUCE_MIN (-262) |
| 157329 | 157603 | #define YY_REDUCE_MAX (1655) |
| 157330 | 157604 | static const short yy_reduce_ofst[] = { |
| 157331 | 157605 | /* 0 */ 599, -123, 272, 716, 756, -121, -190, -188, -185, -183, |
| 157332 | 157606 | /* 10 */ -179, -177, -26, 304, 313, -254, -11, 500, 609, 630, |
| | @@ -157348,89 +157622,89 @@ |
| 157348 | 157622 | /* 170 */ -187, 328, 700, 707, 239, 282, 331, 556, 721, 438, |
| 157349 | 157623 | /* 180 */ 193, 860, 322, 541, 880, 933, 975, 241, 651, 879, |
| 157350 | 157624 | /* 190 */ 970, 270, 905, 918, 88, 914, 961, 967, 1069, -39, |
| 157351 | 157625 | /* 200 */ 604, 1050, 1091, 1098, 1115, 1122, 1117, 1141, -211, -206, |
| 157352 | 157626 | /* 210 */ -180, -130, -161, 10, 179, 236, 316, 341, 629, 726, |
| 157353 | | - /* 220 */ 804, 816, 834, 898, 972, 1177, 1231, 1238, 170, 1253, |
| 157354 | | - /* 230 */ 1263, 1285, 1298, 1336, 1357, 1369, 1373, 1374, 1376, 1377, |
| 157355 | | - /* 240 */ 1382, 240, 257, 1053, 1407, 1410, 1413, 1417, 1012, 1422, |
| 157356 | | - /* 250 */ 1423, 1430, 1166, 1156, 1418, 1431, 1355, 1432, 179, 1438, |
| 157357 | | - /* 260 */ 1439, 1440, 1441, 1442, 1443, 1246, 1351, 1398, 1384, 1387, |
| 157358 | | - /* 270 */ 1388, 1389, 1012, 1398, 1398, 1403, 1433, 1453, 1352, 1379, |
| 157359 | | - /* 280 */ 1381, 1406, 1395, 1385, 1399, 1362, 1416, 1392, 1394, 1420, |
| 157360 | | - /* 290 */ 1400, 1412, 1363, 1448, 1444, 1435, 1451, 1455, 1459, 1408, |
| 157361 | | - /* 300 */ 1445, 1452, 1419, 1427, 1449, 1462, 1405, 1482, 1486, 1409, |
| 157362 | | - /* 310 */ 1415, 1489, 1424, 1425, 1446, 1474, 1469, 1473, 1476, 1478, |
| 157363 | | - /* 320 */ 1510, 1518, 1481, 1456, 1457, 1484, 1464, 1497, 1487, 1498, |
| 157364 | | - /* 330 */ 1490, 1536, 1541, 1454, 1460, 1544, 1542, 1525, 1547, 1550, |
| 157365 | | - /* 340 */ 1551, 1553, 1530, 1537, 1543, 1549, 1531, 1545, 1546, 1552, |
| 157366 | | - /* 350 */ 1554, 1548, 1556, 1533, 1558, 1559, 1468, 1562, 1503, 1504, |
| 157367 | | - /* 360 */ 1563, 1526, 1529, 1532, 1557, 1555, 1560, 1561, 1564, 1593, |
| 157368 | | - /* 370 */ 1483, 1485, 1567, 1568, 1569, 1565, 1527, 1604, 1572, 1571, |
| 157369 | | - /* 380 */ 1570, 1576, 1580, 1606, 1609, 1630, 1639, 1643, 1644, 1645, |
| 157370 | | - /* 390 */ 1573, 1577, 1581, 1632, 1627, 1628, 1629, 1633, 1638, 1622, |
| 157371 | | - /* 400 */ 1626, 1640, 1641, 1634, 1655, |
| 157627 | + /* 220 */ 804, 816, 834, 898, 972, 1177, 1231, 1253, 1285, 170, |
| 157628 | + /* 230 */ 1298, 1336, 1345, 1347, 1357, 1362, 1364, 1369, 1371, 1376, |
| 157629 | + /* 240 */ 1382, 1413, 240, 257, 1053, 1417, 1422, 1423, 1430, 1012, |
| 157630 | + /* 250 */ 1431, 1432, 1438, 1166, 1156, 1418, 1439, 1355, 1440, 179, |
| 157631 | + /* 260 */ 1441, 1442, 1443, 1444, 1445, 1446, 1246, 1356, 1400, 1389, |
| 157632 | + /* 270 */ 1392, 1394, 1395, 1012, 1400, 1400, 1403, 1448, 1453, 1351, |
| 157633 | + /* 280 */ 1380, 1385, 1409, 1396, 1398, 1399, 1363, 1420, 1388, 1407, |
| 157634 | + /* 290 */ 1424, 1408, 1412, 1367, 1451, 1452, 1449, 1454, 1464, 1468, |
| 157635 | + /* 300 */ 1404, 1419, 1450, 1387, 1427, 1457, 1491, 1405, 1406, 1492, |
| 157636 | + /* 310 */ 1493, 1410, 1415, 1496, 1425, 1435, 1456, 1477, 1478, 1479, |
| 157637 | + /* 320 */ 1481, 1490, 1516, 1529, 1484, 1460, 1462, 1487, 1467, 1504, |
| 157638 | + /* 330 */ 1494, 1505, 1498, 1535, 1542, 1455, 1465, 1545, 1550, 1530, |
| 157639 | + /* 340 */ 1551, 1553, 1554, 1556, 1536, 1543, 1544, 1547, 1532, 1546, |
| 157640 | + /* 350 */ 1555, 1557, 1558, 1563, 1559, 1560, 1567, 1568, 1483, 1573, |
| 157641 | + /* 360 */ 1507, 1514, 1576, 1511, 1524, 1538, 1540, 1561, 1564, 1562, |
| 157642 | + /* 370 */ 1565, 1597, 1486, 1489, 1569, 1570, 1571, 1577, 1533, 1608, |
| 157643 | + /* 380 */ 1534, 1582, 1572, 1586, 1590, 1613, 1616, 1643, 1644, 1648, |
| 157644 | + /* 390 */ 1649, 1652, 1575, 1578, 1583, 1637, 1633, 1634, 1635, 1638, |
| 157645 | + /* 400 */ 1645, 1631, 1632, 1647, 1653, 1642, 1655, |
| 157372 | 157646 | }; |
| 157373 | 157647 | static const YYACTIONTYPE yy_default[] = { |
| 157374 | | - /* 0 */ 1610, 1610, 1610, 1445, 1215, 1324, 1215, 1215, 1215, 1445, |
| 157375 | | - /* 10 */ 1445, 1445, 1215, 1354, 1354, 1498, 1246, 1215, 1215, 1215, |
| 157376 | | - /* 20 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1444, 1215, 1215, |
| 157377 | | - /* 30 */ 1215, 1215, 1528, 1528, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157378 | | - /* 40 */ 1215, 1215, 1215, 1363, 1215, 1370, 1215, 1215, 1215, 1215, |
| 157379 | | - /* 50 */ 1215, 1446, 1447, 1215, 1215, 1215, 1497, 1499, 1462, 1377, |
| 157380 | | - /* 60 */ 1376, 1375, 1374, 1480, 1341, 1368, 1361, 1365, 1440, 1441, |
| 157381 | | - /* 70 */ 1439, 1443, 1447, 1446, 1215, 1364, 1411, 1425, 1410, 1215, |
| 157382 | | - /* 80 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157383 | | - /* 90 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157384 | | - /* 100 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157385 | | - /* 110 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157386 | | - /* 120 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1419, 1424, |
| 157387 | | - /* 130 */ 1430, 1423, 1420, 1413, 1412, 1414, 1415, 1215, 1236, 1288, |
| 157388 | | - /* 140 */ 1215, 1215, 1215, 1215, 1516, 1515, 1215, 1215, 1246, 1405, |
| 157389 | | - /* 150 */ 1404, 1416, 1417, 1427, 1426, 1505, 1563, 1562, 1463, 1215, |
| 157390 | | - /* 160 */ 1215, 1215, 1215, 1215, 1215, 1215, 1528, 1215, 1215, 1215, |
| 157391 | | - /* 170 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157392 | | - /* 180 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157393 | | - /* 190 */ 1215, 1528, 1528, 1215, 1246, 1528, 1528, 1242, 1242, 1348, |
| 157394 | | - /* 200 */ 1215, 1511, 1315, 1315, 1315, 1315, 1324, 1315, 1215, 1215, |
| 157395 | | - /* 210 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157396 | | - /* 220 */ 1215, 1215, 1502, 1500, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157397 | | - /* 230 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157398 | | - /* 240 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157399 | | - /* 250 */ 1215, 1215, 1320, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157400 | | - /* 260 */ 1215, 1215, 1215, 1215, 1557, 1215, 1475, 1302, 1320, 1320, |
| 157401 | | - /* 270 */ 1320, 1320, 1322, 1303, 1301, 1314, 1247, 1222, 1602, 1380, |
| 157402 | | - /* 280 */ 1369, 1321, 1343, 1369, 1343, 1599, 1367, 1380, 1380, 1367, |
| 157403 | | - /* 290 */ 1380, 1321, 1599, 1263, 1579, 1258, 1354, 1354, 1354, 1343, |
| 157404 | | - /* 300 */ 1348, 1348, 1442, 1321, 1314, 1215, 1602, 1329, 1329, 1601, |
| 157405 | | - /* 310 */ 1601, 1329, 1463, 1586, 1389, 1291, 1297, 1297, 1297, 1297, |
| 157406 | | - /* 320 */ 1329, 1233, 1367, 1586, 1586, 1367, 1389, 1291, 1367, 1291, |
| 157407 | | - /* 330 */ 1367, 1329, 1233, 1479, 1596, 1329, 1233, 1453, 1329, 1233, |
| 157408 | | - /* 340 */ 1329, 1233, 1453, 1289, 1289, 1289, 1278, 1215, 1215, 1453, |
| 157409 | | - /* 350 */ 1289, 1263, 1289, 1278, 1289, 1289, 1546, 1453, 1457, 1457, |
| 157410 | | - /* 360 */ 1453, 1347, 1342, 1347, 1342, 1347, 1342, 1347, 1342, 1329, |
| 157411 | | - /* 370 */ 1538, 1538, 1357, 1357, 1362, 1348, 1448, 1329, 1215, 1362, |
| 157412 | | - /* 380 */ 1360, 1358, 1367, 1239, 1281, 1560, 1560, 1556, 1556, 1556, |
| 157413 | | - /* 390 */ 1607, 1607, 1511, 1572, 1246, 1246, 1246, 1246, 1572, 1265, |
| 157414 | | - /* 400 */ 1265, 1247, 1247, 1246, 1572, 1215, 1215, 1215, 1215, 1215, |
| 157415 | | - /* 410 */ 1215, 1567, 1215, 1464, 1333, 1215, 1215, 1215, 1215, 1215, |
| 157416 | | - /* 420 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157417 | | - /* 430 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1394, |
| 157418 | | - /* 440 */ 1215, 1218, 1508, 1215, 1215, 1506, 1215, 1215, 1215, 1215, |
| 157419 | | - /* 450 */ 1215, 1215, 1371, 1372, 1334, 1215, 1215, 1215, 1215, 1215, |
| 157420 | | - /* 460 */ 1215, 1215, 1386, 1215, 1215, 1215, 1381, 1215, 1215, 1215, |
| 157421 | | - /* 470 */ 1215, 1215, 1215, 1215, 1215, 1598, 1215, 1215, 1215, 1215, |
| 157422 | | - /* 480 */ 1215, 1215, 1478, 1477, 1215, 1215, 1331, 1215, 1215, 1215, |
| 157423 | | - /* 490 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157424 | | - /* 500 */ 1261, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157425 | | - /* 510 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157426 | | - /* 520 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1359, 1215, 1215, |
| 157427 | | - /* 530 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157428 | | - /* 540 */ 1215, 1215, 1543, 1349, 1215, 1215, 1589, 1215, 1215, 1215, |
| 157429 | | - /* 550 */ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, |
| 157430 | | - /* 560 */ 1215, 1583, 1305, 1396, 1215, 1395, 1399, 1215, 1227, 1215, |
| 157431 | | - /* 570 */ 1215, |
| 157648 | + /* 0 */ 1615, 1615, 1615, 1449, 1219, 1328, 1219, 1219, 1219, 1449, |
| 157649 | + /* 10 */ 1449, 1449, 1219, 1358, 1358, 1502, 1250, 1219, 1219, 1219, |
| 157650 | + /* 20 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1448, 1219, 1219, |
| 157651 | + /* 30 */ 1219, 1219, 1533, 1533, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157652 | + /* 40 */ 1219, 1219, 1219, 1367, 1219, 1374, 1219, 1219, 1219, 1219, |
| 157653 | + /* 50 */ 1219, 1450, 1451, 1219, 1219, 1219, 1501, 1503, 1466, 1381, |
| 157654 | + /* 60 */ 1380, 1379, 1378, 1484, 1345, 1372, 1365, 1369, 1444, 1445, |
| 157655 | + /* 70 */ 1443, 1447, 1451, 1450, 1219, 1368, 1415, 1429, 1414, 1219, |
| 157656 | + /* 80 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157657 | + /* 90 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157658 | + /* 100 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157659 | + /* 110 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157660 | + /* 120 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1423, 1428, |
| 157661 | + /* 130 */ 1434, 1427, 1424, 1417, 1416, 1418, 1419, 1219, 1240, 1292, |
| 157662 | + /* 140 */ 1219, 1219, 1219, 1219, 1521, 1520, 1219, 1219, 1250, 1409, |
| 157663 | + /* 150 */ 1408, 1420, 1421, 1431, 1430, 1509, 1568, 1567, 1467, 1219, |
| 157664 | + /* 160 */ 1219, 1219, 1219, 1219, 1219, 1219, 1533, 1219, 1219, 1219, |
| 157665 | + /* 170 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157666 | + /* 180 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157667 | + /* 190 */ 1219, 1533, 1533, 1219, 1250, 1533, 1533, 1246, 1246, 1352, |
| 157668 | + /* 200 */ 1219, 1516, 1319, 1319, 1319, 1319, 1328, 1319, 1219, 1219, |
| 157669 | + /* 210 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157670 | + /* 220 */ 1219, 1219, 1219, 1506, 1504, 1219, 1219, 1219, 1219, 1219, |
| 157671 | + /* 230 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157672 | + /* 240 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157673 | + /* 250 */ 1219, 1219, 1219, 1324, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157674 | + /* 260 */ 1219, 1219, 1219, 1219, 1219, 1562, 1219, 1479, 1306, 1324, |
| 157675 | + /* 270 */ 1324, 1324, 1324, 1326, 1307, 1305, 1318, 1251, 1226, 1607, |
| 157676 | + /* 280 */ 1384, 1373, 1325, 1347, 1373, 1347, 1604, 1371, 1384, 1384, |
| 157677 | + /* 290 */ 1371, 1384, 1325, 1604, 1267, 1584, 1262, 1358, 1358, 1358, |
| 157678 | + /* 300 */ 1347, 1352, 1352, 1446, 1325, 1318, 1219, 1607, 1607, 1333, |
| 157679 | + /* 310 */ 1333, 1606, 1606, 1333, 1467, 1591, 1393, 1295, 1301, 1301, |
| 157680 | + /* 320 */ 1301, 1301, 1333, 1237, 1371, 1591, 1591, 1371, 1393, 1295, |
| 157681 | + /* 330 */ 1371, 1295, 1371, 1333, 1237, 1483, 1601, 1333, 1237, 1457, |
| 157682 | + /* 340 */ 1333, 1237, 1333, 1237, 1457, 1293, 1293, 1293, 1282, 1219, |
| 157683 | + /* 350 */ 1219, 1457, 1293, 1267, 1293, 1282, 1293, 1293, 1551, 1457, |
| 157684 | + /* 360 */ 1461, 1461, 1457, 1351, 1346, 1351, 1346, 1351, 1346, 1351, |
| 157685 | + /* 370 */ 1346, 1333, 1543, 1543, 1361, 1361, 1366, 1352, 1452, 1333, |
| 157686 | + /* 380 */ 1219, 1366, 1364, 1362, 1371, 1243, 1285, 1565, 1565, 1561, |
| 157687 | + /* 390 */ 1561, 1561, 1612, 1612, 1516, 1577, 1250, 1250, 1250, 1250, |
| 157688 | + /* 400 */ 1577, 1269, 1269, 1251, 1251, 1250, 1577, 1219, 1219, 1219, |
| 157689 | + /* 410 */ 1219, 1219, 1219, 1572, 1219, 1511, 1468, 1337, 1219, 1219, |
| 157690 | + /* 420 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157691 | + /* 430 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157692 | + /* 440 */ 1219, 1219, 1398, 1219, 1222, 1513, 1219, 1219, 1219, 1219, |
| 157693 | + /* 450 */ 1219, 1219, 1219, 1219, 1375, 1376, 1338, 1219, 1219, 1219, |
| 157694 | + /* 460 */ 1219, 1219, 1219, 1219, 1390, 1219, 1219, 1219, 1385, 1219, |
| 157695 | + /* 470 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1603, 1219, 1219, |
| 157696 | + /* 480 */ 1219, 1219, 1219, 1219, 1482, 1481, 1219, 1219, 1335, 1219, |
| 157697 | + /* 490 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157698 | + /* 500 */ 1219, 1219, 1265, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157699 | + /* 510 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157700 | + /* 520 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1363, |
| 157701 | + /* 530 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157702 | + /* 540 */ 1219, 1219, 1219, 1219, 1548, 1353, 1219, 1219, 1594, 1219, |
| 157703 | + /* 550 */ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, |
| 157704 | + /* 560 */ 1219, 1219, 1219, 1588, 1309, 1400, 1219, 1399, 1403, 1219, |
| 157705 | + /* 570 */ 1231, 1219, 1219, |
| 157432 | 157706 | }; |
| 157433 | 157707 | /********** End of lemon-generated parsing tables *****************************/ |
| 157434 | 157708 | |
| 157435 | 157709 | /* The next table maps tokens (terminal symbols) into fallback tokens. |
| 157436 | 157710 | ** If a construct like the following: |
| | @@ -158324,115 +158598,116 @@ |
| 158324 | 158598 | /* 283 */ "cmd ::= REINDEX nm dbnm", |
| 158325 | 158599 | /* 284 */ "cmd ::= ANALYZE", |
| 158326 | 158600 | /* 285 */ "cmd ::= ANALYZE nm dbnm", |
| 158327 | 158601 | /* 286 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", |
| 158328 | 158602 | /* 287 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", |
| 158329 | | - /* 288 */ "add_column_fullname ::= fullname", |
| 158330 | | - /* 289 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm", |
| 158331 | | - /* 290 */ "cmd ::= create_vtab", |
| 158332 | | - /* 291 */ "cmd ::= create_vtab LP vtabarglist RP", |
| 158333 | | - /* 292 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", |
| 158334 | | - /* 293 */ "vtabarg ::=", |
| 158335 | | - /* 294 */ "vtabargtoken ::= ANY", |
| 158336 | | - /* 295 */ "vtabargtoken ::= lp anylist RP", |
| 158337 | | - /* 296 */ "lp ::= LP", |
| 158338 | | - /* 297 */ "with ::= WITH wqlist", |
| 158339 | | - /* 298 */ "with ::= WITH RECURSIVE wqlist", |
| 158340 | | - /* 299 */ "wqlist ::= nm eidlist_opt AS LP select RP", |
| 158341 | | - /* 300 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP", |
| 158342 | | - /* 301 */ "windowdefn_list ::= windowdefn", |
| 158343 | | - /* 302 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", |
| 158344 | | - /* 303 */ "windowdefn ::= nm AS LP window RP", |
| 158345 | | - /* 304 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt", |
| 158346 | | - /* 305 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt", |
| 158347 | | - /* 306 */ "window ::= ORDER BY sortlist frame_opt", |
| 158348 | | - /* 307 */ "window ::= nm ORDER BY sortlist frame_opt", |
| 158349 | | - /* 308 */ "window ::= frame_opt", |
| 158350 | | - /* 309 */ "window ::= nm frame_opt", |
| 158351 | | - /* 310 */ "frame_opt ::=", |
| 158352 | | - /* 311 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt", |
| 158353 | | - /* 312 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt", |
| 158354 | | - /* 313 */ "range_or_rows ::= RANGE|ROWS|GROUPS", |
| 158355 | | - /* 314 */ "frame_bound_s ::= frame_bound", |
| 158356 | | - /* 315 */ "frame_bound_s ::= UNBOUNDED PRECEDING", |
| 158357 | | - /* 316 */ "frame_bound_e ::= frame_bound", |
| 158358 | | - /* 317 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", |
| 158359 | | - /* 318 */ "frame_bound ::= expr PRECEDING|FOLLOWING", |
| 158360 | | - /* 319 */ "frame_bound ::= CURRENT ROW", |
| 158361 | | - /* 320 */ "frame_exclude_opt ::=", |
| 158362 | | - /* 321 */ "frame_exclude_opt ::= EXCLUDE frame_exclude", |
| 158363 | | - /* 322 */ "frame_exclude ::= NO OTHERS", |
| 158364 | | - /* 323 */ "frame_exclude ::= CURRENT ROW", |
| 158365 | | - /* 324 */ "frame_exclude ::= GROUP|TIES", |
| 158366 | | - /* 325 */ "window_clause ::= WINDOW windowdefn_list", |
| 158367 | | - /* 326 */ "filter_over ::= filter_clause over_clause", |
| 158368 | | - /* 327 */ "filter_over ::= over_clause", |
| 158369 | | - /* 328 */ "filter_over ::= filter_clause", |
| 158370 | | - /* 329 */ "over_clause ::= OVER LP window RP", |
| 158371 | | - /* 330 */ "over_clause ::= OVER nm", |
| 158372 | | - /* 331 */ "filter_clause ::= FILTER LP WHERE expr RP", |
| 158373 | | - /* 332 */ "input ::= cmdlist", |
| 158374 | | - /* 333 */ "cmdlist ::= cmdlist ecmd", |
| 158375 | | - /* 334 */ "cmdlist ::= ecmd", |
| 158376 | | - /* 335 */ "ecmd ::= SEMI", |
| 158377 | | - /* 336 */ "ecmd ::= cmdx SEMI", |
| 158378 | | - /* 337 */ "ecmd ::= explain cmdx SEMI", |
| 158379 | | - /* 338 */ "trans_opt ::=", |
| 158380 | | - /* 339 */ "trans_opt ::= TRANSACTION", |
| 158381 | | - /* 340 */ "trans_opt ::= TRANSACTION nm", |
| 158382 | | - /* 341 */ "savepoint_opt ::= SAVEPOINT", |
| 158383 | | - /* 342 */ "savepoint_opt ::=", |
| 158384 | | - /* 343 */ "cmd ::= create_table create_table_args", |
| 158385 | | - /* 344 */ "columnlist ::= columnlist COMMA columnname carglist", |
| 158386 | | - /* 345 */ "columnlist ::= columnname carglist", |
| 158387 | | - /* 346 */ "nm ::= ID|INDEXED", |
| 158388 | | - /* 347 */ "nm ::= STRING", |
| 158389 | | - /* 348 */ "nm ::= JOIN_KW", |
| 158390 | | - /* 349 */ "typetoken ::= typename", |
| 158391 | | - /* 350 */ "typename ::= ID|STRING", |
| 158392 | | - /* 351 */ "signed ::= plus_num", |
| 158393 | | - /* 352 */ "signed ::= minus_num", |
| 158394 | | - /* 353 */ "carglist ::= carglist ccons", |
| 158395 | | - /* 354 */ "carglist ::=", |
| 158396 | | - /* 355 */ "ccons ::= NULL onconf", |
| 158397 | | - /* 356 */ "ccons ::= GENERATED ALWAYS AS generated", |
| 158398 | | - /* 357 */ "ccons ::= AS generated", |
| 158399 | | - /* 358 */ "conslist_opt ::= COMMA conslist", |
| 158400 | | - /* 359 */ "conslist ::= conslist tconscomma tcons", |
| 158401 | | - /* 360 */ "conslist ::= tcons", |
| 158402 | | - /* 361 */ "tconscomma ::=", |
| 158403 | | - /* 362 */ "defer_subclause_opt ::= defer_subclause", |
| 158404 | | - /* 363 */ "resolvetype ::= raisetype", |
| 158405 | | - /* 364 */ "selectnowith ::= oneselect", |
| 158406 | | - /* 365 */ "oneselect ::= values", |
| 158407 | | - /* 366 */ "sclp ::= selcollist COMMA", |
| 158408 | | - /* 367 */ "as ::= ID|STRING", |
| 158409 | | - /* 368 */ "returning ::=", |
| 158410 | | - /* 369 */ "expr ::= term", |
| 158411 | | - /* 370 */ "likeop ::= LIKE_KW|MATCH", |
| 158412 | | - /* 371 */ "exprlist ::= nexprlist", |
| 158413 | | - /* 372 */ "nmnum ::= plus_num", |
| 158414 | | - /* 373 */ "nmnum ::= nm", |
| 158415 | | - /* 374 */ "nmnum ::= ON", |
| 158416 | | - /* 375 */ "nmnum ::= DELETE", |
| 158417 | | - /* 376 */ "nmnum ::= DEFAULT", |
| 158418 | | - /* 377 */ "plus_num ::= INTEGER|FLOAT", |
| 158419 | | - /* 378 */ "foreach_clause ::=", |
| 158420 | | - /* 379 */ "foreach_clause ::= FOR EACH ROW", |
| 158421 | | - /* 380 */ "trnm ::= nm", |
| 158422 | | - /* 381 */ "tridxby ::=", |
| 158423 | | - /* 382 */ "database_kw_opt ::= DATABASE", |
| 158424 | | - /* 383 */ "database_kw_opt ::=", |
| 158425 | | - /* 384 */ "kwcolumn_opt ::=", |
| 158426 | | - /* 385 */ "kwcolumn_opt ::= COLUMNKW", |
| 158427 | | - /* 386 */ "vtabarglist ::= vtabarg", |
| 158428 | | - /* 387 */ "vtabarglist ::= vtabarglist COMMA vtabarg", |
| 158429 | | - /* 388 */ "vtabarg ::= vtabarg vtabargtoken", |
| 158430 | | - /* 389 */ "anylist ::=", |
| 158431 | | - /* 390 */ "anylist ::= anylist LP anylist RP", |
| 158432 | | - /* 391 */ "anylist ::= anylist ANY", |
| 158433 | | - /* 392 */ "with ::=", |
| 158603 | + /* 288 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm", |
| 158604 | + /* 289 */ "add_column_fullname ::= fullname", |
| 158605 | + /* 290 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm", |
| 158606 | + /* 291 */ "cmd ::= create_vtab", |
| 158607 | + /* 292 */ "cmd ::= create_vtab LP vtabarglist RP", |
| 158608 | + /* 293 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", |
| 158609 | + /* 294 */ "vtabarg ::=", |
| 158610 | + /* 295 */ "vtabargtoken ::= ANY", |
| 158611 | + /* 296 */ "vtabargtoken ::= lp anylist RP", |
| 158612 | + /* 297 */ "lp ::= LP", |
| 158613 | + /* 298 */ "with ::= WITH wqlist", |
| 158614 | + /* 299 */ "with ::= WITH RECURSIVE wqlist", |
| 158615 | + /* 300 */ "wqlist ::= nm eidlist_opt AS LP select RP", |
| 158616 | + /* 301 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP", |
| 158617 | + /* 302 */ "windowdefn_list ::= windowdefn", |
| 158618 | + /* 303 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", |
| 158619 | + /* 304 */ "windowdefn ::= nm AS LP window RP", |
| 158620 | + /* 305 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt", |
| 158621 | + /* 306 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt", |
| 158622 | + /* 307 */ "window ::= ORDER BY sortlist frame_opt", |
| 158623 | + /* 308 */ "window ::= nm ORDER BY sortlist frame_opt", |
| 158624 | + /* 309 */ "window ::= frame_opt", |
| 158625 | + /* 310 */ "window ::= nm frame_opt", |
| 158626 | + /* 311 */ "frame_opt ::=", |
| 158627 | + /* 312 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt", |
| 158628 | + /* 313 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt", |
| 158629 | + /* 314 */ "range_or_rows ::= RANGE|ROWS|GROUPS", |
| 158630 | + /* 315 */ "frame_bound_s ::= frame_bound", |
| 158631 | + /* 316 */ "frame_bound_s ::= UNBOUNDED PRECEDING", |
| 158632 | + /* 317 */ "frame_bound_e ::= frame_bound", |
| 158633 | + /* 318 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", |
| 158634 | + /* 319 */ "frame_bound ::= expr PRECEDING|FOLLOWING", |
| 158635 | + /* 320 */ "frame_bound ::= CURRENT ROW", |
| 158636 | + /* 321 */ "frame_exclude_opt ::=", |
| 158637 | + /* 322 */ "frame_exclude_opt ::= EXCLUDE frame_exclude", |
| 158638 | + /* 323 */ "frame_exclude ::= NO OTHERS", |
| 158639 | + /* 324 */ "frame_exclude ::= CURRENT ROW", |
| 158640 | + /* 325 */ "frame_exclude ::= GROUP|TIES", |
| 158641 | + /* 326 */ "window_clause ::= WINDOW windowdefn_list", |
| 158642 | + /* 327 */ "filter_over ::= filter_clause over_clause", |
| 158643 | + /* 328 */ "filter_over ::= over_clause", |
| 158644 | + /* 329 */ "filter_over ::= filter_clause", |
| 158645 | + /* 330 */ "over_clause ::= OVER LP window RP", |
| 158646 | + /* 331 */ "over_clause ::= OVER nm", |
| 158647 | + /* 332 */ "filter_clause ::= FILTER LP WHERE expr RP", |
| 158648 | + /* 333 */ "input ::= cmdlist", |
| 158649 | + /* 334 */ "cmdlist ::= cmdlist ecmd", |
| 158650 | + /* 335 */ "cmdlist ::= ecmd", |
| 158651 | + /* 336 */ "ecmd ::= SEMI", |
| 158652 | + /* 337 */ "ecmd ::= cmdx SEMI", |
| 158653 | + /* 338 */ "ecmd ::= explain cmdx SEMI", |
| 158654 | + /* 339 */ "trans_opt ::=", |
| 158655 | + /* 340 */ "trans_opt ::= TRANSACTION", |
| 158656 | + /* 341 */ "trans_opt ::= TRANSACTION nm", |
| 158657 | + /* 342 */ "savepoint_opt ::= SAVEPOINT", |
| 158658 | + /* 343 */ "savepoint_opt ::=", |
| 158659 | + /* 344 */ "cmd ::= create_table create_table_args", |
| 158660 | + /* 345 */ "columnlist ::= columnlist COMMA columnname carglist", |
| 158661 | + /* 346 */ "columnlist ::= columnname carglist", |
| 158662 | + /* 347 */ "nm ::= ID|INDEXED", |
| 158663 | + /* 348 */ "nm ::= STRING", |
| 158664 | + /* 349 */ "nm ::= JOIN_KW", |
| 158665 | + /* 350 */ "typetoken ::= typename", |
| 158666 | + /* 351 */ "typename ::= ID|STRING", |
| 158667 | + /* 352 */ "signed ::= plus_num", |
| 158668 | + /* 353 */ "signed ::= minus_num", |
| 158669 | + /* 354 */ "carglist ::= carglist ccons", |
| 158670 | + /* 355 */ "carglist ::=", |
| 158671 | + /* 356 */ "ccons ::= NULL onconf", |
| 158672 | + /* 357 */ "ccons ::= GENERATED ALWAYS AS generated", |
| 158673 | + /* 358 */ "ccons ::= AS generated", |
| 158674 | + /* 359 */ "conslist_opt ::= COMMA conslist", |
| 158675 | + /* 360 */ "conslist ::= conslist tconscomma tcons", |
| 158676 | + /* 361 */ "conslist ::= tcons", |
| 158677 | + /* 362 */ "tconscomma ::=", |
| 158678 | + /* 363 */ "defer_subclause_opt ::= defer_subclause", |
| 158679 | + /* 364 */ "resolvetype ::= raisetype", |
| 158680 | + /* 365 */ "selectnowith ::= oneselect", |
| 158681 | + /* 366 */ "oneselect ::= values", |
| 158682 | + /* 367 */ "sclp ::= selcollist COMMA", |
| 158683 | + /* 368 */ "as ::= ID|STRING", |
| 158684 | + /* 369 */ "returning ::=", |
| 158685 | + /* 370 */ "expr ::= term", |
| 158686 | + /* 371 */ "likeop ::= LIKE_KW|MATCH", |
| 158687 | + /* 372 */ "exprlist ::= nexprlist", |
| 158688 | + /* 373 */ "nmnum ::= plus_num", |
| 158689 | + /* 374 */ "nmnum ::= nm", |
| 158690 | + /* 375 */ "nmnum ::= ON", |
| 158691 | + /* 376 */ "nmnum ::= DELETE", |
| 158692 | + /* 377 */ "nmnum ::= DEFAULT", |
| 158693 | + /* 378 */ "plus_num ::= INTEGER|FLOAT", |
| 158694 | + /* 379 */ "foreach_clause ::=", |
| 158695 | + /* 380 */ "foreach_clause ::= FOR EACH ROW", |
| 158696 | + /* 381 */ "trnm ::= nm", |
| 158697 | + /* 382 */ "tridxby ::=", |
| 158698 | + /* 383 */ "database_kw_opt ::= DATABASE", |
| 158699 | + /* 384 */ "database_kw_opt ::=", |
| 158700 | + /* 385 */ "kwcolumn_opt ::=", |
| 158701 | + /* 386 */ "kwcolumn_opt ::= COLUMNKW", |
| 158702 | + /* 387 */ "vtabarglist ::= vtabarg", |
| 158703 | + /* 388 */ "vtabarglist ::= vtabarglist COMMA vtabarg", |
| 158704 | + /* 389 */ "vtabarg ::= vtabarg vtabargtoken", |
| 158705 | + /* 390 */ "anylist ::=", |
| 158706 | + /* 391 */ "anylist ::= anylist LP anylist RP", |
| 158707 | + /* 392 */ "anylist ::= anylist ANY", |
| 158708 | + /* 393 */ "with ::=", |
| 158434 | 158709 | }; |
| 158435 | 158710 | #endif /* NDEBUG */ |
| 158436 | 158711 | |
| 158437 | 158712 | |
| 158438 | 158713 | #if YYSTACKDEPTH<=0 |
| | @@ -159225,115 +159500,116 @@ |
| 159225 | 159500 | 187, /* (283) cmd ::= REINDEX nm dbnm */ |
| 159226 | 159501 | 187, /* (284) cmd ::= ANALYZE */ |
| 159227 | 159502 | 187, /* (285) cmd ::= ANALYZE nm dbnm */ |
| 159228 | 159503 | 187, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */ |
| 159229 | 159504 | 187, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ |
| 159230 | | - 292, /* (288) add_column_fullname ::= fullname */ |
| 159231 | | - 187, /* (289) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ |
| 159232 | | - 187, /* (290) cmd ::= create_vtab */ |
| 159233 | | - 187, /* (291) cmd ::= create_vtab LP vtabarglist RP */ |
| 159234 | | - 294, /* (292) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ |
| 159235 | | - 296, /* (293) vtabarg ::= */ |
| 159236 | | - 297, /* (294) vtabargtoken ::= ANY */ |
| 159237 | | - 297, /* (295) vtabargtoken ::= lp anylist RP */ |
| 159238 | | - 298, /* (296) lp ::= LP */ |
| 159239 | | - 262, /* (297) with ::= WITH wqlist */ |
| 159240 | | - 262, /* (298) with ::= WITH RECURSIVE wqlist */ |
| 159241 | | - 237, /* (299) wqlist ::= nm eidlist_opt AS LP select RP */ |
| 159242 | | - 237, /* (300) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ |
| 159243 | | - 300, /* (301) windowdefn_list ::= windowdefn */ |
| 159244 | | - 300, /* (302) windowdefn_list ::= windowdefn_list COMMA windowdefn */ |
| 159245 | | - 301, /* (303) windowdefn ::= nm AS LP window RP */ |
| 159246 | | - 302, /* (304) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159247 | | - 302, /* (305) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159248 | | - 302, /* (306) window ::= ORDER BY sortlist frame_opt */ |
| 159249 | | - 302, /* (307) window ::= nm ORDER BY sortlist frame_opt */ |
| 159250 | | - 302, /* (308) window ::= frame_opt */ |
| 159251 | | - 302, /* (309) window ::= nm frame_opt */ |
| 159252 | | - 303, /* (310) frame_opt ::= */ |
| 159253 | | - 303, /* (311) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ |
| 159254 | | - 303, /* (312) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ |
| 159255 | | - 307, /* (313) range_or_rows ::= RANGE|ROWS|GROUPS */ |
| 159256 | | - 309, /* (314) frame_bound_s ::= frame_bound */ |
| 159257 | | - 309, /* (315) frame_bound_s ::= UNBOUNDED PRECEDING */ |
| 159258 | | - 310, /* (316) frame_bound_e ::= frame_bound */ |
| 159259 | | - 310, /* (317) frame_bound_e ::= UNBOUNDED FOLLOWING */ |
| 159260 | | - 308, /* (318) frame_bound ::= expr PRECEDING|FOLLOWING */ |
| 159261 | | - 308, /* (319) frame_bound ::= CURRENT ROW */ |
| 159262 | | - 311, /* (320) frame_exclude_opt ::= */ |
| 159263 | | - 311, /* (321) frame_exclude_opt ::= EXCLUDE frame_exclude */ |
| 159264 | | - 312, /* (322) frame_exclude ::= NO OTHERS */ |
| 159265 | | - 312, /* (323) frame_exclude ::= CURRENT ROW */ |
| 159266 | | - 312, /* (324) frame_exclude ::= GROUP|TIES */ |
| 159267 | | - 247, /* (325) window_clause ::= WINDOW windowdefn_list */ |
| 159268 | | - 269, /* (326) filter_over ::= filter_clause over_clause */ |
| 159269 | | - 269, /* (327) filter_over ::= over_clause */ |
| 159270 | | - 269, /* (328) filter_over ::= filter_clause */ |
| 159271 | | - 306, /* (329) over_clause ::= OVER LP window RP */ |
| 159272 | | - 306, /* (330) over_clause ::= OVER nm */ |
| 159273 | | - 305, /* (331) filter_clause ::= FILTER LP WHERE expr RP */ |
| 159274 | | - 182, /* (332) input ::= cmdlist */ |
| 159275 | | - 183, /* (333) cmdlist ::= cmdlist ecmd */ |
| 159276 | | - 183, /* (334) cmdlist ::= ecmd */ |
| 159277 | | - 184, /* (335) ecmd ::= SEMI */ |
| 159278 | | - 184, /* (336) ecmd ::= cmdx SEMI */ |
| 159279 | | - 184, /* (337) ecmd ::= explain cmdx SEMI */ |
| 159280 | | - 189, /* (338) trans_opt ::= */ |
| 159281 | | - 189, /* (339) trans_opt ::= TRANSACTION */ |
| 159282 | | - 189, /* (340) trans_opt ::= TRANSACTION nm */ |
| 159283 | | - 191, /* (341) savepoint_opt ::= SAVEPOINT */ |
| 159284 | | - 191, /* (342) savepoint_opt ::= */ |
| 159285 | | - 187, /* (343) cmd ::= create_table create_table_args */ |
| 159286 | | - 198, /* (344) columnlist ::= columnlist COMMA columnname carglist */ |
| 159287 | | - 198, /* (345) columnlist ::= columnname carglist */ |
| 159288 | | - 190, /* (346) nm ::= ID|INDEXED */ |
| 159289 | | - 190, /* (347) nm ::= STRING */ |
| 159290 | | - 190, /* (348) nm ::= JOIN_KW */ |
| 159291 | | - 204, /* (349) typetoken ::= typename */ |
| 159292 | | - 205, /* (350) typename ::= ID|STRING */ |
| 159293 | | - 206, /* (351) signed ::= plus_num */ |
| 159294 | | - 206, /* (352) signed ::= minus_num */ |
| 159295 | | - 203, /* (353) carglist ::= carglist ccons */ |
| 159296 | | - 203, /* (354) carglist ::= */ |
| 159297 | | - 211, /* (355) ccons ::= NULL onconf */ |
| 159298 | | - 211, /* (356) ccons ::= GENERATED ALWAYS AS generated */ |
| 159299 | | - 211, /* (357) ccons ::= AS generated */ |
| 159300 | | - 199, /* (358) conslist_opt ::= COMMA conslist */ |
| 159301 | | - 224, /* (359) conslist ::= conslist tconscomma tcons */ |
| 159302 | | - 224, /* (360) conslist ::= tcons */ |
| 159303 | | - 225, /* (361) tconscomma ::= */ |
| 159304 | | - 229, /* (362) defer_subclause_opt ::= defer_subclause */ |
| 159305 | | - 231, /* (363) resolvetype ::= raisetype */ |
| 159306 | | - 235, /* (364) selectnowith ::= oneselect */ |
| 159307 | | - 236, /* (365) oneselect ::= values */ |
| 159308 | | - 250, /* (366) sclp ::= selcollist COMMA */ |
| 159309 | | - 251, /* (367) as ::= ID|STRING */ |
| 159310 | | - 268, /* (368) returning ::= */ |
| 159311 | | - 213, /* (369) expr ::= term */ |
| 159312 | | - 270, /* (370) likeop ::= LIKE_KW|MATCH */ |
| 159313 | | - 258, /* (371) exprlist ::= nexprlist */ |
| 159314 | | - 280, /* (372) nmnum ::= plus_num */ |
| 159315 | | - 280, /* (373) nmnum ::= nm */ |
| 159316 | | - 280, /* (374) nmnum ::= ON */ |
| 159317 | | - 280, /* (375) nmnum ::= DELETE */ |
| 159318 | | - 280, /* (376) nmnum ::= DEFAULT */ |
| 159319 | | - 207, /* (377) plus_num ::= INTEGER|FLOAT */ |
| 159320 | | - 285, /* (378) foreach_clause ::= */ |
| 159321 | | - 285, /* (379) foreach_clause ::= FOR EACH ROW */ |
| 159322 | | - 288, /* (380) trnm ::= nm */ |
| 159323 | | - 289, /* (381) tridxby ::= */ |
| 159324 | | - 290, /* (382) database_kw_opt ::= DATABASE */ |
| 159325 | | - 290, /* (383) database_kw_opt ::= */ |
| 159326 | | - 293, /* (384) kwcolumn_opt ::= */ |
| 159327 | | - 293, /* (385) kwcolumn_opt ::= COLUMNKW */ |
| 159328 | | - 295, /* (386) vtabarglist ::= vtabarg */ |
| 159329 | | - 295, /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */ |
| 159330 | | - 296, /* (388) vtabarg ::= vtabarg vtabargtoken */ |
| 159331 | | - 299, /* (389) anylist ::= */ |
| 159332 | | - 299, /* (390) anylist ::= anylist LP anylist RP */ |
| 159333 | | - 299, /* (391) anylist ::= anylist ANY */ |
| 159334 | | - 262, /* (392) with ::= */ |
| 159505 | + 187, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ |
| 159506 | + 292, /* (289) add_column_fullname ::= fullname */ |
| 159507 | + 187, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ |
| 159508 | + 187, /* (291) cmd ::= create_vtab */ |
| 159509 | + 187, /* (292) cmd ::= create_vtab LP vtabarglist RP */ |
| 159510 | + 294, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ |
| 159511 | + 296, /* (294) vtabarg ::= */ |
| 159512 | + 297, /* (295) vtabargtoken ::= ANY */ |
| 159513 | + 297, /* (296) vtabargtoken ::= lp anylist RP */ |
| 159514 | + 298, /* (297) lp ::= LP */ |
| 159515 | + 262, /* (298) with ::= WITH wqlist */ |
| 159516 | + 262, /* (299) with ::= WITH RECURSIVE wqlist */ |
| 159517 | + 237, /* (300) wqlist ::= nm eidlist_opt AS LP select RP */ |
| 159518 | + 237, /* (301) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ |
| 159519 | + 300, /* (302) windowdefn_list ::= windowdefn */ |
| 159520 | + 300, /* (303) windowdefn_list ::= windowdefn_list COMMA windowdefn */ |
| 159521 | + 301, /* (304) windowdefn ::= nm AS LP window RP */ |
| 159522 | + 302, /* (305) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159523 | + 302, /* (306) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159524 | + 302, /* (307) window ::= ORDER BY sortlist frame_opt */ |
| 159525 | + 302, /* (308) window ::= nm ORDER BY sortlist frame_opt */ |
| 159526 | + 302, /* (309) window ::= frame_opt */ |
| 159527 | + 302, /* (310) window ::= nm frame_opt */ |
| 159528 | + 303, /* (311) frame_opt ::= */ |
| 159529 | + 303, /* (312) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ |
| 159530 | + 303, /* (313) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ |
| 159531 | + 307, /* (314) range_or_rows ::= RANGE|ROWS|GROUPS */ |
| 159532 | + 309, /* (315) frame_bound_s ::= frame_bound */ |
| 159533 | + 309, /* (316) frame_bound_s ::= UNBOUNDED PRECEDING */ |
| 159534 | + 310, /* (317) frame_bound_e ::= frame_bound */ |
| 159535 | + 310, /* (318) frame_bound_e ::= UNBOUNDED FOLLOWING */ |
| 159536 | + 308, /* (319) frame_bound ::= expr PRECEDING|FOLLOWING */ |
| 159537 | + 308, /* (320) frame_bound ::= CURRENT ROW */ |
| 159538 | + 311, /* (321) frame_exclude_opt ::= */ |
| 159539 | + 311, /* (322) frame_exclude_opt ::= EXCLUDE frame_exclude */ |
| 159540 | + 312, /* (323) frame_exclude ::= NO OTHERS */ |
| 159541 | + 312, /* (324) frame_exclude ::= CURRENT ROW */ |
| 159542 | + 312, /* (325) frame_exclude ::= GROUP|TIES */ |
| 159543 | + 247, /* (326) window_clause ::= WINDOW windowdefn_list */ |
| 159544 | + 269, /* (327) filter_over ::= filter_clause over_clause */ |
| 159545 | + 269, /* (328) filter_over ::= over_clause */ |
| 159546 | + 269, /* (329) filter_over ::= filter_clause */ |
| 159547 | + 306, /* (330) over_clause ::= OVER LP window RP */ |
| 159548 | + 306, /* (331) over_clause ::= OVER nm */ |
| 159549 | + 305, /* (332) filter_clause ::= FILTER LP WHERE expr RP */ |
| 159550 | + 182, /* (333) input ::= cmdlist */ |
| 159551 | + 183, /* (334) cmdlist ::= cmdlist ecmd */ |
| 159552 | + 183, /* (335) cmdlist ::= ecmd */ |
| 159553 | + 184, /* (336) ecmd ::= SEMI */ |
| 159554 | + 184, /* (337) ecmd ::= cmdx SEMI */ |
| 159555 | + 184, /* (338) ecmd ::= explain cmdx SEMI */ |
| 159556 | + 189, /* (339) trans_opt ::= */ |
| 159557 | + 189, /* (340) trans_opt ::= TRANSACTION */ |
| 159558 | + 189, /* (341) trans_opt ::= TRANSACTION nm */ |
| 159559 | + 191, /* (342) savepoint_opt ::= SAVEPOINT */ |
| 159560 | + 191, /* (343) savepoint_opt ::= */ |
| 159561 | + 187, /* (344) cmd ::= create_table create_table_args */ |
| 159562 | + 198, /* (345) columnlist ::= columnlist COMMA columnname carglist */ |
| 159563 | + 198, /* (346) columnlist ::= columnname carglist */ |
| 159564 | + 190, /* (347) nm ::= ID|INDEXED */ |
| 159565 | + 190, /* (348) nm ::= STRING */ |
| 159566 | + 190, /* (349) nm ::= JOIN_KW */ |
| 159567 | + 204, /* (350) typetoken ::= typename */ |
| 159568 | + 205, /* (351) typename ::= ID|STRING */ |
| 159569 | + 206, /* (352) signed ::= plus_num */ |
| 159570 | + 206, /* (353) signed ::= minus_num */ |
| 159571 | + 203, /* (354) carglist ::= carglist ccons */ |
| 159572 | + 203, /* (355) carglist ::= */ |
| 159573 | + 211, /* (356) ccons ::= NULL onconf */ |
| 159574 | + 211, /* (357) ccons ::= GENERATED ALWAYS AS generated */ |
| 159575 | + 211, /* (358) ccons ::= AS generated */ |
| 159576 | + 199, /* (359) conslist_opt ::= COMMA conslist */ |
| 159577 | + 224, /* (360) conslist ::= conslist tconscomma tcons */ |
| 159578 | + 224, /* (361) conslist ::= tcons */ |
| 159579 | + 225, /* (362) tconscomma ::= */ |
| 159580 | + 229, /* (363) defer_subclause_opt ::= defer_subclause */ |
| 159581 | + 231, /* (364) resolvetype ::= raisetype */ |
| 159582 | + 235, /* (365) selectnowith ::= oneselect */ |
| 159583 | + 236, /* (366) oneselect ::= values */ |
| 159584 | + 250, /* (367) sclp ::= selcollist COMMA */ |
| 159585 | + 251, /* (368) as ::= ID|STRING */ |
| 159586 | + 268, /* (369) returning ::= */ |
| 159587 | + 213, /* (370) expr ::= term */ |
| 159588 | + 270, /* (371) likeop ::= LIKE_KW|MATCH */ |
| 159589 | + 258, /* (372) exprlist ::= nexprlist */ |
| 159590 | + 280, /* (373) nmnum ::= plus_num */ |
| 159591 | + 280, /* (374) nmnum ::= nm */ |
| 159592 | + 280, /* (375) nmnum ::= ON */ |
| 159593 | + 280, /* (376) nmnum ::= DELETE */ |
| 159594 | + 280, /* (377) nmnum ::= DEFAULT */ |
| 159595 | + 207, /* (378) plus_num ::= INTEGER|FLOAT */ |
| 159596 | + 285, /* (379) foreach_clause ::= */ |
| 159597 | + 285, /* (380) foreach_clause ::= FOR EACH ROW */ |
| 159598 | + 288, /* (381) trnm ::= nm */ |
| 159599 | + 289, /* (382) tridxby ::= */ |
| 159600 | + 290, /* (383) database_kw_opt ::= DATABASE */ |
| 159601 | + 290, /* (384) database_kw_opt ::= */ |
| 159602 | + 293, /* (385) kwcolumn_opt ::= */ |
| 159603 | + 293, /* (386) kwcolumn_opt ::= COLUMNKW */ |
| 159604 | + 295, /* (387) vtabarglist ::= vtabarg */ |
| 159605 | + 295, /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */ |
| 159606 | + 296, /* (389) vtabarg ::= vtabarg vtabargtoken */ |
| 159607 | + 299, /* (390) anylist ::= */ |
| 159608 | + 299, /* (391) anylist ::= anylist LP anylist RP */ |
| 159609 | + 299, /* (392) anylist ::= anylist ANY */ |
| 159610 | + 262, /* (393) with ::= */ |
| 159335 | 159611 | }; |
| 159336 | 159612 | |
| 159337 | 159613 | /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number |
| 159338 | 159614 | ** of symbols on the right-hand side of that rule. */ |
| 159339 | 159615 | static const signed char yyRuleInfoNRhs[] = { |
| | @@ -159623,115 +159899,116 @@ |
| 159623 | 159899 | -3, /* (283) cmd ::= REINDEX nm dbnm */ |
| 159624 | 159900 | -1, /* (284) cmd ::= ANALYZE */ |
| 159625 | 159901 | -3, /* (285) cmd ::= ANALYZE nm dbnm */ |
| 159626 | 159902 | -6, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */ |
| 159627 | 159903 | -7, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ |
| 159628 | | - -1, /* (288) add_column_fullname ::= fullname */ |
| 159629 | | - -8, /* (289) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ |
| 159630 | | - -1, /* (290) cmd ::= create_vtab */ |
| 159631 | | - -4, /* (291) cmd ::= create_vtab LP vtabarglist RP */ |
| 159632 | | - -8, /* (292) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ |
| 159633 | | - 0, /* (293) vtabarg ::= */ |
| 159634 | | - -1, /* (294) vtabargtoken ::= ANY */ |
| 159635 | | - -3, /* (295) vtabargtoken ::= lp anylist RP */ |
| 159636 | | - -1, /* (296) lp ::= LP */ |
| 159637 | | - -2, /* (297) with ::= WITH wqlist */ |
| 159638 | | - -3, /* (298) with ::= WITH RECURSIVE wqlist */ |
| 159639 | | - -6, /* (299) wqlist ::= nm eidlist_opt AS LP select RP */ |
| 159640 | | - -8, /* (300) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ |
| 159641 | | - -1, /* (301) windowdefn_list ::= windowdefn */ |
| 159642 | | - -3, /* (302) windowdefn_list ::= windowdefn_list COMMA windowdefn */ |
| 159643 | | - -5, /* (303) windowdefn ::= nm AS LP window RP */ |
| 159644 | | - -5, /* (304) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159645 | | - -6, /* (305) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159646 | | - -4, /* (306) window ::= ORDER BY sortlist frame_opt */ |
| 159647 | | - -5, /* (307) window ::= nm ORDER BY sortlist frame_opt */ |
| 159648 | | - -1, /* (308) window ::= frame_opt */ |
| 159649 | | - -2, /* (309) window ::= nm frame_opt */ |
| 159650 | | - 0, /* (310) frame_opt ::= */ |
| 159651 | | - -3, /* (311) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ |
| 159652 | | - -6, /* (312) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ |
| 159653 | | - -1, /* (313) range_or_rows ::= RANGE|ROWS|GROUPS */ |
| 159654 | | - -1, /* (314) frame_bound_s ::= frame_bound */ |
| 159655 | | - -2, /* (315) frame_bound_s ::= UNBOUNDED PRECEDING */ |
| 159656 | | - -1, /* (316) frame_bound_e ::= frame_bound */ |
| 159657 | | - -2, /* (317) frame_bound_e ::= UNBOUNDED FOLLOWING */ |
| 159658 | | - -2, /* (318) frame_bound ::= expr PRECEDING|FOLLOWING */ |
| 159659 | | - -2, /* (319) frame_bound ::= CURRENT ROW */ |
| 159660 | | - 0, /* (320) frame_exclude_opt ::= */ |
| 159661 | | - -2, /* (321) frame_exclude_opt ::= EXCLUDE frame_exclude */ |
| 159662 | | - -2, /* (322) frame_exclude ::= NO OTHERS */ |
| 159663 | | - -2, /* (323) frame_exclude ::= CURRENT ROW */ |
| 159664 | | - -1, /* (324) frame_exclude ::= GROUP|TIES */ |
| 159665 | | - -2, /* (325) window_clause ::= WINDOW windowdefn_list */ |
| 159666 | | - -2, /* (326) filter_over ::= filter_clause over_clause */ |
| 159667 | | - -1, /* (327) filter_over ::= over_clause */ |
| 159668 | | - -1, /* (328) filter_over ::= filter_clause */ |
| 159669 | | - -4, /* (329) over_clause ::= OVER LP window RP */ |
| 159670 | | - -2, /* (330) over_clause ::= OVER nm */ |
| 159671 | | - -5, /* (331) filter_clause ::= FILTER LP WHERE expr RP */ |
| 159672 | | - -1, /* (332) input ::= cmdlist */ |
| 159673 | | - -2, /* (333) cmdlist ::= cmdlist ecmd */ |
| 159674 | | - -1, /* (334) cmdlist ::= ecmd */ |
| 159675 | | - -1, /* (335) ecmd ::= SEMI */ |
| 159676 | | - -2, /* (336) ecmd ::= cmdx SEMI */ |
| 159677 | | - -3, /* (337) ecmd ::= explain cmdx SEMI */ |
| 159678 | | - 0, /* (338) trans_opt ::= */ |
| 159679 | | - -1, /* (339) trans_opt ::= TRANSACTION */ |
| 159680 | | - -2, /* (340) trans_opt ::= TRANSACTION nm */ |
| 159681 | | - -1, /* (341) savepoint_opt ::= SAVEPOINT */ |
| 159682 | | - 0, /* (342) savepoint_opt ::= */ |
| 159683 | | - -2, /* (343) cmd ::= create_table create_table_args */ |
| 159684 | | - -4, /* (344) columnlist ::= columnlist COMMA columnname carglist */ |
| 159685 | | - -2, /* (345) columnlist ::= columnname carglist */ |
| 159686 | | - -1, /* (346) nm ::= ID|INDEXED */ |
| 159687 | | - -1, /* (347) nm ::= STRING */ |
| 159688 | | - -1, /* (348) nm ::= JOIN_KW */ |
| 159689 | | - -1, /* (349) typetoken ::= typename */ |
| 159690 | | - -1, /* (350) typename ::= ID|STRING */ |
| 159691 | | - -1, /* (351) signed ::= plus_num */ |
| 159692 | | - -1, /* (352) signed ::= minus_num */ |
| 159693 | | - -2, /* (353) carglist ::= carglist ccons */ |
| 159694 | | - 0, /* (354) carglist ::= */ |
| 159695 | | - -2, /* (355) ccons ::= NULL onconf */ |
| 159696 | | - -4, /* (356) ccons ::= GENERATED ALWAYS AS generated */ |
| 159697 | | - -2, /* (357) ccons ::= AS generated */ |
| 159698 | | - -2, /* (358) conslist_opt ::= COMMA conslist */ |
| 159699 | | - -3, /* (359) conslist ::= conslist tconscomma tcons */ |
| 159700 | | - -1, /* (360) conslist ::= tcons */ |
| 159701 | | - 0, /* (361) tconscomma ::= */ |
| 159702 | | - -1, /* (362) defer_subclause_opt ::= defer_subclause */ |
| 159703 | | - -1, /* (363) resolvetype ::= raisetype */ |
| 159704 | | - -1, /* (364) selectnowith ::= oneselect */ |
| 159705 | | - -1, /* (365) oneselect ::= values */ |
| 159706 | | - -2, /* (366) sclp ::= selcollist COMMA */ |
| 159707 | | - -1, /* (367) as ::= ID|STRING */ |
| 159708 | | - 0, /* (368) returning ::= */ |
| 159709 | | - -1, /* (369) expr ::= term */ |
| 159710 | | - -1, /* (370) likeop ::= LIKE_KW|MATCH */ |
| 159711 | | - -1, /* (371) exprlist ::= nexprlist */ |
| 159712 | | - -1, /* (372) nmnum ::= plus_num */ |
| 159713 | | - -1, /* (373) nmnum ::= nm */ |
| 159714 | | - -1, /* (374) nmnum ::= ON */ |
| 159715 | | - -1, /* (375) nmnum ::= DELETE */ |
| 159716 | | - -1, /* (376) nmnum ::= DEFAULT */ |
| 159717 | | - -1, /* (377) plus_num ::= INTEGER|FLOAT */ |
| 159718 | | - 0, /* (378) foreach_clause ::= */ |
| 159719 | | - -3, /* (379) foreach_clause ::= FOR EACH ROW */ |
| 159720 | | - -1, /* (380) trnm ::= nm */ |
| 159721 | | - 0, /* (381) tridxby ::= */ |
| 159722 | | - -1, /* (382) database_kw_opt ::= DATABASE */ |
| 159723 | | - 0, /* (383) database_kw_opt ::= */ |
| 159724 | | - 0, /* (384) kwcolumn_opt ::= */ |
| 159725 | | - -1, /* (385) kwcolumn_opt ::= COLUMNKW */ |
| 159726 | | - -1, /* (386) vtabarglist ::= vtabarg */ |
| 159727 | | - -3, /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */ |
| 159728 | | - -2, /* (388) vtabarg ::= vtabarg vtabargtoken */ |
| 159729 | | - 0, /* (389) anylist ::= */ |
| 159730 | | - -4, /* (390) anylist ::= anylist LP anylist RP */ |
| 159731 | | - -2, /* (391) anylist ::= anylist ANY */ |
| 159732 | | - 0, /* (392) with ::= */ |
| 159904 | + -6, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ |
| 159905 | + -1, /* (289) add_column_fullname ::= fullname */ |
| 159906 | + -8, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ |
| 159907 | + -1, /* (291) cmd ::= create_vtab */ |
| 159908 | + -4, /* (292) cmd ::= create_vtab LP vtabarglist RP */ |
| 159909 | + -8, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ |
| 159910 | + 0, /* (294) vtabarg ::= */ |
| 159911 | + -1, /* (295) vtabargtoken ::= ANY */ |
| 159912 | + -3, /* (296) vtabargtoken ::= lp anylist RP */ |
| 159913 | + -1, /* (297) lp ::= LP */ |
| 159914 | + -2, /* (298) with ::= WITH wqlist */ |
| 159915 | + -3, /* (299) with ::= WITH RECURSIVE wqlist */ |
| 159916 | + -6, /* (300) wqlist ::= nm eidlist_opt AS LP select RP */ |
| 159917 | + -8, /* (301) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ |
| 159918 | + -1, /* (302) windowdefn_list ::= windowdefn */ |
| 159919 | + -3, /* (303) windowdefn_list ::= windowdefn_list COMMA windowdefn */ |
| 159920 | + -5, /* (304) windowdefn ::= nm AS LP window RP */ |
| 159921 | + -5, /* (305) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159922 | + -6, /* (306) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ |
| 159923 | + -4, /* (307) window ::= ORDER BY sortlist frame_opt */ |
| 159924 | + -5, /* (308) window ::= nm ORDER BY sortlist frame_opt */ |
| 159925 | + -1, /* (309) window ::= frame_opt */ |
| 159926 | + -2, /* (310) window ::= nm frame_opt */ |
| 159927 | + 0, /* (311) frame_opt ::= */ |
| 159928 | + -3, /* (312) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ |
| 159929 | + -6, /* (313) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ |
| 159930 | + -1, /* (314) range_or_rows ::= RANGE|ROWS|GROUPS */ |
| 159931 | + -1, /* (315) frame_bound_s ::= frame_bound */ |
| 159932 | + -2, /* (316) frame_bound_s ::= UNBOUNDED PRECEDING */ |
| 159933 | + -1, /* (317) frame_bound_e ::= frame_bound */ |
| 159934 | + -2, /* (318) frame_bound_e ::= UNBOUNDED FOLLOWING */ |
| 159935 | + -2, /* (319) frame_bound ::= expr PRECEDING|FOLLOWING */ |
| 159936 | + -2, /* (320) frame_bound ::= CURRENT ROW */ |
| 159937 | + 0, /* (321) frame_exclude_opt ::= */ |
| 159938 | + -2, /* (322) frame_exclude_opt ::= EXCLUDE frame_exclude */ |
| 159939 | + -2, /* (323) frame_exclude ::= NO OTHERS */ |
| 159940 | + -2, /* (324) frame_exclude ::= CURRENT ROW */ |
| 159941 | + -1, /* (325) frame_exclude ::= GROUP|TIES */ |
| 159942 | + -2, /* (326) window_clause ::= WINDOW windowdefn_list */ |
| 159943 | + -2, /* (327) filter_over ::= filter_clause over_clause */ |
| 159944 | + -1, /* (328) filter_over ::= over_clause */ |
| 159945 | + -1, /* (329) filter_over ::= filter_clause */ |
| 159946 | + -4, /* (330) over_clause ::= OVER LP window RP */ |
| 159947 | + -2, /* (331) over_clause ::= OVER nm */ |
| 159948 | + -5, /* (332) filter_clause ::= FILTER LP WHERE expr RP */ |
| 159949 | + -1, /* (333) input ::= cmdlist */ |
| 159950 | + -2, /* (334) cmdlist ::= cmdlist ecmd */ |
| 159951 | + -1, /* (335) cmdlist ::= ecmd */ |
| 159952 | + -1, /* (336) ecmd ::= SEMI */ |
| 159953 | + -2, /* (337) ecmd ::= cmdx SEMI */ |
| 159954 | + -3, /* (338) ecmd ::= explain cmdx SEMI */ |
| 159955 | + 0, /* (339) trans_opt ::= */ |
| 159956 | + -1, /* (340) trans_opt ::= TRANSACTION */ |
| 159957 | + -2, /* (341) trans_opt ::= TRANSACTION nm */ |
| 159958 | + -1, /* (342) savepoint_opt ::= SAVEPOINT */ |
| 159959 | + 0, /* (343) savepoint_opt ::= */ |
| 159960 | + -2, /* (344) cmd ::= create_table create_table_args */ |
| 159961 | + -4, /* (345) columnlist ::= columnlist COMMA columnname carglist */ |
| 159962 | + -2, /* (346) columnlist ::= columnname carglist */ |
| 159963 | + -1, /* (347) nm ::= ID|INDEXED */ |
| 159964 | + -1, /* (348) nm ::= STRING */ |
| 159965 | + -1, /* (349) nm ::= JOIN_KW */ |
| 159966 | + -1, /* (350) typetoken ::= typename */ |
| 159967 | + -1, /* (351) typename ::= ID|STRING */ |
| 159968 | + -1, /* (352) signed ::= plus_num */ |
| 159969 | + -1, /* (353) signed ::= minus_num */ |
| 159970 | + -2, /* (354) carglist ::= carglist ccons */ |
| 159971 | + 0, /* (355) carglist ::= */ |
| 159972 | + -2, /* (356) ccons ::= NULL onconf */ |
| 159973 | + -4, /* (357) ccons ::= GENERATED ALWAYS AS generated */ |
| 159974 | + -2, /* (358) ccons ::= AS generated */ |
| 159975 | + -2, /* (359) conslist_opt ::= COMMA conslist */ |
| 159976 | + -3, /* (360) conslist ::= conslist tconscomma tcons */ |
| 159977 | + -1, /* (361) conslist ::= tcons */ |
| 159978 | + 0, /* (362) tconscomma ::= */ |
| 159979 | + -1, /* (363) defer_subclause_opt ::= defer_subclause */ |
| 159980 | + -1, /* (364) resolvetype ::= raisetype */ |
| 159981 | + -1, /* (365) selectnowith ::= oneselect */ |
| 159982 | + -1, /* (366) oneselect ::= values */ |
| 159983 | + -2, /* (367) sclp ::= selcollist COMMA */ |
| 159984 | + -1, /* (368) as ::= ID|STRING */ |
| 159985 | + 0, /* (369) returning ::= */ |
| 159986 | + -1, /* (370) expr ::= term */ |
| 159987 | + -1, /* (371) likeop ::= LIKE_KW|MATCH */ |
| 159988 | + -1, /* (372) exprlist ::= nexprlist */ |
| 159989 | + -1, /* (373) nmnum ::= plus_num */ |
| 159990 | + -1, /* (374) nmnum ::= nm */ |
| 159991 | + -1, /* (375) nmnum ::= ON */ |
| 159992 | + -1, /* (376) nmnum ::= DELETE */ |
| 159993 | + -1, /* (377) nmnum ::= DEFAULT */ |
| 159994 | + -1, /* (378) plus_num ::= INTEGER|FLOAT */ |
| 159995 | + 0, /* (379) foreach_clause ::= */ |
| 159996 | + -3, /* (380) foreach_clause ::= FOR EACH ROW */ |
| 159997 | + -1, /* (381) trnm ::= nm */ |
| 159998 | + 0, /* (382) tridxby ::= */ |
| 159999 | + -1, /* (383) database_kw_opt ::= DATABASE */ |
| 160000 | + 0, /* (384) database_kw_opt ::= */ |
| 160001 | + 0, /* (385) kwcolumn_opt ::= */ |
| 160002 | + -1, /* (386) kwcolumn_opt ::= COLUMNKW */ |
| 160003 | + -1, /* (387) vtabarglist ::= vtabarg */ |
| 160004 | + -3, /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */ |
| 160005 | + -2, /* (389) vtabarg ::= vtabarg vtabargtoken */ |
| 160006 | + 0, /* (390) anylist ::= */ |
| 160007 | + -4, /* (391) anylist ::= anylist LP anylist RP */ |
| 160008 | + -2, /* (392) anylist ::= anylist ANY */ |
| 160009 | + 0, /* (393) with ::= */ |
| 159733 | 160010 | }; |
| 159734 | 160011 | |
| 159735 | 160012 | static void yy_accept(yyParser*); /* Forward Declaration */ |
| 159736 | 160013 | |
| 159737 | 160014 | /* |
| | @@ -159787,11 +160064,11 @@ |
| 159787 | 160064 | {yymsp[1].minor.yy412 = TK_DEFERRED;} |
| 159788 | 160065 | break; |
| 159789 | 160066 | case 5: /* transtype ::= DEFERRED */ |
| 159790 | 160067 | case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6); |
| 159791 | 160068 | case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7); |
| 159792 | | - case 313: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==313); |
| 160069 | + case 314: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==314); |
| 159793 | 160070 | {yymsp[0].minor.yy412 = yymsp[0].major; /*A-overwrites-X*/} |
| 159794 | 160071 | break; |
| 159795 | 160072 | case 8: /* cmd ::= COMMIT|END trans_opt */ |
| 159796 | 160073 | case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9); |
| 159797 | 160074 | {sqlite3EndTransaction(pParse,yymsp[-1].major);} |
| | @@ -160964,167 +161241,172 @@ |
| 160964 | 161241 | { |
| 160965 | 161242 | yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n; |
| 160966 | 161243 | sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0); |
| 160967 | 161244 | } |
| 160968 | 161245 | break; |
| 160969 | | - case 288: /* add_column_fullname ::= fullname */ |
| 161246 | + case 288: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ |
| 161247 | +{ |
| 161248 | + sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy457, &yymsp[0].minor.yy0); |
| 161249 | +} |
| 161250 | + break; |
| 161251 | + case 289: /* add_column_fullname ::= fullname */ |
| 160970 | 161252 | { |
| 160971 | 161253 | disableLookaside(pParse); |
| 160972 | 161254 | sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy457); |
| 160973 | 161255 | } |
| 160974 | 161256 | break; |
| 160975 | | - case 289: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ |
| 161257 | + case 290: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ |
| 160976 | 161258 | { |
| 160977 | 161259 | sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy457, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); |
| 160978 | 161260 | } |
| 160979 | 161261 | break; |
| 160980 | | - case 290: /* cmd ::= create_vtab */ |
| 161262 | + case 291: /* cmd ::= create_vtab */ |
| 160981 | 161263 | {sqlite3VtabFinishParse(pParse,0);} |
| 160982 | 161264 | break; |
| 160983 | | - case 291: /* cmd ::= create_vtab LP vtabarglist RP */ |
| 161265 | + case 292: /* cmd ::= create_vtab LP vtabarglist RP */ |
| 160984 | 161266 | {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} |
| 160985 | 161267 | break; |
| 160986 | | - case 292: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ |
| 161268 | + case 293: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ |
| 160987 | 161269 | { |
| 160988 | 161270 | sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy412); |
| 160989 | 161271 | } |
| 160990 | 161272 | break; |
| 160991 | | - case 293: /* vtabarg ::= */ |
| 161273 | + case 294: /* vtabarg ::= */ |
| 160992 | 161274 | {sqlite3VtabArgInit(pParse);} |
| 160993 | 161275 | break; |
| 160994 | | - case 294: /* vtabargtoken ::= ANY */ |
| 160995 | | - case 295: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==295); |
| 160996 | | - case 296: /* lp ::= LP */ yytestcase(yyruleno==296); |
| 161276 | + case 295: /* vtabargtoken ::= ANY */ |
| 161277 | + case 296: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==296); |
| 161278 | + case 297: /* lp ::= LP */ yytestcase(yyruleno==297); |
| 160997 | 161279 | {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} |
| 160998 | 161280 | break; |
| 160999 | | - case 297: /* with ::= WITH wqlist */ |
| 161000 | | - case 298: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==298); |
| 161281 | + case 298: /* with ::= WITH wqlist */ |
| 161282 | + case 299: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==299); |
| 161001 | 161283 | { sqlite3WithPush(pParse, yymsp[0].minor.yy105, 1); } |
| 161002 | 161284 | break; |
| 161003 | | - case 299: /* wqlist ::= nm eidlist_opt AS LP select RP */ |
| 161285 | + case 300: /* wqlist ::= nm eidlist_opt AS LP select RP */ |
| 161004 | 161286 | { |
| 161005 | 161287 | yymsp[-5].minor.yy105 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293); /*A-overwrites-X*/ |
| 161006 | 161288 | } |
| 161007 | 161289 | break; |
| 161008 | | - case 300: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ |
| 161290 | + case 301: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ |
| 161009 | 161291 | { |
| 161010 | 161292 | yymsp[-7].minor.yy105 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy105, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy350, yymsp[-1].minor.yy293); |
| 161011 | 161293 | } |
| 161012 | 161294 | break; |
| 161013 | | - case 301: /* windowdefn_list ::= windowdefn */ |
| 161295 | + case 302: /* windowdefn_list ::= windowdefn */ |
| 161014 | 161296 | { yylhsminor.yy503 = yymsp[0].minor.yy503; } |
| 161015 | 161297 | yymsp[0].minor.yy503 = yylhsminor.yy503; |
| 161016 | 161298 | break; |
| 161017 | | - case 302: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ |
| 161299 | + case 303: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ |
| 161018 | 161300 | { |
| 161019 | 161301 | assert( yymsp[0].minor.yy503!=0 ); |
| 161020 | 161302 | sqlite3WindowChain(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy503); |
| 161021 | 161303 | yymsp[0].minor.yy503->pNextWin = yymsp[-2].minor.yy503; |
| 161022 | 161304 | yylhsminor.yy503 = yymsp[0].minor.yy503; |
| 161023 | 161305 | } |
| 161024 | 161306 | yymsp[-2].minor.yy503 = yylhsminor.yy503; |
| 161025 | 161307 | break; |
| 161026 | | - case 303: /* windowdefn ::= nm AS LP window RP */ |
| 161308 | + case 304: /* windowdefn ::= nm AS LP window RP */ |
| 161027 | 161309 | { |
| 161028 | 161310 | if( ALWAYS(yymsp[-1].minor.yy503) ){ |
| 161029 | 161311 | yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n); |
| 161030 | 161312 | } |
| 161031 | 161313 | yylhsminor.yy503 = yymsp[-1].minor.yy503; |
| 161032 | 161314 | } |
| 161033 | 161315 | yymsp[-4].minor.yy503 = yylhsminor.yy503; |
| 161034 | 161316 | break; |
| 161035 | | - case 304: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ |
| 161317 | + case 305: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ |
| 161036 | 161318 | { |
| 161037 | 161319 | yymsp[-4].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, 0); |
| 161038 | 161320 | } |
| 161039 | 161321 | break; |
| 161040 | | - case 305: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ |
| 161322 | + case 306: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ |
| 161041 | 161323 | { |
| 161042 | 161324 | yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, yymsp[-2].minor.yy350, yymsp[-1].minor.yy350, &yymsp[-5].minor.yy0); |
| 161043 | 161325 | } |
| 161044 | 161326 | yymsp[-5].minor.yy503 = yylhsminor.yy503; |
| 161045 | 161327 | break; |
| 161046 | | - case 306: /* window ::= ORDER BY sortlist frame_opt */ |
| 161328 | + case 307: /* window ::= ORDER BY sortlist frame_opt */ |
| 161047 | 161329 | { |
| 161048 | 161330 | yymsp[-3].minor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, 0); |
| 161049 | 161331 | } |
| 161050 | 161332 | break; |
| 161051 | | - case 307: /* window ::= nm ORDER BY sortlist frame_opt */ |
| 161333 | + case 308: /* window ::= nm ORDER BY sortlist frame_opt */ |
| 161052 | 161334 | { |
| 161053 | 161335 | yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, yymsp[-1].minor.yy350, &yymsp[-4].minor.yy0); |
| 161054 | 161336 | } |
| 161055 | 161337 | yymsp[-4].minor.yy503 = yylhsminor.yy503; |
| 161056 | 161338 | break; |
| 161057 | | - case 308: /* window ::= frame_opt */ |
| 161058 | | - case 327: /* filter_over ::= over_clause */ yytestcase(yyruleno==327); |
| 161339 | + case 309: /* window ::= frame_opt */ |
| 161340 | + case 328: /* filter_over ::= over_clause */ yytestcase(yyruleno==328); |
| 161059 | 161341 | { |
| 161060 | 161342 | yylhsminor.yy503 = yymsp[0].minor.yy503; |
| 161061 | 161343 | } |
| 161062 | 161344 | yymsp[0].minor.yy503 = yylhsminor.yy503; |
| 161063 | 161345 | break; |
| 161064 | | - case 309: /* window ::= nm frame_opt */ |
| 161346 | + case 310: /* window ::= nm frame_opt */ |
| 161065 | 161347 | { |
| 161066 | 161348 | yylhsminor.yy503 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy503, 0, 0, &yymsp[-1].minor.yy0); |
| 161067 | 161349 | } |
| 161068 | 161350 | yymsp[-1].minor.yy503 = yylhsminor.yy503; |
| 161069 | 161351 | break; |
| 161070 | | - case 310: /* frame_opt ::= */ |
| 161352 | + case 311: /* frame_opt ::= */ |
| 161071 | 161353 | { |
| 161072 | 161354 | yymsp[1].minor.yy503 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0); |
| 161073 | 161355 | } |
| 161074 | 161356 | break; |
| 161075 | | - case 311: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ |
| 161357 | + case 312: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ |
| 161076 | 161358 | { |
| 161077 | 161359 | yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy412, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy624); |
| 161078 | 161360 | } |
| 161079 | 161361 | yymsp[-2].minor.yy503 = yylhsminor.yy503; |
| 161080 | 161362 | break; |
| 161081 | | - case 312: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ |
| 161363 | + case 313: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ |
| 161082 | 161364 | { |
| 161083 | 161365 | yylhsminor.yy503 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy412, yymsp[-3].minor.yy341.eType, yymsp[-3].minor.yy341.pExpr, yymsp[-1].minor.yy341.eType, yymsp[-1].minor.yy341.pExpr, yymsp[0].minor.yy624); |
| 161084 | 161366 | } |
| 161085 | 161367 | yymsp[-5].minor.yy503 = yylhsminor.yy503; |
| 161086 | 161368 | break; |
| 161087 | | - case 314: /* frame_bound_s ::= frame_bound */ |
| 161088 | | - case 316: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==316); |
| 161369 | + case 315: /* frame_bound_s ::= frame_bound */ |
| 161370 | + case 317: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==317); |
| 161089 | 161371 | {yylhsminor.yy341 = yymsp[0].minor.yy341;} |
| 161090 | 161372 | yymsp[0].minor.yy341 = yylhsminor.yy341; |
| 161091 | 161373 | break; |
| 161092 | | - case 315: /* frame_bound_s ::= UNBOUNDED PRECEDING */ |
| 161093 | | - case 317: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==317); |
| 161094 | | - case 319: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==319); |
| 161374 | + case 316: /* frame_bound_s ::= UNBOUNDED PRECEDING */ |
| 161375 | + case 318: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==318); |
| 161376 | + case 320: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==320); |
| 161095 | 161377 | {yylhsminor.yy341.eType = yymsp[-1].major; yylhsminor.yy341.pExpr = 0;} |
| 161096 | 161378 | yymsp[-1].minor.yy341 = yylhsminor.yy341; |
| 161097 | 161379 | break; |
| 161098 | | - case 318: /* frame_bound ::= expr PRECEDING|FOLLOWING */ |
| 161380 | + case 319: /* frame_bound ::= expr PRECEDING|FOLLOWING */ |
| 161099 | 161381 | {yylhsminor.yy341.eType = yymsp[0].major; yylhsminor.yy341.pExpr = yymsp[-1].minor.yy354;} |
| 161100 | 161382 | yymsp[-1].minor.yy341 = yylhsminor.yy341; |
| 161101 | 161383 | break; |
| 161102 | | - case 320: /* frame_exclude_opt ::= */ |
| 161384 | + case 321: /* frame_exclude_opt ::= */ |
| 161103 | 161385 | {yymsp[1].minor.yy624 = 0;} |
| 161104 | 161386 | break; |
| 161105 | | - case 321: /* frame_exclude_opt ::= EXCLUDE frame_exclude */ |
| 161387 | + case 322: /* frame_exclude_opt ::= EXCLUDE frame_exclude */ |
| 161106 | 161388 | {yymsp[-1].minor.yy624 = yymsp[0].minor.yy624;} |
| 161107 | 161389 | break; |
| 161108 | | - case 322: /* frame_exclude ::= NO OTHERS */ |
| 161109 | | - case 323: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==323); |
| 161390 | + case 323: /* frame_exclude ::= NO OTHERS */ |
| 161391 | + case 324: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==324); |
| 161110 | 161392 | {yymsp[-1].minor.yy624 = yymsp[-1].major; /*A-overwrites-X*/} |
| 161111 | 161393 | break; |
| 161112 | | - case 324: /* frame_exclude ::= GROUP|TIES */ |
| 161394 | + case 325: /* frame_exclude ::= GROUP|TIES */ |
| 161113 | 161395 | {yymsp[0].minor.yy624 = yymsp[0].major; /*A-overwrites-X*/} |
| 161114 | 161396 | break; |
| 161115 | | - case 325: /* window_clause ::= WINDOW windowdefn_list */ |
| 161397 | + case 326: /* window_clause ::= WINDOW windowdefn_list */ |
| 161116 | 161398 | { yymsp[-1].minor.yy503 = yymsp[0].minor.yy503; } |
| 161117 | 161399 | break; |
| 161118 | | - case 326: /* filter_over ::= filter_clause over_clause */ |
| 161400 | + case 327: /* filter_over ::= filter_clause over_clause */ |
| 161119 | 161401 | { |
| 161120 | 161402 | yymsp[0].minor.yy503->pFilter = yymsp[-1].minor.yy354; |
| 161121 | 161403 | yylhsminor.yy503 = yymsp[0].minor.yy503; |
| 161122 | 161404 | } |
| 161123 | 161405 | yymsp[-1].minor.yy503 = yylhsminor.yy503; |
| 161124 | 161406 | break; |
| 161125 | | - case 328: /* filter_over ::= filter_clause */ |
| 161407 | + case 329: /* filter_over ::= filter_clause */ |
| 161126 | 161408 | { |
| 161127 | 161409 | yylhsminor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window)); |
| 161128 | 161410 | if( yylhsminor.yy503 ){ |
| 161129 | 161411 | yylhsminor.yy503->eFrmType = TK_FILTER; |
| 161130 | 161412 | yylhsminor.yy503->pFilter = yymsp[0].minor.yy354; |
| | @@ -161132,89 +161414,89 @@ |
| 161132 | 161414 | sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy354); |
| 161133 | 161415 | } |
| 161134 | 161416 | } |
| 161135 | 161417 | yymsp[0].minor.yy503 = yylhsminor.yy503; |
| 161136 | 161418 | break; |
| 161137 | | - case 329: /* over_clause ::= OVER LP window RP */ |
| 161419 | + case 330: /* over_clause ::= OVER LP window RP */ |
| 161138 | 161420 | { |
| 161139 | 161421 | yymsp[-3].minor.yy503 = yymsp[-1].minor.yy503; |
| 161140 | 161422 | assert( yymsp[-3].minor.yy503!=0 ); |
| 161141 | 161423 | } |
| 161142 | 161424 | break; |
| 161143 | | - case 330: /* over_clause ::= OVER nm */ |
| 161425 | + case 331: /* over_clause ::= OVER nm */ |
| 161144 | 161426 | { |
| 161145 | 161427 | yymsp[-1].minor.yy503 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window)); |
| 161146 | 161428 | if( yymsp[-1].minor.yy503 ){ |
| 161147 | 161429 | yymsp[-1].minor.yy503->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n); |
| 161148 | 161430 | } |
| 161149 | 161431 | } |
| 161150 | 161432 | break; |
| 161151 | | - case 331: /* filter_clause ::= FILTER LP WHERE expr RP */ |
| 161433 | + case 332: /* filter_clause ::= FILTER LP WHERE expr RP */ |
| 161152 | 161434 | { yymsp[-4].minor.yy354 = yymsp[-1].minor.yy354; } |
| 161153 | 161435 | break; |
| 161154 | 161436 | default: |
| 161155 | | - /* (332) input ::= cmdlist */ yytestcase(yyruleno==332); |
| 161156 | | - /* (333) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==333); |
| 161157 | | - /* (334) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=334); |
| 161158 | | - /* (335) ecmd ::= SEMI */ yytestcase(yyruleno==335); |
| 161159 | | - /* (336) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==336); |
| 161160 | | - /* (337) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=337); |
| 161161 | | - /* (338) trans_opt ::= */ yytestcase(yyruleno==338); |
| 161162 | | - /* (339) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==339); |
| 161163 | | - /* (340) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==340); |
| 161164 | | - /* (341) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==341); |
| 161165 | | - /* (342) savepoint_opt ::= */ yytestcase(yyruleno==342); |
| 161166 | | - /* (343) cmd ::= create_table create_table_args */ yytestcase(yyruleno==343); |
| 161167 | | - /* (344) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==344); |
| 161168 | | - /* (345) columnlist ::= columnname carglist */ yytestcase(yyruleno==345); |
| 161169 | | - /* (346) nm ::= ID|INDEXED */ yytestcase(yyruleno==346); |
| 161170 | | - /* (347) nm ::= STRING */ yytestcase(yyruleno==347); |
| 161171 | | - /* (348) nm ::= JOIN_KW */ yytestcase(yyruleno==348); |
| 161172 | | - /* (349) typetoken ::= typename */ yytestcase(yyruleno==349); |
| 161173 | | - /* (350) typename ::= ID|STRING */ yytestcase(yyruleno==350); |
| 161174 | | - /* (351) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=351); |
| 161175 | | - /* (352) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=352); |
| 161176 | | - /* (353) carglist ::= carglist ccons */ yytestcase(yyruleno==353); |
| 161177 | | - /* (354) carglist ::= */ yytestcase(yyruleno==354); |
| 161178 | | - /* (355) ccons ::= NULL onconf */ yytestcase(yyruleno==355); |
| 161179 | | - /* (356) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==356); |
| 161180 | | - /* (357) ccons ::= AS generated */ yytestcase(yyruleno==357); |
| 161181 | | - /* (358) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==358); |
| 161182 | | - /* (359) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==359); |
| 161183 | | - /* (360) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=360); |
| 161184 | | - /* (361) tconscomma ::= */ yytestcase(yyruleno==361); |
| 161185 | | - /* (362) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=362); |
| 161186 | | - /* (363) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=363); |
| 161187 | | - /* (364) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=364); |
| 161188 | | - /* (365) oneselect ::= values */ yytestcase(yyruleno==365); |
| 161189 | | - /* (366) sclp ::= selcollist COMMA */ yytestcase(yyruleno==366); |
| 161190 | | - /* (367) as ::= ID|STRING */ yytestcase(yyruleno==367); |
| 161191 | | - /* (368) returning ::= */ yytestcase(yyruleno==368); |
| 161192 | | - /* (369) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=369); |
| 161193 | | - /* (370) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==370); |
| 161194 | | - /* (371) exprlist ::= nexprlist */ yytestcase(yyruleno==371); |
| 161195 | | - /* (372) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=372); |
| 161196 | | - /* (373) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=373); |
| 161197 | | - /* (374) nmnum ::= ON */ yytestcase(yyruleno==374); |
| 161198 | | - /* (375) nmnum ::= DELETE */ yytestcase(yyruleno==375); |
| 161199 | | - /* (376) nmnum ::= DEFAULT */ yytestcase(yyruleno==376); |
| 161200 | | - /* (377) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==377); |
| 161201 | | - /* (378) foreach_clause ::= */ yytestcase(yyruleno==378); |
| 161202 | | - /* (379) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==379); |
| 161203 | | - /* (380) trnm ::= nm */ yytestcase(yyruleno==380); |
| 161204 | | - /* (381) tridxby ::= */ yytestcase(yyruleno==381); |
| 161205 | | - /* (382) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==382); |
| 161206 | | - /* (383) database_kw_opt ::= */ yytestcase(yyruleno==383); |
| 161207 | | - /* (384) kwcolumn_opt ::= */ yytestcase(yyruleno==384); |
| 161208 | | - /* (385) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==385); |
| 161209 | | - /* (386) vtabarglist ::= vtabarg */ yytestcase(yyruleno==386); |
| 161210 | | - /* (387) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==387); |
| 161211 | | - /* (388) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==388); |
| 161212 | | - /* (389) anylist ::= */ yytestcase(yyruleno==389); |
| 161213 | | - /* (390) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==390); |
| 161214 | | - /* (391) anylist ::= anylist ANY */ yytestcase(yyruleno==391); |
| 161215 | | - /* (392) with ::= */ yytestcase(yyruleno==392); |
| 161437 | + /* (333) input ::= cmdlist */ yytestcase(yyruleno==333); |
| 161438 | + /* (334) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==334); |
| 161439 | + /* (335) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=335); |
| 161440 | + /* (336) ecmd ::= SEMI */ yytestcase(yyruleno==336); |
| 161441 | + /* (337) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==337); |
| 161442 | + /* (338) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=338); |
| 161443 | + /* (339) trans_opt ::= */ yytestcase(yyruleno==339); |
| 161444 | + /* (340) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==340); |
| 161445 | + /* (341) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==341); |
| 161446 | + /* (342) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==342); |
| 161447 | + /* (343) savepoint_opt ::= */ yytestcase(yyruleno==343); |
| 161448 | + /* (344) cmd ::= create_table create_table_args */ yytestcase(yyruleno==344); |
| 161449 | + /* (345) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==345); |
| 161450 | + /* (346) columnlist ::= columnname carglist */ yytestcase(yyruleno==346); |
| 161451 | + /* (347) nm ::= ID|INDEXED */ yytestcase(yyruleno==347); |
| 161452 | + /* (348) nm ::= STRING */ yytestcase(yyruleno==348); |
| 161453 | + /* (349) nm ::= JOIN_KW */ yytestcase(yyruleno==349); |
| 161454 | + /* (350) typetoken ::= typename */ yytestcase(yyruleno==350); |
| 161455 | + /* (351) typename ::= ID|STRING */ yytestcase(yyruleno==351); |
| 161456 | + /* (352) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=352); |
| 161457 | + /* (353) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=353); |
| 161458 | + /* (354) carglist ::= carglist ccons */ yytestcase(yyruleno==354); |
| 161459 | + /* (355) carglist ::= */ yytestcase(yyruleno==355); |
| 161460 | + /* (356) ccons ::= NULL onconf */ yytestcase(yyruleno==356); |
| 161461 | + /* (357) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==357); |
| 161462 | + /* (358) ccons ::= AS generated */ yytestcase(yyruleno==358); |
| 161463 | + /* (359) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==359); |
| 161464 | + /* (360) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==360); |
| 161465 | + /* (361) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=361); |
| 161466 | + /* (362) tconscomma ::= */ yytestcase(yyruleno==362); |
| 161467 | + /* (363) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=363); |
| 161468 | + /* (364) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=364); |
| 161469 | + /* (365) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=365); |
| 161470 | + /* (366) oneselect ::= values */ yytestcase(yyruleno==366); |
| 161471 | + /* (367) sclp ::= selcollist COMMA */ yytestcase(yyruleno==367); |
| 161472 | + /* (368) as ::= ID|STRING */ yytestcase(yyruleno==368); |
| 161473 | + /* (369) returning ::= */ yytestcase(yyruleno==369); |
| 161474 | + /* (370) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=370); |
| 161475 | + /* (371) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==371); |
| 161476 | + /* (372) exprlist ::= nexprlist */ yytestcase(yyruleno==372); |
| 161477 | + /* (373) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=373); |
| 161478 | + /* (374) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=374); |
| 161479 | + /* (375) nmnum ::= ON */ yytestcase(yyruleno==375); |
| 161480 | + /* (376) nmnum ::= DELETE */ yytestcase(yyruleno==376); |
| 161481 | + /* (377) nmnum ::= DEFAULT */ yytestcase(yyruleno==377); |
| 161482 | + /* (378) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==378); |
| 161483 | + /* (379) foreach_clause ::= */ yytestcase(yyruleno==379); |
| 161484 | + /* (380) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==380); |
| 161485 | + /* (381) trnm ::= nm */ yytestcase(yyruleno==381); |
| 161486 | + /* (382) tridxby ::= */ yytestcase(yyruleno==382); |
| 161487 | + /* (383) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==383); |
| 161488 | + /* (384) database_kw_opt ::= */ yytestcase(yyruleno==384); |
| 161489 | + /* (385) kwcolumn_opt ::= */ yytestcase(yyruleno==385); |
| 161490 | + /* (386) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==386); |
| 161491 | + /* (387) vtabarglist ::= vtabarg */ yytestcase(yyruleno==387); |
| 161492 | + /* (388) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==388); |
| 161493 | + /* (389) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==389); |
| 161494 | + /* (390) anylist ::= */ yytestcase(yyruleno==390); |
| 161495 | + /* (391) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==391); |
| 161496 | + /* (392) anylist ::= anylist ANY */ yytestcase(yyruleno==392); |
| 161497 | + /* (393) with ::= */ yytestcase(yyruleno==393); |
| 161216 | 161498 | break; |
| 161217 | 161499 | /********** End reduce actions ************************************************/ |
| 161218 | 161500 | }; |
| 161219 | 161501 | assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) ); |
| 161220 | 161502 | yygoto = yyRuleInfoLhs[yyruleno]; |
| | @@ -203040,26 +203322,28 @@ |
| 203040 | 203322 | #ifdef SQLITE_AMALGAMATION |
| 203041 | 203323 | assert( WAL_CKPT_LOCK==1 ); |
| 203042 | 203324 | #endif |
| 203043 | 203325 | |
| 203044 | 203326 | assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) ); |
| 203045 | | - if( pRbu && (pRbu->eStage==RBU_STAGE_OAL || pRbu->eStage==RBU_STAGE_MOVE) ){ |
| 203046 | | - /* Magic number 1 is the WAL_CKPT_LOCK lock. Preventing SQLite from |
| 203047 | | - ** taking this lock also prevents any checkpoints from occurring. |
| 203048 | | - ** todo: really, it's not clear why this might occur, as |
| 203049 | | - ** wal_autocheckpoint ought to be turned off. */ |
| 203327 | + if( pRbu && ( |
| 203328 | + pRbu->eStage==RBU_STAGE_OAL |
| 203329 | + || pRbu->eStage==RBU_STAGE_MOVE |
| 203330 | + || pRbu->eStage==RBU_STAGE_DONE |
| 203331 | + )){ |
| 203332 | + /* Prevent SQLite from taking a shm-lock on the target file when it |
| 203333 | + ** is supplying heap memory to the upper layer in place of *-shm |
| 203334 | + ** segments. */ |
| 203050 | 203335 | if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY; |
| 203051 | 203336 | }else{ |
| 203052 | 203337 | int bCapture = 0; |
| 203053 | 203338 | if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){ |
| 203054 | 203339 | bCapture = 1; |
| 203055 | 203340 | } |
| 203056 | | - |
| 203057 | 203341 | if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){ |
| 203058 | 203342 | rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags); |
| 203059 | 203343 | if( bCapture && rc==SQLITE_OK ){ |
| 203060 | | - pRbu->mLock |= (1 << ofst); |
| 203344 | + pRbu->mLock |= ((1<<n) - 1) << ofst; |
| 203061 | 203345 | } |
| 203062 | 203346 | } |
| 203063 | 203347 | } |
| 203064 | 203348 | |
| 203065 | 203349 | return rc; |
| | @@ -228484,11 +228768,11 @@ |
| 228484 | 228768 | int nArg, /* Number of args */ |
| 228485 | 228769 | sqlite3_value **apUnused /* Function arguments */ |
| 228486 | 228770 | ){ |
| 228487 | 228771 | assert( nArg==0 ); |
| 228488 | 228772 | UNUSED_PARAM2(nArg, apUnused); |
| 228489 | | - sqlite3_result_text(pCtx, "fts5: 2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398f17d", -1, SQLITE_TRANSIENT); |
| 228773 | + sqlite3_result_text(pCtx, "fts5: 2021-02-17 13:19:22 c46a94a624c2cc6c49ac916a206a913081e1628c24805987cabc75c9057ea36b", -1, SQLITE_TRANSIENT); |
| 228490 | 228774 | } |
| 228491 | 228775 | |
| 228492 | 228776 | /* |
| 228493 | 228777 | ** Return true if zName is the extension on one of the shadow tables used |
| 228494 | 228778 | ** by this module. |
| | @@ -233410,12 +233694,12 @@ |
| 233410 | 233694 | } |
| 233411 | 233695 | #endif /* SQLITE_CORE */ |
| 233412 | 233696 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 233413 | 233697 | |
| 233414 | 233698 | /************** End of stmt.c ************************************************/ |
| 233415 | | -#if __LINE__!=233415 |
| 233699 | +#if __LINE__!=233699 |
| 233416 | 233700 | #undef SQLITE_SOURCE_ID |
| 233417 | | -#define SQLITE_SOURCE_ID "2021-02-07 12:59:43 5f8bf99579e6663fc701cdc94f685584a86398c4687e25e7e241de755398alt2" |
| 233701 | +#define SQLITE_SOURCE_ID "2021-02-19 14:32:58 c844a331e78949850fde8ed95058cb34f863566944bc9e92e3ae042768f1alt2" |
| 233418 | 233702 | #endif |
| 233419 | 233703 | /* Return the source-id for this library */ |
| 233420 | 233704 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 233421 | 233705 | /************************** End of sqlite3.c ******************************/ |
| 233422 | 233706 | |