| | @@ -1162,11 +1162,11 @@ |
| 1162 | 1162 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1163 | 1163 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1164 | 1164 | */ |
| 1165 | 1165 | #define SQLITE_VERSION "3.33.0" |
| 1166 | 1166 | #define SQLITE_VERSION_NUMBER 3033000 |
| 1167 | | -#define SQLITE_SOURCE_ID "2020-06-04 18:05:39 6da784c9e174744d6deeb76c553b515b96c1fcb80c55a281e476959ec680fb72" |
| 1167 | +#define SQLITE_SOURCE_ID "2020-06-08 11:34:40 6e6b3729e0549de028f6c5bf494b2d69d621c81b61a1dc0a329d3950039342fb" |
| 1168 | 1168 | |
| 1169 | 1169 | /* |
| 1170 | 1170 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1171 | 1171 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1172 | 1172 | ** |
| | @@ -17861,15 +17861,15 @@ |
| 17861 | 17861 | int nSortingColumn; /* Number of columns in the sorting index */ |
| 17862 | 17862 | int mnReg, mxReg; /* Range of registers allocated for aCol and aFunc */ |
| 17863 | 17863 | ExprList *pGroupBy; /* The group by clause */ |
| 17864 | 17864 | struct AggInfo_col { /* For each column used in source tables */ |
| 17865 | 17865 | Table *pTab; /* Source table */ |
| 17866 | + Expr *pExpr; /* The original expression */ |
| 17866 | 17867 | int iTable; /* Cursor number of the source table */ |
| 17867 | | - int iColumn; /* Column number within the source table */ |
| 17868 | | - int iSorterColumn; /* Column number in the sorting index */ |
| 17869 | 17868 | int iMem; /* Memory location that acts as accumulator */ |
| 17870 | | - Expr *pExpr; /* The original expression */ |
| 17869 | + i16 iColumn; /* Column number within the source table */ |
| 17870 | + i16 iSorterColumn; /* Column number in the sorting index */ |
| 17871 | 17871 | } *aCol; |
| 17872 | 17872 | int nColumn; /* Number of used entries in aCol[] */ |
| 17873 | 17873 | int nAccumulator; /* Number of columns that show through to the output. |
| 17874 | 17874 | ** Additional columns are used only as parameters to |
| 17875 | 17875 | ** aggregate functions */ |
| | @@ -17878,12 +17878,21 @@ |
| 17878 | 17878 | FuncDef *pFunc; /* The aggregate function implementation */ |
| 17879 | 17879 | int iMem; /* Memory location that acts as accumulator */ |
| 17880 | 17880 | int iDistinct; /* Ephemeral table used to enforce DISTINCT */ |
| 17881 | 17881 | } *aFunc; |
| 17882 | 17882 | int nFunc; /* Number of entries in aFunc[] */ |
| 17883 | +#ifdef SQLITE_DEBUG |
| 17884 | + int iAggMagic; /* Magic number when valid */ |
| 17885 | +#endif |
| 17886 | + AggInfo *pNext; /* Next in list of them all */ |
| 17883 | 17887 | }; |
| 17884 | 17888 | |
| 17889 | +/* |
| 17890 | +** Value for AggInfo.iAggMagic when the structure is valid |
| 17891 | +*/ |
| 17892 | +#define AggInfoMagic 0x2059e99e |
| 17893 | + |
| 17885 | 17894 | /* |
| 17886 | 17895 | ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. |
| 17887 | 17896 | ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater |
| 17888 | 17897 | ** than 32767 we have to make it 32-bit. 16-bit is preferred because |
| 17889 | 17898 | ** it uses less memory in the Expr object, which is a big memory user |
| | @@ -18676,10 +18685,11 @@ |
| 18676 | 18685 | #endif |
| 18677 | 18686 | AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */ |
| 18678 | 18687 | Parse *pToplevel; /* Parse structure for main program (or NULL) */ |
| 18679 | 18688 | Table *pTriggerTab; /* Table triggers are being coded for */ |
| 18680 | 18689 | Parse *pParentParse; /* Parent parser if this parser is nested */ |
| 18690 | + AggInfo *pAggList; /* List of all AggInfo objects */ |
| 18681 | 18691 | int addrCrTab; /* Address of OP_CreateBtree opcode on CREATE TABLE */ |
| 18682 | 18692 | u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ |
| 18683 | 18693 | u32 oldmask; /* Mask of old.* columns referenced */ |
| 18684 | 18694 | u32 newmask; /* Mask of new.* columns referenced */ |
| 18685 | 18695 | u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ |
| | @@ -19642,10 +19652,11 @@ |
| 19642 | 19652 | SQLITE_PRIVATE int sqlite3ExprCompare(Parse*,Expr*, Expr*, int); |
| 19643 | 19653 | SQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr*, Expr*, int); |
| 19644 | 19654 | SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList*, ExprList*, int); |
| 19645 | 19655 | SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Parse*,Expr*, Expr*, int); |
| 19646 | 19656 | SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr*,int); |
| 19657 | +SQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker*,Parse*); |
| 19647 | 19658 | SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*); |
| 19648 | 19659 | SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*); |
| 19649 | 19660 | SQLITE_PRIVATE int sqlite3ExprCoveredByIndex(Expr*, int iCur, Index *pIdx); |
| 19650 | 19661 | SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr*, SrcList*); |
| 19651 | 19662 | SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*); |
| | @@ -30013,11 +30024,11 @@ |
| 30013 | 30024 | sqlite3TreeViewLine(pView, "EXISTS-expr flags=0x%x", pExpr->flags); |
| 30014 | 30025 | sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0); |
| 30015 | 30026 | break; |
| 30016 | 30027 | } |
| 30017 | 30028 | case TK_SELECT: { |
| 30018 | | - sqlite3TreeViewLine(pView, "SELECT-expr flags=0x%x", pExpr->flags); |
| 30029 | + sqlite3TreeViewLine(pView, "subquery-expr flags=0x%x", pExpr->flags); |
| 30019 | 30030 | sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0); |
| 30020 | 30031 | break; |
| 30021 | 30032 | } |
| 30022 | 30033 | case TK_IN: { |
| 30023 | 30034 | sqlite3TreeViewLine(pView, "IN flags=0x%x", pExpr->flags); |
| | @@ -99541,11 +99552,16 @@ |
| 99541 | 99552 | assert( pExpr!=0 ); |
| 99542 | 99553 | } |
| 99543 | 99554 | op = pExpr->op; |
| 99544 | 99555 | if( op==TK_SELECT ){ |
| 99545 | 99556 | assert( pExpr->flags&EP_xIsSelect ); |
| 99546 | | - return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr); |
| 99557 | + if( ALWAYS(pExpr->x.pSelect) |
| 99558 | + && pExpr->x.pSelect->pEList |
| 99559 | + && ALWAYS(pExpr->x.pSelect->pEList->a[0].pExpr) |
| 99560 | + ){ |
| 99561 | + return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr); |
| 99562 | + } |
| 99547 | 99563 | } |
| 99548 | 99564 | if( op==TK_REGISTER ) op = pExpr->op2; |
| 99549 | 99565 | #ifndef SQLITE_OMIT_CAST |
| 99550 | 99566 | if( op==TK_CAST ){ |
| 99551 | 99567 | assert( !ExprHasProperty(pExpr, EP_IntValue) ); |
| | @@ -105197,10 +105213,68 @@ |
| 105197 | 105213 | sqlite3WalkExpr(&w, pExpr->y.pWin->pFilter); |
| 105198 | 105214 | } |
| 105199 | 105215 | #endif |
| 105200 | 105216 | return cnt.nThis>0 || cnt.nOther==0; |
| 105201 | 105217 | } |
| 105218 | + |
| 105219 | +/* |
| 105220 | +** This is a Walker expression node callback. |
| 105221 | +** |
| 105222 | +** For Expr nodes that contain pAggInfo pointers, make sure the AggInfo |
| 105223 | +** object that is referenced does not refer directly to the Expr. If |
| 105224 | +** it does, make a copy. This is done because the pExpr argument is |
| 105225 | +** subject to change. |
| 105226 | +** |
| 105227 | +** The copy is stored on pParse->pConstExpr with a register number of 0. |
| 105228 | +** This will cause the expression to be deleted automatically when the |
| 105229 | +** Parse object is destroyed, but the zero register number means that it |
| 105230 | +** will not generate any code in the preamble. |
| 105231 | +*/ |
| 105232 | +static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){ |
| 105233 | + if( ALWAYS(!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced)) |
| 105234 | + && pExpr->pAggInfo!=0 |
| 105235 | + ){ |
| 105236 | + AggInfo *pAggInfo = pExpr->pAggInfo; |
| 105237 | + int iAgg = pExpr->iAgg; |
| 105238 | + Parse *pParse = pWalker->pParse; |
| 105239 | + sqlite3 *db = pParse->db; |
| 105240 | + assert( pExpr->op==TK_AGG_COLUMN || pExpr->op==TK_AGG_FUNCTION ); |
| 105241 | + if( pExpr->op==TK_AGG_COLUMN ){ |
| 105242 | + assert( iAgg>=0 && iAgg<pAggInfo->nColumn ); |
| 105243 | + if( pAggInfo->aCol[iAgg].pExpr==pExpr ){ |
| 105244 | + pExpr = sqlite3ExprDup(db, pExpr, 0); |
| 105245 | + if( pExpr ){ |
| 105246 | + pAggInfo->aCol[iAgg].pExpr = pExpr; |
| 105247 | + pParse->pConstExpr = |
| 105248 | + sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr); |
| 105249 | + } |
| 105250 | + } |
| 105251 | + }else{ |
| 105252 | + assert( iAgg>=0 && iAgg<pAggInfo->nFunc ); |
| 105253 | + if( pAggInfo->aFunc[iAgg].pExpr==pExpr ){ |
| 105254 | + pExpr = sqlite3ExprDup(db, pExpr, 0); |
| 105255 | + if( pExpr ){ |
| 105256 | + pAggInfo->aFunc[iAgg].pExpr = pExpr; |
| 105257 | + pParse->pConstExpr = |
| 105258 | + sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr); |
| 105259 | + } |
| 105260 | + } |
| 105261 | + } |
| 105262 | + } |
| 105263 | + return WRC_Continue; |
| 105264 | +} |
| 105265 | + |
| 105266 | +/* |
| 105267 | +** Initialize a Walker object so that will persist AggInfo entries referenced |
| 105268 | +** by the tree that is walked. |
| 105269 | +*/ |
| 105270 | +SQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker *pWalker, Parse *pParse){ |
| 105271 | + memset(pWalker, 0, sizeof(*pWalker)); |
| 105272 | + pWalker->pParse = pParse; |
| 105273 | + pWalker->xExprCallback = agginfoPersistExprCb; |
| 105274 | + pWalker->xSelectCallback = sqlite3SelectWalkNoop; |
| 105275 | +} |
| 105202 | 105276 | |
| 105203 | 105277 | /* |
| 105204 | 105278 | ** Add a new element to the pAggInfo->aCol[] array. Return the index of |
| 105205 | 105279 | ** the new element. Return a negative number if malloc fails. |
| 105206 | 105280 | */ |
| | @@ -105228,11 +105302,11 @@ |
| 105228 | 105302 | sizeof(pInfo->aFunc[0]), |
| 105229 | 105303 | &pInfo->nFunc, |
| 105230 | 105304 | &i |
| 105231 | 105305 | ); |
| 105232 | 105306 | return i; |
| 105233 | | -} |
| 105307 | +} |
| 105234 | 105308 | |
| 105235 | 105309 | /* |
| 105236 | 105310 | ** This is the xExprCallback for a tree walker. It is used to |
| 105237 | 105311 | ** implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates |
| 105238 | 105312 | ** for additional information. |
| | @@ -110283,16 +110357,25 @@ |
| 110283 | 110357 | |
| 110284 | 110358 | /* Initialize any AUTOINCREMENT data structures required. |
| 110285 | 110359 | */ |
| 110286 | 110360 | sqlite3AutoincrementBegin(pParse); |
| 110287 | 110361 | |
| 110288 | | - /* Code constant expressions that where factored out of inner loops */ |
| 110362 | + /* Code constant expressions that where factored out of inner loops. |
| 110363 | + ** |
| 110364 | + ** The pConstExpr list might also contain expressions that we simply |
| 110365 | + ** want to keep around until the Parse object is deleted. Such |
| 110366 | + ** expressions have iConstExprReg==0. Do not generate code for |
| 110367 | + ** those expressions, of course. |
| 110368 | + */ |
| 110289 | 110369 | if( pParse->pConstExpr ){ |
| 110290 | 110370 | ExprList *pEL = pParse->pConstExpr; |
| 110291 | 110371 | pParse->okConstFactor = 0; |
| 110292 | 110372 | for(i=0; i<pEL->nExpr; i++){ |
| 110293 | | - sqlite3ExprCode(pParse, pEL->a[i].pExpr, pEL->a[i].u.iConstExprReg); |
| 110373 | + int iReg = pEL->a[i].u.iConstExprReg; |
| 110374 | + if( iReg>0 ){ |
| 110375 | + sqlite3ExprCode(pParse, pEL->a[i].pExpr, iReg); |
| 110376 | + } |
| 110294 | 110377 | } |
| 110295 | 110378 | } |
| 110296 | 110379 | |
| 110297 | 110380 | /* Finally, jump back to the beginning of the executable code. */ |
| 110298 | 110381 | sqlite3VdbeGoto(v, 1); |
| | @@ -128474,16 +128557,31 @@ |
| 128474 | 128557 | } |
| 128475 | 128558 | assert( i>=0 && i<db->nDb ); |
| 128476 | 128559 | } |
| 128477 | 128560 | return i; |
| 128478 | 128561 | } |
| 128562 | + |
| 128563 | +/* |
| 128564 | +** Deallocate a single AggInfo object |
| 128565 | +*/ |
| 128566 | +static void agginfoFree(sqlite3 *db, AggInfo *p){ |
| 128567 | + sqlite3DbFree(db, p->aCol); |
| 128568 | + sqlite3DbFree(db, p->aFunc); |
| 128569 | + sqlite3DbFree(db, p); |
| 128570 | +} |
| 128479 | 128571 | |
| 128480 | 128572 | /* |
| 128481 | 128573 | ** Free all memory allocations in the pParse object |
| 128482 | 128574 | */ |
| 128483 | 128575 | SQLITE_PRIVATE void sqlite3ParserReset(Parse *pParse){ |
| 128484 | 128576 | sqlite3 *db = pParse->db; |
| 128577 | + AggInfo *pThis = pParse->pAggList; |
| 128578 | + while( pThis ){ |
| 128579 | + AggInfo *pNext = pThis->pNext; |
| 128580 | + agginfoFree(db, pThis); |
| 128581 | + pThis = pNext; |
| 128582 | + } |
| 128485 | 128583 | sqlite3DbFree(db, pParse->aLabel); |
| 128486 | 128584 | sqlite3ExprListDelete(db, pParse->pConstExpr); |
| 128487 | 128585 | if( db ){ |
| 128488 | 128586 | assert( db->lookaside.bDisable >= pParse->disableLookaside ); |
| 128489 | 128587 | db->lookaside.bDisable -= pParse->disableLookaside; |
| | @@ -132668,10 +132766,11 @@ |
| 132668 | 132766 | int isLeftJoin = 0; /* True if pSub is the right side of a LEFT JOIN */ |
| 132669 | 132767 | int i; /* Loop counter */ |
| 132670 | 132768 | Expr *pWhere; /* The WHERE clause */ |
| 132671 | 132769 | struct SrcList_item *pSubitem; /* The subquery */ |
| 132672 | 132770 | sqlite3 *db = pParse->db; |
| 132771 | + Walker w; /* Walker to persist agginfo data */ |
| 132673 | 132772 | |
| 132674 | 132773 | /* Check to see if flattening is permitted. Return 0 if not. |
| 132675 | 132774 | */ |
| 132676 | 132775 | assert( p!=0 ); |
| 132677 | 132776 | assert( p->pPrior==0 ); |
| | @@ -133042,10 +133141,12 @@ |
| 133042 | 133141 | } |
| 133043 | 133142 | |
| 133044 | 133143 | /* Finially, delete what is left of the subquery and return |
| 133045 | 133144 | ** success. |
| 133046 | 133145 | */ |
| 133146 | + sqlite3AggInfoPersistWalkerInit(&w, pParse); |
| 133147 | + sqlite3WalkSelect(&w,pSub1); |
| 133047 | 133148 | sqlite3SelectDelete(db, pSub1); |
| 133048 | 133149 | |
| 133049 | 133150 | #if SELECTTRACE_ENABLED |
| 133050 | 133151 | if( sqlite3SelectTrace & 0x100 ){ |
| 133051 | 133152 | SELECTTRACE(0x100,pParse,p,("After flattening:\n")); |
| | @@ -134626,14 +134727,14 @@ |
| 134626 | 134727 | ExprList *pEList = 0; /* List of columns to extract. */ |
| 134627 | 134728 | SrcList *pTabList; /* List of tables to select from */ |
| 134628 | 134729 | Expr *pWhere; /* The WHERE clause. May be NULL */ |
| 134629 | 134730 | ExprList *pGroupBy; /* The GROUP BY clause. May be NULL */ |
| 134630 | 134731 | Expr *pHaving; /* The HAVING clause. May be NULL */ |
| 134732 | + AggInfo *pAggInfo = 0; /* Aggregate information */ |
| 134631 | 134733 | int rc = 1; /* Value to return from this function */ |
| 134632 | 134734 | DistinctCtx sDistinct; /* Info on how to code the DISTINCT keyword */ |
| 134633 | 134735 | SortCtx sSort; /* Info on how to code the ORDER BY clause */ |
| 134634 | | - AggInfo sAggInfo; /* Information used by aggregate queries */ |
| 134635 | 134736 | int iEnd; /* Address of the end of the query */ |
| 134636 | 134737 | sqlite3 *db; /* The database connection */ |
| 134637 | 134738 | ExprList *pMinMaxOrderBy = 0; /* Added ORDER BY for min/max queries */ |
| 134638 | 134739 | u8 minMaxFlag; /* Flag for min/max queries */ |
| 134639 | 134740 | |
| | @@ -134641,11 +134742,10 @@ |
| 134641 | 134742 | v = sqlite3GetVdbe(pParse); |
| 134642 | 134743 | if( p==0 || db->mallocFailed || pParse->nErr ){ |
| 134643 | 134744 | return 1; |
| 134644 | 134745 | } |
| 134645 | 134746 | if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1; |
| 134646 | | - memset(&sAggInfo, 0, sizeof(sAggInfo)); |
| 134647 | 134747 | #if SELECTTRACE_ENABLED |
| 134648 | 134748 | SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain)); |
| 134649 | 134749 | if( sqlite3SelectTrace & 0x100 ){ |
| 134650 | 134750 | sqlite3TreeViewSelect(0, p, 0); |
| 134651 | 134751 | } |
| | @@ -135231,18 +135331,24 @@ |
| 135231 | 135331 | |
| 135232 | 135332 | /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in |
| 135233 | 135333 | ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the |
| 135234 | 135334 | ** SELECT statement. |
| 135235 | 135335 | */ |
| 135336 | + pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) ); |
| 135337 | + if( pAggInfo==0 ){ |
| 135338 | + goto select_end; |
| 135339 | + } |
| 135340 | + pAggInfo->pNext = pParse->pAggList; |
| 135341 | + pParse->pAggList = pAggInfo; |
| 135236 | 135342 | memset(&sNC, 0, sizeof(sNC)); |
| 135237 | 135343 | sNC.pParse = pParse; |
| 135238 | 135344 | sNC.pSrcList = pTabList; |
| 135239 | | - sNC.uNC.pAggInfo = &sAggInfo; |
| 135345 | + sNC.uNC.pAggInfo = pAggInfo; |
| 135240 | 135346 | VVA_ONLY( sNC.ncFlags = NC_UAggInfo; ) |
| 135241 | | - sAggInfo.mnReg = pParse->nMem+1; |
| 135242 | | - sAggInfo.nSortingColumn = pGroupBy ? pGroupBy->nExpr : 0; |
| 135243 | | - sAggInfo.pGroupBy = pGroupBy; |
| 135347 | + pAggInfo->mnReg = pParse->nMem+1; |
| 135348 | + pAggInfo->nSortingColumn = pGroupBy ? pGroupBy->nExpr : 0; |
| 135349 | + pAggInfo->pGroupBy = pGroupBy; |
| 135244 | 135350 | sqlite3ExprAnalyzeAggList(&sNC, pEList); |
| 135245 | 135351 | sqlite3ExprAnalyzeAggList(&sNC, sSort.pOrderBy); |
| 135246 | 135352 | if( pHaving ){ |
| 135247 | 135353 | if( pGroupBy ){ |
| 135248 | 135354 | assert( pWhere==p->pWhere ); |
| | @@ -135251,18 +135357,18 @@ |
| 135251 | 135357 | havingToWhere(pParse, p); |
| 135252 | 135358 | pWhere = p->pWhere; |
| 135253 | 135359 | } |
| 135254 | 135360 | sqlite3ExprAnalyzeAggregates(&sNC, pHaving); |
| 135255 | 135361 | } |
| 135256 | | - sAggInfo.nAccumulator = sAggInfo.nColumn; |
| 135257 | | - if( p->pGroupBy==0 && p->pHaving==0 && sAggInfo.nFunc==1 ){ |
| 135258 | | - minMaxFlag = minMaxQuery(db, sAggInfo.aFunc[0].pExpr, &pMinMaxOrderBy); |
| 135362 | + pAggInfo->nAccumulator = pAggInfo->nColumn; |
| 135363 | + if( p->pGroupBy==0 && p->pHaving==0 && pAggInfo->nFunc==1 ){ |
| 135364 | + minMaxFlag = minMaxQuery(db, pAggInfo->aFunc[0].pExpr, &pMinMaxOrderBy); |
| 135259 | 135365 | }else{ |
| 135260 | 135366 | minMaxFlag = WHERE_ORDERBY_NORMAL; |
| 135261 | 135367 | } |
| 135262 | | - for(i=0; i<sAggInfo.nFunc; i++){ |
| 135263 | | - Expr *pExpr = sAggInfo.aFunc[i].pExpr; |
| 135368 | + for(i=0; i<pAggInfo->nFunc; i++){ |
| 135369 | + Expr *pExpr = pAggInfo->aFunc[i].pExpr; |
| 135264 | 135370 | assert( !ExprHasProperty(pExpr, EP_xIsSelect) ); |
| 135265 | 135371 | sNC.ncFlags |= NC_InAggFunc; |
| 135266 | 135372 | sqlite3ExprAnalyzeAggList(&sNC, pExpr->x.pList); |
| 135267 | 135373 | #ifndef SQLITE_OMIT_WINDOWFUNC |
| 135268 | 135374 | assert( !IsWindowFunc(pExpr) ); |
| | @@ -135270,26 +135376,26 @@ |
| 135270 | 135376 | sqlite3ExprAnalyzeAggregates(&sNC, pExpr->y.pWin->pFilter); |
| 135271 | 135377 | } |
| 135272 | 135378 | #endif |
| 135273 | 135379 | sNC.ncFlags &= ~NC_InAggFunc; |
| 135274 | 135380 | } |
| 135275 | | - sAggInfo.mxReg = pParse->nMem; |
| 135381 | + pAggInfo->mxReg = pParse->nMem; |
| 135276 | 135382 | if( db->mallocFailed ) goto select_end; |
| 135277 | 135383 | #if SELECTTRACE_ENABLED |
| 135278 | 135384 | if( sqlite3SelectTrace & 0x400 ){ |
| 135279 | 135385 | int ii; |
| 135280 | | - SELECTTRACE(0x400,pParse,p,("After aggregate analysis %p:\n", &sAggInfo)); |
| 135386 | + SELECTTRACE(0x400,pParse,p,("After aggregate analysis %p:\n", pAggInfo)); |
| 135281 | 135387 | sqlite3TreeViewSelect(0, p, 0); |
| 135282 | | - for(ii=0; ii<sAggInfo.nColumn; ii++){ |
| 135388 | + for(ii=0; ii<pAggInfo->nColumn; ii++){ |
| 135283 | 135389 | sqlite3DebugPrintf("agg-column[%d] iMem=%d\n", |
| 135284 | | - ii, sAggInfo.aCol[ii].iMem); |
| 135285 | | - sqlite3TreeViewExpr(0, sAggInfo.aCol[ii].pExpr, 0); |
| 135390 | + ii, pAggInfo->aCol[ii].iMem); |
| 135391 | + sqlite3TreeViewExpr(0, pAggInfo->aCol[ii].pExpr, 0); |
| 135286 | 135392 | } |
| 135287 | | - for(ii=0; ii<sAggInfo.nFunc; ii++){ |
| 135393 | + for(ii=0; ii<pAggInfo->nFunc; ii++){ |
| 135288 | 135394 | sqlite3DebugPrintf("agg-func[%d]: iMem=%d\n", |
| 135289 | | - ii, sAggInfo.aFunc[ii].iMem); |
| 135290 | | - sqlite3TreeViewExpr(0, sAggInfo.aFunc[ii].pExpr, 0); |
| 135395 | + ii, pAggInfo->aFunc[ii].iMem); |
| 135396 | + sqlite3TreeViewExpr(0, pAggInfo->aFunc[ii].pExpr, 0); |
| 135291 | 135397 | } |
| 135292 | 135398 | } |
| 135293 | 135399 | #endif |
| 135294 | 135400 | |
| 135295 | 135401 | |
| | @@ -135310,14 +135416,15 @@ |
| 135310 | 135416 | /* If there is a GROUP BY clause we might need a sorting index to |
| 135311 | 135417 | ** implement it. Allocate that sorting index now. If it turns out |
| 135312 | 135418 | ** that we do not need it after all, the OP_SorterOpen instruction |
| 135313 | 135419 | ** will be converted into a Noop. |
| 135314 | 135420 | */ |
| 135315 | | - sAggInfo.sortingIdx = pParse->nTab++; |
| 135316 | | - pKeyInfo = sqlite3KeyInfoFromExprList(pParse,pGroupBy,0,sAggInfo.nColumn); |
| 135421 | + pAggInfo->sortingIdx = pParse->nTab++; |
| 135422 | + pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pGroupBy, |
| 135423 | + 0, pAggInfo->nColumn); |
| 135317 | 135424 | addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen, |
| 135318 | | - sAggInfo.sortingIdx, sAggInfo.nSortingColumn, |
| 135425 | + pAggInfo->sortingIdx, pAggInfo->nSortingColumn, |
| 135319 | 135426 | 0, (char*)pKeyInfo, P4_KEYINFO); |
| 135320 | 135427 | |
| 135321 | 135428 | /* Initialize memory locations used by GROUP BY aggregate processing |
| 135322 | 135429 | */ |
| 135323 | 135430 | iUseFlag = ++pParse->nMem; |
| | @@ -135368,40 +135475,40 @@ |
| 135368 | 135475 | |
| 135369 | 135476 | groupBySort = 1; |
| 135370 | 135477 | nGroupBy = pGroupBy->nExpr; |
| 135371 | 135478 | nCol = nGroupBy; |
| 135372 | 135479 | j = nGroupBy; |
| 135373 | | - for(i=0; i<sAggInfo.nColumn; i++){ |
| 135374 | | - if( sAggInfo.aCol[i].iSorterColumn>=j ){ |
| 135480 | + for(i=0; i<pAggInfo->nColumn; i++){ |
| 135481 | + if( pAggInfo->aCol[i].iSorterColumn>=j ){ |
| 135375 | 135482 | nCol++; |
| 135376 | 135483 | j++; |
| 135377 | 135484 | } |
| 135378 | 135485 | } |
| 135379 | 135486 | regBase = sqlite3GetTempRange(pParse, nCol); |
| 135380 | 135487 | sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0, 0); |
| 135381 | 135488 | j = nGroupBy; |
| 135382 | | - for(i=0; i<sAggInfo.nColumn; i++){ |
| 135383 | | - struct AggInfo_col *pCol = &sAggInfo.aCol[i]; |
| 135489 | + for(i=0; i<pAggInfo->nColumn; i++){ |
| 135490 | + struct AggInfo_col *pCol = &pAggInfo->aCol[i]; |
| 135384 | 135491 | if( pCol->iSorterColumn>=j ){ |
| 135385 | 135492 | int r1 = j + regBase; |
| 135386 | 135493 | sqlite3ExprCodeGetColumnOfTable(v, |
| 135387 | 135494 | pCol->pTab, pCol->iTable, pCol->iColumn, r1); |
| 135388 | 135495 | j++; |
| 135389 | 135496 | } |
| 135390 | 135497 | } |
| 135391 | 135498 | regRecord = sqlite3GetTempReg(pParse); |
| 135392 | 135499 | sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord); |
| 135393 | | - sqlite3VdbeAddOp2(v, OP_SorterInsert, sAggInfo.sortingIdx, regRecord); |
| 135500 | + sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord); |
| 135394 | 135501 | sqlite3ReleaseTempReg(pParse, regRecord); |
| 135395 | 135502 | sqlite3ReleaseTempRange(pParse, regBase, nCol); |
| 135396 | 135503 | sqlite3WhereEnd(pWInfo); |
| 135397 | | - sAggInfo.sortingIdxPTab = sortPTab = pParse->nTab++; |
| 135504 | + pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++; |
| 135398 | 135505 | sortOut = sqlite3GetTempReg(pParse); |
| 135399 | 135506 | sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol); |
| 135400 | | - sqlite3VdbeAddOp2(v, OP_SorterSort, sAggInfo.sortingIdx, addrEnd); |
| 135507 | + sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd); |
| 135401 | 135508 | VdbeComment((v, "GROUP BY sort")); VdbeCoverage(v); |
| 135402 | | - sAggInfo.useSortingIdx = 1; |
| 135509 | + pAggInfo->useSortingIdx = 1; |
| 135403 | 135510 | } |
| 135404 | 135511 | |
| 135405 | 135512 | /* If the index or temporary table used by the GROUP BY sort |
| 135406 | 135513 | ** will naturally deliver rows in the order required by the ORDER BY |
| 135407 | 135514 | ** clause, cancel the ephemeral table open coded earlier. |
| | @@ -135421,18 +135528,18 @@ |
| 135421 | 135528 | ** Then compare the current GROUP BY terms against the GROUP BY terms |
| 135422 | 135529 | ** from the previous row currently stored in a0, a1, a2... |
| 135423 | 135530 | */ |
| 135424 | 135531 | addrTopOfLoop = sqlite3VdbeCurrentAddr(v); |
| 135425 | 135532 | if( groupBySort ){ |
| 135426 | | - sqlite3VdbeAddOp3(v, OP_SorterData, sAggInfo.sortingIdx, |
| 135533 | + sqlite3VdbeAddOp3(v, OP_SorterData, pAggInfo->sortingIdx, |
| 135427 | 135534 | sortOut, sortPTab); |
| 135428 | 135535 | } |
| 135429 | 135536 | for(j=0; j<pGroupBy->nExpr; j++){ |
| 135430 | 135537 | if( groupBySort ){ |
| 135431 | 135538 | sqlite3VdbeAddOp3(v, OP_Column, sortPTab, j, iBMem+j); |
| 135432 | 135539 | }else{ |
| 135433 | | - sAggInfo.directMode = 1; |
| 135540 | + pAggInfo->directMode = 1; |
| 135434 | 135541 | sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j); |
| 135435 | 135542 | } |
| 135436 | 135543 | } |
| 135437 | 135544 | sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr, |
| 135438 | 135545 | (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO); |
| | @@ -135458,18 +135565,18 @@ |
| 135458 | 135565 | |
| 135459 | 135566 | /* Update the aggregate accumulators based on the content of |
| 135460 | 135567 | ** the current row |
| 135461 | 135568 | */ |
| 135462 | 135569 | sqlite3VdbeJumpHere(v, addr1); |
| 135463 | | - updateAccumulator(pParse, iUseFlag, &sAggInfo); |
| 135570 | + updateAccumulator(pParse, iUseFlag, pAggInfo); |
| 135464 | 135571 | sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag); |
| 135465 | 135572 | VdbeComment((v, "indicate data in accumulator")); |
| 135466 | 135573 | |
| 135467 | 135574 | /* End of the loop |
| 135468 | 135575 | */ |
| 135469 | 135576 | if( groupBySort ){ |
| 135470 | | - sqlite3VdbeAddOp2(v, OP_SorterNext, sAggInfo.sortingIdx, addrTopOfLoop); |
| 135577 | + sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx, addrTopOfLoop); |
| 135471 | 135578 | VdbeCoverage(v); |
| 135472 | 135579 | }else{ |
| 135473 | 135580 | sqlite3WhereEnd(pWInfo); |
| 135474 | 135581 | sqlite3VdbeChangeToNoop(v, addrSortingIdx); |
| 135475 | 135582 | } |
| | @@ -135498,11 +135605,11 @@ |
| 135498 | 135605 | addrOutputRow = sqlite3VdbeCurrentAddr(v); |
| 135499 | 135606 | sqlite3VdbeAddOp2(v, OP_IfPos, iUseFlag, addrOutputRow+2); |
| 135500 | 135607 | VdbeCoverage(v); |
| 135501 | 135608 | VdbeComment((v, "Groupby result generator entry point")); |
| 135502 | 135609 | sqlite3VdbeAddOp1(v, OP_Return, regOutputRow); |
| 135503 | | - finalizeAggFunctions(pParse, &sAggInfo); |
| 135610 | + finalizeAggFunctions(pParse, pAggInfo); |
| 135504 | 135611 | sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL); |
| 135505 | 135612 | selectInnerLoop(pParse, p, -1, &sSort, |
| 135506 | 135613 | &sDistinct, pDest, |
| 135507 | 135614 | addrOutputRow+1, addrSetAbort); |
| 135508 | 135615 | sqlite3VdbeAddOp1(v, OP_Return, regOutputRow); |
| | @@ -135509,19 +135616,19 @@ |
| 135509 | 135616 | VdbeComment((v, "end groupby result generator")); |
| 135510 | 135617 | |
| 135511 | 135618 | /* Generate a subroutine that will reset the group-by accumulator |
| 135512 | 135619 | */ |
| 135513 | 135620 | sqlite3VdbeResolveLabel(v, addrReset); |
| 135514 | | - resetAccumulator(pParse, &sAggInfo); |
| 135621 | + resetAccumulator(pParse, pAggInfo); |
| 135515 | 135622 | sqlite3VdbeAddOp2(v, OP_Integer, 0, iUseFlag); |
| 135516 | 135623 | VdbeComment((v, "indicate accumulator empty")); |
| 135517 | 135624 | sqlite3VdbeAddOp1(v, OP_Return, regReset); |
| 135518 | 135625 | |
| 135519 | 135626 | } /* endif pGroupBy. Begin aggregate queries without GROUP BY: */ |
| 135520 | 135627 | else { |
| 135521 | 135628 | Table *pTab; |
| 135522 | | - if( (pTab = isSimpleCount(p, &sAggInfo))!=0 ){ |
| 135629 | + if( (pTab = isSimpleCount(p, pAggInfo))!=0 ){ |
| 135523 | 135630 | /* If isSimpleCount() returns a pointer to a Table structure, then |
| 135524 | 135631 | ** the SQL statement is of the form: |
| 135525 | 135632 | ** |
| 135526 | 135633 | ** SELECT count(*) FROM <tbl> |
| 135527 | 135634 | ** |
| | @@ -135572,11 +135679,11 @@ |
| 135572 | 135679 | /* Open a read-only cursor, execute the OP_Count, close the cursor. */ |
| 135573 | 135680 | sqlite3VdbeAddOp4Int(v, OP_OpenRead, iCsr, iRoot, iDb, 1); |
| 135574 | 135681 | if( pKeyInfo ){ |
| 135575 | 135682 | sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO); |
| 135576 | 135683 | } |
| 135577 | | - sqlite3VdbeAddOp2(v, OP_Count, iCsr, sAggInfo.aFunc[0].iMem); |
| 135684 | + sqlite3VdbeAddOp2(v, OP_Count, iCsr, pAggInfo->aFunc[0].iMem); |
| 135578 | 135685 | sqlite3VdbeAddOp1(v, OP_Close, iCsr); |
| 135579 | 135686 | explainSimpleCount(pParse, pTab, pBest); |
| 135580 | 135687 | }else{ |
| 135581 | 135688 | int regAcc = 0; /* "populate accumulators" flag */ |
| 135582 | 135689 | |
| | @@ -135587,16 +135694,20 @@ |
| 135587 | 135694 | ** that the accumulator registers are (a) updated only once if |
| 135588 | 135695 | ** there are no min() or max functions or (b) always updated for the |
| 135589 | 135696 | ** first row visited by the aggregate, so that they are updated at |
| 135590 | 135697 | ** least once even if the FILTER clause means the min() or max() |
| 135591 | 135698 | ** function visits zero rows. */ |
| 135592 | | - if( sAggInfo.nAccumulator ){ |
| 135593 | | - for(i=0; i<sAggInfo.nFunc; i++){ |
| 135594 | | - if( ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_WinFunc) ) continue; |
| 135595 | | - if( sAggInfo.aFunc[i].pFunc->funcFlags&SQLITE_FUNC_NEEDCOLL ) break; |
| 135699 | + if( pAggInfo->nAccumulator ){ |
| 135700 | + for(i=0; i<pAggInfo->nFunc; i++){ |
| 135701 | + if( ExprHasProperty(pAggInfo->aFunc[i].pExpr, EP_WinFunc) ){ |
| 135702 | + continue; |
| 135703 | + } |
| 135704 | + if( pAggInfo->aFunc[i].pFunc->funcFlags&SQLITE_FUNC_NEEDCOLL ){ |
| 135705 | + break; |
| 135706 | + } |
| 135596 | 135707 | } |
| 135597 | | - if( i==sAggInfo.nFunc ){ |
| 135708 | + if( i==pAggInfo->nFunc ){ |
| 135598 | 135709 | regAcc = ++pParse->nMem; |
| 135599 | 135710 | sqlite3VdbeAddOp2(v, OP_Integer, 0, regAcc); |
| 135600 | 135711 | } |
| 135601 | 135712 | } |
| 135602 | 135713 | |
| | @@ -135603,11 +135714,11 @@ |
| 135603 | 135714 | /* This case runs if the aggregate has no GROUP BY clause. The |
| 135604 | 135715 | ** processing is much simpler since there is only a single row |
| 135605 | 135716 | ** of output. |
| 135606 | 135717 | */ |
| 135607 | 135718 | assert( p->pGroupBy==0 ); |
| 135608 | | - resetAccumulator(pParse, &sAggInfo); |
| 135719 | + resetAccumulator(pParse, pAggInfo); |
| 135609 | 135720 | |
| 135610 | 135721 | /* If this query is a candidate for the min/max optimization, then |
| 135611 | 135722 | ** minMaxFlag will have been previously set to either |
| 135612 | 135723 | ** WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX and pMinMaxOrderBy will |
| 135613 | 135724 | ** be an appropriate ORDER BY expression for the optimization. |
| | @@ -135619,19 +135730,19 @@ |
| 135619 | 135730 | pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy, |
| 135620 | 135731 | 0, minMaxFlag, 0); |
| 135621 | 135732 | if( pWInfo==0 ){ |
| 135622 | 135733 | goto select_end; |
| 135623 | 135734 | } |
| 135624 | | - updateAccumulator(pParse, regAcc, &sAggInfo); |
| 135735 | + updateAccumulator(pParse, regAcc, pAggInfo); |
| 135625 | 135736 | if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc); |
| 135626 | 135737 | if( sqlite3WhereIsOrdered(pWInfo)>0 ){ |
| 135627 | 135738 | sqlite3VdbeGoto(v, sqlite3WhereBreakLabel(pWInfo)); |
| 135628 | 135739 | VdbeComment((v, "%s() by index", |
| 135629 | 135740 | (minMaxFlag==WHERE_ORDERBY_MIN?"min":"max"))); |
| 135630 | 135741 | } |
| 135631 | 135742 | sqlite3WhereEnd(pWInfo); |
| 135632 | | - finalizeAggFunctions(pParse, &sAggInfo); |
| 135743 | + finalizeAggFunctions(pParse, pAggInfo); |
| 135633 | 135744 | } |
| 135634 | 135745 | |
| 135635 | 135746 | sSort.pOrderBy = 0; |
| 135636 | 135747 | sqlite3ExprIfFalse(pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL); |
| 135637 | 135748 | selectInnerLoop(pParse, p, -1, 0, 0, |
| | @@ -135666,12 +135777,29 @@ |
| 135666 | 135777 | /* Control jumps to here if an error is encountered above, or upon |
| 135667 | 135778 | ** successful coding of the SELECT. |
| 135668 | 135779 | */ |
| 135669 | 135780 | select_end: |
| 135670 | 135781 | sqlite3ExprListDelete(db, pMinMaxOrderBy); |
| 135671 | | - sqlite3DbFree(db, sAggInfo.aCol); |
| 135672 | | - sqlite3DbFree(db, sAggInfo.aFunc); |
| 135782 | +#ifdef SQLITE_DEBUG |
| 135783 | + if( pAggInfo ){ |
| 135784 | + for(i=0; i<pAggInfo->nColumn; i++){ |
| 135785 | + Expr *pExpr = pAggInfo->aCol[i].pExpr; |
| 135786 | + assert( pExpr!=0 || db->mallocFailed ); |
| 135787 | + if( pExpr==0 ) continue; |
| 135788 | + assert( pExpr->pAggInfo==pAggInfo ); |
| 135789 | + assert( pExpr->iAgg==i ); |
| 135790 | + } |
| 135791 | + for(i=0; i<pAggInfo->nFunc; i++){ |
| 135792 | + Expr *pExpr = pAggInfo->aFunc[i].pExpr; |
| 135793 | + assert( pExpr!=0 || db->mallocFailed ); |
| 135794 | + if( pExpr==0 ) continue; |
| 135795 | + assert( pExpr->pAggInfo==pAggInfo ); |
| 135796 | + assert( pExpr->iAgg==i ); |
| 135797 | + } |
| 135798 | + } |
| 135799 | +#endif |
| 135800 | + |
| 135673 | 135801 | #if SELECTTRACE_ENABLED |
| 135674 | 135802 | SELECTTRACE(0x1,pParse,p,("end processing\n")); |
| 135675 | 135803 | if( (sqlite3SelectTrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ |
| 135676 | 135804 | sqlite3TreeViewSelect(0, p, 0); |
| 135677 | 135805 | } |
| | @@ -151361,16 +151489,20 @@ |
| 151361 | 151489 | |
| 151362 | 151490 | ExprList *pSublist = 0; /* Expression list for sub-query */ |
| 151363 | 151491 | Window *pMWin = p->pWin; /* Master window object */ |
| 151364 | 151492 | Window *pWin; /* Window object iterator */ |
| 151365 | 151493 | Table *pTab; |
| 151494 | + Walker w; |
| 151495 | + |
| 151366 | 151496 | u32 selFlags = p->selFlags; |
| 151367 | 151497 | |
| 151368 | 151498 | pTab = sqlite3DbMallocZero(db, sizeof(Table)); |
| 151369 | 151499 | if( pTab==0 ){ |
| 151370 | 151500 | return sqlite3ErrorToParser(db, SQLITE_NOMEM); |
| 151371 | 151501 | } |
| 151502 | + sqlite3AggInfoPersistWalkerInit(&w, pParse); |
| 151503 | + sqlite3WalkSelect(&w, p); |
| 151372 | 151504 | |
| 151373 | 151505 | p->pSrc = 0; |
| 151374 | 151506 | p->pWhere = 0; |
| 151375 | 151507 | p->pGroupBy = 0; |
| 151376 | 151508 | p->pHaving = 0; |
| | @@ -151447,11 +151579,10 @@ |
| 151447 | 151579 | pParse, pSublist, pSrc, pWhere, pGroupBy, pHaving, pSort, 0, 0 |
| 151448 | 151580 | ); |
| 151449 | 151581 | p->pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); |
| 151450 | 151582 | if( p->pSrc ){ |
| 151451 | 151583 | Table *pTab2; |
| 151452 | | - Walker w; |
| 151453 | 151584 | p->pSrc->a[0].pSelect = pSub; |
| 151454 | 151585 | sqlite3SrcListAssignCursors(pParse, p->pSrc); |
| 151455 | 151586 | pSub->selFlags |= SF_Expanded; |
| 151456 | 151587 | pTab2 = sqlite3ResultSetOfSelect(pParse, pSub, SQLITE_AFF_NONE); |
| 151457 | 151588 | pSub->selFlags |= (selFlags & SF_Aggregate); |
| | @@ -224866,11 +224997,11 @@ |
| 224866 | 224997 | int nArg, /* Number of args */ |
| 224867 | 224998 | sqlite3_value **apUnused /* Function arguments */ |
| 224868 | 224999 | ){ |
| 224869 | 225000 | assert( nArg==0 ); |
| 224870 | 225001 | UNUSED_PARAM2(nArg, apUnused); |
| 224871 | | - sqlite3_result_text(pCtx, "fts5: 2020-06-04 18:05:39 6da784c9e174744d6deeb76c553b515b96c1fcb80c55a281e476959ec680fb72", -1, SQLITE_TRANSIENT); |
| 225002 | + sqlite3_result_text(pCtx, "fts5: 2020-06-08 11:34:40 6e6b3729e0549de028f6c5bf494b2d69d621c81b61a1dc0a329d3950039342fb", -1, SQLITE_TRANSIENT); |
| 224872 | 225003 | } |
| 224873 | 225004 | |
| 224874 | 225005 | /* |
| 224875 | 225006 | ** Return true if zName is the extension on one of the shadow tables used |
| 224876 | 225007 | ** by this module. |
| | @@ -229649,12 +229780,12 @@ |
| 229649 | 229780 | } |
| 229650 | 229781 | #endif /* SQLITE_CORE */ |
| 229651 | 229782 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 229652 | 229783 | |
| 229653 | 229784 | /************** End of stmt.c ************************************************/ |
| 229654 | | -#if __LINE__!=229654 |
| 229785 | +#if __LINE__!=229785 |
| 229655 | 229786 | #undef SQLITE_SOURCE_ID |
| 229656 | | -#define SQLITE_SOURCE_ID "2020-06-04 18:05:39 6da784c9e174744d6deeb76c553b515b96c1fcb80c55a281e476959ec680alt2" |
| 229787 | +#define SQLITE_SOURCE_ID "2020-06-08 11:34:40 6e6b3729e0549de028f6c5bf494b2d69d621c81b61a1dc0a329d39500393alt2" |
| 229657 | 229788 | #endif |
| 229658 | 229789 | /* Return the source-id for this library */ |
| 229659 | 229790 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 229660 | 229791 | /************************** End of sqlite3.c ******************************/ |
| 229661 | 229792 | |