aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-12-14 16:11:09 +0000
committerdrh <drh@noemail.net>2007-12-14 16:11:09 +0000
commitef0bea922034efd25fcb3a188588e3e8e3d9eb2f (patch)
tree23b1cbb4d7348e9dc464f9996133983486751603 /src
parent49df6b749cc9c94c6663802217907e95ecbb5ec9 (diff)
downloadsqlite-ef0bea922034efd25fcb3a188588e3e8e3d9eb2f.tar.gz
sqlite-ef0bea922034efd25fcb3a188588e3e8e3d9eb2f.zip
Fix a typo in the previous check-in. Also simplify a line in select.c. (CVS 4631)
FossilOrigin-Name: 86f45d7bb6f7d9e5c177be76d8a7ace754d52bcd
Diffstat (limited to 'src')
-rw-r--r--src/insert.c4
-rw-r--r--src/select.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/insert.c b/src/insert.c
index 2029f19c4..3720af60e 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
-** $Id: insert.c,v 1.196 2007/12/14 15:12:21 drh Exp $
+** $Id: insert.c,v 1.197 2007/12/14 16:11:09 drh Exp $
*/
#include "sqliteInt.h"
@@ -110,7 +110,7 @@ static int readsTable(Vdbe *v, int iStartAddr, int iDb, Table *pTab){
int iEnd = sqlite3VdbeCurrentAddr(v);
for(i=iStartAddr; i<iEnd; i++){
VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
- assert( pOp==0 );
+ assert( pOp!=0 );
if( pOp->opcode==OP_OpenRead ){
VdbeOp *pPrior = &pOp[-1];
int tnum = pOp->p2;
diff --git a/src/select.c b/src/select.c
index dd577f35e..ffaab786c 100644
--- a/src/select.c
+++ b/src/select.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.370 2007/12/13 21:54:11 drh Exp $
+** $Id: select.c,v 1.371 2007/12/14 16:11:09 drh Exp $
*/
#include "sqliteInt.h"
@@ -1464,8 +1464,7 @@ static int matchOrderByTermToExprList(
if( pE->op==TK_ID || (pE->op==TK_STRING && pE->token.z[0]!='\'') ){
sqlite3 *db = pParse->db;
char *zCol = sqlite3NameFromToken(db, &pE->token);
- if( db->mallocFailed ){
- sqlite3_free(zCol);
+ if( zCol==0 ){
return -1;
}
for(i=0; i<pEList->nExpr; i++){