Bugs item #2219131, was opened at 2008-11-03 16:08
Message generated for change (Comment added) made by romulog
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2219131&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: MonetDB5 CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Niels Nes (nielsnes)
Summary: group by in subquery fails

Initial Comment:
(not the latest cvs)

CREATE TABLE "sys"."testme" (
        "id" int NOT NULL DEFAULT next value for "sys"."seq_4157",
        "pos" varchar(8),
        "word" varchar(32),
        CONSTRAINT "testme_id_pkey" PRIMARY KEY ("id")
);

INSERT INTO testme (pos, word) VALUES ('hello', 'world');

SELECT (SELECT count(word) AS subtotal, pos FROM testme GROUP BY pos);

0x0d62544c in sql_value_exp (sql=0x10894e50, scp=0x108d8ab8, se=0x10931b88, 
grp=0x0, subset=0x0, f=3, ek={type = 0 '\0', card = 2 '\002', reduce = 0 '\0'})
    at ../../../src/server/sql_select.mx:1709
1709                                    h = stmt_dup(s->h->t);

#0  0x0d62544c in sql_value_exp (sql=0x10894e50, scp=0x108d8ab8, se=0x10931b88, 
grp=0x0, subset=0x0, f=3, ek={type = 0 '\0', card = 2 '\002', reduce = 0 '\0'})
    at ../../../src/server/sql_select.mx:1709
#1  0x0d629010 in _column_exp (sql=0x10894e50, scp=0x108d8ab8, 
column_e=0x10931c28, grp=0x0, subset=0x0, f=3) at 
../../../src/server/sql_select.mx:2701
#2  0x0d6292bc in sql_column_exp (sql=0x10894e50, scp=0x108d8ab8, 
column_e=0x10931c28, grp=0x0, subset=0x0, f=3) at 
../../../src/server/sql_select.mx:2735
#3  0x0d62d290 in sql_simple_select (sql=0x10894e50, scp=0x108d8ab8, 
sn=0x10931d08) at ../../../src/server/sql_select.mx:3791
#4  0x0d61f6d8 in sql_subquery (sql=0x10894e50, scp=0x108d8ab8, sq=0x10931d08, 
ek={type = 0 '\0', card = 4 '\004', reduce = 1 '\001'})
    at ../../../src/server/sql_select.mx:234
#5  0x0d61f9a0 in scope_subquery (sql=0x10894e50, scp=0x108d8ab8, 
sq=0x10931d08, ek={type = 0 '\0', card = 4 '\004', reduce = 1 '\001'})
    at ../../../src/server/sql_select.mx:279
#6  0x0d62ef0c in selects (sql=0x10894e50, scp=0x0, s=0x10931d08) at 
../../../src/server/sql_select.mx:4292
#7  0x0d6325e0 in semantic (sql=0x10894e50, scp=0x0, s=0x10931d08) at 
../../../src/server/sql_semantic.mx:1160
#8  0x0d63287c in output_semantic (sql=0x10894e50, scp=0x0, s=0x10931d08) at 
../../../src/server/sql_semantic.mx:1231
#9  0x0d59f3c0 in sql_symbol2stmt (c=0x10894e50, sym=0x10931d08) at 
../../../../src/backends/monet5/sql.mx:995
#10 0x0d5eaddc in SQLparser (c=0x10016398) at 
../../../../src/backends/monet5/sql_scenario.mx:1023
#11 0x0ff65910 in runPhase (c=0x10016398, phase=1) at 
../../../src/mal/mal_scenario.mx:591
#12 0x0ff65a50 in runScenarioBody (c=0x10016398) at 
../../../src/mal/mal_scenario.mx:622
#13 0x0ff65cbc in runScenario (c=0x10016398) at 
../../../src/mal/mal_scenario.mx:656
#14 0x0ff29a90 in MSserveClient (dummy=0x10016398) at 
../../../src/mal/mal_session.mx:462
#15 0x0f07cb0c in start_thread () from /lib/libpthread.so.0
#16 0x0ecc5b90 in clone () from /lib/libc.so.6
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

----------------------------------------------------------------------

>Comment By: Romulo Goncalves (romulog)
Date: 2008-11-17 21:12

Message:
Test added:
sql/src/test/BugTracker-2008/Tests/group_by_in_subquery_fails.SF-2219131.sql

It contain the simple example and not the one used to open this bug....



----------------------------------------------------------------------

Comment By: Romulo Goncalves (romulog)
Date: 2008-11-17 17:34

Message:
A simple example that covers all the problem:
select (select 1);

:)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2219131&group_id=56967

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to