1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-12 23:22:53 +03:00

Remove the Expr.pColl field and compute the collating sequence as it is needed.

This fixes the test script "shared9.test", though there is still a memory leak.
And there are other problems.  Consider this a work-in-progress.

FossilOrigin-Name: fd011cb22f2d899d94ec7ce22641d7a8f5e19972
This commit is contained in:
drh
2012-12-06 21:16:43 +00:00
parent 74358f0c77
commit ae80ddea9f
9 changed files with 117 additions and 121 deletions

View File

@@ -114,10 +114,6 @@ static void resolveAlias(
pDup->flags2 |= EP2_MallocedToken;
pDup->u.zToken = sqlite3DbStrDup(db, zToken);
}
if( pExpr->flags & EP_ExpCollate ){
pDup->pColl = pExpr->pColl;
pDup->flags |= EP_ExpCollate;
}
/* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
** prevents ExprDelete() from deleting the Expr structure itself,
@@ -830,13 +826,10 @@ static int resolveCompoundOrderBy(
}
}
if( iCol>0 ){
CollSeq *pColl = pE->pColl;
int flags = pE->flags & EP_ExpCollate;
sqlite3ExprDelete(db, pE);
pItem->pExpr = pE = sqlite3Expr(db, TK_INTEGER, 0);
if( pE==0 ) return 1;
pE->pColl = pColl;
pE->flags |= EP_IntValue | flags;
pE->flags |= EP_IntValue;
pE->u.iValue = iCol;
pItem->iOrderByCol = (u16)iCol;
pItem->done = 1;