diff options
author | drh <drh@noemail.net> | 2017-05-01 16:37:20 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-05-01 16:37:20 +0000 |
commit | 33543c237b38936a3beab3475e9664c20dfa4bfe (patch) | |
tree | a4866a6ad8847eaee9d10445a48b419f0d4ff16f /src/vdbeaux.c | |
parent | e08e8d6b61187ecfd19f98f863a2a35f6b80152b (diff) | |
download | sqlite-33543c237b38936a3beab3475e9664c20dfa4bfe.tar.gz sqlite-33543c237b38936a3beab3475e9664c20dfa4bfe.zip |
Minor bug fixes and performance enhancement.
FossilOrigin-Name: b2aae559581d05e4e8caaddfbd137cb275d582e82d58872c6f42e462dc859b1c
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index e903f4bbc..b41ed95b2 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -2035,11 +2035,11 @@ void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){ break; } case CURTYPE_BTREE: { - if( pCx->pBtx ){ - sqlite3BtreeClose(pCx->pBtx); + if( pCx->isEphemeral ){ + if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx); /* The pCx->pCursor will be close automatically, if it exists, by ** the call above. */ - }else if( !pCx->isEphemeral ){ + }else{ assert( pCx->uc.pCursor!=0 ); sqlite3BtreeCloseCursor(pCx->uc.pCursor); } |