-C If\sa\svirtual\stable\sconstructor\sreturns\sSQLITE_NOMEM,\sset\sthe\smallocFailed\nflag\sin\sthe\scorresponding\sdatabase\sconnection\sto\sinsure\sthat\sthe\serror\nis\spropagated\sback\sto\sthe\stop\slayer.\s(CVS\s6627)
-D 2009-05-11T23:38:00
+C Tweaks\sto\sbuild.c\sto\sfacilitate\scoverage\stesting.\s(CVS\s6628)
+D 2009-05-12T00:40:13
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/btree.c 7c4b02afea7efb561361f20408414fec68df898c
F src/btree.h 58d876d3ed944a8f4f1fd0e67024b385243fc9dd
F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5
-F src/build.c caece8163ad2cf6be278ad5405f25852c468d8d8
+F src/build.c 65caba758665cc1f511864329940aac19344e2db
F src/callback.c bf295cfdc065b56cc49a5f6452126dc4ffe0ff5b
F src/complete.c 5ad5c6cd4548211867c204c41a126d73a9fbcea0
F src/date.c ab5f7137656652a48434d64f96bdcdc823bb23b3
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
-R 1e077e3ba746ae1ba5340b2bc353df44
+P 5635666f20358e854a76d244768198734afd4299
+R f9f1009ab66a2d75fd919e71db434f55
U drh
-Z bd311d11dec0024101d1628d00e7c29b
+Z 612bf8c819ce488d831d79c1e2187441
** COMMIT
** ROLLBACK
**
-** $Id: build.c,v 1.538 2009/05/11 20:53:29 drh Exp $
+** $Id: build.c,v 1.539 2009/05/12 00:40:13 drh Exp $
*/
#include "sqliteInt.h"
char *zStmt; /* Text of the CREATE TABLE or CREATE VIEW statement */
v = sqlite3GetVdbe(pParse);
- if( v==0 ) return;
+ if( NEVER(v==0) ) return;
sqlite3VdbeAddOp1(v, OP_Close, 0);
/* Add the table to the in-memory representation of the database.
*/
- if( db->init.busy && pParse->nErr==0 ){
+ if( db->init.busy && ALWAYS(pParse->nErr==0) ){
Table *pOld;
Schema *pSchema = p->pSchema;
pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName,
}
sqlite3StartTable(pParse, pName1, pName2, isTemp, 1, 0, noErr);
p = pParse->pNewTable;
- if( p==0 || pParse->nErr ){
+ if( p==0 || NEVER(pParse->nErr>0) ){
sqlite3SelectDelete(db, pSelect);
return;
}
** the end.
*/
sEnd = pParse->sLastToken;
- if( sEnd.z[0]!=0 && sEnd.z[0]!=';' ){
+ if( ALWAYS(sEnd.z[0]!=0) && sEnd.z[0]!=';' ){
sEnd.z += sEnd.n;
}
sEnd.n = 0;
n = (int)(sEnd.z - pBegin->z);
z = (const unsigned char*)pBegin->z;
- while( n>0 && (z[n-1]==';' || sqlite3Isspace(z[n-1])) ){ n--; }
+ while( ALWAYS(n>0) && sqlite3Isspace(z[n-1]) ){ n--; }
sEnd.z = &z[n-1];
sEnd.n = 1;
** CREATE VIEW one AS SELECT * FROM two;
** CREATE VIEW two AS SELECT * FROM one;
**
- ** Actually, this error is caught previously and so the following test
- ** should always fail. But we will leave it in place just to be safe.
+ ** Actually, the error above is now caught prior to reaching this point.
+ ** But the following test is still important as it does come up
+ ** in the following:
+ **
+ ** CREATE TABLE main.ex1(a);
+ ** CREATE TEMP VIEW ex1 AS SELECT a FROM ex1;
+ ** SELECT * FROM temp.ex1;
*/
if( pTable->nCol<0 ){
sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( IsVirtual(pTab) ){
- if( v ){
- sqlite3VdbeAddOp0(v, OP_VBegin);
- }
+ sqlite3VdbeAddOp0(v, OP_VBegin);
}
#endif