1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix bugs in the altermalloc.test and incrblob_err.test scripts. (CVS 4295)

FossilOrigin-Name: e5ec17071720a973bbd213a8b23038d3aff25315
This commit is contained in:
danielk1977
2007-08-25 13:09:26 +00:00
parent df7ca22abb
commit cdc3a6bcbc
6 changed files with 24 additions and 196 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that used to generate VDBE code
** that implements the ALTER TABLE command.
**
** $Id: alter.c,v 1.29 2007/08/16 10:09:02 danielk1977 Exp $
** $Id: alter.c,v 1.30 2007/08/25 13:09:26 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -587,7 +587,7 @@ void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
assert( pNew->nCol>0 );
nAlloc = (((pNew->nCol-1)/8)*8)+8;
assert( nAlloc>=pNew->nCol && nAlloc%8==0 && nAlloc-pNew->nCol<8 );
pNew->aCol = (Column*)sqlite3_malloc(sizeof(Column)*nAlloc);
pNew->aCol = (Column*)sqlite3MallocZero(sizeof(Column)*nAlloc);
pNew->zName = sqlite3DbStrDup(db, pTab->zName);
if( !pNew->aCol || !pNew->zName ){
db->mallocFailed = 1;