Hi Christian,
Thanks for the quick response. Just started another test with the latest snapshot.
In the meantime I tried a patched version yesterday and stumbled upon another issue. One of our queries did something like this (snippet simplified for readability):
for $item in /somepath/someitemelement let $lmd as xs:dateTime := $item/value[@xsi:type="xs:dateTime"] let $dur := $now - $lmd where $dur > $itemMaxAge return $dur }
<somepath> <someitemelement> <value xsi:type="xs:dateTime">2012-11-14T13:02:23Z</value> </someitemelement> </somepath>
Now in 7.2.1 and in 7.3 the construct above would work i.e. * let $lmd as xs:dateTime was OK * the conversion from the <value> element to a dateTime value worked
In the current snapshot I had to change that query. Things that worked are: * let $lmd := xs:dateTime($item/value[@xsi:type="xs:dateTime"]/text()) * let $lmd := $item/value[@xsi:type="xs:dateTime"] cast as xs:dateTime
Now questions: 1. Was the query above wrong? 2. Which of the suggested new versions will be the fastest? The first "feels" like a double cast dateTime->string->dateTime. 3. What is the cleanest way to get a log with actual queries. I use tcpdump now, which is rather ugly. I tried the standard Tomcat's RequestDumperFilter, but it prints all the request information *apart* from the body. Do I have to write my own filter, as the guy on Stackoverlow did:
http://stackoverflow.com/questions/1528628/logging-payload-of-posts-to-tomca...
-- Antoni Myłka Software Engineer
basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22 http://www.basis06.ch - source of smart business
----- Ursprüngliche Mail ----- Von: "Christian Grün" christian.gruen@gmail.com An: "Antoni Mylka" amy@basis06.ch CC: "basex-talk" basex-talk@mailman.uni-konstanz.de Gesendet: Mittwoch, 14. November 2012 00:34:47 Betreff: Re: [basex-talk] Database corruption
Hi Antoni,
to start bottom up.. It feels as if you already know our code base quite well ;) Your description of the bug and the reasons for the changes in the code were absolutely right. I didn't manage to merge your patch out-of-box, but I adopted the general idea [1], which means the problem should now be resolved.
By the way, we are planning to add support for our XML command syntax to the REST API [2]. Beside that, you could also use the PUT method in order to add documents to a database [3]; but I assume you already though about that anyway.
Your feedback is welcome, thanks again, Christian
[1] https://github.com/BaseXdb/basex/commit/d4abedd2080d98897533ed3c3329ac7030c5... [2] https://github.com/BaseXdb/basex/issues/559 [3] http://docs.basex.org/wiki/REST#PUT_Requests