1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Minor bug fixes and performance enhancement.

FossilOrigin-Name: b2aae559581d05e4e8caaddfbd137cb275d582e82d58872c6f42e462dc859b1c
This commit is contained in:
drh
2017-05-01 16:37:20 +00:00
parent e08e8d6b61
commit 33543c237b
4 changed files with 14 additions and 15 deletions

View File

@@ -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);
}