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

alter table my_merge_table drop table t1; crashes mserver5 with Segmentation fault #3716

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: 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:

  1. start mserver5 (MonetDB 5 server v11.19.9 "Oct2014-SP2")
  2. start mclient
  3. 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

SQL catalog created, loading sql scripts once
loading sql script: 09_like.sql
loading sql script: 10_math.sql
loading sql script: 11_times.sql
loading sql script: 12_url.sql
loading sql script: 13_date.sql
loading sql script: 14_inet.sql
loading sql script: 15_querylog.sql
loading sql script: 16_tracelog.sql
loading sql script: 19_cluster.sql
loading sql script: 20_vacuum.sql
loading sql script: 21_dependency_functions.sql
loading sql script: 22_clients.sql
loading sql script: 23_skyserver.sql
loading sql script: 24_zorder.sql
loading sql script: 25_debug.sql
loading sql script: 26_sysmon.sql
loading sql script: 39_analytics.sql
loading sql script: 40_geom.sql
loading sql script: 40_json.sql
loading sql script: 41_jsonstore.sql
loading sql script: 45_uuid.sql
loading sql script: 46_gsl.sql
loading sql script: 75_storagemodel.sql
loading sql script: 80_statistics.sql
loading sql script: 80_udf.sql
loading sql script: 85_bam.sql
loading sql script: 90_generator.sql
loading sql script: 99_system.sql
./start_mserver5.sh: line 5: 11423 Segmentation fault

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.

@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