diff --git a/src/sqlite3.erl b/src/sqlite3.erl index 6e5fa47..b69ecd7 100644 --- a/src/sqlite3.erl +++ b/src/sqlite3.erl @@ -832,9 +832,9 @@ handle_call({write, Tbl, Data}, _From, State) -> {reply, {error, Exception}, State} end; handle_call({write_many, Tbl, DataList}, _From, State) -> - SQLScript = ["BEGIN;", - [sqlite3_lib:write_sql(Tbl, Data) || Data <- DataList], - "COMMIT;"], + SQLScript = ["SAVEPOINT 'erlang-sqlite3-write_many';", + [sqlite3_lib:write_sql(Tbl, Data) || Data <- DataList], + "RELEASE SAVEPOINT 'erlang-sqlite3-write_many';"], Reply = do_sql_exec_script(SQLScript, State), {reply, Reply, State}; handle_call({read, Tbl}, _From, State) ->