aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2024-08-17 19:46:49 +0000
committerdrh <>2024-08-17 19:46:49 +0000
commit8797bd695f97db094bf10e546170d7b1e266867c (patch)
tree162455af982cbc5af4ce2a075c2de5c3c837d2ce /src/expr.c
parent21363ac78df6751655c33372a7277512531b9570 (diff)
downloadsqlite-8797bd695f97db094bf10e546170d7b1e266867c.tar.gz
sqlite-8797bd695f97db094bf10e546170d7b1e266867c.zip
Reduce the size of the SrcItem object by combining fields into a union.
FossilOrigin-Name: a4c59ac3c6ec979c25b544d29e47b8e39f6439c098eed8f84b3bd506c9adf047
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 53b0170ab..d0fa4b500 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1877,8 +1877,11 @@ SrcList *sqlite3SrcListDup(sqlite3 *db, const SrcList *p, int flags){
SrcItem *pNewItem = &pNew->a[i];
const SrcItem *pOldItem = &p->a[i];
Table *pTab;
- pNewItem->pSchema = pOldItem->pSchema;
- pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
+ if( pOldItem->fg.fixedSchema ){
+ pNewItem->u4.pSchema = pOldItem->u4.pSchema;
+ }else{
+ pNewItem->u4.zDatabase = sqlite3DbStrDup(db, pOldItem->u4.zDatabase);
+ }
pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
pNewItem->fg = pOldItem->fg;