lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
535 stars 192 forks source link

Connecting to multiple lua sqlite3 databases #90

Open Aditya23456 opened 6 years ago

Aditya23456 commented 6 years ago

Hi,

I am running lua lanes and have 2 threads running. Each thread connects to its own database but I don't know why but entry into my 2nd database fails SOMETIMES with error "No such table" or "lua sql logic error or missing db". My 2nd database is on a USB drive which is mounted before the software runs. Does this cause any issue? This error is kinda rare like once every 6 to 8 insert operations(Hence sql logic error seems to be incorrect message). Does anyone know how to solve it? I created 2 different variables in my threads env and env2 and created 2 different conn and conn2 connection variables but still somehow I cant solve it.

Thanks, Aditya