Assertion failed with document delete

Bug #859522 reported by Federico Cavalieri
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Federico Cavalieri

Bug Description

The following query causes an assertion failure.
import module namespace doc = "http://www.zorba-xquery.com/modules/store/dynamic/documents";

doc:put("foo", document { <foo>bar</foo> });

(
doc:remove("foo"),
doc:remove("foo")
);

Revision history for this message
Federico Cavalieri (fcavalieri) wrote :
Download full text (3.3 KiB)

<?xml version="1.0" encoding="UTF-8"?>
Zorba API error [zerr:ZAPI0020]: "file:///zorba/test/foo": document already exists in store; raised at /zorba/repository/pulprocessing/src/store/naive/simple_store.cpp:1125
battlezone@M1710-linux:/zorba/build/pulprocessing$ bin/zorba -f -q /zorba/test/test13.xq
<?xml version="1.0" encoding="UTF-8"?>
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(+0xeda63b) [0x1d3b63b]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba16assertion_failedEPKcS1_i+0x22) [0x1d3b6fe]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11simplestore17UpdDeleteDocument5applyEv+0xbf) [0x255e151]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11simplestore9applyListERSt6vectorIPNS0_15UpdatePrimitiveESaIS3_EE+0x57) [0x2542030]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11simplestore7PULImpl12applyUpdatesEb+0xf3) [0x2546f55]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba13apply_updatesEPNS_10CompilerCBEPNS_15dynamic_contextEPNS_14static_contextEPNS_5store3PULERKNS_8QueryLocE+0x371) [0x221f574]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZNK5zorba13ApplyIterator8nextImplERNS_5store10ItemHandleINS1_4ItemEEERNS_9PlanStateE+0x1d5) [0x221f075]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZNK5zorba7BatcherINS_13ApplyIteratorEE11produceNextERNS_5store10ItemHandleINS3_4ItemEEERNS_9PlanStateE+0x9f) [0x22233f9]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba12PlanIterator11consumeNextERNS_5store10ItemHandleINS1_4ItemEEEPKS0_RNS_9PlanStateE+0x79) [0x2206b77]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZNK5zorba18SequentialIterator8nextImplERNS_5store10ItemHandleINS1_4ItemEEERNS_9PlanStateE+0xec) [0x23c3982]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZNK5zorba7BatcherINS_18SequentialIteratorEE11produceNextERNS_5store10ItemHandleINS3_4ItemEEERNS_9PlanStateE+0x9f) [0x23d2b69]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba12PlanIterator11consumeNextERNS_5store10ItemHandleINS1_4ItemEEEPKS0_RNS_9PlanStateE+0x79) [0x2206b77]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11PlanWrapper4nextERNS_5store10ItemHandleINS1_4ItemEEE+0xa0) [0x220655e]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba10serializer9serializeENS_8rchandleINS_5store8IteratorEEERSoPNS_19SAX2_ContentHandlerE+0x295) [0x19e684f]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba10serializer9serializeENS_8rchandleINS_5store8IteratorEEERSo+0x46) [0x19e6590]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba10XQueryImpl9serializeERSoRNS_8rchandleINS_11PlanWrapperEEEPK23Zorba_SerializerOptions+0x9c) [0x198bce0]
/zorba/build/pulprocessing/src/libzorba_simplestore.so.2.0.1(_ZN5zorba10XQueryImpl7executeERSoPK23Zorba_SerializerOptions+0xcd) [0x198b0eb]
bin/zorba(_Z17compileAndExecutePN5zorba5ZorbaERK18ZorbaCMDPropertiesRNS_8SmartPtrINS_13StaticContextEEERKSsRSiRSoR10TimingInfo+0x4e4) [0x805a3e2]
bin/zorba(main+0xd41) [0x805b6cc]
/lib/i386-linux-gnu/libc.so.6(__libc_star...

Read more...

visibility: private → public
Changed in zorba:
importance: Undecided → Medium
assignee: nobody → Federico Cavalieri (fcavalieri)
Changed in zorba:
status: New → Fix Released
Changed in zorba:
status: Fix Released → Fix Committed
milestone: none → 2.1
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

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