SQL "alter table m drop table t1;"
where table t1 does no longer exist (as it is dropped before) causes a segmentation fault. Instead it should return an error.
Also it appears that running "alter table m drop table t1;" twice is also accepted without a warning or error. I would like to receive an error instead.
Reproducible: Always
Steps to Reproduce:
start mserver5 (MonetDB 5 server v11.19.9 "Oct2014-SP2")
start mclient
execute SQL commands:
create table t1 (i int);
create table t2 (i int);
create merge table m (i int);
alter table m add table t1;
alter table m add table t2;
alter table m drop table t1;
alter table m drop table t1;
DROP table t1;
alter table m drop table t1;
-- this last alter table m statement causes the segmentation fault
-- if it doesn't try also:
select * from m;
Actual Results:
builtin opt gdk_dbpath = /export/scratch1/dinther/Downloads/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_debug = 10
MonetDB 5 server v11.19.9 "Oct2014-SP2"
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 15.590 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
bash-4.2$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>create table t1 (i int);
operation successful (1.612ms)
sql>create table t2 (i int);
operation successful (1.145ms)
sql>create merge table m (i int);
operation successful (0.716ms)
sql>alter table m add table t1;
operation successful (0.526ms)
sql>alter table m add table t2;
operation successful (0.471ms)
sql>alter table m drop table t1;
operation successful (0.180ms)
sql>alter table m drop table t1;
operation successful (0.672ms)
sql>alter table m drop table t1;
operation successful (0.620ms)
sql>DROP table t1;
operation successful (6.437ms)
sql>DROP table t1;
DROP TABLE: no such table 't1'
sql>alter table m drop table t1;
operation successful (0.612ms)
sql>alter table m drop table t1;
sql>
bash-4.2$
Expected Results:
after the SQLs:
alter table m add table t2;
alter table m drop table t1;
alter table m drop table t1;
I expect to get an error msg stating that table t1 cannot be dropped from merge table m as it is not part of the merge table definition.
after the SQLs:
DROP table t1;
alter table m drop table t1;
I expect to get an error msg stating that table t1 does not exist.
Date: 2015-04-23 16:01:57 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes
Last updated: 2015-08-28 13:43:03 +0200
Comment 20836
Date: 2015-04-23 16:01:57 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build Identifier:
SQL "alter table m drop table t1;"
where table t1 does no longer exist (as it is dropped before) causes a segmentation fault. Instead it should return an error.
Also it appears that running "alter table m drop table t1;" twice is also accepted without a warning or error. I would like to receive an error instead.
Reproducible: Always
Steps to Reproduce:
create table t1 (i int);
create table t2 (i int);
create merge table m (i int);
alter table m add table t1;
alter table m add table t2;
alter table m drop table t1;
alter table m drop table t1;
DROP table t1;
alter table m drop table t1;
-- this last alter table m statement causes the segmentation fault
-- if it doesn't try also:
select * from m;
Actual Results:
builtin opt gdk_dbpath = /export/scratch1/dinther/Downloads/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_debug = 10
MonetDB 5 server v11.19.9 "Oct2014-SP2"
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 15.590 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
bash-4.2$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>create table t1 (i int);
operation successful (1.612ms)
sql>create table t2 (i int);
operation successful (1.145ms)
sql>create merge table m (i int);
operation successful (0.716ms)
sql>alter table m add table t1;
operation successful (0.526ms)
sql>alter table m add table t2;
operation successful (0.471ms)
sql>alter table m drop table t1;
operation successful (0.180ms)
sql>alter table m drop table t1;
operation successful (0.672ms)
sql>alter table m drop table t1;
operation successful (0.620ms)
sql>DROP table t1;
operation successful (6.437ms)
sql>DROP table t1;
DROP TABLE: no such table 't1'
sql>alter table m drop table t1;
operation successful (0.612ms)
sql>alter table m drop table t1;
sql>
bash-4.2$
Expected Results:
after the SQLs:
alter table m add table t2;
alter table m drop table t1;
alter table m drop table t1;
I expect to get an error msg stating that table t1 cannot be dropped from merge table m as it is not part of the merge table definition.
after the SQLs:
DROP table t1;
alter table m drop table t1;
I expect to get an error msg stating that table t1 does not exist.
See also bug #3703
Comment 20842
Date: 2015-04-24 13:16:29 +0200
From: @njnes
fixed in default, also added a test to the mergetable set
Comment 21229
Date: 2015-08-28 13:43:03 +0200
From: @sjoerdmullender
Jul2015 has been released.
The text was updated successfully, but these errors were encountered: