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

UPDATE does not work with DECLEAREd TABLE in FUNCTION #3318

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

UPDATE does not work with DECLEAREd TABLE in FUNCTION #3318

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

Comments

@monetdb-team
Copy link

Date: 2013-07-09 09:24:31 +0200
From: @drstmane
To: SQL devs <>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes

Last updated: 2013-09-27 13:47:17 +0200

Comment 18908

Date: 2013-07-09 09:24:31 +0200
From: @drstmane

While INSERT appears to work fine, UPDATE does not work with / does not see DECLAREd TABLE in SQL FUNCTION:

$ cat /tmp/x.sql
create function MyFunc1()
returns int
begin
declare table t (a int);
insert into t values (1);
update t set i = 0;
return 0;
end;

select MyFunc1();

drop function MyFunc1;

$ mclient /tmp/x.sql
UPDATE: no such table 't'
SELECT: no such operator 'myfunc1'
DROP FUNCTION: no such function 'myfunc1'

Comment 18955

Date: 2013-07-31 10:45:41 +0200
From: @njnes

fixed, ie we now properly find declared tables also in the update_table code

Comment 18958

Date: 2013-07-31 10:49:30 +0200
From: MonetDB Mercurial Repository <>

Changeset 6b9d21862a6a 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=6b9d21862a6a

Changeset description:

fixed bug #3329, ie handle abort on error bit on subavg call
fixed bug #3319, return error on unique/primary/foreign constraints on declared tables
fixed bug #3318, correctly find the declared tables
@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