mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Make sure the IN operator works with zeroblobs. Ticket #3965.
Other simplifications associated with structural testing. (CVS 6890) FossilOrigin-Name: 25dd342283046aaf66a679348ef1c7364c616402
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
** to version 2.8.7, all this code was combined into the vdbe.c source file.
|
||||
** But that file was getting too big so this subroutines were split out.
|
||||
**
|
||||
** $Id: vdbeaux.c,v 1.471 2009/07/13 15:52:38 drh Exp $
|
||||
** $Id: vdbeaux.c,v 1.472 2009/07/14 02:33:02 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@@ -1614,12 +1614,7 @@ int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
|
||||
sqlite3 *const db = p->db;
|
||||
int rc = SQLITE_OK;
|
||||
|
||||
/* If p->iStatement is greater than zero, then this Vdbe opened a
|
||||
** statement transaction that should be closed here. The only exception
|
||||
** is that an IO error may have occured, causing an emergency rollback.
|
||||
** In this case (db->nStatement==0), and there is nothing to do.
|
||||
*/
|
||||
if( db->nStatement && p->iStatement ){
|
||||
if( p->iStatement ){
|
||||
int i;
|
||||
const int iSavepoint = p->iStatement-1;
|
||||
|
||||
@@ -1810,7 +1805,7 @@ int sqlite3VdbeHalt(Vdbe *p){
|
||||
/* If this was an INSERT, UPDATE or DELETE and no statement transaction
|
||||
** has been rolled back, update the database connection change-counter.
|
||||
*/
|
||||
if( p->changeCntOn && p->pc>=0 ){
|
||||
if( p->changeCntOn ){
|
||||
if( eStatementOp!=SAVEPOINT_ROLLBACK ){
|
||||
sqlite3VdbeSetChanges(db, p->nChange);
|
||||
}else{
|
||||
@@ -2052,7 +2047,7 @@ int sqlite3VdbeCursorMoveto(VdbeCursor *p){
|
||||
#endif
|
||||
p->deferredMoveto = 0;
|
||||
p->cacheStatus = CACHE_STALE;
|
||||
}else if( p->pCursor ){
|
||||
}else if( ALWAYS(p->pCursor) ){
|
||||
int hasMoved;
|
||||
int rc = sqlite3BtreeCursorHasMoved(p->pCursor, &hasMoved);
|
||||
if( rc ) return rc;
|
||||
@@ -2453,9 +2448,12 @@ void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord *p){
|
||||
assert( p!=0 );
|
||||
assert( p->flags & UNPACKED_NEED_DESTROY );
|
||||
for(i=0, pMem=p->aMem; i<p->nField; i++, pMem++){
|
||||
if( pMem->zMalloc ){
|
||||
sqlite3VdbeMemRelease(pMem);
|
||||
}
|
||||
/* The unpacked record is always constructed by the
|
||||
** sqlite3VdbeUnpackRecord() function above, which makes all
|
||||
** strings and blobs static. And none of the elements are
|
||||
** ever transformed, so there is never anything to delete.
|
||||
*/
|
||||
if( NEVER(pMem->zMalloc) ) sqlite3VdbeMemRelease(pMem);
|
||||
}
|
||||
if( p->flags & UNPACKED_NEED_FREE ){
|
||||
sqlite3DbFree(p->pKeyInfo->db, p);
|
||||
|
||||
Reference in New Issue
Block a user