You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following queries crashes mserver5 (both in Mar2011 and in default):
sql>CREATE TABLE t3 (x INTEGER, y INTEGER);
operation successful
sql>alter table t3 add r float default sqrt(power(t3.x, 2) + power(t3.y, 2));
MAPI = monetdb@localhost:60000
ACTION= read_line
QUERY = alter table t3 add r float default sqrt(power(t3.x, 2) + power(t3.y, 2));
ERROR = !Connection terminated
GDB says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7bab700 (LWP 26196)]
0x00007fffe8e0a593 in rel_parse_val (m=0x7fffd8005468,
query=0x7fffd806d868 "select sqrt(sql_add(power((null),2),power((null),2)));\n", emode=0 '\000') at /ufs/zhang/monet/default/sql/server/rel_subquery.c:402
402 if (m->sym->token == SQL_SELECT) {
If I understand the SQL:2003 grammar correctly (http://savage.net.au/SQL/sql-2003-2.bnf.html), such an expression is not allowed in de DEFAULT clause. But it is not rejected by the SQL parser.
Date: 2011-03-31 14:44:02 +0200
From: @yzchang
To: SQL devs <>
Version: 11.1.1 (Mar2011) [obsolete]
CC: @njnes
Last updated: 2011-04-28 16:25:39 +0200
Comment 15711
Date: 2011-03-31 14:44:02 +0200
From: @yzchang
The following queries crashes mserver5 (both in Mar2011 and in default):
sql>CREATE TABLE t3 (x INTEGER, y INTEGER);
operation successful
sql>alter table t3 add r float default sqrt(power(t3.x, 2) + power(t3.y, 2));
MAPI = monetdb@localhost:60000
ACTION= read_line
QUERY = alter table t3 add r float default sqrt(power(t3.x, 2) + power(t3.y, 2));
ERROR = !Connection terminated
GDB says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7bab700 (LWP 26196)]
0x00007fffe8e0a593 in rel_parse_val (m=0x7fffd8005468,
query=0x7fffd806d868 "select sqrt(sql_add(power((null),2),power((null),2)));\n", emode=0 '\000') at /ufs/zhang/monet/default/sql/server/rel_subquery.c:402
402 if (m->sym->token == SQL_SELECT) {
If I understand the SQL:2003 grammar correctly (http://savage.net.au/SQL/sql-2003-2.bnf.html), such an expression is not allowed in de DEFAULT clause. But it is not rejected by the SQL parser.
Comment 15719
Date: 2011-04-05 12:35:15 +0200
From: @njnes
Changeset 3e42e98ee928 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=3e42e98ee928
Changeset description:
Comment 15720
Date: 2011-04-05 12:36:20 +0200
From: @njnes
added test to BugTracker-2011/alter_incorrect_syntax_crash.Bug-2795.sql
Fixed bug by handling the failed parsing of the default expression.
Comment 15755
Date: 2011-04-28 16:25:39 +0200
From: @sjoerdmullender
The Apr2011 release has been uploaded.
The text was updated successfully, but these errors were encountered: