Commit Graph
1364 Commits
Author SHA1 Message Date
Evan Miller b0afc9f2f6 Add mdb-queries to README [CI SKIP] 2020-09-01 22:54:39 -04:00
Evan Miller 9a0abb43ae Fix GCC warnings 2020-09-01 22:43:10 -04:00
Evan Miller c76fad6356 Add ancient mdb-queries tool by Leonard Leblanc
Modified to run with modern libmdb.

See: https://github.com/mdbtools/mdbtools/issues/122
2020-09-01 22:34:55 -04:00
Evan Miller d553a3c5b5 Merge pull request #38 from evanmiller/txt2man
Include txt2man script (requires gawk)
2020-09-01 20:42:23 -04:00
Evan Miller d3949f7a0f Include txt2man script (requires gawk) 2020-09-01 20:27:19 -04:00
Evan Miller 47c07a2803 Fix links in README file 2020-09-01 19:16:01 -04:00
Evan Miller 6e9f128a22 Update README for the new official repository 2020-09-01 17:52:38 -04:00
Evan Miller 2abd83724a Tick the box for fuzz-testing [CI SKIP] 2020-08-31 13:32:24 -04:00
Evan Miller cea7553e00 Export fakeglib symbols from main library 2020-08-31 13:27:08 -04:00
Evan Miller be888e0dd7 Support fuzz testing (#4)
Quickstart (requires Clang 6 or later):

$ export LIB_FUZZING_ENGINE=/path/to/fuzzing/library.a
$ ./configure --enable-fuzz-testing
$ make
$ cd src/fuzz
$ make fuzz_mdb
$ ./fuzz_mdb

Also add a new `mdb_open_buffer function` to facilitate in-memory
fuzz-testing. This requires fmemopen, which may not be present on all
systems. The internal API has been reworked to use file streams instead
of file descriptors. This allows reading from memory and reading from
files using a consistent API.
2020-08-31 13:03:58 -04:00
Evan Miller 8b40423f65 Merge pull request #36 from nyalldawson/precedence
Setup operator precedence for parser to avoid ambiguity and fix shift/reduce warnings
2020-08-22 18:28:23 -04:00
Evan Miller c78a158f9e Merge pull request #35 from nyalldawson/const_correct
const correctness (fixes warning)
2020-08-22 18:15:43 -04:00
Nyall Dawson 83104b7b69 Setup operator precedence for parser to avoid ambiguity and fix shift/reduce warnings 2020-08-23 07:57:17 +10:00
Nyall Dawson 88e2ffa34a const correctness (fixes warning) 2020-08-23 07:56:26 +10:00
Evan Miller 7ed9df0526 Add a note about thread safety 2020-08-21 20:44:47 -04:00
Evan Miller f65c744aa5 Merge pull request #32 from evanmiller/backend-thread-safety
Move backend dictionary and state to MdbHandle
2020-08-21 20:32:56 -04:00
Evan Miller a08dab706e Fix crash in previous commit 2020-08-21 08:53:05 -04:00
Evan Miller 2ee83971fa Clean up mdb_clone_handle 2020-08-20 21:57:25 -04:00
Evan Miller 4d443840cb Try to fix a crash 2020-08-20 21:31:38 -04:00
Evan Miller 09c497bffd Fix double free with backend dictionary 2020-08-20 20:10:51 -04:00
Evan Miller 6d7a5c79af Merge branch 'master' into backend-thread-safety 2020-08-20 19:53:29 -04:00
Evan Miller f8cff52eb1 Merge pull request #34 from nyalldawson/read_after_free
Fix read after free error
2020-08-20 19:50:26 -04:00
Nyall Dawson ab9d17ef98 Fix read after free error 2020-08-21 09:36:01 +10:00
Evan Miller e743949e47 Change char * to const char * 2020-08-20 15:46:06 -04:00
Evan Miller f668f25d99 Use GCC struct initializers for clarity 2020-08-20 15:37:05 -04:00
Evan Miller b36f2bff1d Merge branch 'master' into backend-thread-safety 2020-08-20 15:22:52 -04:00
Evan Miller 0f017883f6 Merge pull request #33 from evanmiller/remove-dmalloc
Remove references to dmalloc
2020-08-20 15:22:17 -04:00
Evan Miller 90ee7bfcb5 Remove references to dmalloc
There are more modern tools for memory debugging, get rid of DMALLOC
crap in the source code.

I've left one reference in backend.c to prevent a merge conflict but
this can be removed later.
2020-08-20 08:59:08 -04:00
Evan Miller 452cd29343 Get rid of more static memory
* Replace backend_is_init (formerly is_init) with relationships_table

* Remove deprecated functions that used static variables

* Move static "bound" variable to MdbHandle as relationships_values
2020-08-20 08:47:13 -04:00
Evan Miller 588663675e Move backend dictionary and state to MdbHandle
Attempt to make the backend handling logic thread-safe. This removes the
last MDB_CONSTRUCTOR. Also get rid of some JAVA junk and make the
remaining static variables in backend.c constant. Finally remove some
obsolete fields from MdbFile.
2020-08-20 07:58:53 -04:00
Evan Miller c2087a95cc Merge pull request #30 from nyalldawson/fix_28
ODBC requires dates formatted in ISO standards
2020-08-20 06:26:17 -04:00
Nyall Dawson d0ea8a9a86 ODBC requires dates formatted in ISO standards 2020-08-20 14:07:17 +10:00
Evan Miller 5d078838ed [API break] Make date/boolean formats thread safe
Store the preferred date and boolean formats in the MdbHandle rather
than in global memory.
2020-08-19 21:26:06 -04:00
Evan Miller 7b51824c89 Consolidate / fix UUID formatting 2020-08-19 20:53:35 -04:00
Evan Miller 2887fa49ed Merge pull request #24 from evanmiller/odbc-thread-safety
Make the ODBC driver thread-safe. Multiple simultaneous handles should work fine now, but individual handles should only be used by one thread at at time.
2020-08-19 19:55:29 -04:00
Evan Miller 673c7700b9 Store OLE strings on the statement object
Also cut MDB_OLE out into its own code path. This removes the last of
the global / thread-local storage in the ODBC driver, I think.
2020-08-19 19:24:40 -04:00
Evan Miller 55e0d4ff07 Store sqlState separtely on ODBC env / handle / stmts
Also fix the fact that "08001" was always returned by SQLError instead
of the actual SQL state.
2020-08-19 17:34:57 -04:00
Evan Miller 00b3ab9571 Store statement and handle errors separately 2020-08-19 17:22:54 -04:00
Evan Miller a84c07980f Make lastError thread-safe 2020-08-19 17:03:06 -04:00
Evan Miller e67c8e6d52 Remove obsolete comment about thread safety 2020-08-19 16:32:13 -04:00
Evan Miller 3d63f16fc0 Fix errors
It helps to enable ODBC when testing ODBC :-P
2020-08-19 16:16:25 -04:00
Evan Miller 684fa55781 Fix unused variable warning 2020-08-19 15:50:57 -04:00
Evan Miller 9020ca9a1e Attempt to make the ODBC driver thread-safe
I'm not sure if this is a complete solution - some of the global state
has been moved to thread-local storage. So passing an ODBC handle across
threads may have unexpected results. But at least it's not global state.

Each ODBC handle now has its own iconv_t object.

See #23
2020-08-19 15:35:02 -04:00
Evan Miller 1ad0dd2d8b Simplify code 2020-08-18 21:20:40 -04:00
Evan Miller 008b3b462b Merge pull request #22 from nyalldawson/no_crash
Don't crash when a table can't be read for some reason
2020-08-18 21:10:52 -04:00
Evan Miller ab1a253f45 Merge pull request #21 from nyalldawson/fix_19
Fix empty table results
2020-08-18 21:10:11 -04:00
Nyall Dawson 40981d2fc6 Only handle tables in SQLColumns, not other objects 2020-08-19 10:50:12 +10:00
Nyall Dawson b72ac6b1c0 Don't crash when a table can't be read for some reason 2020-08-19 10:44:17 +10:00
Nyall Dawson 333f4712b9 Fix empty table results
Fixes #19
2020-08-19 10:28:01 +10:00
Evan Miller 463fd0af11 Make thread-safety a goal, why not 2020-08-18 12:59:56 -04:00