aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordan <Dan Kennedy>2023-11-02 21:02:53 +0000
committerdan <Dan Kennedy>2023-11-02 21:02:53 +0000
commit5e4233a9e48b124d4d342b757b34e4ae849f5cf8 (patch)
treeef7da0a6a4358d48fc8e6645606805d3559791d3 /src/sqliteInt.h
parent78fee3f738d5a37f742b79e18475505beac69d08 (diff)
downloadsqlite-5e4233a9e48b124d4d342b757b34e4ae849f5cf8.tar.gz
sqlite-5e4233a9e48b124d4d342b757b34e4ae849f5cf8.zip
Fix a spurious "misuse of aggregate function" error that could occur when an aggregate function was used within the FROM clause of a sub-select of the select that owns the aggregate. e.g. "SELECT (SELECT x FROM (SELECT sum(t1.a) AS x)) FROM t1". [forum:/forumpost/c9970a37ed | Forum post c9970a37ed].
FossilOrigin-Name: 4470f657d2069972d02a00983252dec1f814d90c0d8d0906e320e955111e8c11
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index dbf01dd13..c8288736b 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -3397,6 +3397,7 @@ struct NameContext {
int nRef; /* Number of names resolved by this context */
int nNcErr; /* Number of errors encountered while resolving names */
int ncFlags; /* Zero or more NC_* flags defined below */
+ int nNestedSelect; /* Number of nested selects using this NC */
Select *pWinSelect; /* SELECT statement for any window functions */
};