Evan Miller [Wed, 23 Dec 2020 20:40:39 +0000 (23 15:40 -0500)]
Update NEWS file for 0.9.1 Beta 1
Evan Miller [Wed, 23 Dec 2020 20:37:18 +0000 (23 15:37 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
Evan Miller [Wed, 23 Dec 2020 20:36:18 +0000 (23 15:36 -0500)]
Version 0.9.1, Beta 1
Evan Miller [Wed, 23 Dec 2020 14:34:21 +0000 (23 09:34 -0500)]
Windows GitHub Action (#231)
* Migrate the Windows Msys2 build from Appveyor to GitHub Actions
* Fix build with newer versions of Msys2 (fix `vasprintf` conflict)
* Enable SQL tests on the Cygwin build on Appveyor
* Fix an error message about Bison not being available when in fact Flex was not available
* Don't fail fast with Mac and Linux GitHub Actions
Evan Miller [Mon, 21 Dec 2020 22:51:27 +0000 (21 17:51 -0500)]
Use scientific notation only for very small numbers
See #84
Evan Miller [Mon, 21 Dec 2020 22:28:29 +0000 (21 17:28 -0500)]
SQLite does not support foreign keys via ALTER TABLE
See #82. A complete solution would add the foreign keys to CREATE TABLE
but the goal here is to stop generating bad SQL.
Evan Miller [Mon, 21 Dec 2020 22:01:22 +0000 (21 17:01 -0500)]
Merge pull request #93 from ewenmcneill/postgres_namespace_fixes
Postgres: No namespace in INDEX, CONSTRAINT names
Ewen McNeill [Wed, 6 Apr 2016 20:37:50 +0000 (7 08:37 +1200)]
Postgres: No namespace in INDEX, CONSTRAINT names
src/libmdb/backend.c:mdb_print_indexes() and
src/libmdb/backend.c:mdb_get_relationships(): In PostgreSQL the INDEX
names explicitly must not have a namespace name on them; they are always
created in the namespace of the table. See:
http://www.postgresql.org/docs/current/static/sql-createindex.html
which says: "The name of the index to be created. No schema name can be
included here; the index is always created in the same schema as
its parent table."
By observation the same is true for CONSTRAINT names; they are refused
if the namespace is included before them.
Also omit the namespace from the FOREIGN KEY constraint _column_ names
on PostgreSQL (it's not clear that the _column_ names should ever be
namespaced, but behaviour should currently be unchanged for databases
other than PostgreSQL).
Evan Miller [Mon, 21 Dec 2020 21:02:30 +0000 (21 16:02 -0500)]
Fix Appveyor builds
Evan Miller [Mon, 21 Dec 2020 20:42:38 +0000 (21 15:42 -0500)]
Migrate from Travis CI to GitHub Actions (#229)
* Add GitHub Actions workflow
* Consolidate CI test commands into test_script.sh
* Remove Travis build
Evan Miller [Mon, 21 Dec 2020 20:34:16 +0000 (21 15:34 -0500)]
Merge pull request #228 from evanmiller/no-math
Remove math.h
Evan Miller [Mon, 21 Dec 2020 16:26:45 +0000 (21 11:26 -0500)]
Remove math.h
Evan Miller [Mon, 21 Dec 2020 14:50:09 +0000 (21 09:50 -0500)]
Merge pull request #227 from evanmiller/index-lang
Use the language ID from the DB header for indexing
Evan Miller [Mon, 21 Dec 2020 14:11:42 +0000 (21 09:11 -0500)]
Use the language ID from the DB header for indexing
According to the HACKING file, the file's default language ID is stored
in the database header. Use this value instead of a generic English
language locale for indexing JET4 files.
Columns can have their own text sorting rules, including language ID
distinct from the file's language ID, but this is not addressed as we'd
have to break the mdb_index_hash_text function signature, which I'm not
prepared to do just yet.
There appear to be two bytes after the language ID that may indicate
additional sorting flags. These bytes need additional research.
Evan Miller [Mon, 21 Dec 2020 01:48:38 +0000 (20 20:48 -0500)]
Merge pull request #225 from evanmiller/gcc-initializers
Use GCC style initializers for MdbFormatConstants
Evan Miller [Mon, 21 Dec 2020 01:15:13 +0000 (20 20:15 -0500)]
Use GCC style initializers for MdbFormatConstants
Evan Miller [Mon, 21 Dec 2020 01:12:06 +0000 (20 20:12 -0500)]
Merge pull request #224 from evanmiller/jet3-encodings
Simplify header-reading logic and support JET3 code pages
Evan Miller [Mon, 21 Dec 2020 00:54:51 +0000 (20 19:54 -0500)]
Add a simple Latin-1 => UTF-8 transcoder w/o iconv
Evan Miller [Sun, 20 Dec 2020 23:02:23 +0000 (20 18:02 -0500)]
Simplify header-reading logic and support JET3 code pages
Using the notes and RC4 key provided in the HACKING file, decrypt the
database definition page all at once instead of decrypting individual
fields with ad-hoc keys. Use the newly decrypted header to access the
database code page at offset 0x3C, and use this numeric value to
initialize the iconv converter with an appropriate charset name for
popular windows code pages. More encodings can be added later, with
the eventual goal of getting rid of the MDB_JET3_CHARSET environment
variable.
Note that individual columns can have their own code pages but this
issue is not addressed.
An extra field is added to the MdbFile structure - because this
struct is allocated internally, this should not break the public
ABI.
Finally, only set the db_passwd field if it's a JET3 database (see #144)
Evan Miller [Sun, 20 Dec 2020 22:56:33 +0000 (20 17:56 -0500)]
Use wcstombs when iconv is not present (#223)
Replace the jerry-built UTF-16 => Latin-1 code path with a cross-platform wcstombs solution that emits UTF-8.
This adds an element to the end of the MdbHandle struct, but should not break any existing code.
A run-time option could be added later to emit other encodings, but people who care about such things can just use the iconv code path.
Evan Miller [Sat, 19 Dec 2020 14:37:39 +0000 (19 09:37 -0500)]
Fix unused but set variable warning (#221)
Refactor mdb_unicode2ascii to eliminate warnings
Evan Miller [Sat, 19 Dec 2020 13:24:32 +0000 (19 08:24 -0500)]
Clarify mdb_unicode2ascii API and fix buffer overrun (#220)
There was some confusion as to whether the destination buffer length
should include space for the null terminator. Some callers of the
function assumed that a terminator would be added beyond the end
of the stated buffer size, while others did not. Make everything
consistent and also fix an overrun when there was insufficient
space for the output in the non-iconv implementation.
As stated in a code comment, a better solution would follow the lead
of libxls and use wcstombs and friends when iconv is not available.
But this gets into the weeds with conversion functions named differently
across platforms. The goal here is to fix the buffer overrun.
See oss-fuzz/28773
Evan Miller [Sat, 19 Dec 2020 00:51:59 +0000 (18 19:51 -0500)]
Merge pull request #219 from evanmiller/oss-fuzz-28790
Fix integer overflow
Evan Miller [Sat, 19 Dec 2020 00:42:11 +0000 (18 19:42 -0500)]
Fix buffer overflow (#218)
See oss-fuzz/28787
Evan Miller [Fri, 18 Dec 2020 21:35:48 +0000 (18 16:35 -0500)]
Merge pull request #217 from evanmiller/oss-fuzz-28780
Fix stack overflow
Evan Miller [Fri, 18 Dec 2020 21:33:54 +0000 (18 16:33 -0500)]
Merge pull request #216 from evanmiller/oss-fuzz-28779
Null-terminate binary strings
Evan Miller [Fri, 18 Dec 2020 16:22:52 +0000 (18 11:22 -0500)]
Fix integer overflow
See oss-fuzz/28790
Evan Miller [Fri, 18 Dec 2020 14:35:12 +0000 (18 09:35 -0500)]
Fix stack overflow
See oss-fuzz/28780
Evan Miller [Fri, 18 Dec 2020 14:26:28 +0000 (18 09:26 -0500)]
Null-terminate binary strings
See oss-fuzz/28779
Evan Miller [Thu, 17 Dec 2020 19:03:05 +0000 (17 14:03 -0500)]
Version 0.9.0, final
Evan Miller [Thu, 17 Dec 2020 16:56:51 +0000 (17 11:56 -0500)]
Update configure.ac
* AM_SILENT_RULES has been around for 9 years so just assume it
* dist-zip adds a ZIP archive step to "make dist"
Evan Miller [Thu, 17 Dec 2020 16:20:23 +0000 (17 11:20 -0500)]
Fix Appveyor link
Evan Miller [Thu, 17 Dec 2020 16:05:37 +0000 (17 11:05 -0500)]
Update CI badges to dev branch
Evan Miller [Thu, 17 Dec 2020 16:04:54 +0000 (17 11:04 -0500)]
Fix libmdbsql build on Windows
Evan Miller [Sun, 13 Dec 2020 13:38:10 +0000 (13 08:38 -0500)]
Merge pull request #213 from mdbtools/nirgal-patch-2
Drop obsolete files from .gitignore
nirgal [Sun, 13 Dec 2020 13:27:58 +0000 (13 13:27 +0000)]
Drop obsolete files from .gitignore
Evan Miller [Sun, 13 Dec 2020 12:43:52 +0000 (13 07:43 -0500)]
Restore GLib detection. Fixes #212
Evan Miller [Sun, 13 Dec 2020 12:36:52 +0000 (13 07:36 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
Evan Miller [Sun, 13 Dec 2020 12:19:16 +0000 (13 07:19 -0500)]
Merge pull request #211 from mdbtools/nirgal-patch-1
Remove obsolete comment
nirgal [Sun, 13 Dec 2020 10:22:17 +0000 (13 10:22 +0000)]
Remove obsolete comment
Evan Miller [Fri, 4 Dec 2020 15:48:37 +0000 (4 10:48 -0500)]
Version 0.9.0, Beta 8
Evan Miller [Fri, 4 Dec 2020 15:45:51 +0000 (4 10:45 -0500)]
Merge pull request #208 from evanmiller/remove-old-docs
Remove old documentation
Evan Miller [Fri, 4 Dec 2020 15:07:26 +0000 (4 10:07 -0500)]
Remove -Wno-portability from CI scripts
Evan Miller [Fri, 4 Dec 2020 14:34:04 +0000 (4 09:34 -0500)]
Merge branch 'master' into remove-old-docs
Evan Miller [Fri, 4 Dec 2020 14:29:53 +0000 (4 09:29 -0500)]
Merge pull request #206 from evanmiller/test-pkg-config-2
Verify pkg-config on Travis
Evan Miller [Fri, 4 Dec 2020 14:18:11 +0000 (4 09:18 -0500)]
Merge branch 'master' into remove-old-docs
Evan Miller [Fri, 4 Dec 2020 14:14:12 +0000 (4 09:14 -0500)]
Remove out of date documentation
The HTML docs have not been updated in 10+ years. The README and man
pages should suffice for now.
Evan Miller [Fri, 4 Dec 2020 14:12:51 +0000 (4 09:12 -0500)]
Merge pull request #204 from evanmiller/remove-specfile
Remove mdbtools spec file
Evan Miller [Fri, 4 Dec 2020 12:33:51 +0000 (4 07:33 -0500)]
Have libmdb.pc reflect --disable-glib
Also try to work around Travis issues with sudo, libtool, and clang
Evan Miller [Fri, 4 Dec 2020 11:11:02 +0000 (4 06:11 -0500)]
Verify pkg-config on Travis
Now featuring sudo
Evan Miller [Fri, 4 Dec 2020 00:34:44 +0000 (3 19:34 -0500)]
Remove mdbtools spec file
This is used to build RPMs, but it is out of date and not under test
coverage. If someone would like to restore it, please add some kind of
test coverage so that it does not fall out of date in the future.
See #201
Evan Miller [Thu, 3 Dec 2020 22:48:14 +0000 (3 17:48 -0500)]
Merge pull request #200 from evanmiller/remove-changelog
Remove ChangeLog/CHANGELOG.md
Evan Miller [Fri, 27 Nov 2020 13:07:40 +0000 (27 08:07 -0500)]
Version 0.9.0, Beta 7
Evan Miller [Fri, 27 Nov 2020 12:27:09 +0000 (27 07:27 -0500)]
Merge pull request #199 from evanmiller/remove-deprecated
Remove deprecated functions
Evan Miller [Fri, 27 Nov 2020 12:26:18 +0000 (27 07:26 -0500)]
Merge branch 'master' into remove-deprecated
Evan Miller [Fri, 27 Nov 2020 12:04:28 +0000 (27 07:04 -0500)]
Remove ChangeLog/CHANGELOG.md
The cyberemissary notes were technically NEWS (about an unofficial
release) and the earlier VCS notes are useless.
Evan Miller [Fri, 27 Nov 2020 11:38:44 +0000 (27 06:38 -0500)]
mdb-count is new since 0.7.1 [CI SKIP]
Evan Miller [Fri, 27 Nov 2020 11:33:15 +0000 (27 06:33 -0500)]
Remove GMDB section from TODO
This information has been copied to gmdb2's TODO file
Evan Miller [Fri, 27 Nov 2020 11:02:26 +0000 (27 06:02 -0500)]
Remove mem.c from Makefile
Evan Miller [Fri, 27 Nov 2020 10:58:14 +0000 (27 05:58 -0500)]
Remove long-deprecated functions
mdb_init() and mdb_exit() have done nothing for a while.
mdb_get_coltype_string() and mdb_coltype_takes_length() were previously
removed, but remained in the header file by accident.
Evan Miller [Fri, 27 Nov 2020 10:50:41 +0000 (27 05:50 -0500)]
Add CLI deprecation notices to README
Evan Miller [Fri, 27 Nov 2020 10:42:02 +0000 (27 05:42 -0500)]
Merge pull request #198 from nirgal/deprecation
Deprecate mdb-array mdb-header mdb-parsecsv
Evan Miller [Thu, 26 Nov 2020 17:38:44 +0000 (26 12:38 -0500)]
Remove unused packaging script
package.sh is a vestige of the cyberemissary fork.
Nirgal Vourgère [Wed, 25 Nov 2020 14:42:57 +0000 (25 15:42 +0100)]
Deprecation warning in the manuals
Nirgal Vourgère [Wed, 25 Nov 2020 11:14:45 +0000 (25 12:14 +0100)]
Deprecate mdb-array mdb-header mdb-parsecsv
Evan Miller [Wed, 25 Nov 2020 01:30:32 +0000 (24 20:30 -0500)]
Move 0.9 release information from README to NEWS
Evan Miller [Wed, 25 Nov 2020 01:30:06 +0000 (24 20:30 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
nirgal [Sun, 15 Nov 2020 13:28:38 +0000 (15 13:28 +0000)]
Modernize Debian install command
Evan Miller [Sat, 14 Nov 2020 13:29:27 +0000 (14 08:29 -0500)]
Version 0.9.0, Beta 6
Evan Miller [Sat, 14 Nov 2020 13:16:53 +0000 (14 08:16 -0500)]
Merge pull request #194 from evanmiller/bounds-check-mdb-sql-bind-column
[Updated] Bounds check mdb_sql_bind_column()
Evan Miller [Fri, 13 Nov 2020 17:10:31 +0000 (13 12:10 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
Evan Miller [Fri, 13 Nov 2020 17:08:27 +0000 (13 12:08 -0500)]
Merge pull request #196 from mdbtools/nirgal-AUTHORS
Refreshed AUTHORS
nirgal [Fri, 13 Nov 2020 15:45:04 +0000 (13 15:45 +0000)]
Refreshed AUTHORS
Dropped the description of who did what, as this is too complex to maintain.
Sorted by year, for copyrights purposes.
Evan Miller [Thu, 12 Nov 2020 21:26:48 +0000 (12 16:26 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
Evan Miller [Thu, 12 Nov 2020 21:14:15 +0000 (12 16:14 -0500)]
Merge pull request #195 from evanmiller/thread-safety
Use re-entrant functions and thread-local storage in a couple of places
Evan Miller [Thu, 12 Nov 2020 18:38:32 +0000 (12 13:38 -0500)]
Use thread-local storage to cache run-time options
Evan Miller [Thu, 12 Nov 2020 16:20:05 +0000 (12 11:20 -0500)]
Use re-entrant functions in a couple of places
Replace strtok and gmtime with their re-entrant versions. More to come.
Evan Miller [Sun, 8 Nov 2020 14:39:59 +0000 (8 09:39 -0500)]
Fix indentation warning on GCC
Evan Miller [Sun, 8 Nov 2020 14:28:48 +0000 (8 09:28 -0500)]
Version 0.9.0, Beta 5
Evan Miller [Sun, 8 Nov 2020 14:25:26 +0000 (8 09:25 -0500)]
Fix syntax error
Evan Miller [Sun, 8 Nov 2020 14:19:28 +0000 (8 09:19 -0500)]
Merge pull request #185 from mjwoodcock/odbc-string-truncation
Don't include length of '\0' in SQLGetData pcbValue
Evan Miller [Sun, 8 Nov 2020 13:50:17 +0000 (8 08:50 -0500)]
Bounds check mdb_sql_bind_column()
Return -1 if the bounds check fails, otherwise the result of
mdb_bind_column_by_name.
Update other places in the code to check the return value.
Evan Miller [Sun, 8 Nov 2020 13:31:59 +0000 (8 08:31 -0500)]
Merge pull request #193 from evanmiller/largefile
Large file support on 32-bit systems
Evan Miller [Sat, 7 Nov 2020 16:40:44 +0000 (7 11:40 -0500)]
Large file support on 32-bit systems
* Add AC_SYS_LARGEFILE to configure.ac
* Replace fseek with fseeko
Evan Miller [Sat, 7 Nov 2020 15:19:28 +0000 (7 10:19 -0500)]
Simplify configure.ac with AC_CHECK_FUNCS
Evan Miller [Sun, 1 Nov 2020 13:35:01 +0000 (1 08:35 -0500)]
Version 0.9.0, Beta 4
Evan Miller [Sun, 1 Nov 2020 13:32:04 +0000 (1 08:32 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
Evan Miller [Sun, 1 Nov 2020 13:31:50 +0000 (1 08:31 -0500)]
Merge pull request #192 from evanmiller/merge-166
Original author: @rogerswb
* Dynamic allocation of MdbSQL->bound_values
Was previously hardcoded to 256 columns max.
Evan Miller [Sun, 1 Nov 2020 13:21:45 +0000 (1 08:21 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into dev
Evan Miller [Sun, 1 Nov 2020 13:06:05 +0000 (1 08:06 -0500)]
Merge pull request #186 from mjwoodcock/bounds-check-mdb-bind-column
Bounds check mdb_bind_column()
James Woodcock [Sun, 1 Nov 2020 12:56:38 +0000 (1 12:56 +0000)]
Send error message to stderr
Evan Miller [Sun, 1 Nov 2020 12:55:53 +0000 (1 07:55 -0500)]
Merge branch 'dev' of github.com:mdbtools/mdbtools into merge-166
James Woodcock [Sat, 31 Oct 2020 09:46:00 +0000 (31 09:46 +0000)]
Handle errors from mdb_bind_column()
James Woodcock [Sat, 31 Oct 2020 09:40:24 +0000 (31 09:40 +0000)]
Return column number from mdb_bind_column()
To match the return from mdb_bind_column_by_name().
James Woodcock [Sat, 31 Oct 2020 09:38:03 +0000 (31 09:38 +0000)]
Merge branch 'dev' of https://github.com/mdbtools/mdbtools into bounds-check-mdb-bind-column
Nirgal Vourgère [Mon, 26 Oct 2020 23:05:26 +0000 (27 00:05 +0100)]
Modernize bash-completion
Use _init_completion
Support long options with or without =
Auto generate options from the --help using _parse_help
nirgal [Sun, 25 Oct 2020 20:49:20 +0000 (25 20:49 +0000)]
Added back -q support
Nirgal Vourgère [Sun, 25 Oct 2020 19:16:47 +0000 (25 20:16 +0100)]
Quote shell special characters ...
... and add support for mdb-count mdb-json and mdb-queries
Evan Miller [Sun, 25 Oct 2020 17:11:01 +0000 (25 13:11 -0400)]
Merge pull request #189 from nirgal/insert
mdb-export: Rename --backend into --insert
Nirgal Vourgère [Sun, 25 Oct 2020 10:34:53 +0000 (25 11:34 +0100)]
mdb-export: Rename --backend into --insert