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

Changes to alter.c to enable full branch coverage testing. (CVS 6513)

FossilOrigin-Name: 6a91ab08a55eacc77f69190e1126326f4da220af
This commit is contained in:
drh
2009-04-16 16:30:17 +00:00
parent 7fee360d09
commit 56d56f7aa7
3 changed files with 10 additions and 10 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.56 2009/04/15 13:39:48 drh Exp $
** $Id: alter.c,v 1.57 2009/04/16 16:30:18 drh Exp $
*/
#include "sqliteInt.h"
@@ -279,7 +279,7 @@ void sqlite3AlterRenameTable(
#endif
int isVirtualRename = 0; /* True if this is a v-table with an xRename() */
if( db->mallocFailed ) goto exit_rename_table;
if( NEVER(db->mallocFailed) ) goto exit_rename_table;
assert( pSrc->nSrc==1 );
assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
@@ -512,7 +512,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
zCol = sqlite3DbStrNDup(db, (char*)pColDef->z, pColDef->n);
if( zCol ){
char *zEnd = &zCol[pColDef->n-1];
while( (zEnd>zCol && *zEnd==';') || sqlite3Isspace(*zEnd) ){
while( zEnd>zCol && (*zEnd==';' || sqlite3Isspace(*zEnd)) ){
*zEnd-- = '\0';
}
sqlite3NestedParse(pParse,