Bugs item #2229936, was opened at 2008-11-06 16:13
Message generated for change (Settings changed) made by romulog
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2229936&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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Niels Nes (nielsnes)
Summary: [SQL] count(*) with order by and limit crashes
Initial Comment:
In the category; error at layer 8.
CREATE TABLE "sys"."bigramlex" (
"subtotal" int,
"one" varchar(255) NOT NULL,
"two" varchar(255) NOT NULL,
CONSTRAINT "bigramlex_one_two_pkey" PRIMARY KEY ("one", "two")
);
insert into bigramlex (subtotal, one, two) values (1, 'hello', 'word');
select count(*) from bigramlex order by subtotal limit 10;
The query is plain wrong, that is clear. But it also crashes mserver5.
(gdb) bt
#0 0x01d301d0 in ?? ()
#1 0x0f96e3d0 in ATOMlen (t=255, src=0x10c88c28) at
../../../src/gdk/gdk_atoms.mx:960
#2 0x0f96ebdc in ATOMdup (t=255, p=0x10c88c28) at
../../../src/gdk/gdk_atoms.mx:1064
#3 0x0d69ea7c in res_col_create (tr=0x10603018, t=0x10cd30f0, tn=0x10ca9c30
"sys.bigramlex", name=0x10c85c70 "count_",
typename=0x10caa058 "wrd", digits=32, scale=0, mtype=255, val=0x10c88c28)
at ../../../../src/storage/bat/res_table.mx:88
#4 0x0d5fdcb8 in mvc_result_value (m=0x10c4b520, tn=0x10ca9c30
"sys.bigramlex", name=0x10c85c70 "count_",
typename=0x10caa058 "wrd", digits=32, scale=0, p=0x10c88c28, mtype=255)
at ../../../../src/backends/monet5/sql_result.mx:1166
#5 0x0d5a2da4 in mvc_result_value_wrap (cntxt=0x10016398, mb=0x10c87258,
stk=0x10c88a08, pci=0x10c887e0)
at ../../../../src/backends/monet5/sql.mx:1785
#6 0x0ff2d234 in runMALsequence (cntxt=0x10016398, mb=0x10c87258, startpc=1,
stoppc=0, stk=0x10c88a08, env=0x0,
pcicaller=0x0) at ../../../src/mal/mal_interpreter.mx:1635
#7 0x0ff2bc8c in callMAL (cntxt=0x10016398, mb=0x10c87258, env=0x4ca6bbe8,
argv=0x4ca6bb98, debug=0 '\0')
at ../../../src/mal/mal_interpreter.mx:423
#8 0x0d5eb78c in SQLexecutePrepared (c=0x10016398, be=0x10c91b60, q=0x10cd1fa8)
at ../../../../src/backends/monet5/sql_scenario.mx:1203
#9 0x0d5ebd94 in SQLengineIntern (c=0x10016398, be=0x10c91b60) at
../../../../src/backends/monet5/sql_scenario.mx:1314
#10 0x0d5ec428 in SQLengine (c=0x10016398) at
../../../../src/backends/monet5/sql_scenario.mx:1432
#11 0x0ff65910 in runPhase (c=0x10016398, phase=4) at
../../../src/mal/mal_scenario.mx:591
#12 0x0ff65aec in runScenarioBody (c=0x10016398) at
../../../src/mal/mal_scenario.mx:631
#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: 2009-02-09 14:59
Message:
The algebra version became the default one in the stable branch as well.
So the bug is fixed and it can be closed.
----------------------------------------------------------------------
Comment By: Romulo Goncalves (romulog)
Date: 2008-12-01 15:50
Message:
This bug is fixed in the algebra version for the stable and current branch
of M5-SQL.
I can't close the bug until it is fixed in the normal version as well.
To use the algebra version just call mclient with option "-G":
mclient -G
----------------------------------------------------------------------
Comment By: Romulo Goncalves (romulog)
Date: 2008-11-17 21:18
Message:
Test added at:
sql/src/test/BugTracker-2008/Tests/count_with_order_by_and_limit_crashes.SF-2229936.sql
The content of the test is the simple example and not the one used to open
this bug...
----------------------------------------------------------------------
Comment By: Romulo Goncalves (romulog)
Date: 2008-11-17 17:51
Message:
We can reduce the example to this simple one:
CREATE TABLE bigramlex (subtotal int);
select count(subtotal) from bigramlex order by subtotal;
drop TABLE bigramlex;
It only crashed in the algebra version and not in the normal version.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2229936&group_id=56967
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs