Keep a reference to the connection before the prepare statement is put on the command queue.

This should fix a race condition when a prepare is called right before the
db connection is garbage collected.
This commit is contained in:
Maas-Maarten Zeeman
2017-02-22 22:03:26 +01:00
parent 3d546ff8a4
commit 785903ae6d
3 changed files with 14 additions and 9 deletions

View File

@@ -1,9 +1,9 @@
%% @author Maas-Maarten Zeeman <mmzeeman@xs4all.nl>
%% @copyright 2011, 2012, 2013 Maas-Maarten Zeeman
%% @copyright 2011 - 2017 Maas-Maarten Zeeman
%% @doc Erlang API for sqlite3 databases
%% Copyright 2011, 2012 Maas-Maarten Zeeman
%% Copyright 2011 - 2017 Maas-Maarten Zeeman
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.

View File

@@ -1,9 +1,9 @@
%% @author Maas-Maarten Zeeman <mmzeeman@xs4all.nl>
%% @copyright 2011, 2012, 2013 Maas-Maarten Zeeman
%% @copyright 2011 - 2017 Maas-Maarten Zeeman
%% @doc Low level erlang API for sqlite3 databases
%% Copyright 2011, 2012, 2013, 2014 Maas-Maarten Zeeman
%% Copyright 2011 - 2017 Maas-Maarten Zeeman
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.