Create a simulated corrupted foo.db with
```
create table t(id integer primary key not null,v integer);
insert into t values(1,NULL);
PRAGMA writable_schema=ON;
update sqlite_master set sql='create table t(id integer primary key not null,v integer not null);' where name='t';
```
with sqlite 3.35 or later,
```
./sqlite3 foo.db "select id, v from t where v is not null"
```
returns
```
1|
```
The expected result would have for it to not return that row, as in previous versions.

This causes a regression in the GDAL open source project which trusts the "v is not null" and dereferences values in that field without testing them against NULL.

git bisects on the git mirror points to the following commit:

```
commit
Date:   Fri Feb 26 20:14:32 2021 +0000

    Attempt to optimize "x IS NULL" and "x IS NOT NULL" expressions when x is a column with a NOT NULL constraint.

    FossilOrigin-Name:
```