diff options
author | drh <drh@noemail.net> | 2017-10-24 19:05:26 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-10-24 19:05:26 +0000 |
commit | e2f3b671ede82824286668f9143d864b27fcdfcb (patch) | |
tree | d0dde42306db50f44b83c7b8f58c844a73ac03a9 /src | |
parent | 0295774ca0d2d33c7644688be3624433e29ab84b (diff) | |
parent | 39f2b329f6513b6901afb461b57674a109e934ff (diff) | |
download | sqlite-e2f3b671ede82824286668f9143d864b27fcdfcb.tar.gz sqlite-e2f3b671ede82824286668f9143d864b27fcdfcb.zip |
Merge all of the fixes from the 3.21.0 release.
FossilOrigin-Name: 5ab662b443df17c5ebdadc0bdac2f447c5c7e86f7a32a6943bb4ac8605879441
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 2 | ||||
-rw-r--r-- | src/pager.c | 2 | ||||
-rw-r--r-- | src/test_config.c | 6 | ||||
-rw-r--r-- | src/vdbe.c | 11 | ||||
-rw-r--r-- | src/vdbeblob.c | 7 |
5 files changed, 16 insertions, 12 deletions
diff --git a/src/expr.c b/src/expr.c index 0b922cd0f..31e9a9386 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2678,7 +2678,7 @@ int sqlite3CodeSubselect( /* Loop through each expression in <exprlist>. */ r1 = sqlite3GetTempReg(pParse); r2 = sqlite3GetTempReg(pParse); - if( isRowid ) sqlite3VdbeAddOp2(v, OP_Null, 0, r2); + if( isRowid ) sqlite3VdbeAddOp4(v, OP_Blob, 0, r2, 0, "", P4_STATIC); for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){ Expr *pE2 = pItem->pExpr; int iValToIns; diff --git a/src/pager.c b/src/pager.c index 2ddca9a5f..dbb7636ca 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1208,6 +1208,8 @@ static int jrnlBufferSize(Pager *pPager){ assert( isOpen(pPager->fd) ); dc = sqlite3OsDeviceCharacteristics(pPager->fd); +#else + UNUSED_PARAMETER(pPager); #endif #ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE diff --git a/src/test_config.c b/src/test_config.c index 9ff84dcec..193f95edf 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -214,6 +214,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "json1", "0", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_HAS_CODEC + Tcl_SetVar2(interp, "sqlite_options", "has_codec", "1", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "has_codec", "0", TCL_GLOBAL_ONLY); +#endif + #ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS Tcl_SetVar2(interp, "sqlite_options", "like_match_blobs", "0", TCL_GLOBAL_ONLY); #else diff --git a/src/vdbe.c b/src/vdbe.c index 9687170be..cfe18a9d1 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -4435,14 +4435,9 @@ case OP_InsertInt: { if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++; if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = x.nKey; - if( pData->flags & MEM_Null ){ - x.pData = 0; - x.nData = 0; - }else{ - assert( pData->flags & (MEM_Blob|MEM_Str) ); - x.pData = pData->z; - x.nData = pData->n; - } + assert( pData->flags & (MEM_Blob|MEM_Str) ); + x.pData = pData->z; + x.nData = pData->n; seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0); if( pData->flags & MEM_Zero ){ x.nZero = pData->u.nZero; diff --git a/src/vdbeblob.c b/src/vdbeblob.c index 16a2c0f36..427979269 100644 --- a/src/vdbeblob.c +++ b/src/vdbeblob.c @@ -63,11 +63,12 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){ v->aMem[1].u.i = iRow; /* If the statement has been run before (and is paused at the OP_ResultRow) - ** then back it up to the point where it does the OP_SeekRowid. This could + ** then back it up to the point where it does the OP_NotExists. This could ** have been down with an extra OP_Goto, but simply setting the program ** counter is faster. */ - if( v->pc>3 ){ - v->pc = 3; + if( v->pc>4 ){ + v->pc = 4; + assert( v->aOp[v->pc].opcode==OP_NotExists ); rc = sqlite3VdbeExec(v); }else{ rc = sqlite3_step(p->pStmt); |