## 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
SAVEPOINT sp7675;
SAVEPOINT sp2322;
.timer on
SAVEPOINT sp9959;
PRAGMA automatic_index;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO main.T VALUES (('a' || ''),CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(glob('?', 'hello') AS ANY),-round(if(-(-(json_patch(json_pretty(sqlite_compileoption_get(NULL), '  '), '{"key": null}'))), 5452320620090576265), -2)), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE NOT NOT NOT (c > (SELECT AVG(c) FROM T)) ;
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;
.width
.check
.read commands.sql
CREATE TABLE `T` (
  a TEXT,
  b INTEGER,
  c REAL
);
-- .backup main output.db

-- -header

INSERT INTO T VALUES ('a',CAST(glob(NULL, NULL) AS DOUB),unhex(lower('HeLLo'), ' ')), ('a',CAST(2 AS ANY),-3.0), ('b',1,4.5);
WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m a,b,c,
SUM(c) OVER (
  PARTITION BY a
  ORDER BY b
) AS d
FROM T;
INSERT INTO T VALUES (NULL, NULL, NULL);
INSERT INTO T VALUES ('x', 'x', 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
ALTER TABLE T RENAME COLUMN a TO a_r171;
INSERT INTO T VALUES (NULL, NULL, NULL);
DELETE FROM T WHERE c > (SELECT AVG(c) FROM T);
INSERT OR ROLLBACK INTO T VALUES (0, '', 'x');
VACUUM;

INSERT INTO T DEFAULT VALUES;
WITH cte AS (SELECT CASE WHEN b IS NULL THEN 0 ELSE b END AS val FROM T) SELECT * FROM cte;
INSERT INTO T SELECT * FROM T;
SELECT * FROM T AS a LEFT OUTER JOIN T AS b ON a.rowid = b.rowid;
SELECT STRING_AGG(a) FROM T;
ALTER TABLE T RENAME TO T_r7480;
ROLLBACK TRANSACTION TO SAVEPOINT sp9959;
RELEASE SAVEPOINT sp9959;
ANALYZE T;
ALTER TABLE T RENAME TO T_r9036;
REINDEX T;
SELECT * FROM T;
SELECT GROUP_CONCAT(c, '.') FILTER (WHERE c IS NOT NULL) OVER (ORDER BY c GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM T;
SELECT * FROM T;
ANALYZE T;
SELECT AVG(b) OVER (ORDER BY b RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
ANALYZE T;
CREATE  INDEX IF NOT EXISTS idx_T_8830 ON T(a COLLATE NOCASE);

SELECT COUNT(*) FROM T;
UPDATE T SET a = json_object('k', a);

SELECT COUNT(*) FROM T;
SELECT * FROM T;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_8463 ON T(c COLLATE NOCASE) WHERE c IS NOT NULL;
ALTER TABLE T RENAME COLUMN b TO b_r8007;
PRAGMA temp_store_directory;
SELECT GROUP_CONCAT(b, '.') FILTER (WHERE b IS NOT NULL) OVER (PARTITION BY b ORDER BY b ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T;
ALTER TABLE T DROP COLUMN c;
INSERT OR IGNORE INTO T VALUES (0, 'x', '');
WITH cte AS (SELECT * FROM T) SELECT (SELECT COUNT(*) FROM cte) AS total, * FROM cte LIMIT 1;
INSERT INTO T SELECT * FROM T;
SELECT * FROM T;
INSERT OR IGNORE INTO T VALUES (0, '', 0);
RELEASE sp2322;
ROLLBACK TRANSACTION TO SAVEPOINT sp7675;
RELEASE SAVEPOINT sp7675;
CREATE  VIEW IF NOT EXISTS v_T_8285 AS SELECT c FROM T;
ALTER TABLE T DROP COLUMN a;
ANALYZE;
DROP TRIGGER IF EXISTS T;
WITH cte AS (SELECT 1.5 AS x) SELECT CAST(x AS TEXT) FROM cte;
SELECT LEAD(b) OVER (PARTITION BY b ORDER BY b RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE NO OTHERS) FROM T;
ALTER TABLE T RENAME COLUMN b TO b_r6159;
UPDATE T SET c = json_object('k', c) WHERE c BETWEEN 0 AND 100 RETURNING *;
INSERT OR IGNORE INTO T VALUES (-7, '', 0);
```

## Actual output

```sql
Run Time: real 0.000 user 0.000013 sys 0.000000
1
Run Time: real 0.000 user 0.000015 sys 0.000000
```

## Expectation

```sql
Run Time: real 0.000000 user 0.000011 sys 0.000000
1
Run Time: real 0.000011 user 0.000012 sys 0.000000
```

## Flag

```

```

