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

Alternative fix for the double-initialization of type and collating sequence

problem that leaves the estimated table size intact.

FossilOrigin-Name: 623ddbdbf48d26dac58c593bcb9e7b184334ddfc
This commit is contained in:
drh
2015-04-21 17:17:47 +00:00
parent dfb5e1cbc6
commit 1cb50c880e
3 changed files with 11 additions and 11 deletions

View File

@@ -1700,14 +1700,14 @@ static void selectAddColumnTypeAndCollation(
a = pSelect->pEList->a;
for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
p = a[i].pExpr;
if( pCol->zType ) break;
if( pCol->zColl ) break;
pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p,0,0,0, &pCol->szEst));
if( pCol->zType==0 ){
pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p,0,0,0, &pCol->szEst));
}
szAll += pCol->szEst;
pCol->affinity = sqlite3ExprAffinity(p);
if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_NONE;
pColl = sqlite3ExprCollSeq(pParse, p);
if( pColl ){
if( pColl && pCol->zColl==0 ){
pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
}
}