Bugs item #1718066, was opened at 2007-05-13 12:01
Message generated for change (Comment added) made by boncz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1718066&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 CVS Head
Status: Open
Resolution: Fixed
Priority: 6
Private: No
Submitted By: Ying Zhang (yingying)
Assigned to: Peter Boncz (boncz)
Summary: PF: put() to /tmp crashes Mserver

Initial Comment:
This happens both in the Current and the Stable branch.

The following query:
    put(<hello/>, "/tmp/hello.xml")

causes Mserver to segmentation fault, while this query:

    put(<hello/>, "tmp/hello.xml")

works fine.


I can understand that only relative paths are allowed to be used in put, but 
giving an error message would be better than the segmentation fault.

Temporarily assign to Peter, since he might be the one who has implemented 
put().  Please reassign if I'm wrong.


Regards,

Jennie

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

>Comment By: Peter Boncz (boncz)
Date: 2008-06-02 00:14

Message:
Logged In: YES 
user_id=591107
Originator: NO

Lefteris: relative paths are only allowed because of security reasons: we
do not want to give an open license to overwrite any file in the server
computer. Therefore, it also checks against .. in the paths. So i think the
error should still be given for absolute paths.

as for the change in output: probably correct indeed, as fn:put now is a
normal function, not anymore an updating function (update functions produce
an empty output).

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

Comment By: Lefteris Sidirourgos (lsidir)
Date: 2008-06-02 00:06

Message:
Logged In: YES 
user_id=1856546
Originator: NO

The xquery update specs say that the second argument must be a valid
xs:anyURI:

"If $uri is not a valid lexical representation of the xs:anyURI type, a
dynamic error is raised [err:FOUP0002]. If $uri is a relative URI
Reference, it is resolved relative to the value of the base URI property in
the static context."

Why do we raise an error if it is not a relative URI? Am I missing
something?

Also for the second issue of what to print as a result, my understanding
is that it should print the result of the query:

"The fn:put function has no effect on the current query."

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

Comment By: Stefan Manegold (stmane)
Date: 2008-06-01 22:37

Message:
Logged In: YES 
user_id=572415
Originator: NO

Re-opened, as the test fails (again):
The first (correct) fn:put() call now produces and empty XML fragment
========
<?xml version="1.0" encoding="utf-8"?>
<XQueryResult></XQueryResult>
========
as result, while it used to produce no output/result at all; see
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTests103/GNU.64.64.d-Fedora8/tests_BugTracker/put_to_tmp.SF-1718066.out.00.html

In case this is an intended change, the new output must be approved.

Otherwise the (new) bug must be fixed.


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

Comment By: Stefan Manegold (stmane)
Date: 2007-05-16 18:22

Message:
Logged In: YES 
user_id=572415
Originator: NO

For completeness:
Test added as pathfinder/tests/BugTracker/Tests/put_to_tmp.SF-1718066*

put(<hello/>, "tmp/hello.xml")
works fine

put(<hello/>, "/tmp/hello.xml")
produces expected error
fn_put: file URI '/tmp/hello.xml' must be a relative path (1 such
errors).


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

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to