Bugs item #1848553, was opened at 2007-12-11 12:51
Message generated for change (Settings changed) made by romulog
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1848553&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 2.24
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Romulo Goncalves (romulog)
Assigned to: Niels Nes (nielsnes)
Summary: select crashes in the optimization
Initial Comment:
The following queries crash the Mserver5-SQL:
create table s ( snr int, sname varchar(30) );
create table sp ( snr int, pnr varchar(30) );
select 24;
SELECT DISTINCT S.SNAME
FROM S, SP
GROUP BY S.SNR, S.SNAME, SP.SNR, SP.PNR
HAVING SP.SNR = S.SNR
AND SP.PNR = 'P2';
drop table s;
drop table sp;
Regards,
Romulo
----------------------------------------------------------------------
>Comment By: Romulo Goncalves (romulog)
Date: 2008-06-02 17:24
Message:
Logged In: YES
user_id=1498628
Originator: YES
This bug is from a old stable release, I decided to assign it current
stable release and had a test:
sql/src/tests/BugTracker/Tests/select_crashes_in_the_optimization.SF-1848553
If I am doing something wrong please let me know...
Romulo
----------------------------------------------------------------------
Comment By: Romulo Goncalves (romulog)
Date: 2007-12-18 16:59
Message:
Logged In: YES
user_id=1498628
Originator: YES
After some debug lets pump some information...
These two queries crash for different reasons. The firs one presented
creates an infinite loop due the pivot stmt...
The second query crashes after 4 iterations (in the optimization). A pivot
is missing so the find_pivot returns a empty stmt.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1107310912 (LWP 23037)]
0x00002aaabc70308c in optimize (c=0x1ace498, s=0x1aa1af8) at
/ufs/goncalve/MonetDB/Stable/sql/src/server/sql_optimize.mx:1542
1542 s->optimized = np->optimized = 1;
(gdb) l
#0 0x00002aaabc70308c in optimize (c=0x1ace498, s=0x1aa1af8) at
/ufs/goncalve/MonetDB/Stable/sql/src/server/sql_optimize.mx:1542
1542 s->optimized = np->optimized = 1;
(gdb) l
1537 stmt *ns = optimize(c, s->op2.stval); /*
optimize ptable */
1538 stmt *np = find_pivot(ns, s->t);
1539
(gdb) p np
$2 = (stmt *) 0x0
(gdb)
Looking to the query it is easy to see that no table or column reference
is used in the where clause. If I do:
...a between 4 and 6;
instead of:
...5 between 4 and 6;
The Mserver does not crash.
Regards,
Romulo
----------------------------------------------------------------------
Comment By: Romulo Goncalves (romulog)
Date: 2007-12-14 12:49
Message:
Logged In: YES
user_id=1498628
Originator: YES
Another query which crashes the mserver in the same place...
create table crash_me (a integer not null,b char(10) not null);
insert into crash_me (a,b) values (1,'a');
This is the query:
select a from crash_me where 5 between 4 and 6;
drop table crash_me;
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1107310912 (LWP 31989)]
0x00002aaabc702fe0 in optimize (c=0x16a6508, s=0x1a68928)
at /ufs/goncalve/MonetDB/Stable/sql/src/server/sql_optimize.mx:1542
1542 s->optimized = np->optimized = 1;
(gdb) up
#1 0x00002aaabc702dc3 in optimize (c=0x16a6508, s=0x1a418b8)
at /ufs/goncalve/MonetDB/Stable/sql/src/server/sql_optimize.mx:1487
1487 stmt *ns = optimize(c, os);
(gdb) up
#2 0x00002aaabc702f11 in optimize (c=0x16a6508, s=0x1a419a8)
at /ufs/goncalve/MonetDB/Stable/sql/src/server/sql_optimize.mx:1523
1523 stmt *ns = optimize(c, n->data);
(gdb)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1848553&group_id=56967
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs