diff options
author | drh <> | 2024-03-08 21:37:18 +0000 |
---|---|---|
committer | drh <> | 2024-03-08 21:37:18 +0000 |
commit | 61b77a6fe14d271c89b0c392898b83dc05c658e5 (patch) | |
tree | a42ecee8ca169db89eaf93de992461e9c04fdb02 /src/sqliteInt.h | |
parent | 96f5ae6bd74a43f0ada92bdc40d3b23257116291 (diff) | |
download | sqlite-61b77a6fe14d271c89b0c392898b83dc05c658e5.tar.gz sqlite-61b77a6fe14d271c89b0c392898b83dc05c658e5.zip |
The NOT NULL strength reduction optimization from [de9c86c9e4cdb34f] should
be applied to the WHERE clause only. Otherwise, the operand of the IS NULL
or IS NOT NULL operator might be a reference to a bare column of an
aggregate table, and we can't tell if it is NULL or not based only on its
NOT NULL attribute. [forum:/forumpost/440f2a2f17|Forum post 440f2a2f17].
FossilOrigin-Name: 51704feae224eff601db5607f8651da11b3c2ed8a58ffe5b6ee8260cab50695b
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 91cf17304..e11b5b3a4 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1125,6 +1125,7 @@ extern u32 sqlite3TreeTrace; ** 0x00010000 Beginning of DELETE/INSERT/UPDATE processing ** 0x00020000 Transform DISTINCT into GROUP BY ** 0x00040000 SELECT tree dump after all code has been generated +** 0x00080000 NOT NULL strength reduction */ /* @@ -3453,6 +3454,7 @@ struct NameContext { #define NC_InAggFunc 0x020000 /* True if analyzing arguments to an agg func */ #define NC_FromDDL 0x040000 /* SQL text comes from sqlite_schema */ #define NC_NoSelect 0x080000 /* Do not descend into sub-selects */ +#define NC_Where 0x100000 /* Processing WHERE clause of a SELECT */ #define NC_OrderAgg 0x8000000 /* Has an aggregate other than count/min/max */ /* |