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

PREPARE SQL statement fails to compile user defined functions with parameter/s #6650

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

Comments

@monetdb-team
Copy link

Date: 2018-10-10 16:35:27 +0200
From: raunak
To: SQL devs <>
Version: 11.31.7 (Aug2018)
CC: @PedroTadim

Last updated: 2019-01-14 17:29:11 +0100

Comment 26635

Date: 2018-10-10 16:35:27 +0200
From: raunak

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

Prepared statement fails to compile user defined function with parameters and hangs mclient

Reproducible: Always

Steps to Reproduce:

  1. mclient -u monetdb -d testdb
  2. sql>CREATE FUNCTION get_user(name_param text)
    more>RETURNS TABLE (name text, "fullName" text, default_schema text)
    more>RETURN TABLE(select * from users where name = name_param);
  3. prepare select * from get_user(?);

Actual Results:

software hangs, no response

Expected Results:

should compile and return:
execute prepared statement using: EXEC Id(...)
clk:x.xxx ms
+------+--------+-------+--------+-------+----------------+
| type | digits | scale | schema | table | column |
+======+========+=======+========+=======+================+
| clob | 0 | 0 | | L2 | name |
| clob | 0 | 0 | | L2 | fullName |
| clob | 0 | 0 | | L2 | default_schema |
+------+--------+-------+--------+-------+----------------+
3 tuples
clk:x.xxx ms

Comment 26636

Date: 2018-10-11 14:22:40 +0200
From: MonetDB Mercurial Repository <>

Changeset a4254c9306da 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=a4254c9306da

Changeset description:

Added test for bug #6650

Comment 26682

Date: 2018-11-16 13:51:55 +0100
From: MonetDB Mercurial Repository <>

Changeset 8e00b5197736 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=8e00b5197736

Changeset description:

Fix for bug #6650. After compiling a table returning function, set missing parameter types in m_prepare emode.

Also added missing SQL error codes.
@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