diff options
author | drh <drh@noemail.net> | 2017-07-25 01:34:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-07-25 01:34:05 +0000 |
commit | e8cf1ab9aa106b5d3fb11965ce1ca90264e7531c (patch) | |
tree | a48525407e36df01f10da6b35d6dd6611f11c6d0 /src | |
parent | b67abfc46392115c125cc9f4e8ee2f0b5bd40ccc (diff) | |
download | sqlite-e8cf1ab9aa106b5d3fb11965ce1ca90264e7531c.tar.gz sqlite-e8cf1ab9aa106b5d3fb11965ce1ca90264e7531c.zip |
Fix a bug in the deterministic date/time function logic that can only appear
with STAT3 or STAT4.
FossilOrigin-Name: 1ca707a4fb8db7aa85430413164265607ce727fc8a5afc3424b3abfb59921b39
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbeaux.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index ce9e98bb4..7c2bd87ef 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -4593,6 +4593,9 @@ void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){ ** features such as 'now'. */ int sqlite3NotPureFunc(sqlite3_context *pCtx){ +#ifdef SQLITE_ENABLE_STAT3_OR_STAT4 + if( pCtx->pVdbe==0 ) return 1; +#endif if( pCtx->pVdbe->aOp[pCtx->iOp].opcode==OP_PureFunc ){ sqlite3_result_error(pCtx, "non-deterministic function in index expression or CHECK constraint", |