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 fails on table function with subselects as parameters #3172

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

assertion fails on table function with subselects as parameters #3172

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

Comments

@monetdb-team
Copy link

Date: 2012-11-02 14:39:48 +0100
From: @swingbit
To: @njnes
Version: 11.13.3 (Oct2012)
CC: bugs-sql, @mlkersten, @njnes, y.kargin

Last updated: 2013-07-31 15:55:17 +0200

Comment 17864

Date: 2012-11-02 14:39:48 +0100
From: @swingbit

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Build Identifier:

The following (pretty useless, but allowed) SQL, crashes mserver:

create function x(a int, b int)
returns table (c int,d int)
external name sql.x;

select * from x((select id from _tables), (select schema_id from _tables));

The external function sql.x is not even implemented, the crash happens before it is even called.

Reproducible: Always

Steps to Reproduce:

  1. issue the SQL above

Actual Results:

SIGFAULT

MonetDB 5 server v11.11.12 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 2.0GiB available memory, 1 available cpu core
Libraries:
libpcre: 8.12 2011-01-15 (compiled with 8.12)
openssl: OpenSSL 1.0.0j 10 May 2012 (compiled with OpenSSL 1.0.0j-fips 10 May 2012)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: roberto@localhost.localdomain (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64

Comment 17865

Date: 2012-11-02 14:43:43 +0100
From: @swingbit

Correction, it does not crash, it fails on an assertion:

mserver5: /home/roberto/svn.spinque.com/MonetDBServer/MonetDB.Spinque_Jul2012/src/sql/server/rel_bin.c:1233: rel2bin_table: Assertion `0' failed.

Comment 18004

Date: 2012-11-26 11:16:01 +0100
From: @njnes

what would be the expected result.

Sofar we do not support multi value inputs in table returning functions.

Comment 18006

Date: 2012-11-26 14:03:30 +0100
From: @swingbit

That's ok, I reported it just because it abruptly stops the server.
I think an error message would do.

Comment 18044

Date: 2012-11-27 12:47:20 +0100
From: @njnes

working on a partial (sql side) fix. Yagiz could just add the test?

Comment 18085

Date: 2012-11-27 14:35:11 +0100
From: @njnes

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

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=89a9ebc92eda

Changeset description:

added tests for Bugs 3193, 3179 and 3172

Fixed bug #3191, we now allow the order by column expressions to refer to
the lower level projection. This is very limited support voor order by with
expressions. Aliases is still preferred.

Fixed bug #3179 (or feature request). We now rewrite batstr.*like + subselect into
*likeselect. Also some cleanup of pushselect optimizer and mergetable related
helper functions in opt_support.c

Fixed bug #3172. We still don't allow multi row input in table functions. But
we now don't crash on it anymore. Still work on mal.multiplex needed (requires
multiple outputs)!

Comment 18192

Date: 2012-11-28 13:45:16 +0100
From: Yagiz <<y.kargin>>

Changeset 9b297e5dc99d made by Yagiz Kargin y.kargin@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9b297e5dc99d

Changeset description:

bug-3172 test

Comment 18505

Date: 2013-02-19 13:17:55 +0100
From: @sjoerdmullender

Feb2013 has been released.

Comment 18898

Date: 2013-07-02 23:37:37 +0200
From: @mlkersten

Improved the error message and make it more robust against mal.multiplex calls with multiple return values.

Comment 18903

Date: 2013-07-03 14:03:47 +0200
From: MonetDB Mercurial Repository <>

Changeset d681c9a9e056 made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d681c9a9e056

Changeset description:

treat varying (with threads) ID in err.msg. as minor difference
tests table_function_with_column_subselects.Bug-3172 & create_function.Bug-3172

Comment 18968

Date: 2013-07-31 15:55:17 +0200
From: MonetDB Mercurial Repository <>

Changeset e0999294bd15 made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e0999294bd15

Changeset description:

table_function_with_column_subselects.Bug-3172: approve new variable IDs in error message
@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 Nov 9, 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

3 participants