1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Slightly faster INSERTs from a SELECT by avoiding an intermediate table.

But it didn't make nearly as much difference as I had hoped. (CVS 732)

FossilOrigin-Name: 723362e74f79c784314d042e3a8c8a9bf07cbd5e
This commit is contained in:
drh
2002-08-28 03:00:58 +00:00
parent 66105a8ea0
commit 142e30df99
8 changed files with 184 additions and 46 deletions

View File

@@ -30,7 +30,7 @@
** But other routines are also provided to help in building up
** a program instruction by instruction.
**
** $Id: vdbe.c,v 1.172 2002/08/26 19:55:08 drh Exp $
** $Id: vdbe.c,v 1.173 2002/08/28 03:01:00 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -539,6 +539,18 @@ void sqliteVdbeCompressSpace(Vdbe *p, int addr){
z[j] = 0;
}
/*
** Search for the current program for the given opcode and P2
** value. Return 1 if found and 0 if not found.
*/
int sqliteVdbeFindOp(Vdbe *p, int op, int p2){
int i;
for(i=0; i<p->nOp; i++){
if( p->aOp[i].opcode==op && p->aOp[i].p2==p2 ) return 1;
}
return 0;
}
/*
** The following group or routines are employed by installable functions
** to return their results.
@@ -5231,7 +5243,7 @@ cleanup:
}
sqliteBtreeCommitCkpt(pBt);
if( db->pBeTemp ) sqliteBtreeCommitCkpt(db->pBeTemp);
assert( p->tos<pc );
assert( p->tos<pc || sqlite_malloc_failed==1 );
return rc;
/* Jump to here if a malloc() fails. It's hard to get a malloc()