mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Avoid leaking memory in an obscure case where the flattener adds an ORDER BY clause to the recursive part of a recursive query.
FossilOrigin-Name: 1f413aca00015100224273480e1ce39a76bf93ab
This commit is contained in:
@@ -2283,7 +2283,7 @@ struct Select {
|
||||
#define SRT_Discard 4 /* Do not save the results anywhere */
|
||||
|
||||
/* The ORDER BY clause is ignored for all of the above */
|
||||
#define IgnorableOrderby(X) ((X->eDest)<=SRT_Discard)
|
||||
#define IgnorableOrderby(X) ((X->eDest)<=SRT_Discard || (X->eDest)>SRT_Table)
|
||||
|
||||
#define SRT_Output 5 /* Output each row of result */
|
||||
#define SRT_Mem 6 /* Store result in a memory cell */
|
||||
|
||||
Reference in New Issue
Block a user