Hi,

 

When I run the following query with BaseX 8.2.3 or 8.3, and I have a certain database open, the optimized query is empty, so there are no results.

 

let $x := 'x'

let $doc := <root><el attr="x;y"/></root>

return $doc//el[contains(@attr,$x)]

 

This seems like a bug. If I close the database (which is not even being referenced in this query), open a different database, or replace $x in the last line with the literal string value, ‘x’, then I get the result I expect. The database that exhibits the problem and the database that doesn’t exhibit the problem differ in the kinds of XML files in them and the indexes that are available for them.

 

Does anyone know why the open database should affect the result of a query that doesn’t reference the database?

 

Thanks,

Amanda