26 Jul
2012
26 Jul
'12
4:14 a.m.
I'm still seeing this problem (Database
'PUB_feed_libx_dot_editions_at_gmail...' is currently opened by another
client).
I was able to connect via org.basex.BaseXClient to the database and saw,
via 'SHOW SESSIONS', that the database in question was listed like so:
> SHOW SESSIONS
3 session(s):
- admin [127.0.0.1:35515]:
ts_20120725_dot_213235_dot_723_feed_libx_dot_editions_at_gmail_dot_com_core
- admin [127.0.0.1:37210]
- admin [127.0.0.1:44610]: PUB_feed_libx_dot_editions_at_gmail_dot_com_core
>From the code in Sessions.java/Context.java, I inferred that the db in
question ('PUB_feed_libx_dot_editions_at_gmail_dot_com_core') was the
'current data reference' of session :44610.
How can that be?
As a reminder, I'm not using any 'OPEN' commands...
So I've examined the logs when this db became the 'current' database of
that session, and that, apparently, happened when it was created:
13:58:21.113 [127.0.0.1:44610]:
ts_20120725_dot_135820_dot_723_feed_libx_dot_editions_at_gmail_dot_com_core
CREATE DB PUB_feed_libx_dot_editions_at_gmail_dot_com_core [...]
13:58:21.164 [127.0.0.1:44610]:
PUB_feed_libx_dot_editions_at_gmail_dot_com_core OK 50.95 ms
Is this an undocumented side-effect of 'CREATE DB'?
Is it necessary to follow every 'CREATE DB...' statement with a 'CLOSE'
statement to avoid that the session in which the db was created keeps it
open? It is not mentioned here:
http://docs.basex.org/wiki/Commands#CREATE_DB
If true, I find this rather unusual - and certainly unexpected - it would
be as if a 'CREATE DATABASE' statement in SQL automatically issued a
'USE'... command.
- Godmar