Bugs item #1706501, was opened at 2007-04-24 13:56
Message generated for change (Settings changed) made by sjoerd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1706501&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.20)
Status: Open
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Sjoerd Mullender (sjoerd)
Summary: XQuery: no attribute-node check in updates

Initial Comment:
MonetDB 0.16.2 (supersourcetarball)

an attribute can be added more than once in a single query (resulting in an 
invalid xml document):

xquery>for $i in (1,2)
more>let $d := doc("test.xml")
more>return do insert attribute { "id" } { "10" } into exactly-one($d/*)
more>xquery>
more>doc("test.xml")
more><?xml version="1.0" encoding="utf-8"?>
<doc id="10" id="10"><start/>
   <greet kind="informal">Hi </greet>
   <greet kind="casual">Hello </greet>
   <location kind="global">World</location>
   <location kind="local">Amsterdam</location>
  </doc>

xquery>


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

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-12-13 16:04

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

This test tests the double insert in a single query.  If you were to do
the two inserts in separate queries, we do indeed throw an error, but we do
not when the two inserts are done in a single query.

The error throwing is actually also not entirely correct: if in the same
query the old attribute is deleted or renamed, we should (I assume--I
haven't checked the spec) accept the query since the end result is valid
XML.

The problem is that we should perform all updates and then check whether
the end result is valid.  This, I think, is too hard to do (both as far as
implementing it and the resulting speed).

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

Comment By: Peter Boncz (boncz)
Date: 2007-06-12 14:21

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

Hi Sjoerd. Is this one still open?

I noticed that in pf_support there is code that checks against this (at
least against the condition that the inserted attribute is there already in
the pre-state), as tested here.

That still indeed leaves the possibility open of inserting twice the same
attribute in the same update.

Peter

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

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-04-25 15:10

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

There is a lot more that needs to be tested at the end of an update.  One
of the problems is, you can't test while doing the update, since a
subsequent update in the same query may well change something that fixes
the problem.

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

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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to