Reorder the fields in the VdbeCursor object so that those that need to be
bulk zeroed on allocation are grouped at the beginning, and the memset() only runs over those fields that really need it. FossilOrigin-Name: 8165f88bb1d40693d67005a8d5dc499085f64b91
This commit is contained in:
+3
-3
@@ -2006,15 +2006,15 @@ void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
|
||||
if( pCx==0 ){
|
||||
return;
|
||||
}
|
||||
assert( pCx->pBt==0 || pCx->eCurType==CURTYPE_BTREE );
|
||||
assert( pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE );
|
||||
switch( pCx->eCurType ){
|
||||
case CURTYPE_SORTER: {
|
||||
sqlite3VdbeSorterClose(p->db, pCx);
|
||||
break;
|
||||
}
|
||||
case CURTYPE_BTREE: {
|
||||
if( pCx->pBt ){
|
||||
sqlite3BtreeClose(pCx->pBt);
|
||||
if( pCx->pBtx ){
|
||||
sqlite3BtreeClose(pCx->pBtx);
|
||||
/* The pCx->pCursor will be close automatically, if it exists, by
|
||||
** the call above. */
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user