Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11064
Merged at revision: 11379
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 106 lines (+47/-17)
3 files modified
ChangeLog (+2/-0)
src/store/naive/node_items.cpp (+45/-16)
test/fots/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+159349@code.launchpad.net

Commit message

fixed bug in raising XQTY0086 (copying of namespace-sensitive values during node construction)

Description of the change

fixed bug in raising XQTY0086 (copying of namespace-sensitive values during node construction)

To post a comment you must log in.
11064. By Markos Zaharioudakis

fixed bug in raising XQTY0086 (copying of namespace-sensitive values during node construction

Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job markos-scratch-2013-04-17T12-46-53.592Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2013-04-16 13:34:59 +0000
+++ ChangeLog 2013-04-17 12:40:44 +0000
@@ -69,6 +69,8 @@
69 * Fixed bug #1023168 (Non-single-char-escapes in regex character ranges not69 * Fixed bug #1023168 (Non-single-char-escapes in regex character ranges not
70 caught)70 caught)
71 * Throw XQST0048 for groupby clause, as specified by XQuery 3.0.71 * Throw XQST0048 for groupby clause, as specified by XQuery 3.0.
72 * Fixed bug in raising XQTY0086 (copying of namespace-sensitive values during
73 node construction).
72 * Fixed bug #866874 (regex "range subtraction" not supported for ICU)74 * Fixed bug #866874 (regex "range subtraction" not supported for ICU)
73 * Fixed bug in computing the static type of an allowing-empty FOR variable.75 * Fixed bug in computing the static type of an allowing-empty FOR variable.
74 * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat)76 * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat)
7577
=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp 2013-04-08 08:54:50 +0000
+++ src/store/naive/node_items.cpp 2013-04-17 12:40:44 +0000
@@ -2517,15 +2517,28 @@
2517 }2517 }
2518 else // ! nsPreserve2518 else // ! nsPreserve
2519 {2519 {
2520 if (copymode.theTypePreserve)2520 if (copymode.theTypePreserve && haveTypedValue())
2521 {2521 {
2522 store::Item* typeName = getType();2522 store::Item_t typedValue;
25232523 store::Iterator_t typedValues;
2524 if (typeName != NULL &&2524 getTypedValue(typedValue, typedValues);
2525 (typeName->equals(GET_STORE().theSchemaTypeNames[store::XS_QNAME]) ||2525
2526 typeName->equals(GET_STORE().theSchemaTypeNames[store::XS_NOTATION])))2526 if (typedValue != NULL)
2527 {2527 {
2528 throw XQUERY_EXCEPTION(err::XQTY0086);2528 store::SchemaTypeCode typecode = typedValue->getTypeCode();
2529
2530 if (typecode == store::XS_QNAME || typecode == store::XS_NOTATION)
2531 throw XQUERY_EXCEPTION(err::XQTY0086);
2532 }
2533 else if (typedValues != NULL)
2534 {
2535 while (typedValues->next(typedValue))
2536 {
2537 store::SchemaTypeCode typecode = typedValue->getTypeCode();
2538
2539 if (typecode == store::XS_QNAME || typecode == store::XS_NOTATION)
2540 throw XQUERY_EXCEPTION(err::XQTY0086);
2541 }
2529 }2542 }
2530 }2543 }
25312544
@@ -3991,16 +4004,32 @@
39914004
3992 bool isListValue;4005 bool isListValue;
39934006
3994 if (parent == rootParent &&
3995 typeName != NULL &&
3996 (typeName->equals(GET_STORE().theSchemaTypeNames[store::XS_QNAME]) ||
3997 typeName->equals(GET_STORE().theSchemaTypeNames[store::XS_NOTATION])))
3998 {
3999 throw XQUERY_EXCEPTION(err::XQTY0086);
4000 }
4001
4002 if (copymode.theTypePreserve)4007 if (copymode.theTypePreserve)
4003 {4008 {
4009 if ((parent == rootParent || copymode.theNsPreserve == false) &&
4010 typeName != NULL)
4011 {
4012 if (theTypedValue->isAtomic())
4013 {
4014 store::SchemaTypeCode typecode = theTypedValue->getTypeCode();
4015
4016 if (typecode == store::XS_QNAME || typecode == store::XS_NOTATION)
4017 throw XQUERY_EXCEPTION(err::XQTY0086);
4018 }
4019 else
4020 {
4021 const std::vector<store::Item_t>& values = getValueVector().getItems();
4022 csize numValues = values.size();
4023 for (csize i = 0; i < numValues; ++i)
4024 {
4025 store::SchemaTypeCode typecode = values[i]->getTypeCode();
4026
4027 if (typecode == store::XS_QNAME || typecode == store::XS_NOTATION)
4028 throw XQUERY_EXCEPTION(err::XQTY0086);
4029 }
4030 }
4031 }
4032
4004 typedValue = theTypedValue;4033 typedValue = theTypedValue;
4005 isListValue = haveListValue();4034 isListValue = haveListValue();
4006 }4035 }
40074036
=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt 2013-04-17 11:11:24 +0000
+++ test/fots/CMakeLists.txt 2013-04-17 12:40:44 +0000
@@ -239,7 +239,6 @@
239EXPECTED_FOTS_FAILURE (math-acos math-acos-003 0)239EXPECTED_FOTS_FAILURE (math-acos math-acos-003 0)
240EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0085 0)240EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0085 0)
241EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0093a 0)241EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0093a 0)
242EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQTY0086_3 0)
243EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-1 0)242EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-1 0)
244EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-2 0)243EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-2 0)
245EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-3 0)244EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-3 0)

Subscribers

People subscribed via source and target branches