Files
ast-project/part1/results/2/bug_f9cf03b5-be25-4bec-a839-48d8630e332e_logic.md
2026-06-24 13:47:14 +02:00

62 lines
1.1 KiB
Markdown

## 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
PRAGMA vdbe_debug = FALSE;
PRAGMA query_only = OFF;
PRAGMA user_version = 999;
.recover
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(1);
ALTER TABLE t1 ADD COLUMN b TEXT DEFAULT -123.0;
SELECT b, typeof(b) FROM t1;
ALTER TABLE t1 ADD COLUMN c TEXT DEFAULT -123.5;
ALTER TABLE t1 ADD COLUMN d TEXT DEFAULT 'hello';
SELECT c, typeof(c) FROM t1;
ALTER TABLE t1 DROP COLUMN a;
SELECT COUNT(*) FROM t1;
```
## Actual output
```sql
PRAGMA foreign_keys=OFF;
BEGIN;
PRAGMA writable_schema = on;
PRAGMA writable_schema = off;
COMMIT;
-123.0|text
-123.5|text
1
```
## Expectation
```sql
.dbconfig defensive off
BEGIN;
PRAGMA writable_schema = on;
PRAGMA foreign_keys = off;
PRAGMA encoding = 'UTF-8';
PRAGMA page_size = '4096';
PRAGMA auto_vacuum = '0';
PRAGMA user_version = '999';
PRAGMA application_id = '0';
PRAGMA writable_schema = off;
COMMIT;
-123.0|text
-123.5|text
1
```
## Flag
```
```