Bugs item #1959822, was opened at 2008-05-07 23:41
Message generated for change (Comment added) made by romulog
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1959822&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Romulo Goncalves (romulog)
Assigned to: Niels Nes (nielsnes)
Summary: order by over table from another function
Initial Comment:
The following sql functions crash mserver5
CREATE FUNCTION f2 ()
RETURNS TABLE (
fieldID bigint,
distance bigint
)
BEGIN
DECLARE TABLE cover(
htmidStart bigint, htmidEnd bigint
);
INSERT into cover
SELECT 1, 2;
RETURN TABLE (
SELECT htmidStart, 1 as distance
FROM cover H);
END;
CREATE FUNCTION f3 ()
RETURNS TABLE (
fieldID bigint
)
BEGIN
RETURN TABLE (
SELECT fieldID
FROM f2 () n
ORDER BY fieldID ASC LIMIT 1);
END;
drop function f2();
drop function f3();
some debug information:
Program received signal SIGABRT, Aborted.
[Switching to Thread 1107310928 (LWP 16859)]
0x0000003c6d030ec5 in raise () from /lib64/libc.so.6
(gdb) up
#1 0x0000003c6d032970 in abort () from /lib64/libc.so.6
(gdb) up
#2 0x0000003c6d02a11f in __assert_fail () from /lib64/libc.so.6
(gdb) up
#3 0x00002aaabe745130 in find_order (s=0x30375e8)
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_select.mx:3652
3652 assert(s->type == st_order || s->type == st_reorder);
(gdb) up
#4 0x00002aaabe74517b in sql_reorder (order=0x30375e8, s=0x2fd5318)
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_select.mx:3664
3664 stmt *o = find_order(order);
(gdb) up
#5 0x00002aaabe73949b in flat_subquery (sql=0x2d71a68, sq=0x2d741e8)
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_select.mx:294
294 n = sql_reorder(stmt_dup(s->op1.stval),
stmt_dup(s->op2.stval));
(gdb) up
#6 0x00002aaabe73dcff in sql_table_exp (sql=0x2d71a68, scp=0x0, sym=0x2d741e8)
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_select.mx:1586
1586 stmt *ls = flat_subquery(sql, sym);
(gdb) up
#7 0x00002aaabe73e35a in sql_value_exp (sql=0x2d71a68, scp=0x0, se=0x2d743e8,
grp=0x0, subset=0x0, f=3, ek=
{type = 0 '\0', card = 4 '\004', reduce = 0 '\0'})
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_select.mx:1708
1708 return sql_table_exp(sql, scp, se->data.sym);
(gdb)
Romulo
----------------------------------------------------------------------
>Comment By: Romulo Goncalves (romulog)
Date: 2008-05-08 10:46
Message:
Logged In: YES
user_id=1498628
Originator: YES
test added at:
sql/src/test/BugTracker/Tests/order_by_over_table_from_another_function.SF-1959822.sql
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1959822&group_id=56967
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs