should be it
This commit is contained in:
39
external/duckdb/test/fuzzer/pedro/alter_column_generated.test
vendored
Normal file
39
external/duckdb/test/fuzzer/pedro/alter_column_generated.test
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# name: test/fuzzer/pedro/alter_column_generated.test
|
||||
# description: Issue #4677: heap-buffer-overflow on ALTER statement
|
||||
# group: [pedro]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 AS (1), c1 INT);
|
||||
|
||||
statement ok
|
||||
ALTER TABLE t0 ALTER c1 SET NOT NULL;
|
||||
|
||||
statement ok
|
||||
ALTER TABLE t0 ALTER c1 SET NOT NULL;
|
||||
|
||||
statement error
|
||||
ALTER TABLE t0 ALTER c0 SET NOT NULL;
|
||||
----
|
||||
<REGEX>:Binder Error.*Unsupported constraint.*
|
||||
|
||||
statement error
|
||||
INSERT INTO t0 VALUES (NULL);
|
||||
----
|
||||
<REGEX>:Constraint Error.*NOT NULL.*failed.*
|
||||
|
||||
statement ok
|
||||
DROP TABLE t0;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 AS (1), c1 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (NULL);
|
||||
|
||||
statement error
|
||||
ALTER TABLE t0 ALTER c1 SET NOT NULL;
|
||||
----
|
||||
<REGEX>:Constraint Error.*NOT NULL.*failed.*
|
||||
Reference in New Issue
Block a user