luasql icon indicating copy to clipboard operation
luasql copied to clipboard

sqlite3 execute sql with begin / end transaction nothing is executed

Open wmasilva opened this issue 2 years ago • 0 comments

hi, i'm trying to do multiple inserts using a single execution / transaction, but when executing a statement with begin transaction the driver don't insert any data... if i call the inserts one by one no problem.

i try playing with setautocommit (true/false) method but same results..

Is there a limitation to execute sql with begin/end transaction?

The sqlite3 interface from the command line it works ok:

sqlite3 /dev/shm/test.db "begin transaction; insert into tableTest (id, name) values (2, 'some name'); insert into tableTest (id, name) values (3, 'some name'); end transaction;"

Attach my test script. I'm running it on debian 11.6 (bullseye), using backports version of lua-sql-sqlite3:amd64 2.6.0-2+1.

Thanks for the help. test-lusql-sqlite3-transaction.lua.txt

wmasilva avatar Dec 28 '22 16:12 wmasilva