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

Interference of procedure/table name #6348

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

Interference of procedure/table name #6348

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

Comments

@monetdb-team
Copy link

Date: 2017-07-08 22:56:14 +0200
From: @mlkersten
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 25440

Date: 2017-07-08 22:56:14 +0200
From: @mlkersten

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0
Build Identifier:

The sample test causes monetdb default branch to crash in the following

A test file has been added

hread 6 "mserver5" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f302cd56700 (LWP 10293)]
0x00007f304e456433 in count_col (tr=0x7f301c001b00, c=0x7f301c1369c0, all=1) at /export/scratch1/mk/default//package/sql/storage/bat/bat_storage.c:961
961 c->data = timestamp_delta(oc->data, tr->stime);
(gdb) where
0 0x00007f304e456433 in count_col (tr=0x7f301c001b00, c=0x7f301c1369c0, all=1) at /export/scratch1/mk/default//package/sql/storage/bat/bat_storage.c:961
1 0x00007f304e3320a5 in stmt_tid (be=0x7f301c0db0f0, t=0x7f301c136860, partition=1) at /export/scratch1/mk/default//package/sql/backends/monet5/sql_statement.c:476
2 0x00007f304e316a60 in rel2bin_basetable (be=0x7f301c0db0f0, rel=0x7f301c134550) at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:1171
3 0x00007f304e326f59 in subrel_bin (be=0x7f301c0db0f0, rel=0x7f301c134550, refs=0x7f301c134fc0) at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:4755
4 0x00007f304e31c975 in rel2bin_project (be=0x7f301c0db0f0, rel=0x7f301c134930, refs=0x7f301c134fc0, topn=0x0) at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:2418
5 0x00007f304e3270bc in subrel_bin (be=0x7f301c0db0f0, rel=0x7f301c134930, refs=0x7f301c134fc0) at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:4789
6 0x00007f304e3273b3 in output_rel_bin (be=0x7f301c0db0f0, rel=0x7f301c134930) at /export/scratch1/mk/default//package/sql/backends/monet5/rel_bin.c:4854
7 0x00007f304e341031 in sql_relation2stmt (be=0x7f301c0db0f0, r=0x7f301c134930) at /export/scratch1/mk/default//package/sql/backends/monet5/sql_gencode.c:474
8 0x00007f304e341390 in backend_dumpstmt (be=0x7f301c0db0f0, mb=0x7f301c107fe0, r=0x7f301c134930, top=1, add_end=1, query=0x7f301c001a30 "select * from cls_0_statistics;")
at /export/scratch1/mk/default//package/sql/backends/monet5/sql_gencode.c:515
9 0x00007f304e341bf5 in backend_dumpproc (be=0x7f301c0db0f0, c=0x7f304fbf6348, cq=0x7f301c118010, r=0x7f301c134930) at /export/scratch1/mk/default//package/sql/backends/monet5/sql_gencode.c:642
10 0x00007f304e309d30 in SQLparser (c=0x7f304fbf6348) at /export/scratch1/mk/default//package/sql/backends/monet5/sql_scenario.c:1145

Reproducible: Always

Steps to Reproduce:

create table cls_0(i integer, j integer, k string);
insert into cls_0 values
( 1, 99, 'b'),
( 2, 99, 'b'),
( 3, 99, 'b'),
( 4, 99, 'a'),
( 5, 99, 'a'),
( 6, 99, 'a'),
( 7, 33, 'b'),
( 8, 33, 'b'),
( 9, 33, 'b'),
( 10, 33, 'a'),
( 11, 33, 'a'),
( 12, 33, 'a');
select * from cls_0;

-- The metric functions over all columns are derived in one blow.
-- The result can be cached for easy recall
create procedure cls_0_statistics()
begin
create table cls_0_statistics ( col string, fcn string, tpe string, val string);
insert into cls_0_statistics values
('i', 'min', 'int', (select cast( min( i ) as string) from cls_0)),
('i', 'max', 'int', (select cast( min( i ) as string) from cls_0)),
('j', 'min', 'int', (select cast( min( i ) as string) from cls_0));
end;

select * from cls_0_statistics;

Comment 25454

Date: 2017-07-12 11:22:55 +0200
From: MonetDB Mercurial Repository <>

Changeset 11c1724677ad made by Martin Kersten mk@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Added file for bug #6348

Comment 25518

Date: 2017-07-28 20:24:31 +0200
From: @njnes

fixed, problem was in the multiple rows of insert values

Comment 25520

Date: 2017-07-28 20:25:59 +0200
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

fixed bug #6348, only rename non constant expressions
fixed bug #6352, when pushing projects up, we should include subqueries.
@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