diff options
author | drh <> | 2021-08-05 15:27:19 +0000 |
---|---|---|
committer | drh <> | 2021-08-05 15:27:19 +0000 |
commit | 65b400931ddbaaa2059094a014ecf46c0840857c (patch) | |
tree | 26c831dfb7bd1bfb567aad2bd7afd20b91b2268a /src/select.c | |
parent | 324f91a591ba4578917ab0436a966ff33b163a2a (diff) | |
download | sqlite-65b400931ddbaaa2059094a014ecf46c0840857c.tar.gz sqlite-65b400931ddbaaa2059094a014ecf46c0840857c.zip |
Store the collating sequence name for each column of a table as an
extension to the column name, for an additional savings in the heap space
needed to hold the schema.
FossilOrigin-Name: 832ac4c1ee384be0de72a4bdd55ed87e0f8294e7df5eefcf6b4942db3d85a69e
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/select.c b/src/select.c index 064ea758d..375050bdc 100644 --- a/src/select.c +++ b/src/select.c @@ -2193,8 +2193,9 @@ void sqlite3SelectAddColumnTypeAndCollation( } if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff; pColl = sqlite3ExprCollSeq(pParse, p); - if( pColl && pCol->zCnColl==0 ){ - pCol->zCnColl = sqlite3DbStrDup(db, pColl->zName); + if( pColl && (pCol->colFlags & COLFLAG_HASCOLL)==0 ){ + assert( pTab->pIndex==0 ); + sqlite3ColumnSetColl(db, pCol, pColl->zName); } } pTab->szTabRow = 1; /* Any non-zero value works */ |