Function must not be updating error in 8.4.3 (not in 8.4.2)
Friday, 22 April 2016 · 5 messages · last reply 26 Apr 2016
MG
Marc van Grootel22 Apr 2016 14:03 #
Hi,
I'm sorry for the vague report. I can do more digging but it's happening deep inside some code and it's hard to pinpoint.
In 8.4.3 I get the following error message:
[XPTY0004] Function must not be updating: %updating function($result,$tran....
In 8.4.2 and before the same code works as expected.
What I can say that it's happening in a fold-left function which in it's body uses an xslt transform (using Saxon). I have
MIXUPDATES=true. I'm not touching the database inside this code but I can say that the fn call in which the fold-left is located does contain a couple of db:* functions (but they are not in the active code path). That's all I can offer at the moment.
I'm happy to do some more digging later but I wanted to post this just in case it gives someone a hunch and it's only introduced since 8.4.2. Also tried 8.4.4-SNAPSHOT and there it's broken too.
Cheers,
--Marc
CG
Christian Grün22 Apr 2016 15:21 #
Difficult to tell ;) I checked the places where your error message is triggered. Did you use updating functions in built-in XQuery functions (for-each, apply, ...)? Does your query run through with the new snapshot [1]?
[1] http://files.basex.org/releases/latest/
Quoted text · Marc van Grootel · 26 lines
On Fri, Apr 22, 2016 at 2:03 PM, Marc van Grootel <marc.van.grootel at gmail.com> wrote: > Hi, > > I'm sorry for the vague report. I can do more digging but it's > happening deep inside some code and it's hard to pinpoint. > > In 8.4.3 I get the following error message: > > [XPTY0004] Function must not be updating: %updating function($result,$tran.... > > In 8.4.2 and before the same code works as expected. > > What I can say that it's happening in a fold-left function which in > it's body uses an xslt transform (using Saxon). I have > MIXUPDATES=true. I'm not touching the database inside this code but I > can say that the fn call in which the fold-left is located does > contain a couple of db:* functions (but they are not in the active > code path). That's all I can offer at the moment. > > I'm happy to do some more digging later but I wanted to post this just > in case it gives someone a hunch and it's only introduced since 8.4.2. > Also tried 8.4.4-SNAPSHOT and there it's broken too. > > Cheers, > --Marc
MG
Marc van Grootel22 Apr 2016 15:36 #
Checked with this new snapshot. It's still occurring.
Will do some more digging on monday.
Thanks,
--Marc
Quoted text · Christian Grün · 38 lines
On Fri, Apr 22, 2016 at 3:21 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Difficult to tell ;) I checked the places where your error message is > triggered. Did you use updating functions in built-in XQuery functions > (for-each, apply, ...)? Does your query run through with the new > snapshot [1]? > > [1] http://files.basex.org/releases/latest/ > > > > > On Fri, Apr 22, 2016 at 2:03 PM, Marc van Grootel > <marc.van.grootel at gmail.com> wrote: >> Hi, >> >> I'm sorry for the vague report. I can do more digging but it's >> happening deep inside some code and it's hard to pinpoint. >> >> In 8.4.3 I get the following error message: >> >> [XPTY0004] Function must not be updating: %updating function($result,$tran.... >> >> In 8.4.2 and before the same code works as expected. >> >> What I can say that it's happening in a fold-left function which in >> it's body uses an xslt transform (using Saxon). I have >> MIXUPDATES=true. I'm not touching the database inside this code but I >> can say that the fn call in which the fold-left is located does >> contain a couple of db:* functions (but they are not in the active >> code path). That's all I can offer at the moment. >> >> I'm happy to do some more digging later but I wanted to post this just >> in case it gives someone a hunch and it's only introduced since 8.4.2. >> Also tried 8.4.4-SNAPSHOT and there it's broken too. >> >> Cheers, >> --Marc
--
--Marc
MG
Marc van Grootel26 Apr 2016 08:54 #
Hi Christian,
This morning wanted to get to the bottom of this but found that with the latest snapshot (23/4) it is fixed (can still repro with 8.4.3 and older snapshots like the 22/4 snapshot).
Unless you think it's worthwhile to try and get a minimal reproducible case for 8.4.3 I can try but as far as this issue goes it seems to be gone now.
Thanks,
--Marc
Quoted text · Marc van Grootel · 51 lines
On Fri, Apr 22, 2016 at 3:36 PM, Marc van Grootel <marc.van.grootel at gmail.com> wrote: > Checked with this new snapshot. It's still occurring. > Will do some more digging on monday. > > Thanks, > --Marc > > On Fri, Apr 22, 2016 at 3:21 PM, Christian Grün > <christian.gruen at gmail.com> wrote: >> Difficult to tell ;) I checked the places where your error message is >> triggered. Did you use updating functions in built-in XQuery functions >> (for-each, apply, ...)? Does your query run through with the new >> snapshot [1]? >> >> [1] http://files.basex.org/releases/latest/ >> >> >> >> >> On Fri, Apr 22, 2016 at 2:03 PM, Marc van Grootel >> <marc.van.grootel at gmail.com> wrote: >>> Hi, >>> >>> I'm sorry for the vague report. I can do more digging but it's >>> happening deep inside some code and it's hard to pinpoint. >>> >>> In 8.4.3 I get the following error message: >>> >>> [XPTY0004] Function must not be updating: %updating function($result,$tran.... >>> >>> In 8.4.2 and before the same code works as expected. >>> >>> What I can say that it's happening in a fold-left function which in >>> it's body uses an xslt transform (using Saxon). I have >>> MIXUPDATES=true. I'm not touching the database inside this code but I >>> can say that the fn call in which the fold-left is located does >>> contain a couple of db:* functions (but they are not in the active >>> code path). That's all I can offer at the moment. >>> >>> I'm happy to do some more digging later but I wanted to post this just >>> in case it gives someone a hunch and it's only introduced since 8.4.2. >>> Also tried 8.4.4-SNAPSHOT and there it's broken too. >>> >>> Cheers, >>> --Marc > > > > -- > --Marc
--
--Marc
CG
Christian Grün26 Apr 2016 09:18 #
Hi Marc,
Sounds good; it seems that the update that has been triggered by your post [1] has solved the problem.
Sorry for all the flip-flopping reg. the MIXUPDATE option. This is the one of the drawbacks of having custom features that haven't been signed off by the splendid W3 XQuery team. But I think we are very close now.
Christian
[1]
https://github.com/BaseXdb/basex/commit/6f05242fc5a1956e9377a53cf46e1367d41ac000
Quoted text · Marc van Grootel · 73 lines
Am 26.04.2016 08:54 schrieb "Marc van Grootel" <marc.van.grootel at gmail.com>: > Hi Christian, > > This morning wanted to get to the bottom of this but found that with > the latest snapshot (23/4) it is fixed (can still repro with 8.4.3 and > older snapshots like the 22/4 snapshot). > > Unless you think it's worthwhile to try and get a minimal reproducible > case for 8.4.3 I can try but as far as this issue goes it seems to be > gone now. > > Thanks, > --Marc > > > On Fri, Apr 22, 2016 at 3:36 PM, Marc van Grootel > <marc.van.grootel at gmail.com> wrote: > > Checked with this new snapshot. It's still occurring. > > Will do some more digging on monday. > > > > Thanks, > > --Marc > > > > On Fri, Apr 22, 2016 at 3:21 PM, Christian Grün > > <christian.gruen at gmail.com> wrote: > >> Difficult to tell ;) I checked the places where your error message is > >> triggered. Did you use updating functions in built-in XQuery functions > >> (for-each, apply, ...)? Does your query run through with the new > >> snapshot [1]? > >> > >> [1] http://files.basex.org/releases/latest/ > >> > >> > >> > >> > >> On Fri, Apr 22, 2016 at 2:03 PM, Marc van Grootel > >> <marc.van.grootel at gmail.com> wrote: > >>> Hi, > >>> > >>> I'm sorry for the vague report. I can do more digging but it's > >>> happening deep inside some code and it's hard to pinpoint. > >>> > >>> In 8.4.3 I get the following error message: > >>> > >>> [XPTY0004] Function must not be updating: %updating > function($result,$tran.... > >>> > >>> In 8.4.2 and before the same code works as expected. > >>> > >>> What I can say that it's happening in a fold-left function which in > >>> it's body uses an xslt transform (using Saxon). I have > >>> MIXUPDATES=true. I'm not touching the database inside this code but I > >>> can say that the fn call in which the fold-left is located does > >>> contain a couple of db:* functions (but they are not in the active > >>> code path). That's all I can offer at the moment. > >>> > >>> I'm happy to do some more digging later but I wanted to post this just > >>> in case it gives someone a hunch and it's only introduced since 8.4.2. > >>> Also tried 8.4.4-SNAPSHOT and there it's broken too. > >>> > >>> Cheers, > >>> --Marc > > > > > > > > -- > > --Marc > > > > -- > --Marc >
Written for BaseX 8.4. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery