zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #05579
[Merge] lp:~zorba-coders/zorba/bug-943788 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-943788 into lp:zorba.
Requested reviews:
Matthias Brantner (matthias-brantner)
Till Westmann (tillw)
Related bugs:
Bug #943788 in Zorba: "streamable string is not seekable"
https://bugs.launchpad.net/zorba/+bug/943788
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-943788/+merge/95309
fix for bug #943788 (streamable string is not seekable)
--
https://code.launchpad.net/~zorba-coders/zorba/bug-943788/+merge/95309
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2012-02-29 17:15:09 +0000
+++ ChangeLog 2012-03-01 04:07:22 +0000
@@ -51,6 +51,7 @@
* Fixed bug #917981 (disallow declaring same module twice).
* Added API method StaticContext::getNamespaceBindings() (see bug #905035)
* Deprecated StaticContext:getNamespaceURIByPrefix()
+ * Fixed bug #943788 (streamable string is not seekable)
* Fixed bug 921624 (slow queries with bogus example.com schema URIs)
* Fixed bug #918211 (xqueryx fulltext w3c conformance generation)
* Fixed bug #918157 (Add XQFTTS to validation queue)
=== modified file 'modules/org/expath/ns/file.xq.src/file.cpp'
--- modules/org/expath/ns/file.xq.src/file.cpp 2012-02-28 20:45:43 +0000
+++ modules/org/expath/ns/file.xq.src/file.cpp 2012-03-01 04:07:22 +0000
@@ -215,7 +215,7 @@
}
lFile->openInputStream(*lInStream.get(), false, true);
lResult = theModule->getItemFactory()->createStreamableString(
- *lInStream.release(), &FileModule::streamReleaser
+ *lInStream.release(), &FileModule::streamReleaser, true
);
return ItemSequence_t(new SingletonItemSequence(lResult));
=== modified file 'src/store/naive/atomic_items.cpp'
--- src/store/naive/atomic_items.cpp 2012-02-29 17:15:09 +0000
+++ src/store/naive/atomic_items.cpp 2012-03-01 04:07:22 +0000
@@ -1787,6 +1787,7 @@
std::streambuf * pbuf;
pbuf = theIstream.rdbuf();
pbuf->pubseekoff(0, std::ios::beg);
+ theIstream.clear();
}
theIsConsumed = true;
return theIstream;
=== added file 'test/rbkt/ExpQueryResults/zorba/file/streamability4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/file/streamability4.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/file/streamability4.xml.res 2012-03-01 04:07:22 +0000
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<products>
+ <product>
+ <name>broiler</name>
+ <category>kitchen</category>
+ <price>100</price>
+ <cost>70</cost>
+ </product>
+ <product>
+ <name>toaster</name>
+ <category>kitchen</category>
+ <price>30</price>
+ <cost>10</cost>
+ </product>
+ <product>
+ <name>blender</name>
+ <category>kitchen</category>
+ <price>50</price>
+ <cost>25</cost>
+ </product>
+ <product>
+ <name>socks</name>
+ <category>clothes</category>
+ <price>10</price>
+ <cost>2</cost>
+ </product>
+ <product>
+ <name>shirt</name>
+ <category>clothes</category>
+ <price>10</price>
+ <cost>3</cost>
+ </product>
+</products>642
=== added file 'test/rbkt/Queries/zorba/file/streamability4.xq'
--- test/rbkt/Queries/zorba/file/streamability4.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/file/streamability4.xq 2012-03-01 04:07:22 +0000
@@ -0,0 +1,6 @@
+import module namespace f = "http://expath.org/ns/file";;
+
+let $s := f:read-text(fn:resolve-uri("mydata.xml"))
+let $p := fn:parse-xml($s)
+let $l := fn:string-length($s)
+return ($p, $l)
Follow ups