Skip to content

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

Open
@wmasilva

Description

@wmasilva

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions