Commit Graph
100 Commits
Author SHA1 Message Date
Evan Miller ebf999f8c3 Merge pull request #184 from mjwoodcock/export-better-timestamps
mdb-export: use sensible date formats
2020-10-24 06:34:24 -04:00
Evan Miller 7f28e1cef4 Update CI badge links 2020-10-19 14:41:05 -04:00
Evan Miller a5e3e8a438 Include txt2man in distribution 2020-10-18 17:17:58 -04:00
Evan Miller d2acba6010 Merge branch 'dev' of github.com:mdbtools/mdbtools into dev 2020-10-18 17:16:11 -04:00
Evan Miller 1efb1054d3 Merge pull request #183 from evanmiller/configure-error
Use AC_MSG_ERROR instead of echo/exit
2020-10-18 10:18:57 -04:00
Evan Miller b6dc31eeb8 Merge pull request #182 from evanmiller/no-exit
Do not exit from library
2020-10-18 10:04:59 -04:00
Evan Miller 97bb488785 Use AC_MSG_ERROR instead of echo/exit 2020-10-18 09:48:38 -04:00
Evan Miller 131b443102 Do not exit from library 2020-10-18 09:45:51 -04:00
Evan Miller 888ad9fe3f Merge pull request #179 from mdbtools/nirgal-patch-1
Don't distribute mdbver.h
2020-10-18 09:21:38 -04:00
Evan Miller 0e3110b925 Version 0.9.0, Beta 2 2020-10-18 08:52:58 -04:00
Evan Miller 6e48131bae Merge branch 'dev' of github.com:mdbtools/mdbtools into dev 2020-10-18 08:03:07 -04:00
Evan Miller d8ed91bb05 Include missing header files in make dist 2020-10-18 07:59:45 -04:00
Evan Miller aac0a3d713 Merge branch 'dev' of github.com:mdbtools/mdbtools into dev 2020-10-18 07:46:43 -04:00
Evan Miller 02735e10db Merge pull request #175 from nyalldawson/missing_file_crash2
Fix crash when a missing file is accessed via ODBC
2020-10-12 07:17:50 -04:00
Evan Miller 40d8b15c9e Version 0.9.0, Beta 1 2020-10-11 16:07:28 -04:00
Evan Miller 8e6ebfc411 Merge pull request #174 from evanmiller/remove-gmdb2
Remove gmdb2
2020-10-11 15:58:26 -04:00
Evan Miller a051350ba1 make distcheck fixes 2020-10-11 15:46:19 -04:00
Evan Miller c19654ad40 Remove gmdb2
Split off the Gnome MDB file viewer into its own project:

    https://github.com/mdbtools/gmdb2

This simplifies the build process somewhat and lets us focus on the core
project. (For starters, no more -Wno-portability flag!)
2020-10-11 14:59:08 -04:00
Evan Miller 0be4321e9a Merge pull request #170 from mjwoodcock/dev
Support "SELECT TOP n [PERCENT]... " queries.
2020-09-26 06:58:39 -04:00
Evan Miller 8219e4ef7a Merge pull request #162 from evanmiller/master
Monster pull request with changes from the last 5 years
2020-09-19 14:15:16 -04:00
Evan Miller 9d0c40905d Merge branch 'dev' of github.com:mdbtools/mdbtools 2020-09-19 14:01:23 -04:00
Evan Miller d01b676590 Merge pull request #169 from mjwoodcock/master
mdb-sql should use semicolon separators
2020-09-19 14:00:08 -04:00
Evan Miller 9f41e03278 Fix up libtool version-info logic 2020-09-05 10:50:24 -04:00
Evan Miller 6e08ad5ae9 Add copyright info for fakeglib 2020-09-05 10:49:56 -04:00
Evan Miller 7f7761e884 Improved support for "Short Date" fields
* Separate -D (date only) and -T (date/time) format options in mdb-export and mdb-json

* New public mdb_set_shortdate_fmt() function in libmdb

* New private(ish) mdb_col_is_shortdate() function

I'm calling it "shortdate" in order to preserve the existing API.

See https://github.com/mdbtools/mdbtools/issues/12
2020-09-02 22:14:57 -04:00
Evan Miller 0023e4efe4 Update options documentation [CI SKIP] 2020-09-02 21:33:49 -04:00
Evan Miller a13936bd77 Support comparisons with MDB_FLOAT and MDB_DOUBLE
See https://github.com/mdbtools/mdbtools/issues/105
2020-09-02 21:24:24 -04:00
Evan Miller aa0ce8fb3e Consolidate print_col functions into backend.c 2020-09-02 20:38:15 -04:00
Evan Miller 3b20a5aabd Merge pull request #45 from evanmiller/merge-164
Merge mysql-comments
2020-09-02 16:03:36 -04:00
Evan Miller 7b5d547acf Merge branch 'mysql-comments' of github.com:mdbtools/mdbtools into merge-164 2020-09-02 15:48:29 -04:00
Evan Miller 0fb33c2eb6 Fix prototype error with GCC 2020-09-02 15:07:13 -04:00
Evan Miller 9f23385a8c New mdb_get_version() function
See https://github.com/mdbtools/mdbtools/issues/138
2020-09-02 14:55:32 -04:00
Evan Miller eaf4e86695 Merge pull request #43 from evanmiller/custom-bind-size
New mdb_set_bind_size function overrides MDB_BIND_SIZE
2020-09-02 14:46:50 -04:00
Evan Miller fb960553e6 New mdb_set_bind_size function overrides MDB_BIND_SIZE
This should fix long-standing complaints about the default bind size
without causing undue memory inflation in existing applications.

Could make this adjustable on the command line later.

Supersedes:

https://github.com/mdbtools/mdbtools/pull/137
2020-09-02 14:30:07 -04:00
Evan Miller b7dd44d0d4 Merge pull request #42 from evanmiller/mdb-exportjson
mdb-json tool
2020-09-02 12:05:02 -04:00
Evan Miller f27b89f60a Use new mdb-json in Travis tests 2020-09-02 11:48:54 -04:00
Evan Miller 0f5bbdf96c Rename tool to mdb-json and use modern option parsing 2020-09-02 11:47:50 -04:00
Evan Miller a89df9f5e3 Remove completed items from TODO file [CI SKIP] 2020-09-02 11:19:26 -04:00
Evan Miller 92791572fe Clone test data over HTTP 2020-09-02 10:51:25 -04:00
Evan Miller 4b177914ee Move test data to separate repository 2020-09-02 10:44:12 -04:00
Evan Miller a98066ee0d Merge pull request #41 from evanmiller/export-hex
Export binaries as hex option
2020-09-02 10:09:39 -04:00
Evan Miller 01711b49f4 Merge branch 'hexbinaryexportmode' of github.com:davidhicks/mdbtools into export-hex 2020-09-02 09:53:50 -04:00
Evan Miller a598148afc Merge branch 'export-mongodb-json' of github.com:rutsky/mdbtools into mdb-exportjson 2020-09-02 09:18:52 -04:00
Evan Miller aed2367140 Merge pull request #39 from evanmiller/mdb-queries
Add ancient mdb-queries tool by Leonard Leblanc
2020-09-01 22:55:58 -04:00
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
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
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
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
Evan Miller 463fd0af11 Make thread-safety a goal, why not 2020-08-18 12:59:56 -04:00
Evan Miller ea368bc0e3 Require Bison 3.0+ at configure time for SQL features 2020-08-18 10:02:56 -04:00
Evan Miller 2a808d8d05 Fix Travis Mac GCC configurations 2020-08-18 09:34:39 -04:00
Evan Miller 5758cd6861 Try fixing Mac build with explicit Yacc output file 2020-08-18 09:06:17 -04:00
Evan Miller 60c820245d Only set -Wno-yacc if $YACC supports it 2020-08-18 09:05:33 -04:00
Evan Miller 83666459d2 Add test coverage for mdb-sql 2020-08-18 09:04:20 -04:00
Evan Miller 78707f7aa3 Remove second -d flag 2020-08-18 07:48:54 -04:00
Evan Miller ec8492f1ee Try fixing Travis and Appveyor
The new re-entrant parser requires Bison 3, which is not installed
on macOS by default. It also appears to require -Wno-yacc.
2020-08-18 07:32:15 -04:00
Evan Miller 858e1dff49 Merge pull request #16 from nyalldawson/reentrant
Make SQL parser/lexer reentrant
2020-08-18 07:20:35 -04:00
Evan Miller 1e983c70f1 Merge pull request #18 from nyalldawson/fix_limit
Fix LIMIT clause is ignored when executing SQL via ODBC, incorrect behavior with LIMIT 0
2020-08-18 07:02:00 -04:00
Evan Miller 91c6d3048c Merge pull request #17 from nyalldawson/fix_leak
Fix leak after running "SELECT COUNT(*)..." sql query
2020-08-18 06:56:21 -04:00
Evan Miller 4cc7999022 Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE 2020-08-14 07:18:23 -04:00
Evan Miller 6171472411 Change -Bsymbolic-functions to -Wl,-Bsymbolic-functions 2020-08-14 00:12:07 -04:00
Evan Miller dfd41f2283 Try fixing unixODBC deadlock with -Bsymbolic-functions
This flag compels the dynamic library to prefer its own function symbols
to those in the global symbol table. This behavior should let us
directly call SQL* functions from inside other SQL* functions without
fear of interference by the host program.
2020-08-13 21:52:03 -04:00