Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite3 execute sql with begin / end transaction nothing is executed #150

Open
wmasilva opened this issue Dec 28, 2022 · 0 comments
Open

Comments

@wmasilva
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant