Bugs item #2474519, was opened at 2008-12-29 10:27
Message generated for change (Comment added) made by tsheyar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2474519&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: PF/compiler
Group: Pathfinder "stable"
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: John van Schie (johnvanschie)
Assigned to: Jan Rittinger (tsheyar)
Summary: Effective boolean value of sequence results in an error

Initial Comment:
We use the MonetDB Nov 2008 SP1 server supplied by the Fedora 9 RPM's.

When we execute the following query, which we believe is valid, it results in 
the following error:

Query:
element result {
  if (distinct-values(exactly-one(doc("bookmarks.xml"))//*)) then 1 else 2
}

Mclient output:
xquery>\</media/disk/querylog
MAPI  = mone...@localhost:51240
QUERY = element result {
ERROR = !fatal error: attribute 'item' with type '0x20' not found in environment

It executes without a problem, when we rewrite the query to the following:

Query:
element result {
  if (not(empty(distinct-values(exactly-one(doc("bookmarks.xml"))//*)))) then 1 
else 2
}

Mclient output:
xquery>\</media/disk/querylog.workaround
<result>1</result>

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

>Comment By: Jan Rittinger (tsheyar)
Date: 2009-02-16 15:54

Message:
Test added.

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

Comment By: Jan Rittinger (tsheyar)
Date: 2009-02-16 15:40

Message:
BTW: The two queries query something different. The first one returns a
runtime error if there are more than one values and looks at the value to
decide the outcome. The second query returns true if there is 1 or more
resulting values.

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

Comment By: Jan Rittinger (tsheyar)
Date: 2009-02-16 15:37

Message:
Fixed in CVS.

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

Comment By: Stefan Manegold (stmane)
Date: 2008-12-29 12:07

Message:
With assertions disabled (as in the RPMs), I get the same error:

$ pf /tmp/ebv.SF-2474519-KO.xq >/dev/null 
fatal error: attribute 'item' with type '0x20' not found in environment

With assertions enabled (default when compiled from CVS sources), I get:

$ pf /tmp/ebv.SF-2474519-KO.xq 
pf:
/ufs/manegold/_/scratch0/Monet/Testing/Stable/source/pathfinder/compiler/algebra/logical.c:1831:
PFla_not: Assertion `PFprop_type_of (n, att) == 0x00000020' failed.
Aborted

With the old / deprecated MPS back-end (cf., `pf -M` / `mclient -g` / '\g'
command on mclient prompt), the query compiles fine:

$ pf -M /tmp/ebv.SF-2474519-KO.xq | wc
    718    2994   31177


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

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

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to