diff options
author | drh <> | 2021-03-18 16:47:24 +0000 |
---|---|---|
committer | drh <> | 2021-03-18 16:47:24 +0000 |
commit | 8d81aac13ffb7fa9991eefbb36d8fc31ecdb98a5 (patch) | |
tree | 4e8af92966061459d59e9e5f10c0c481f79d0d6a /src/vdbeaux.c | |
parent | 8df014979e9c0a113bc38145d84ca986b2e30934 (diff) | |
parent | 76f7b16f1ee50a7677989ad93e1652bd31c131b7 (diff) | |
download | sqlite-8d81aac13ffb7fa9991eefbb36d8fc31ecdb98a5.tar.gz sqlite-8d81aac13ffb7fa9991eefbb36d8fc31ecdb98a5.zip |
Fix the OP_OpenDup opcode so that it is able to duplicate a cursor that
was itself opened by OP_OpenDup. Add additional verification of
ephemeral tables. Fix for ticket [bb8a9fd4a9b7fce5].
FossilOrigin-Name: bcbe5308f3a3b94f965b0f5627cb29cce2e09343b86d757e2de889f7773576e7
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 662379ea8..38315e9f4 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -2479,14 +2479,8 @@ void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){ break; } case CURTYPE_BTREE: { - if( pCx->isEphemeral ){ - if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx); - /* The pCx->pCursor will be close automatically, if it exists, by - ** the call above. */ - }else{ - assert( pCx->uc.pCursor!=0 ); - sqlite3BtreeCloseCursor(pCx->uc.pCursor); - } + assert( pCx->uc.pCursor!=0 ); + sqlite3BtreeCloseCursor(pCx->uc.pCursor); break; } #ifndef SQLITE_OMIT_VIRTUALTABLE |