diff options
author | drh <drh@noemail.net> | 2008-01-31 13:35:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-01-31 13:35:48 +0000 |
commit | 820a90694e186c6f25bc081dd4ad8162378b9c15 (patch) | |
tree | 7731ac018a49c46cf0d9f43f2cbbea50b816e695 /src | |
parent | 21ac7f9dcd302d5135b65f02fc29cad3975c7cb9 (diff) | |
download | sqlite-820a90694e186c6f25bc081dd4ad8162378b9c15.tar.gz sqlite-820a90694e186c6f25bc081dd4ad8162378b9c15.zip |
Version number to 3.5.5. Include FTS3 in the amalgamation by default
(but disabled unless compiled with -DSQLITE_ENABLE_FTS3). Fix a memory
allocation problem. (CVS 4757)
FossilOrigin-Name: 72411043e60d5358d5a7adf566d662d65d3b3336
Diffstat (limited to 'src')
-rw-r--r-- | src/build.c | 11 | ||||
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/vdbemem.c | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/src/build.c b/src/build.c index 86109d152..9c7d82cbc 100644 --- a/src/build.c +++ b/src/build.c @@ -22,7 +22,7 @@ ** COMMIT ** ROLLBACK ** -** $Id: build.c,v 1.471 2008/01/25 15:04:49 drh Exp $ +** $Id: build.c,v 1.472 2008/01/31 13:35:49 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1337,7 +1337,7 @@ static void identPut(char *z, int *pIdx, char *zSignedIdent){ ** table. Memory to hold the text of the statement is obtained ** from sqliteMalloc() and must be freed by the calling function. */ -static char *createTableStmt(Table *p, int isTemp){ +static char *createTableStmt(sqlite3 *db, Table *p, int isTemp){ int i, k, n; char *zStmt; char *zSep, *zSep2, *zEnd, *z; @@ -1362,7 +1362,10 @@ static char *createTableStmt(Table *p, int isTemp){ } n += 35 + 6*p->nCol; zStmt = sqlite3_malloc( n ); - if( zStmt==0 ) return 0; + if( zStmt==0 ){ + db->mallocFailed = 1; + return 0; + } sqlite3_snprintf(n, zStmt, !OMIT_TEMPDB&&isTemp ? "CREATE TEMP TABLE ":"CREATE TABLE "); k = strlen(zStmt); @@ -1528,7 +1531,7 @@ void sqlite3EndTable( /* Compute the complete text of the CREATE statement */ if( pSelect ){ - zStmt = createTableStmt(p, p->pSchema==db->aDb[1].pSchema); + zStmt = createTableStmt(db, p, p->pSchema==db->aDb[1].pSchema); }else{ n = pEnd->z - pParse->sNameToken.z + 1; zStmt = sqlite3MPrintf(db, diff --git a/src/main.c b/src/main.c index bc79451e8..62500441b 100644 --- a/src/main.c +++ b/src/main.c @@ -14,10 +14,13 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.414 2008/01/23 12:52:41 drh Exp $ +** $Id: main.c,v 1.415 2008/01/31 13:35:49 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> +#ifdef SQLITE_ENABLE_FTS3 +# include "fts3.h" +#endif /* ** The version of the library @@ -1065,7 +1068,6 @@ static int openDatabase( #ifdef SQLITE_ENABLE_FTS3 if( !db->mallocFailed && rc==SQLITE_OK ){ - extern int sqlite3Fts3Init(sqlite3*); rc = sqlite3Fts3Init(db); } #endif diff --git a/src/vdbemem.c b/src/vdbemem.c index 0449d52f1..fa407b671 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -824,7 +824,7 @@ int sqlite3VdbeMemFromBtree( return SQLITE_OK; } -#ifndef NDEBUG +#if 0 /* ** Perform various checks on the memory cell pMem. An assert() will ** fail if pMem is internally inconsistent. |