Bugs item #1758902, was opened at 2007-07-23 14:38
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Pathfinder 0.18
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hans (hans_0_)
Assigned to: Nobody/Anonymous (nobody)
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/[EMAIL PROTECTED]"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/[EMAIL PROTECTED]"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/[EMAIL PROTECTED]"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>


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

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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to