Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove the OP_SetFound opcode and its cousins. (CVS 1430) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5524075ec02102446f8d153e068546f7 |
User & Date: | drh 2004-05-21 13:39:50.000 |
Context
2004-05-21
| ||
21:12 | Floating point values are serialized in big-endian byte order. (CVS 1431) (check-in: acb65297b6 user: drh tags: trunk) | |
13:39 | Remove the OP_SetFound opcode and its cousins. (CVS 1430) (check-in: 5524075ec0 user: drh tags: trunk) | |
11:39 | Eliminate some unused code (CVS 1429) (check-in: 550a53b3f2 user: danielk1977 tags: trunk) | |
Changes
Changes to src/build.c.
︙ | ︙ | |||
19 20 21 22 23 24 25 | ** DROP INDEX ** creating ID lists ** BEGIN TRANSACTION ** COMMIT ** ROLLBACK ** PRAGMA ** | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ** DROP INDEX ** creating ID lists ** BEGIN TRANSACTION ** COMMIT ** ROLLBACK ** PRAGMA ** ** $Id: build.c,v 1.192 2004/05/21 13:39:50 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> /* ** This routine is called when a new SQL statement is beginning to ** be parsed. Check to see if the schema for the database needs |
︙ | ︙ | |||
2145 2146 2147 2148 2149 2150 2151 | /* ** Generate VDBE code that prepares for doing an operation that ** might change the database. ** ** This routine starts a new transaction if we are not already within ** a transaction. If we are already within a transaction, then a checkpoint | | | | | | | 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 | /* ** Generate VDBE code that prepares for doing an operation that ** might change the database. ** ** This routine starts a new transaction if we are not already within ** a transaction. If we are already within a transaction, then a checkpoint ** is set if the setStatement parameter is true. A checkpoint should ** be set for operations that might fail (due to a constraint) part of ** the way through and which will need to undo some writes without having to ** rollback the whole transaction. For operations where all constraints ** can be checked before any changes are made to the database, it is never ** necessary to undo a write and the checkpoint should not be set. ** ** Only database iDb and the temp database are made writable by this call. ** If iDb==0, then the main and temp databases are made writable. If ** iDb==1 then only the temp database is made writable. If iDb>1 then the ** specified auxiliary database and the temp database are made writable. */ void sqlite3BeginWriteOperation(Parse *pParse, int setStatement, int iDb){ Vdbe *v; sqlite *db = pParse->db; if( DbHasProperty(db, iDb, DB_Locked) ) return; v = sqlite3GetVdbe(pParse); if( v==0 ) return; if( !db->aDb[iDb].inTrans ){ sqlite3VdbeAddOp(v, OP_Transaction, iDb, 0); DbSetProperty(db, iDb, DB_Locked); sqlite3CodeVerifySchema(pParse, iDb); if( iDb!=1 ){ sqlite3BeginWriteOperation(pParse, setStatement, 1); } }else if( setStatement ){ sqlite3VdbeAddOp(v, OP_Statement, iDb, 0); DbSetProperty(db, iDb, DB_Locked); } } /* ** Generate code that concludes an operation that may have changed ** the database. If a statement transaction was started, then emit |
︙ | ︙ |
Changes to src/expr.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** ** $Id: expr.c,v 1.127 2004/05/21 13:39:51 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> char const *sqlite3AffinityString(char affinity){ switch( affinity ){ case SQLITE_AFF_INTEGER: return "i"; |
︙ | ︙ | |||
1427 1428 1429 1430 1431 1432 1433 | } case TK_ISNULL: case TK_NOTNULL: { sqlite3ExprCode(pParse, pExpr->pLeft); sqlite3VdbeAddOp(v, op, 1, dest); break; } | < < < < < < < < < < < < < < < < | 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 | } case TK_ISNULL: case TK_NOTNULL: { sqlite3ExprCode(pParse, pExpr->pLeft); sqlite3VdbeAddOp(v, op, 1, dest); break; } case TK_BETWEEN: { int addr; sqlite3ExprCode(pParse, pExpr->pLeft); sqlite3VdbeAddOp(v, OP_Dup, 0, 0); sqlite3ExprCode(pParse, pExpr->pList->a[0].pExpr); addr = sqlite3VdbeAddOp(v, OP_Lt, !jumpIfNull, 0); sqlite3ExprCode(pParse, pExpr->pList->a[1].pExpr); |
︙ | ︙ |
Changes to src/vdbe.c.
︙ | ︙ | |||
39 40 41 42 43 44 45 | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** ** $Id: vdbe.c,v 1.315 2004/05/21 13:39:51 drh Exp $ */ #include "sqliteInt.h" #include "os.h" #include <ctype.h> #include "vdbeInt.h" /* |
︙ | ︙ | |||
2668 2669 2670 2671 2672 2673 2674 | */ if( pOp->p2 && containsNull && addRowid ){ pc = pOp->p2 - 1; } break; } | | | > | | | | | | 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 | */ if( pOp->p2 && containsNull && addRowid ){ pc = pOp->p2 - 1; } break; } /* Opcode: Statement P1 * * ** ** Begin an individual statement transaction which is part of a larger ** BEGIN..COMMIT transaction. This is needed so that the statement ** can be rolled back after an error without having to roll back the ** entire transaction. The statement transaction will automatically ** commit when the VDBE halts. ** ** The statement is begun on the database file with index P1. The main ** database file has an index of 0 and the file used for temporary tables ** has an index of 1. */ case OP_Statement: { int i = pOp->p1; if( i>=0 && i<db->nDb && db->aDb[i].pBt && db->aDb[i].inTrans==1 ){ rc = sqlite3BtreeBeginStmt(db->aDb[i].pBt); if( rc==SQLITE_OK ) db->aDb[i].inTrans = 2; } break; } |
︙ | ︙ | |||
5150 5151 5152 5153 5154 5155 5156 | Release(pTos); pTos--; } if( sqlite3_malloc_failed ) goto no_mem; break; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 | Release(pTos); pTos--; } if( sqlite3_malloc_failed ) goto no_mem; break; } /* Opcode: Vacuum * * * ** ** Vacuum the entire database. This opcode will cause other virtual ** machines to be created and run. It may not be called from within ** a transaction. */ case OP_Vacuum: { |
︙ | ︙ |