-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Regression: Segmentation fault with DuckDB 1.1.0 when closing connection with certain values in composite primary keys / foreign keys #85
Comments
This is a regression from 1.0.0, where this didn't happen |
Hi @lukaseder, thank you for reporting this regression. |
tania@motorbook duckdb % build/release/duckdb segfault.db
v1.0.1-dev5504 86723c9912
Enter ".help" for usage hints.
D CREATE TABLE a (
a INT NOT NULL,
CONSTRAINT pk_a PRIMARY KEY (a)
);
D CREATE TABLE b (
b VARCHAR(400) NOT NULL,
CONSTRAINT pk_b PRIMARY KEY(b)
);
D CREATE TABLE c (
b VARCHAR(400) NOT NULL,
a INTEGER NOT NULL,
x INTEGER,
CONSTRAINT pk_c PRIMARY KEY(b, a),
CONSTRAINT fk_b FOREIGN KEY (b) REFERENCES b (b),
CONSTRAINT fk_a FOREIGN KEY (a) REFERENCES a (a)
);
D
D INSERT INTO a VALUES (1),(2),(3),(4);
D INSERT INTO b VALUES ('Orell Füssli'), ('Ex Libris'), ('Buchhandlung im Volkshaus');
D INSERT INTO c VALUES ('Ex Libris', 1, 1);
D INSERT INTO c VALUES ('Buchhandlung im Volkshaus', 3, 1);
D .q
tania@motorbook duckdb % |
I can reproduce it with tania@motorbook duckdb % duckdb v1duckdb.db
v1.1.0 fa5c2fe15f
Enter ".help" for usage hints.
D CREATE TABLE a (
a INT NOT NULL,
CONSTRAINT pk_a PRIMARY KEY (a)
);
...
D INSERT INTO c VALUES ('Buchhandlung im Volkshaus', 3, 1);
D .q
zsh: segmentation fault duckdb v1duckdb.db
tania@motorbook duckdb % |
Great, thanks for the feedback! |
From our integration tests, this seems like a minimal reproducer. Use DuckDB 1.1.0's JDBC driver in Dbeaver, then run this script on an empty database:
All goes well until you disconnect (JDBC
Connection.close()
when doing this programmatically, or disconnect with Dbeaver or another database utility), then the JVM segfaults with this:Here's a pure JDBC based reproducer:
The text was updated successfully, but these errors were encountered: