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

'insert into' with multiple rows containing subqueries crashes #6448

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

'insert into' with multiple rows containing subqueries crashes #6448

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

Comments

@monetdb-team
Copy link

Date: 2017-10-24 17:37:29 +0200
From: @rkoopmanschap
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @kutsurak, @njnes

Last updated: 2017-12-14 14:46:06 +0100

Comment 25790

Date: 2017-10-24 17:37:29 +0200
From: @rkoopmanschap

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Build Identifier:

If you try to insert multiple rows at once and your 'insert into' statement contains subqueries it will crash the database.

Reproducible: Always

Steps to Reproduce:

-- The code below crashes the database:

CREATE TABLE test_table(x VARCHAR(10), y INTEGER);
INSERT INTO test_table VALUES ('test1', (SELECT 1)), ('test3', (SELECT 1));
SELECT * FROM test_table;

Actual Results:

MonetDB crashes on linux and hangs on mac

Expected Results:

+-------+------+
| x | y |
+=======+======+
| test1 | 1 |
| test3 | 1 |
+-------+------+
2 tuples (1.680ms)

Comment 25791

Date: 2017-10-24 17:41:37 +0200
From: @kutsurak

It hits the following assertion:

mserver5: ../../../monetdb5/optimizer/opt_garbageCollector.c:123: OPTgarbageCollectorImplementation: Assertion `p->token == ENDsymbol' failed.

Comment 25802

Date: 2017-10-25 13:04:22 +0200
From: @njnes

fixed 2 problems. One better check for atoms in the insert (else we use references without a relations and that will give crashes)
Two fixed merge of 2 projects, ie don't merge value lists.

Comment 25807

Date: 2017-10-26 14:21:33 +0200
From: MonetDB Mercurial Repository <>

Changeset d245a7b07594 made by Richard Koopmanschap richard.koopmanschap@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Added tests for bug #6444 and 6448

Comment 25809

Date: 2017-10-26 15:41:07 +0200
From: MonetDB Mercurial Repository <>

Changeset 96ff384f1c07 made by Richard Koopmanschap richard.koopmanschap@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Added tests for bugs 6444 and 6448
@monetdb-team monetdb-team added bug Something isn't working major 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 major SQL
Projects
None yet
Development

No branches or pull requests

2 participants