Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COPY INTO crashes if table has primary key or foreign key constraint #6404

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2017-09-10 12:30:57 +0200
From: Trung Le <>
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes

Last updated: 2017-10-26 14:01:39 +0200

Comment 25621

Date: 2017-09-10 12:30:57 +0200
From: Trung Le <>

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build Identifier:

When I use COPY INTO feature to import data for a table that has primary key or foreign key constraint, the monetdb db crashes. I expect the case should work or return an not-supported message.

Reproducible: Always

If it is not supported, monetdb should response such information instead of crash.

Comment 25623

Date: 2017-09-11 10:00:45 +0200
From: @sjoerdmullender

Can you give an example for this problem, please?

Comment 25624

Date: 2017-09-11 10:17:25 +0200
From: @kutsurak

Created attachment 567
COPY INTO crash reproduction

I am attaching a minimal example that reproduces the problem for me.

As far as I can tell it crashes if the table has a primary key constraint AND we are not loading all the columns.

Panos.

Attached file: copy_into_crash.sql (application/sql, 112 bytes)
Description: COPY INTO crash reproduction

Comment 25639

Date: 2017-09-17 10:16:02 +0200
From: @njnes

non of the input columns were used and the table code requires atleast one
valid output bat. We now give an error in this case.

Comment 25643

Date: 2017-09-17 18:02:24 +0200
From: MonetDB Mercurial Repository <>

Changeset 261a59262ad6 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=261a59262ad6

Changeset description:

add test and output for bug #6404

Comment 25644

Date: 2017-09-17 18:03:59 +0200
From: MonetDB Mercurial Repository <>

Changeset d1128cc44188 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=d1128cc44188

Changeset description:

make sure we reference expressions in a copy into statement (with column list).
This solves bug #6404.
@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants