[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaSQL connections closing
- From: Scott Morgan <blumf@...>
- Date: Mon, 20 May 2013 12:16:51 +0100
On 20/05/13 06:11, Vadim Peretokin wrote:
> Has anyone who has used LuaSQL <http://www.keplerproject.org/luasql/>
> ran into a problem where open connections get involuntarily closed? I
> keep a connection open per database and only close them on application
> exit - yet on some machines :execute() statements start failing due to
> the connection being closed (/"calling 'execute' on bad self (LuaSQL:
> connection is closed)>/").
As far as I can see on the LuaSQL SQLite drivers, the only ways to get
that message is to call the connection:close() method or have the
connection garbage collected (held in a weak table?)
It would be nice to be able to edit the connection's metatable so you
can trace when those events happen but LuaSQL locks it as standard.