Merge lp:~paul-lucas/zorba/bug-1188100 into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 11497
Merged at revision: 11494
Proposed branch: lp:~paul-lucas/zorba/bug-1188100
Merge into: lp:zorba
Diff against target: 118 lines (+10/-17)
5 files modified
ChangeLog (+1/-0)
modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq (+2/-3)
modules/org/expath/ns/file.xq (+1/-1)
src/runtime/strings/strings_impl.cpp (+6/-11)
test/fots/CMakeLists.txt (+0/-2)
To merge this branch: bzr merge lp:~paul-lucas/zorba/bug-1188100
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+167826@code.launchpad.net

Commit message

Now converting regex in fn:tokenize().

Description of the change

Now converting regex in fn:tokenize().

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-1188100 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 (message):
  Validation queue job bug-1188100-2013-06-06T18-37-44.259Z is finished. The
  final status was:

  5 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-1188100 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 (message):
  Validation queue job bug-1188100-2013-06-06T21-23-43.673Z is finished. The
  final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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 bug-1188100-2013-06-07T02-44-46.144Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-1188100 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 (message):
  Validation queue job bug-1188100-2013-06-07T03-25-40.447Z is finished. The
  final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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 bug-1188100-2013-06-07T05-28-43.84Z 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
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-06-03 23:05:34 +0000
3+++ ChangeLog 2013-06-07 02:41:30 +0000
4@@ -22,6 +22,7 @@
5 * Fixed implementation of fn:deep-equal according to latest W3C spec.
6 * Must apply document ordering on the domain expression of a FOR clause, if
7 the FOR clause is followed by a sequential clause.
8+ * Fixed bug #1188100 (regex issues with 'q' flag in fn:tokenize)
9 * Fixed invalid memory access error occuring during sequence type matching
10 for user-defined types.
11
12
13=== modified file 'modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq'
14--- modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq 2013-02-07 17:24:36 +0000
15+++ modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq 2013-06-07 02:41:30 +0000
16@@ -186,8 +186,7 @@
17
18 for $file in file:list($sourcePath, fn:true(), fn:concat("*.", $extension))
19
20- let $fileName :=
21- fn:tokenize($file, fn:concat("\", file:directory-separator()))[last()]
22+ let $fileName := file:base-name($file)
23
24 let $fileSourcePath := fn:concat($sourcePath, file:directory-separator(), $file)
25
26@@ -937,7 +936,7 @@
27
28 declare %private function xqdoc2html:get-example-filename-link($examplePath as xs:string) as xs:string
29 {
30- fn:tokenize($examplePath,fn:concat("\",file:directory-separator()))[last()]
31+ file:base-name($examplePath)
32 };
33
34 declare %private function xqdoc2html:add-images(
35
36=== modified file 'modules/org/expath/ns/file.xq'
37--- modules/org/expath/ns/file.xq 2013-04-19 22:25:21 +0000
38+++ modules/org/expath/ns/file.xq 2013-06-07 02:41:30 +0000
39@@ -630,7 +630,7 @@
40 $pattern as xs:string
41 ) as xs:string* {
42 for $file in file:list($path, $recursive)
43- let $name := fn:tokenize($file, fn:concat("\", file:directory-separator()))[fn:last()]
44+ let $name := file:base-name($file)
45 return
46 if (fn:matches($name, file:glob-to-regex($pattern))) then
47 $file
48
49=== modified file 'src/runtime/strings/strings_impl.cpp'
50--- src/runtime/strings/strings_impl.cpp 2013-05-09 00:21:51 +0000
51+++ src/runtime/strings/strings_impl.cpp 2013-06-07 02:41:30 +0000
52@@ -1688,10 +1688,9 @@
53 store::Item_t& result,
54 PlanState& planState) const
55 {
56- zstring token;
57+ zstring pattern, token;
58 store::Item_t item;
59 bool tmp;
60- zstring strval;
61 unicode::string u_string;
62
63 FnTokenizeIteratorState* state;
64@@ -1699,28 +1698,24 @@
65
66 if (consumeNext(item, theChildren[0].getp(), planState))
67 {
68- item->getStringValue2(strval);
69- state->theString = strval.str();
70+ item->getStringValue2(state->theString);
71 }
72
73 if (!consumeNext(item, theChildren[1].getp(), planState))
74 ZORBA_ASSERT(false);
75
76- item->getStringValue2(strval);
77- state->thePattern = strval.str();
78+ item->getStringValue2(pattern);
79
80 if(theChildren.size() == 3)
81 {
82 if (!consumeNext(item, theChildren[2].getp(), planState))
83 ZORBA_ASSERT (false);
84-
85- item->getStringValue2(strval);
86-
87- state->theFlags = strval.str();
88+ item->getStringValue2(state->theFlags);
89 }
90
91 try
92 {
93+ convert_xquery_re( pattern, &state->thePattern, state->theFlags.c_str() );
94 static zstring const empty;
95 tmp = utf8::match_part( empty, state->thePattern, state->theFlags );
96 }
97@@ -1732,7 +1727,7 @@
98
99 if(tmp)
100 throw XQUERY_EXCEPTION(
101- err::FORX0003, ERROR_PARAMS( state->thePattern ), ERROR_LOC( loc )
102+ err::FORX0003, ERROR_PARAMS( pattern ), ERROR_LOC( loc )
103 );
104
105
106
107=== modified file 'test/fots/CMakeLists.txt'
108--- test/fots/CMakeLists.txt 2013-06-05 15:06:53 +0000
109+++ test/fots/CMakeLists.txt 2013-06-07 02:41:30 +0000
110@@ -167,8 +167,6 @@
111 EXPECTED_FOTS_FAILURE (fn-serialize serialize-xml-008 0)
112 EXPECTED_FOTS_FAILURE (fn-string-length fn-string-length-22 0)
113 EXPECTED_FOTS_FAILURE (fn-string-length fn-string-length-24 0)
114-EXPECTED_FOTS_FAILURE (fn-tokenize fn-tokenize-31 0)
115-EXPECTED_FOTS_FAILURE (fn-tokenize fn-tokenize-32 0)
116 EXPECTED_FOTS_FAILURE (fn-unparsed-text fn-unparsed-text-038 0)
117 EXPECTED_FOTS_FAILURE (fn-unparsed-text fn-unparsed-text-039 0)
118 EXPECTED_FOTS_FAILURE (fn-unparsed-text fn-unparsed-text-042 0)

Subscribers

People subscribed via source and target branches