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
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
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
Alexey Romanov
398f02c039
Open log file in C code only when DEBUG macro is defined
2012-06-18 15:08:56 +04:00
Alexey Romanov
a1e3fbc4b0
Fixed handling of errors after columns are determined
2012-04-19 16:40:16 +04:00
Ryan Flynn
824adcea32
don't hide the problem, use stderr instead
2012-03-14 11:09:23 -04:00
Ryan Flynn
7f9206336a
if logfile open fails fallback to /dev/null or stderr rather than crash
2012-03-13 17:47:35 -04:00
Alexey Romanov
9297d7268e
Removed unneeded function
2012-02-22 13:32:53 +04:00
Alexey Romanov
8aadf7adc4
Fixed typo in basic_driver_entry
2011-12-16 13:23:56 +04:00
Alexey Romanov
d35c52a370
Fixed tests and documentation.
2011-05-10 12:32:40 +04:00
Alexey Romanov
9eb6f9ed1f
Fixed a term encoding problem
...
See http://www.erlang.org/doc/man/ei.html#ei_decode_string
2011-04-26 11:25:05 +04:00