Bugs item #1997643, was opened at 2008-06-19 11:39
Message generated for change (Comment added) made by romulog
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1997643&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: 6
Private: No
Submitted By: Romulo Goncalves (romulog)
Assigned to: Niels Nes (nielsnes)
Summary: batdescriptor problem
Initial Comment:
Just run the following sql code:
CREATE FUNCTION degrees(r double)
RETURNS double
RETURN r*180/pi();
CREATE FUNCTION fHtm(x float, y float, z float, radius float)
RETURNS TABLE (
HtmIDStart bigint ,
HtmIDEnd bigint
)
BEGIN
RETURN TABLE (SELECT 1,2);
END;
create table t1 (id int, age int);
CREATE FUNCTION f1(ra float, deci float,
radius float, zoo int)
RETURNS TABLE (
fieldID bigint ,
distance float -- distance in arc minutes
)
BEGIN
--
DECLARE nx float,ny float,nz float;
SET nx = ra;
SET ny = ra;
SET nz = deci;
DECLARE TABLE cover(
htmidStart bigint, htmidEnd bigint
);
INSERT into cover
SELECT htmidStart, htmidEnd
FROM fHtm(nx,ny,nz,radius);
RETURN TABLE(SELECT age,
(2*DEGREES(ASIN(sqrt(power(nx-id,2)+power(ny-id,2)+power(nz-id,2))/2))*60) as
val
FROM cover H, t1 F );
END;
select * from f1(1,2,3,4) n;
drop function f1;
drop table t1;
drop function fHtm;
The error is:
MAPI = [EMAIL PROTECTED]:50000
QUERY = select * from f1(1,2,3,4) n;
ERROR = !TypeException:user.f1[26]:'bat.new' undefined in: _184:bat[:str,:BAT]
:= bat.new(_185:str, _186:bat[:oid,:dbl])
!TypeException:user.s0_1[35]:'bat.new' undefined in:
_240:bat[:str,:BAT] := bat.new(_241:str, _242:bat[:oid,:dbl])
!TypeException:user.s0_1[38]:type mismatch bat[:oid,:dbl] :=
bat[:str,:BAT]
!TypeException:user.s0_1[40]:'sql.columnBind' undefined in:
_83:bat[:oid,:lng] := sql.columnBind(_81:bat[:oid,:dbl], _82:str)
!TypeException:user.s0_1[49]:'sql.columnBind' undefined in:
_94:bat[:oid,:lng] := sql.columnBind(_81:bat[:oid,:dbl], _93:str)
!MALException:bat.insert:Cannot access descriptor
!WARNING: BATdescriptor: range error 18294344
Romulo
----------------------------------------------------------------------
>Comment By: Romulo Goncalves (romulog)
Date: 2008-06-30 17:50
Message:
Logged In: YES
user_id=1498628
Originator: YES
Test added:
sql/src/tests/BugTracker/Tests/bat_descriptor_problem.SF-199764.sql
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1997643&group_id=56967
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs