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 mytable SET READ ONLY" results in server segfault #2906

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

"ALTER TABLE mytable SET READ ONLY" results in server segfault #2906

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2011-10-14 08:34:15 +0200
From: @drstmane
To: SQL devs <>
Version: 11.5.3 (Aug2011-SP1) [obsolete]
CC: @arjenpdevries, @njnes

Last updated: 2011-10-26 13:22:01 +0200

Comment 16408

Date: 2011-10-14 08:34:15 +0200
From: @drstmane

Created attachment 80
mserver5 GDB log

client:

create table MyTable (a int);
alter table MyTable set read only;

server:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe86a1700 (LWP 29097)]
0x00007fffe8b88990 in rel_alter_table (sql=0x7fffdc005470, qname=0x7fffdc0faca0, te=0x0) at /net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/HG/Aug2011/source/MonetDB/sql/server/rel_schema.c:1064
1064 if (nt && te->token == SQL_DROP_CONSTRAINT) {

(gdb) li
1059 node *n;
1060 sql_rel *res = NULL, *r;
1061 sql_table *nt = dup_sql_table(sql->sa, t);
1062 sql_exp ** updates, *e;
1063
1064 if (nt && te->token == SQL_DROP_CONSTRAINT) {
1065 dlist *l = te->data.lval;
1066 char *kname = l->h->data.sval;
1067 int drop_action = l->h->next->data.i_val;
1068

(gdb) p nt
$1 = (sql_table *) 0x7fffdc0fad90

(gdb) p *nt
$2 = {base = {wtime = 0, rtime = 0, flag = 1, id = 5663, name = 0x7fffdc0faeb0 "mytable"}, type = 0, system = 0 '\000', persistence = SQL_DECLARED_TABLE, commit_action = CA_COMMIT, readonly = 0 '\000', query = 0x0,
sz = 1024, pkey = 0x0, columns = {sa = 0x7fffdc0add90, destroy = 0, set = 0x7fffdc0faf40, dset = 0x0, nelm = 0x0}, idxs = {sa = 0x7fffdc0add90, destroy = 0, set = 0x0, dset = 0x0, nelm = 0x0}, keys = {
sa = 0x7fffdc0add90, destroy = 0, set = 0x0, dset = 0x0, nelm = 0x0}, triggers = {sa = 0x7fffdc0add90, destroy = 0, set = 0x0, dset = 0x0, nelm = 0x0}, tables = {sa = 0x0, destroy = 0, set = 0x0, dset = 0x0,
nelm = 0x0}, drop_action = 0, cleared = 0, data = 0x0, s = 0x0}

(gdb) p te
$3 = (symbol *) 0x0

Complete mserver5 GDB log is attached.

Attached file: mserver5-gdb-log (application/octet-stream, 5544 bytes)
Description: mserver5 GDB log

Comment 16411

Date: 2011-10-14 08:53:19 +0200
From: @njnes

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

Changeset description:

fixed crash / bug #2906.

Comment 16412

Date: 2011-10-14 08:53:51 +0200
From: @njnes

fixed, ie we check for te != NULL (again) now

Comment 16420

Date: 2011-10-14 09:31:17 +0200
From: @drstmane

Changeset ab3cecd81a13 made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ab3cecd81a13

Changeset description:

added test for bug #2906
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant