## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
.limit
PRAGMA fullsync = TRUE;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES (log10(-(-(1))),1.5), (2,-2.5), (3,0.0);
CREATE INDEX c
ON T(b);
SELECT * FROM T WHERE b >= -2.5 AND b < 2.0;
ATTACH DATABASE ':memory:' AS aux75;
-- max({v}, NULL)

.dump
PRAGMA trusted_schema = TRUE;
PRAGMA vdbe_listing = TRUE;
.width -CAST(replace(like('%0', (jsonb_array_insert(0, '$[0]', 0) + 0), NULL), 0, 0) AS VARCHAR(255)) -2 -3
.changes on
ATTACH DATABASE ':memory:' AS aux54;
.shell pwd
BEGIN DEFERRED TRANSACTION;
.eqp auto
PRAGMA case_sensitive_like = TRUE;
.width json_extract(-2147483649, '$[#-1]') 2 3
ATTACH DATABASE ':memory:' AS aux70;
PRAGMA vdbe_debug = 0;
SAVEPOINT sp2887;
.stats vmstep
.quit
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE `T2` (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES ((timediff(NULL, 1)timediff(NULL, NULL) -> '$.a' -> '$.b' - 0),1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT AND REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
CREATE TABLE A(Name text);
CREATE TABLE Items(ItemName text , Name text);
INSERT INTO Items VALUES('Item1','Parent');
INSERT INTO Items VALUES('Item2','Parent');
CREATE TABLE B(Name text);
SELECT Items.ItemName FROM Items LEFT JOIN A ON (A.Name = Items.ItemName and Items.ItemName = 'dummy') LEFT JOIN B ON (B.Name = Items.ItemName) WHERE NOT NOT (Items.Name = 'Parent') ORDER BY Items.ItemName;
CREATE TABLE "T1" (
  A VARCHAR(395366634658759941) PRIMARY KEY,
  B VARCHAR(15) UNIQUE,
  C INTEGER
);
CREATE TABLE T2 (
  X VARCHAR(20) PRIMARY KEY,
  A VARCHAR(10) NOT NULL UNIQUE,
  FOREIGN KEY (A) REFERENCES T1(A)
);
INSERT INTO T1 VALUES ('a', 'p', -2147483648);
INSERT INTO T1 VALUES ('b', 'q', 2147483647); /* nullif('same', {v}) */ INSERT INTO T2 VALUES ('m', 'a');
INSERT INTO T2 VALUES ('n', 'b');
SELECT T2.X, T1.B, T1.C FROM T2, /**/ T1 WHERE T2.A = T1.A AND T1.C >= 0;
WITH cte AS (SELECT * FROM B ORDER BY Name LIMIT 5) SELECT * FROM cte;
INSERT INTO A DEFAULT VALUES;
CREATE /**/ VIEW IF NOT EXISTS v_B_5173 AS SELECT Name FROM B;
SELECT AVG(Name) FROM Items;
SELECT * FROM B AS a INNER JOIN Items AS b ON a.rowid = b.rowid;
CREATE  INDEX IF NOT EXISTS idx_A_3487 ON A(lower(Name)) WHERE Name IS NOT NULL;
DELETE FROM T1 WHERE +A > (SELECT AVG(A) FROM T1);
VACUUM;
INSERT INTO T1 SELECT * FROM T1;
INSERT INTO B DEFAULT VALUES;
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T2 AS a FULL OUTER JOIN B AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE c > 0;
INSERT INTO A VALUES (1) ON CONFLICT(Name) DO UPDATE SET Name = excluded.Name;
INSERT INTO A VALUES (NULL);
INSERT INTO T2 SELECT * FROM T2;
RELEASE sp2887;
INSERT INTO T1 DEFAULT VALUES;
CREATE TRIGGER IF NOT EXISTS trg_A_2761 AFTER UPDATE ON A BEGIN SELECT RAISE(FAIL, 'no'); END;
SELECT * FROM A NATURAL JOIN A;
SELECT * FROM B AS a INNER JOIN B AS b ON a.rowid = b.rowid;
INSERT INTO T2 VALUES ('x', 1) ON CONFLICT(X) DO UPDATE SET X = excluded.X, A = excluded.A;
PRAGMA pragma_list;
DELETE FROM B WHERE Name > (SELECT AVG(Name) FROM B);
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
INSERT INTO T2
VALUES (NULL, NULL);
SELECT COUNT(*) FILTER (WHERE A IS NOT NULL), SUM(rowid) FILTER (WHERE A > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(A) FILTER (WHERE A > 0 AND A < 100), COUNT(*) FILTER (WHERE typeof(A) = "text") FROM T2;
WITH cte AS (SELECT NULL AS x) SELECT * FROM cte;
INSERT INTO T2 VALUES (NULL, NULL);
UPDATE T1 SET B = CURRENT_TIMESTAMP WHERE B IS NOT NULL;
CREATE  INDEX IF NOT EXISTS idx_T1_7052 ON T1(B) WHERE B > 0;
DETACH DATABASE aux70;
ALTER TABLE Items DROP COLUMN Name;
ALTER TABLE B DROP COLUMN Name;
CREATE TRIGGER IF NOT EXISTS trg_Items_1841 BEFORE UPDATE OF Name ON Items BEGIN SELECT RAISE(FAIL, 'no'); END;
INSERT INTO T1 DEFAULT VALUES;
SELECT * FROM A;
INSERT INTO T1 SELECT * FROM T1;
CREATE TRIGGER IF NOT EXISTS trg_T1_8922 AFTER UPDATE OF A ON T1 BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
SELECT Name, (SELECT Name FROM Items LIMIT 1) AS first_val FROM Items;
SELECT COUNT(*) FILTER (WHERE ItemName IS NOT NULL), SUM(rowid) FILTER (WHERE ItemName > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(ItemName) FILTER (WHERE ItemName > 0 AND ItemName < 100), COUNT(*) FILTER (WHERE typeof(ItemName) = "text") FROM Items;
ALTER TABLE Items RENAME TO Items_r1873;
SELECT Name FROM A WHERE Name = (SELECT MAX(Name) FROM A);
CREATE UNIQUE  INDEX IF NOT EXISTS idx_A_5112 ON A(Name COLLATE NOCASE);
END;
CREATE TRIGGER IF NOT EXISTS trg_T_4449 AFTER UPDATE OF a ON T FOR EACH ROW BEGIN INSERT INTO T(a) VALUES (NULL); END;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(10),
  C INTEGER,
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('a', 'p', -2147483648);
INSERT INTO T VALUES ('b', 'q', 100);
INSERT INTO T VALUES ('b', 'r', 200);
INSERT INTO T VALUES ('c', 's', 300);
INSERT INTO T VALUES ('d', 't', 2147483647);
INSERT INTO T VALUES ('b', 't', 50);
SELECT A, COUNT(*) AS D, SUM(C) AS E FROM T GROUP BY A HAVinG COUNT(*) > 1;
DETACH DATABASE aux54;
WITH RECURSIVE r AS (SELECT X FROM T2 WHERE X IS NOT NULL UNION ALL SELECT X FROM r WHERE X > 0 LIMIT 10) SELECT * FROM r;
ALTER TABLE T1 ADD COLUMN extra_4394 NUMERIC NOT NULL DEFAULT 0;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_A_6485 AS SELECT Name FROM A;

SELECT COUNT(*) FROM A;

SELECT COUNT(*) FROM T2;
INSERT OR REPLACE INTO T1 VALUES ('', -1, -4);
ANALYZE T;
SELECT MAX(ItemName) FROM Items;
WITH RECURSIVE multi(a, b) AS (VALUES(1, "x") UNION ALL SELECT a+1, "x" FROM multi WHERE a<44) SELECT * FROM multi;
WITH RECURSIVE tree(id, parent, depth) AS (VALUES(1, NULL, 0) UNION ALL SELECT id+1, id, depth+1 FROM tree WHERE depth<87) SELECT * FROM tree;
INSERT INTO Items VALUES ('x', 'x') ON CONFLICT(ItemName) DO UPDATE SET ItemName = excluded.ItemName, Name = excluded.Name;
PRAGMA automatic_index = OFF;
UPDATE B SET Name = '' WHERE rowid = 1;
UPDATE Items SET ItemName = 26 WHERE 1;
INSERT INTO Items SELECT * FROM Items;
INSERT INTO Items VALUES (NULL, NULL);
CREATE TEMPORARY  VIEW IF NOT EXISTS v_B_5686 AS SELECT Name FROM B;
ALTER TABLE T1 ADD COLUMN extra_8442 NONE NOT NULL DEFAULT 0;
INSERT OR ABORT INTO T2 VALUES ('x', '');
SELECT * FROM T WHERE EXISTS (SELECT 1 FROM T WHERE 1 = 0);
WITH RECURSIVE r AS (SELECT Name FROM B UNION ALL SELECT Name FROM B LIMIT 5) SELECT * FROM r;
SELECT * FROM Items t1 RIGHT JOIN Items t2 ON t1.Name = (SELECT Name FROM Items WHERE Name = t1.Name);
VACUUM;
DROP INDEX IF EXISTS B;
ALTER TABLE T1 RENAME TO T1_r7048;
DELETE FROM T WHERE 1;
REINDEX T;
SELECT * FROM T1 t1 JOIN (SELECT * FROM T1) AS sub ON t1.C = sub.C;
ALTER TABLE T RENAME COLUMN B TO B_r5528;
REINDEX B;
SELECT TOTAL(X) FROM T2;
INSERT INTO T VALUES (NULL, NULL, 'x') ON CONFLICT(A) DO UPDATE SET A = excluded.A, B = excluded.B, C = excluded.C;
ALTER TABLE T1 ADD COLUMN extra_1565 VARCHAR(255) COLLATE RTRIM;
SELECT * FROM T;
DROP TRIGGER IF EXISTS B;
SELECT COUNT(A) FILTER (WHERE NULL) OVER (PARTITION BY A ORDER BY A ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM T2;
SELECT SUM(C) FROM T;
SELECT A FROM T1 UNION SELECT A FROM (SELECT * FROM T1) AS sub;
ALTER TABLE Items DROP COLUMN Name;
DELETE FROM Items WHERE rowid = 16;
ALTER TABLE T2 ADD COLUMN extra_8257 UNSIGNED BIG INT DEFAULT (random());
INSERT OR FAIL INTO B VALUES (-10);
SELECT COUNT(B) FROM T;
ALTER TABLE T RENAME COLUMN B TO B_r5283;
SELECT COUNT(*) FILTER (WHERE C IS NOT NULL), SUM(rowid) FILTER (WHERE C > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(C) FILTER (WHERE C > 0 AND C < 100), COUNT(*) FILTER (WHERE typeof(C) = "text") FROM T1;
INSERT OR FAIL INTO T VALUES (-4, 'x', '');
ALTER TABLE T RENAME COLUMN B TO B_r9021;
PRAGMA auto_vacuum = INCREMENTAL;
REINDEX T1;
SELECT COUNT(*) FILTER (WHERE Name IS NOT NULL), SUM(rowid) FILTER (WHERE Name > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(Name) FILTER (WHERE Name > 0 AND Name < 100), COUNT(*) FILTER (WHERE typeof(Name) = "text") FROM A;
DETACH DATABASE aux75;
WITH RECURSIVE tree(id, parent, depth) AS (VALUES(1, NULL, 0) UNION ALL SELECT id+1, id, depth+1 FROM tree WHERE depth<42) SELECT * FROM tree;
PRAGMA journal_mode = 'OFF';
DROP TABLE IF EXISTS A;
WITH cte AS (SELECT * FROM T) SELECT * FROM cte;
ALTER TABLE Items RENAME COLUMN Name TO Name_r4612;
WITH m AS MATERIALIZED (SELECT B FROM T1) SELECT * FROM m;
SELECT * FROM T2 WHERE A < (SELECT MIN(A) FROM T2);
ALTER TABLE T1 DROP COLUMN C;
```

## Actual output

```sql
length 1000000000
          sql_length 1000000000
              column 2000
          expr_depth 1000
     compound_select 500
             vdbe_op 250000000
        function_arg 127
            attached 10
 like_pattern_length 50000
     variable_number 32766
       trigger_depth 1000
      worker_threads 0
2|-2.5
3|0.0
0|1.5
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES(0,1.5);
INSERT INTO T VALUES(2,-2.5);
INSERT INTO T VALUES(3,0.0);
CREATE INDEX c
ON T(b);
COMMIT;
changes: 3   total_changes: 3
/fuzzer
changes: 3   total_changes: 3
changes: 3   total_changes: 3
changes: 3   total_changes: 3
changes: 3   total_changes: 3
changes: 3   total_changes: 3
```

## Expectation

```sql
length 1000000000
          sql_length 1000000000
              column 2000
          expr_depth 1000
     compound_select 500
             vdbe_op 250000000
        function_arg 1000
            attached 10
 like_pattern_length 50000
     variable_number 32766
       trigger_depth 1000
      worker_threads 0
2|-2.5
3|0.0
0|1.5
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE T (
  a INTEGER,
  b REAL
);
INSERT INTO T VALUES(0,1.5);
INSERT INTO T VALUES(2,-2.5);
INSERT INTO T VALUES(3,0.0);
CREATE INDEX c
ON T(b);
COMMIT;
changes: 3   total_changes: 3
/fuzzer
changes: 3   total_changes: 3
changes: 3   total_changes: 3
changes: 3   total_changes: 3
changes: 3   total_changes: 3
changes: 3   total_changes: 3
```

## Flag

```

```

