diff options
author | drh <> | 2025-02-21 17:03:22 +0000 |
---|---|---|
committer | drh <> | 2025-02-21 17:03:22 +0000 |
commit | ce25007db8df01e3271486574d520d4dea4cf97a (patch) | |
tree | ba6a3d33af56c5a0d13d80ab8eb7447e69319ce6 /src/sqliteInt.h | |
parent | 220260b8965eb264cab8cb5ee42baacb08ef1eb4 (diff) | |
download | sqlite-ce25007db8df01e3271486574d520d4dea4cf97a.tar.gz sqlite-ce25007db8df01e3271486574d520d4dea4cf97a.zip |
Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need
to use more than SQLITE_LIMIT_COLUMN columns and raise an error.
Also include some unrelated compiler warning fixes.
FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3
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 6ebd8eb4f..d4b998309 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3097,10 +3097,10 @@ struct Expr { /* Macros can be used to test, set, or clear bits in the ** Expr.flags field. */ -#define ExprHasProperty(E,P) (((E)->flags&(P))!=0) -#define ExprHasAllProperty(E,P) (((E)->flags&(P))==(P)) -#define ExprSetProperty(E,P) (E)->flags|=(P) -#define ExprClearProperty(E,P) (E)->flags&=~(P) +#define ExprHasProperty(E,P) (((E)->flags&(u32)(P))!=0) +#define ExprHasAllProperty(E,P) (((E)->flags&(u32)(P))==(u32)(P)) +#define ExprSetProperty(E,P) (E)->flags|=(u32)(P) +#define ExprClearProperty(E,P) (E)->flags&=~(u32)(P) #define ExprAlwaysTrue(E) (((E)->flags&(EP_OuterON|EP_IsTrue))==EP_IsTrue) #define ExprAlwaysFalse(E) (((E)->flags&(EP_OuterON|EP_IsFalse))==EP_IsFalse) #define ExprIsFullSize(E) (((E)->flags&(EP_Reduced|EP_TokenOnly))==0) @@ -4908,7 +4908,7 @@ void sqlite3SubqueryColumnTypes(Parse*,Table*,Select*,char); Table *sqlite3ResultSetOfSelect(Parse*,Select*,char); void sqlite3OpenSchemaTable(Parse *, int); Index *sqlite3PrimaryKeyIndex(Table*); -i16 sqlite3TableColumnToIndex(Index*, i16); +i16 sqlite3TableColumnToIndex(Index*, int); #ifdef SQLITE_OMIT_GENERATED_COLUMNS # define sqlite3TableColumnToStorage(T,X) (X) /* No-op pass-through */ # define sqlite3StorageColumnToTable(T,X) (X) /* No-op pass-through */ |