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

UDF crashes when subquery and scalar values are passed as pameters #6399

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-08-31 17:43:37 +0200
From: @yzchang
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes, @yzchang

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

Comment 25601

Date: 2017-08-31 17:43:37 +0200
From: @yzchang

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Build Identifier:

When a mixture of subquery and scalar values are passed (in some specific ways, or a specific number of them) as the parameter values to a UDF, mserver5 crashes

Reproducible: Always

Steps to Reproduce:

Run the following queries to get the crash:

=================
create table data (idx int);
insert into data values (13), (17);

create function crash2(i int, j int) returns int begin
return i + j;
END;
select * from test(1, (select idx from data));

create function crash3(i int, j int, k int) returns int begin
return i + j + k;
END;
select * from test((select idx from data), 2, 3);

Actual Results:

Crash

Expected Results:

The error message:

SELECT: 'test' requires a single sub query

  1. The query "select * from test((select idx from data), 2);" correctly results in the error message.

  2. On Mac OS (Sierra) mserver5 doesn't crash, but runs forever.

Comment 25602

Date: 2017-08-31 18:07:03 +0200
From: @yzchang

Sorry, forgot to change the names of the functions in the SELECT queries. They should be replaced with "crash2" or "crash3"

Comment 25603

Date: 2017-08-31 18:21:19 +0200
From: MonetDB Mercurial Repository <>

Changeset 69732824cc07 made by Jennie Zhang y.zhang@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test for Bug #6399

Comment 25642

Date: 2017-09-17 18:01:51 +0200
From: @njnes

crash is fixed

@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