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

Assertion failure in rel_bin.c for MERGE INTO command #6715

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

Assertion failure in rel_bin.c for MERGE INTO command #6715

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2019-06-12 20:33:40 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.33.3 (Apr2019)
CC: @PedroTadim

Last updated: 2019-09-02 16:05:27 +0200

Comment 27061

Date: 2019-06-12 20:33:40 +0200
From: Martin van Dinther <<martin.van.dinther>>

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

MERGE INTO command triggers an assertion failure in sql/backends/monet5/rel_bin.c:673: exp_bin: Assertion `s' failed.

Reproducible: Always

Steps to Reproduce:

  1. start mserver5 (MonetDB 5 server v11.33.4)
  2. start mclient
  3. issue SQL commands:
    CREATE TABLE ProductTarget (ProductID SERIAL, Name VARCHAR(100) NOT NULL, ProductNumber BIGINT, Color VARCHAR(30) NOT NULL);
    CREATE TABLE ProductSource (ProductID SERIAL, Name VARCHAR(100) NOT NULL, ProductNumber BIGINT, Color VARCHAR(30) NOT NULL);
    MERGE INTO ProductTarget T USING ProductSource S ON S.ProductID = T.ProductID WHEN MATCHED THEN UPDATE SET Name = S.Name;

Actual Results:

builtin opt gdk_dbpath = /export/scratch1/dinther/INSTALL/var/monetdb5/dbfarm/demo
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt embedded_r = true
cmdline opt embedded_py = 3
cmdline opt embedded_c = true
MonetDB 5 server v11.33.4 (hg id: 226c4bc37d83)
This is an unreleased version
Serving database 'demo', using 4 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
Found 31.305 GiB available main-memory.
Copyright (c) 1993 - July 2008 CWI.
Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:41000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
MonetDB/Python3 module loaded
MonetDB/R module loaded
could not find producttarget.productid
t.productid
t.name
t.productnumber
t.color
s.productid
s.name
s.productnumber
s.color
t.%TID%
t.%TID%
mserver5: sql/backends/monet5/rel_bin.c:673: exp_bin: Assertion `s' failed.

Expected Results:

No assertion failure

Mserver5 compiled from latest source (Apr2019 branch) on 12 june 2019.

Comment 27063

Date: 2019-06-13 10:53:07 +0200
From: MonetDB Mercurial Repository <>

Changeset 68ee548d3a9c made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test and fix for Bug #6715, ie when generating an update relation, take in account that the base table might have an alias on it.
Also fixed possible bugs in insert/update indexes statements generation with aliases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant