lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.

Scott