Stu Tomlinson
bcfbeaac80
Do not link to sqlite3 on macos
...
On macos (darwin), sqlite3 is embedded using "the amalgamation". There
is therefore no need to link to the system sqlite3, and doing so can
cause unexpected behaviour/failures.
Also be explicit about darwin vs. non-darwin port_specs sources.
rebar3 seems to get confused when compiling under eunit command sometimes
2020-12-18 11:43:02 +00:00
Paweł Chmielowski
093dedefa7
Fix compilation on macos 11.0
2020-12-10 14:56:46 +01:00
Paweł Chmielowski
c31585341e
Remove erl_interface include, it's not required and causes problems on 23
2020-05-22 09:30:18 +02:00
Aram Antonyan
b054133c87
Fixed compile warning
...
When you compile project it returns following warning:
> c_src/sqlite3_drv.c: In function ‘exec_async_command’:
> c_src/sqlite3_drv.c:459:7: warning: too many arguments for format
> [-Wformat-extra-args]
LOG_ERROR("driver_async call failed", 0);
This patch fixes mentioned warning.
2016-05-09 18:19:53 +00:00
Chris Parker
003aa8a31a
Fixed issue #42
...
Mac OS X hash.c issue.
2016-02-22 01:03:40 -06:00
Drew Varner
0fe21c9039
Add 17.4 support
...
Erlang 17.4 added a new driver entry, `emergency_close`. This
patch tests for it by driver versions and adds an initializer if
necessary. This patch also adds new Erlang versions to the Travis CI config
to test the new driver field.
2015-08-09 10:19:38 -04:00
Sergey Abramyan
84cd542eb0
Add get changes
2015-03-15 23:51:33 +03:00
Alexey Romanov
a4f1d990a0
Improved initial connection check
2014-10-23 00:06:22 +04:00
Alexey Romanov
208eb16cc7
Revert "Removed unneeded sqlite3_threadsafe() check"
...
This reverts commit 2258c7bb73 .
Conflicts:
c_src/sqlite3_drv.c
2014-10-18 18:09:00 +04:00
Alexey Romanov
16ddd2cd03
Ignore non-negative driver_async return values
2014-10-17 23:41:16 +04:00
Alexey Romanov
2258c7bb73
Removed unneeded sqlite3_threadsafe() check
...
Since the database is accessed from 1 thread only
thanks to `key` parameter of `driver_async`.
In fact we could previously potentially access the
same DB twice from different emulator threads
precisely when SQLite3 is compiled in single-thread
mode.
2014-10-17 23:41:15 +04:00
Alexey Romanov
87b88eb1c4
Allow driver instances to use different threads
2014-10-17 23:40:45 +04:00
Alexey Romanov
5336f2f9c8
Extracted common code
2014-10-17 00:49:55 +04:00
Alexey Romanov
fbc5d9c44d
Fixed VC compiler warnings
2014-10-17 00:49:54 +04:00
Alexey Romanov
35554f7cb1
Store DB name in driver
2014-10-13 10:19:08 +04:00
Alexey Romanov
93b50dc058
Support SQLite versions without sqlite3_db_filename
2014-10-13 10:04:17 +04:00
Alexey Romanov
128972b503
Log failure to close into log file as well as stderr
2014-10-13 09:55:10 +04:00
Alexey Romanov
47ef78b5ed
Formatting
2014-10-13 09:53:14 +04:00
Alexey Romanov
a362be76cd
Removed unused function
2014-10-13 09:11:34 +04:00
Alexey Romanov
d0701903aa
Use single codebase for all Erlang versions
2014-10-12 21:35:15 +04:00
Alexey Romanov
1a6f233159
Improved logging
2014-10-12 20:32:56 +04:00
Alexey Romanov
b3856c745f
Log into correct temp directory
2014-10-12 19:52:37 +04:00
Alexey Romanov
d166e24359
Finalize unfinalized statements
2014-10-12 18:21:20 +04:00
Alexey Romanov
92daa9db89
Verify DB is actually closed (in tests it isn't!)
2014-10-12 17:21:34 +04:00
Alexey Romanov
0c767673b6
Fixed memory leak
2014-10-11 14:07:58 +04:00
Alexey Romanov
e4e3bb40f2
Ignore warning in erl_interface on 64-bit Windows
2014-10-11 01:24:55 +04:00
Alexey Romanov
c1a2abc3c8
Fix driver name
2014-10-11 00:23:39 +04:00
Alexey Romanov
78ac8991eb
Fix warnings on Windows
2014-10-11 00:17:24 +04:00
Alexey Romanov
233a2c1559
Simplify appending to a dataset
2014-10-10 23:09:29 +04:00
Alexey Romanov
ea9fa6093a
Add macro to extend dataset size
2014-10-10 15:55:49 +04:00
Alexey Romanov
96c34117df
Fix a wrong allocation size
2014-10-10 12:06:20 +04:00
Alexey Romanov
45a1b22b41
Fix statement finalization in scripts ( #24 )
2014-10-10 11:35:48 +04:00
Alexey Romanov
9b9448dcdd
Merge remote-tracking branch 'stentroad/custom'
2014-10-10 10:28:39 +04:00
Alexey Romanov
8673f2db6b
Merge branch 'master' of github.com:dnet/erlang-sqlite3 into dnet-master
...
Conflicts:
c_src/sqlite3_drv.c
2014-10-10 00:36:56 +04:00
Alexey Romanov
54048aae5b
Define ERLANG_SQLITE3_LOAD_EXTENSION by default
...
Fixes #30
2014-10-09 23:56:13 +04:00
Dmitriy Mazurin
d237e42735
Few memory leaks were fixed.
...
First memory leak occurred due to improper linked list construction
in `add_to_ptr_list` function.
In case if list had tail - result of execution would be lost pointer of
previous tail.
Second memory leak was in `output_error`.
Function allocated `dataset` but never freed allocated memory.
2014-10-06 14:57:16 +04:00
András Veres-Szentkirályi
34f43d429f
replaced deprecated function driver_output_term
...
From erl_driver.h:
driver_output_term() is deprecated, and scheduled for removal in
OTP-R17. Use erl_drv_output_term() instead.
2013-09-18 13:45:32 +02:00
András Veres-Szentkirályi
b0f95b7774
use Erlang typedefs instead of hardcoded types
...
for example, on Linux x86_64, ErlDrvSSizeT is long, not int
2013-09-18 13:31:17 +02:00
András Veres-Szentkirályi
a5df9269a5
compile debug print functionality only when DEBUG is defined
2013-04-01 20:53:56 +02:00
Alexey Romanov
b0f1aa1351
Added a way to enable exception loading
2013-03-25 00:49:12 +04:00
Alexey Romanov
aeaa81f44b
Return result from en/disabling extension loading
...
Previously the return value of `sqlite3_enable_load_extension` was ignored.
2013-03-23 22:05:06 +04:00
Ryan Flynn
ef5555cbe2
%lld/%llu for 64-bit ints
2013-03-23 11:29:25 -04:00
Ryan Flynn
029995f6a3
issue #17 : solve Symbol not found: _sqlite3_enable_load_extension by #ifdef-ing it out by default; erlang-sqlite3 will need configure-esque feature detection via http://www.sqlite.org/c3ref/compileoption_get.html or http://www.sqlite.org/pragma.html#pragma_compile_options
2013-03-23 11:29:24 -04:00
Brian Stubbs
7fa65d6712
Allocating more memory than required?
2012-11-07 12:24:14 -02:00
Alexey Romanov
8752bffec1
Copy column names to driver-allocated memory.
...
Fixes issue #14 by copying out column names before memory can be overwritten by another statement.
2012-09-17 10:32:16 +04:00
Alexey Romanov
e417a95f53
Fixes for extension loading
2012-09-14 17:17:34 +04:00
Alexey Romanov
5fd17e2abf
Fixed formatting
2012-09-14 16:15:46 +04:00
Alexey Romanov
99ea8fdb7b
Fixed issue #13 (binding ints from 128 to 255 incorrectly)
2012-09-14 16:11:49 +04:00
booo
20298aad29
First implementation for enable_load_extension
...
TODO: Wait for the reply of the port driver
2012-07-24 16:14:33 +02:00
Alexey Romanov
193baaaf7e
Test log isn't actually stderr before closing it
2012-06-18 20:34:08 +04:00