Bugs item #1758902, was opened at 2007-07-23 16:38
Message generated for change (Comment added) made by boncz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1758902&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/runtime
Group: (zombie: Pathfinder 0.18)
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Hans (hans_0_)
Assigned to: Sjoerd Mullender (sjoerd)
Summary: XQUF replace function seems to corrupt the database
Initial Comment:
The following set of queries result in a runtime error:
xquery>pf:del-doc("notes_consumer02.xml")
more>
xquery>pf:add-doc("notes_template.xml", "notes_consumer02.xml",
"notes_consumer02.xml", 10)
xquery>doc("notes_consumer02.xml")
<?xml version="1.0" encoding="utf-8"?>
<notes>
<objectnote xid="4" unixtime="1180000000" user="hans">This is my first
note</objectnote>
</notes>
xquery>let $doc := doc("notes_consumer02.xml") return $doc
<?xml version="1.0" encoding="utf-8"?>
<notes>
<objectnote xid="4" unixtime="1180000000" user="hans">This is my first
note</objectnote>
</notes>
xquery>let $doc := doc("notes_consumer02.xml")
more>let $orig := $doc/notes/objectno...@xid="14"]
more>let $on := element objectnote { attribute xid {"14"}, attribute user
{"unknown"}, attribute unixtime {"1185198696"}, text {"nootje"}, element
original { $orig } }
more>return if (exists($orig)) then (do replace $orig with $on) else (do insert
$on as last into $doc/notes)
xquery>let $doc := doc("notes_consumer02.xml") return $doc
<?xml version="1.0" encoding="utf-8"?>
<notes>
<objectnote xid="4" unixtime="1180000000" user="hans">This is my first
note</objectnote>
<objectnote unixtime="1185198696" user="unknown"
xid="14">nootje<original/></objectnote></notes>
xquery>let $doc := doc("notes_consumer02.xml")
more>let $orig := $doc/notes/objectno...@xid="14"]
more>let $on := element objectnote { attribute xid {"14"}, attribute user
{"unknown"}, attribute unixtime {"1185198696"}, text {"nootje, pinda"}, element
original { $orig } }
more>return if (exists($orig)) then (do replace $orig with $on) else (do insert
$on as last into $doc/notes)
MAPI = [email protected]:50000
QUERY = let $doc := doc("notes_consumer02.xml")
ERROR = !ERROR: interpret: no matching MIL operator to 'seqbase(BAT[oid,int],
oid)'.
!MAYBE YOU MEAN:
! seqbase(BAT[void,any::1], oid) : BAT[void,any::1]
! seqbase(BAT[void,any::1]) : oid
! seqbase(BAT[oid,any::1]) : oid
!ERROR: interpret_params: key(param 1): evaluation error.
xquery>let $doc := doc("notes_consumer02.xml") return $doc
<?xml version="1.0" encoding="utf-8"?>
<notes>
<objectnote xid="4" unixtime="1180000000" user="hans">This is my first
note</objectnote>
<objectnote unixtime="1185198696" user="unknown"
xid="14">nootje<original/></objectnote></notes>
xquery>let $doc := doc("notes_consumer02.xml") "14"}, attribute user {"unk
more>let $orig := $doc/notes/objectno...@xid="14"] "14"}, attribute user {"unk
more>let $on := element objectnote { attribute xid {"14"}, attribute user
{"unknown"}, attribute unixtime {"1185198696"}, text {"nootje, pinda"}}
more>return if (exists($orig)) then (do insert $on as last into $doc/notes, do
delete $orig) else (do insert $on as las
t into $doc/notes)
MAPI = [email protected]:50000
QUERY =
ERROR = !ERROR: CMDdelete_bat_bun: operation failed.
xquery>let $doc := doc("notes_consumer02.xml") return element { "result" } {
$doc }
<result><notes>
<objectnote user="hans" unixtime="1180000000" xid="4">This is my first
note</objectnote>
<objectnote xid="14" user="unknown" unixtime="1185198696">!ERROR: XML
Generation: tmp_2231 BAT does not have a 9 head.
MAPI = [email protected]:50000
QUERY = let $doc := doc("notes_consumer02.xml") return element { "result" } {
$doc }
ERROR = !ERROR:
!ERROR: XML Generation: NULL BAT has a 9 head, but tail is NULL.
!ERROR:
!ERROR: xquery_print_result_loop: operation failed.
xquery>let $doc := doc("notes_consumer02.xml") return $doc
<?xml version="1.0" encoding="utf-8"?>
<notes>
<objectnote xid="4" unixtime="1180000000" user="hans">This is my first
note</objectnote>
<objectnote unixtime="1185198696" user="unknown" xid="14"></objectnote></notes>
----------------------------------------------------------------------
>Comment By: Peter Boncz (boncz)
Date: 2009-04-07 12:26
Message:
is this something serious, Sjoerd?
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2009-02-16 01:02
Message:
re-opened as test output differs from stable one with both ALG & MPS:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTests103/GNU.64.64.d.1-Fedora8/tests_BugTracker/replace-corrupts.SF-1758902.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsg103/GNU.64.64.d.1-Fedora8/tests_BugTracker/replace-corrupts.SF-1758902.out.00.html
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-07-26 13:08
Message:
Logged In: YES
user_id=43607
Originator: NO
Fixed in CVS (stable).
Added test pathfinder/tests/BugTracker/Tests/replace-corrupts.SF-1758902*.
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-07-25 22:10
Message:
Logged In: YES
user_id=43607
Originator: NO
Actually, the document is implicit in the report. Look at the output of
the doc() function at the start.
I can indeed reproduce the problem. It looks like the call to seqbase on
line 2454 of pf_support.mx is the one that is failing. Needless to say, it
shouldn't. More investigation is needed.
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-07-25 17:42
Message:
Logged In: YES
user_id=572415
Originator: NO
Hans,
without the respective (sample) documents, there is no (reasonable) way to
reproduce, analyze, locate, fix, test this (potential) bug.
Hence, could you please provide us with the documents?
Thanks!
Stefan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1758902&group_id=56967
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs