aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-06 09:59:06 +0000
committerstephan <stephan@noemail.net>2022-09-06 09:59:06 +0000
commitae1ed83831d9cb6026a15d30d43a309bf3fd758f (patch)
treea8a255cd018524d40505172732ae7f0a8a92f930 /src/select.c
parent49cb8d7314f201bcc264ab3c38c01ae48822a7a4 (diff)
parent2e440a0801ad366d48532890b506853c0e34030e (diff)
downloadsqlite-ae1ed83831d9cb6026a15d30d43a309bf3fd758f.tar.gz
sqlite-ae1ed83831d9cb6026a15d30d43a309bf3fd758f.zip
Merge trunk into fiddle-opfs branch.
FossilOrigin-Name: 7f76eaec793720db87415a476ddf539bc4dea3e74c8e5406d6739206aebdacc2
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/select.c b/src/select.c
index 39ec70f2b..950d0db62 100644
--- a/src/select.c
+++ b/src/select.c
@@ -3690,10 +3690,11 @@ static int multiSelectOrderBy(
*/
sqlite3VdbeResolveLabel(v, labelEnd);
- /* Reassembly the compound query so that it will be freed correctly
+ /* Reassemble the compound query so that it will be freed correctly
** by the calling function */
if( pSplit->pPrior ){
- sqlite3SelectDelete(db, pSplit->pPrior);
+ sqlite3ParserAddCleanup(pParse,
+ (void(*)(sqlite3*,void*))sqlite3SelectDelete, pSplit->pPrior);
}
pSplit->pPrior = pPrior;
pPrior->pNext = pSplit;