External updating function illegal here only in debug mode

Bug #867195 reported by Federico Cavalieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Federico Cavalieri

Bug Description

The following query declares an updating function which invokes an external updating function.
The actual updating function called does not seems to be relevant.

import module namespace doc = "http://www.zorba-xquery.com/modules/store/dynamic/documents";
declare updating function local:aaa($uri)
{
doc:put($uri, document{element{"a"}{"a"}})
};
local:aaa("http://aaa");
doc:document("http://aaa")

In debug mode:
</home/battlezone/workspace/SmallTests/Test.xq>:5,1: update static error [err:XUST0001]: updating expression illegal here; raised at /zorba/pulsrc/src/compiler/expression/expr_base.cpp:99

In release mode:
<?xml version="1.0" encoding="UTF-8"?>
<a>a</a>

Tags: debugger
Revision history for this message
Federico Cavalieri (fcavalieri) wrote :

Optimization modes have no effect on the outcome of the query

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

I don't get the error. I get <a>a</a>. Can you try this again?

Revision history for this message
Federico Cavalieri (fcavalieri) wrote :

I have tried on Gabriel machine (windows, mine is linux) and we sitll get the error.
CTRL+F11(Relese) OK F11 (Debug) OK
We are using eclipse to invoke the debug mode.

Revision history for this message
Federico Cavalieri (fcavalieri) wrote :

Sorry
CTRL+F11(Relese) OK F11 (Debug) Error

Revision history for this message
nobody (nobody-users) wrote :

This is how to reproduce it from the command-line:

battlezone@M1710-linux:/zorba/pulbuild$ bin/zorba -f -q /home/battlezone/workspace/SmallTests/Test.xq
<?xml version="1.0" encoding="UTF-8"?>
<a>a</a>

battlezone@M1710-linux:/zorba/pulbuild$ bin/zorba --debug -f -q /home/battlezone/workspace/SmallTests/Tes
</home/battlezone/workspace/SmallTests/Test.xq>:4,1: update static error [err:XUST0001]: updating expression illegal here; raised at /zorba/pulsrc/src/compiler/expression/expr_base.cpp:99

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Gabriel, this problem happens if the query is run in debug mode (e.g. started by XQDT). It's crucial for Federico to debug such kind of queries. Could you please look into it.

Revision history for this message
Gabriel Petrovay (gabipetrovay) wrote :

Fixed in 12098.
Please check and close.

Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.