summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite/src/alter.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-08-28 16:57:01 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-08-28 16:57:01 +0000
commitbb3801714270de37f05383214aadfb09006113ea (patch)
tree2549f7b9f0563bb3e88cc95f80ce1692d3e89f69 /ext/pdo_sqlite/sqlite/src/alter.c
parent4509fb9d5d9bc423e34f6a944191b6309e9d0b74 (diff)
downloadphp-git-bb3801714270de37f05383214aadfb09006113ea.tar.gz
Upgrade sqlite lib to 3.2.5
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/alter.c')
-rw-r--r--ext/pdo_sqlite/sqlite/src/alter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/alter.c b/ext/pdo_sqlite/sqlite/src/alter.c
index c5be6b61c7..ada0769b5d 100644
--- a/ext/pdo_sqlite/sqlite/src/alter.c
+++ b/ext/pdo_sqlite/sqlite/src/alter.c
@@ -258,6 +258,7 @@ void sqlite3AlterRenameTable(
char *zWhere = 0; /* Where clause to locate temp triggers */
#endif
+ if( sqlite3_malloc_failed ) goto exit_rename_table;
assert( pSrc->nSrc==1 );
pTab = sqlite3LocateTable(pParse, pSrc->a[0].zName, pSrc->a[0].zDatabase);
@@ -500,8 +501,10 @@ void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
int i;
int nAlloc;
+
/* Look up the table being altered. */
- assert( !pParse->pNewTable );
+ assert( pParse->pNewTable==0 );
+ if( sqlite3_malloc_failed ) goto exit_begin_add_column;
pTab = sqlite3LocateTable(pParse, pSrc->a[0].zName, pSrc->a[0].zDatabase);
if( !pTab ) goto exit_begin_add_column;
@@ -520,6 +523,7 @@ void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
pNew = (Table *)sqliteMalloc(sizeof(Table));
if( !pNew ) goto exit_begin_add_column;
pParse->pNewTable = pNew;
+ pNew->nRef = 1;
pNew->nCol = pTab->nCol;
assert( pNew->nCol>0 );
nAlloc = (((pNew->nCol-1)/8)*8)+8;