is this a bug?
Wednesday, 2 November 2022 · 2 messages
RS
Rob Stapper2 Nov 2022 09:01 #
Hi,
I stumbled upon this behavior. Is this a bug? I’m still using Basex version 9.7.
Code[1]:
let $e := <E>abc</E> update { replace value of node . with ./data() || "def" }
return ( $e, $e/data() )Result:
<E>abcdef</E>
abc
Expecting:
<E>abcdef</E>
abcdef
[1] attachment: “replace-value-of-bug.xq”
Pleased to hear from you,
Rob Stapper
Sent from Mail for Windows
--
This email has been checked for viruses by Avast antivirus software. www.avast.com
CG
Christian Grün2 Nov 2022 14:39 #
Hi Rob,
That was definitely a bug, caused by an atomized value that was cached and not invalidated during the update operation.
Thanks for the observation, a new snapshot is online [1].
Christian
[1] https://files.basex.org/releases/latest/
Quoted text · Rob Stapper · 60 lines
On Wed, Nov 2, 2022 at 9:01 AM Rob Stapper <r.stapper at lijbrandt.nl> wrote: > Hi, > > > > I stumbled upon this behavior. Is this a bug? I’m still using Basex > version 9.7. > > > > Code[1]: > > let $e := <E>abc</E> update { replace value of node . with ./data() > || "def" } > > return ( $e, $e/data() ) > > > > Result: > > <E>abcdef</E> > > abc > > > > Expecting: > > <E>abcdef</E> > > abcdef > > > > [1] attachment: “replace-value-of-bug.xq” > > > > Pleased to hear from you, > > > > Rob Stapper > > > > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows > > > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free.www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_1097126184614108455_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >
Written for BaseX 10.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery