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

Eliminate the need for the Column.zDflt (using Column.pDflt instead) to reduce

the amount of memory needed to hold the schema.

FossilOrigin-Name: d8c94a46dfa94930732c2de2aa79675c5087d36e
This commit is contained in:
drh
2016-02-27 21:16:04 +00:00
parent fc1a84c57b
commit 94fa9c414a
11 changed files with 46 additions and 30 deletions

View File

@@ -628,7 +628,8 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
** literal NULL, then set pDflt to 0. This simplifies checking
** for an SQL NULL default below.
*/
if( pDflt && pDflt->op==TK_NULL ){
assert( pDflt==0 || pDflt->op==TK_SPAN );
if( pDflt && pDflt->pLeft->op==TK_NULL ){
pDflt = 0;
}
@@ -787,7 +788,6 @@ void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
pCol->zColl = 0;
pCol->zType = 0;
pCol->pDflt = 0;
pCol->zDflt = 0;
}
pNew->pSchema = db->aDb[iDb].pSchema;
pNew->addColOffset = pTab->addColOffset;