diff options
author | drh <> | 2025-06-27 19:02:21 +0000 |
---|---|---|
committer | drh <> | 2025-06-27 19:02:21 +0000 |
commit | c52e9d97d485a3eb168e3f8f3674a7bc4b419703 (patch) | |
tree | 18b4c7866eefb8c2576ffe3d57a22a13338c4772 /src/sqliteInt.h | |
parent | fbf1c0526e139996f2e18d3066e5d4c01a8e462e (diff) | |
download | sqlite-c52e9d97d485a3eb168e3f8f3674a7bc4b419703.tar.gz sqlite-c52e9d97d485a3eb168e3f8f3674a7bc4b419703.zip |
Raise an error right away if the number of aggregate terms in a query
exceeds the maximum number of columns.
FossilOrigin-Name: 5508b56fd24016c13981ec280ecdd833007c9d8dd595edb295b984c2b487b5c8
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index ce1b77bfe..36a21d92e 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1031,8 +1031,8 @@ typedef INT16_TYPE LogEst; ** assuming n is a signed integer type. UMXV(n) is similar for unsigned ** integer types. */ -#define SMXV(n) ((((i64)1)<<(sizeof(n)-1))-1) -#define UMXV(n) ((((i64)1)<<(sizeof(n)))-1) +#define SMXV(n) ((((i64)1)<<(sizeof(n)*8-1))-1) +#define UMXV(n) ((((i64)1)<<(sizeof(n)*8))-1) /* ** Round up a number to the next larger multiple of 8. This is used @@ -2896,7 +2896,7 @@ struct AggInfo { ** from source tables rather than from accumulators */ u8 useSortingIdx; /* In direct mode, reference the sorting index rather ** than the source table */ - u16 nSortingColumn; /* Number of columns in the sorting index */ + u32 nSortingColumn; /* Number of columns in the sorting index */ int sortingIdx; /* Cursor number of the sorting index */ int sortingIdxPTab; /* Cursor number of pseudo-table */ int iFirstReg; /* First register in range for aCol[] and aFunc[] */ @@ -2905,8 +2905,8 @@ struct AggInfo { Table *pTab; /* Source table */ Expr *pCExpr; /* The original expression */ int iTable; /* Cursor number of the source table */ - i16 iColumn; /* Column number within the source table */ - i16 iSorterColumn; /* Column number in the sorting index */ + int iColumn; /* Column number within the source table */ + int iSorterColumn; /* Column number in the sorting index */ } *aCol; int nColumn; /* Number of used entries in aCol[] */ int nAccumulator; /* Number of columns that show through to the output. |