BaseX 10.1 bug in GET command?

Tuesday, 27 September 2022 · 2 messages
GL
Gabriel Lorenzo27 Sep 2022 09:32 #

Hello,

I think I've found a possible bug. When I use the GET command the document retrieved is not always the same I requested. It only happens with the GET command, as using db:get() from xquery always works as expected. I haven't observed it happening with BINARY GET.

I've reproduced it with the simplest example:

BaseX 10.1 [Client]Try 'help' to get more information.

Quoted text · 1 line
> create db sample

Database 'sample' created in 14.0 ms.

Quoted text · 1 line
> open sample

Database 'sample' was opened in 0.03 ms.

Quoted text · 1 line
> add to hello.xml <hello>world</hello>

Resource(s) added in 2.25 ms.

Quoted text · 1 line
> add to goodbye.xml <goodbye>world</goodbye>

Resource(s) added in 2.22 ms.

Quoted text · 1 line
> get hello.xml
<goodbye>world</goodbye>Query executed in 0.18 ms.
Quoted text · 1 line
> get goodbye.xml
<hello>world</hello>Query executed in 0.19 ms.
Quoted text · 1 line
> xquery db:get('sample','hello.xml')

<hello>world</hello> Query "BaseX" executed in 0.64 ms.

Quoted text · 1 line
> xquery db:get('sample','goodbye.xml')

<goodbye>world</goodbye> Query "BaseX" executed in 0.23 ms.

Quoted text · 1 line
>

I'm using BaseX 10.1 on Windows 10 with OpenJDK Temurin-17.0.4.1+1

Regards, Gabriel Lorenzo

CG
Christian Grün27 Sep 2022 15:37 #

Thanks, Gabriel, for the reproducible example. A new snapshot is online [1]. BaseX 10.2 will be released later this week. – Best, Christian

[1] https://files.basex.org/releases/latest/

Quoted text · Gabriel Lorenzo · 34 lines
On Tue, Sep 27, 2022 at 9:33 AM Gabriel Lorenzo <jglorenzo at protonmail.com> wrote: > > Hello, > > I think I've found a possible bug. When I use the GET command the document retrieved is not always the same I requested. It only happens with the GET command, as using db:get() from xquery always works as expected. I haven't observed it happening with BINARY GET. > > I've reproduced it with the simplest example: > > BaseX 10.1 [Client]Try 'help' to get more information. > > create db sample > Database 'sample' created in 14.0 ms. > > open sample > Database 'sample' was opened in 0.03 ms. > > add to hello.xml <hello>world</hello> > Resource(s) added in 2.25 ms. > > add to goodbye.xml <goodbye>world</goodbye> > Resource(s) added in 2.22 ms. > > get hello.xml > <goodbye>world</goodbye>Query executed in 0.18 ms. > > get goodbye.xml > <hello>world</hello>Query executed in 0.19 ms. > > xquery db:get('sample','hello.xml') > <hello>world</hello> > Query "BaseX" executed in 0.64 ms. > > xquery db:get('sample','goodbye.xml') > <goodbye>world</goodbye> > Query "BaseX" executed in 0.23 ms. > > > > I'm using BaseX 10.1 on Windows 10 with OpenJDK Temurin-17.0.4.1+1 > > Regards, > Gabriel Lorenzo

⚡Generated with XQuery