1
1
/******************************************************************************
2
2
** This file is an amalgamation of many separate C source files from SQLite
3
- ** version 3.30.0 . By combining all the individual C code files into this
3
+ ** version 3.30.1 . By combining all the individual C code files into this
4
4
** single large file, the entire code can be compiled as a single translation
5
5
** unit. This allows many compilers to do optimizations that would not be
6
6
** possible if the files were compiled separately. Performance improvements
@@ -1165,9 +1165,9 @@ extern "C" {
1165
1165
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1166
1166
** [sqlite_version()] and [sqlite_source_id()].
1167
1167
*/
1168
- #define SQLITE_VERSION "3.30.0 "
1169
- #define SQLITE_VERSION_NUMBER 3030000
1170
- #define SQLITE_SOURCE_ID "2019-10-04 15:03:17 c20a35336432025445f9f7e289d0cc3e4003fb17f45a4ce74c6269c407c6e09f "
1168
+ #define SQLITE_VERSION "3.30.1 "
1169
+ #define SQLITE_VERSION_NUMBER 3030001
1170
+ #define SQLITE_SOURCE_ID "2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b "
1171
1171
1172
1172
/*
1173
1173
** CAPI3REF: Run-Time Library Version Numbers
@@ -17619,9 +17619,13 @@ struct Expr {
17619
17619
** True if the expression passed as an argument was a function with
17620
17620
** an OVER() clause (a window function).
17621
17621
*/
17622
- #define IsWindowFunc(p) ( \
17622
+ #ifdef SQLITE_OMIT_WINDOWFUNC
17623
+ # define IsWindowFunc(p) 0
17624
+ #else
17625
+ # define IsWindowFunc(p) ( \
17623
17626
ExprHasProperty((p), EP_WinFunc) && p->y.pWin->eFrmType!=TK_FILTER \
17624
- )
17627
+ )
17628
+ #endif
17625
17629
17626
17630
/*
17627
17631
** A list of expressions. Each expression may optionally have a
@@ -77192,7 +77196,7 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
77192
77196
int opcode = pOp->opcode;
77193
77197
if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename
77194
77198
|| opcode==OP_VDestroy
77195
- || (opcode==OP_Function0 && pOp->p4.pFunc->funcFlags&SQLITE_FUNC_INTERNAL )
77199
+ || (opcode==OP_ParseSchema && pOp->p4.z==0 )
77196
77200
|| ((opcode==OP_Halt || opcode==OP_HaltIfNull)
77197
77201
&& ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))
77198
77202
){
@@ -88478,23 +88482,27 @@ case OP_SeekRowid: { /* jump, in3 */
88478
88482
pIn3 = &aMem[pOp->p3];
88479
88483
testcase( pIn3->flags & MEM_Int );
88480
88484
testcase( pIn3->flags & MEM_IntReal );
88485
+ testcase( pIn3->flags & MEM_Real );
88486
+ testcase( (pIn3->flags & (MEM_Str|MEM_Int))==MEM_Str );
88481
88487
if( (pIn3->flags & (MEM_Int|MEM_IntReal))==0 ){
88482
- /* Make sure pIn3->u.i contains a valid integer representation of
88483
- ** the key value, but do not change the datatype of the register, as
88484
- ** other parts of the perpared statement might be depending on the
88485
- ** current datatype. */
88486
- u16 origFlags = pIn3->flags;
88487
- int isNotInt ;
88488
- applyAffinity(pIn3 , SQLITE_AFF_NUMERIC, encoding);
88489
- isNotInt = (pIn3-> flags & MEM_Int)==0;
88490
- pIn3->flags = origFlags ;
88491
- if( isNotInt ) goto jump_to_p2 ;
88488
+ /* If pIn3->u.i does not contain an integer, compute iKey as the
88489
+ ** integer value of pIn3. Jump to P2 if pIn3 cannot be converted
88490
+ ** into an integer without loss of information. Take care to avoid
88491
+ ** changing the datatype of pIn3, however, as it is used by other
88492
+ ** parts of the prepared statement. */
88493
+ Mem x = pIn3[0] ;
88494
+ applyAffinity(&x , SQLITE_AFF_NUMERIC, encoding);
88495
+ if( (x. flags & MEM_Int)==0 ) goto jump_to_p2 ;
88496
+ iKey = x.u.i ;
88497
+ goto notExistsWithKey ;
88492
88498
}
88493
88499
/* Fall through into OP_NotExists */
88494
88500
case OP_NotExists: /* jump, in3 */
88495
88501
pIn3 = &aMem[pOp->p3];
88496
88502
assert( (pIn3->flags & MEM_Int)!=0 || pOp->opcode==OP_SeekRowid );
88497
88503
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
88504
+ iKey = pIn3->u.i;
88505
+ notExistsWithKey:
88498
88506
pC = p->apCsr[pOp->p1];
88499
88507
assert( pC!=0 );
88500
88508
#ifdef SQLITE_DEBUG
@@ -88505,7 +88513,6 @@ case OP_NotExists: /* jump, in3 */
88505
88513
pCrsr = pC->uc.pCursor;
88506
88514
assert( pCrsr!=0 );
88507
88515
res = 0;
88508
- iKey = pIn3->u.i;
88509
88516
rc = sqlite3BtreeMovetoUnpacked(pCrsr, 0, iKey, 0, &res);
88510
88517
assert( rc==SQLITE_OK || res==0 );
88511
88518
pC->movetoTarget = iKey; /* Used by OP_Delete */
@@ -102659,6 +102666,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
102659
102666
case TK_CASE:
102660
102667
case TK_IN:
102661
102668
case TK_FUNCTION:
102669
+ case TK_TRUTH:
102662
102670
testcase( pExpr->op==TK_ISNOT );
102663
102671
testcase( pExpr->op==TK_ISNULL );
102664
102672
testcase( pExpr->op==TK_NOTNULL );
@@ -102667,6 +102675,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
102667
102675
testcase( pExpr->op==TK_CASE );
102668
102676
testcase( pExpr->op==TK_IN );
102669
102677
testcase( pExpr->op==TK_FUNCTION );
102678
+ testcase( pExpr->op==TK_TRUTH );
102670
102679
return WRC_Prune;
102671
102680
case TK_COLUMN:
102672
102681
if( pWalker->u.iCur==pExpr->iTable ){
@@ -103607,6 +103616,7 @@ SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
103607
103616
goto exit_begin_add_column;
103608
103617
}
103609
103618
103619
+ sqlite3MayAbort(pParse);
103610
103620
assert( pTab->addColOffset>0 );
103611
103621
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
103612
103622
@@ -125710,9 +125720,9 @@ static void clearSelect(sqlite3 *db, Select *p, int bFree){
125710
125720
if( OK_IF_ALWAYS_TRUE(p->pWinDefn) ){
125711
125721
sqlite3WindowListDelete(db, p->pWinDefn);
125712
125722
}
125723
+ assert( p->pWin==0 );
125713
125724
#endif
125714
125725
if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
125715
- assert( p->pWin==0 );
125716
125726
if( bFree ) sqlite3DbFreeNN(db, p);
125717
125727
p = pPrior;
125718
125728
bFree = 1;
@@ -129113,6 +129123,14 @@ static Expr *substExpr(
129113
129123
}else{
129114
129124
substExprList(pSubst, pExpr->x.pList);
129115
129125
}
129126
+ #ifndef SQLITE_OMIT_WINDOWFUNC
129127
+ if( ExprHasProperty(pExpr, EP_WinFunc) ){
129128
+ Window *pWin = pExpr->y.pWin;
129129
+ pWin->pFilter = substExpr(pSubst, pWin->pFilter);
129130
+ substExprList(pSubst, pWin->pPartition);
129131
+ substExprList(pSubst, pWin->pOrderBy);
129132
+ }
129133
+ #endif
129116
129134
}
129117
129135
return pExpr;
129118
129136
}
@@ -220267,7 +220285,7 @@ static void fts5SourceIdFunc(
220267
220285
){
220268
220286
assert( nArg==0 );
220269
220287
UNUSED_PARAM2(nArg, apUnused);
220270
- sqlite3_result_text(pCtx, "fts5: 2019-10-04 15:03:17 c20a35336432025445f9f7e289d0cc3e4003fb17f45a4ce74c6269c407c6e09f ", -1, SQLITE_TRANSIENT);
220288
+ sqlite3_result_text(pCtx, "fts5: 2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b ", -1, SQLITE_TRANSIENT);
220271
220289
}
220272
220290
220273
220291
/*
@@ -225035,9 +225053,9 @@ SQLITE_API int sqlite3_stmt_init(
225035
225053
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
225036
225054
225037
225055
/************** End of stmt.c ************************************************/
225038
- #if __LINE__!=225038
225056
+ #if __LINE__!=225056
225039
225057
#undef SQLITE_SOURCE_ID
225040
- #define SQLITE_SOURCE_ID "2019-10-04 15:03:17 c20a35336432025445f9f7e289d0cc3e4003fb17f45a4ce74c6269c407c6alt2 "
225058
+ #define SQLITE_SOURCE_ID "2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3dfalt2 "
225041
225059
#endif
225042
225060
/* Return the source-id for this library */
225043
225061
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
0 commit comments