Zorba Internal Fatal error when applying a PUL changes the type of a typed node

Bug #912586 reported by Federico Cavalieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Cezar Andrei

Bug Description

If a PUL changes the type of a typed node there is a Zorba Internal Fatal error when applying.

Query

import schema namespace d="http://www.zorba-xquery.org/schema" at "upd14.xsd";

declare revalidation lax;

declare variable $doc:=validate{<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.zorba-xquery.org/schema">
    <a attr="12"/>
    <b>
        <bb/>
    </b>
    <c/>
</root>};

rename node $doc//d:b as fn:QName("http://www.zorba-xquery.org/schema", "newb");

Schema

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.zorba-xquery.org/schema" xmlns="http://www.zorba-xquery.org/schema"
    elementFormDefault="qualified">

    <xs:element name="root" type="rootType"/>

    <xs:complexType name="rootType">
        <xs:sequence>
            <xs:element name="a" type="aType"/>
            <xs:choice>
                <xs:element name="b" type="bType"/>
                <xs:element name="newb" type="newbType"/>
            </xs:choice>
            <xs:element name="c" type="cType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="aType">
        <xs:attribute name="attr" type="xs:int"/>
    </xs:complexType>
    <xs:complexType name="bType">
        <xs:sequence>
            <xs:element name="bb" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="newbType">
        <xs:restriction base="xs:string">
            <xs:maxLength value="50"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="cType">
        <xs:restriction base="xs:string">
            <xs:maxLength value="50"/>
        </xs:restriction>
    </xs:simpleType>

</xs:schema>

Related branches

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

/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e8f99) [0x7ff30bbf5f99]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e9066) [0x7ff30bbf6066]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1217b7d) [0x7ff30c424b7d]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1255aa3) [0x7ff30c462aa3]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x123d9cc) [0x7ff30c44a9cc]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x12435b2) [0x7ff30c4505b2]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1245603) [0x7ff30c452603]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x124333d) [0x7ff30c45033d]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xeefb9e) [0x7ff30c0fcb9e]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xeef631) [0x7ff30c0fc631]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xef3cf2) [0x7ff30c100cf2]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7ff30c0e3539]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10a689d) [0x7ff30c2b389d]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10b627c) [0x7ff30c2c327c]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7ff30c0e3539]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed5f1a) [0x7ff30c0e2f1a]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669751) [0x7ff30b876751]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669455) [0x7ff30b876455]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x60a83d) [0x7ff30b81783d]
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x609aaa) [0x7ff30b816aaa]
/home/federico/zorba/build/bugs2/bin/zorba() [0x41224c]
/home/federico/zorba/build/bugs2/bin/zorba() [0x4135bd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7ff30a54d30d]
/home/federico/zorba/build/bugs2/bin/zorba() [0x410099]
Zorba Internal Fatal Error in /home/federico/zorba/repository/bugs2/src/store/naive/simple_pul.cpp:1717:
"0": condition failed: Unexpected error during application of revalidation PUL
./why-fail.sh: line 20: 24998 Aborted $BASEDIR/build/$STR/bin/zorba -f -q $line > $BASEDIR/testing/actual.xml
---------------------------------
COMMAND LINE: /home/federico/zorba/build/bugs2/bin/zorba -f -q /home/federico/zorba/repository/bugs2/./test/rbkt/Queries/zorba/updates/upd14.xq
---------------------------------

Changed in zorba:
assignee: Federico Cavalieri (fcavalieri) → Cezar Andrei (cezar-andrei)
Changed in zorba:
milestone: none → 2.2
Changed in zorba:
milestone: 2.2 → 2.5
Changed in zorba:
status: New → Fix Committed
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.