leecher1337 [Mon, 4 Dec 2017 23:13:28 +0000 (5 00:13 +0100)]
Fixing JET4 Index support via libmswstr. Used as a separate library to do it like MS Jet and to ensure that mdbtools library doesn't get tainted with its source.
leecher1337 [Sun, 3 Dec 2017 22:25:35 +0000 (3 23:25 +0100)]
Optimization: Assuming that the index is sorted, I guess an index search can bail out as soon as target value has been found?
leecher1337 [Sun, 3 Dec 2017 22:20:11 +0000 (3 23:20 +0100)]
Bugfixes for JET4 indices.
leecher1337 [Sun, 3 Dec 2017 17:18:21 +0000 (3 18:18 +0100)]
index.c: Centralised debugging helper
leecher1337 [Sun, 3 Dec 2017 16:57:24 +0000 (3 17:57 +0100)]
Let debug hexdump-function output as unsigned hex value properly
leecher1337 [Sun, 3 Dec 2017 16:53:41 +0000 (3 17:53 +0100)]
Fixed severe double-free bug on mdb_clone_handle with immediate mdb_close() afterwards leading to memory corruption
leecher1337 [Sun, 3 Dec 2017 16:02:15 +0000 (3 17:02 +0100)]
Merge branch 'master' into master
nirgal [Sun, 15 Jan 2017 13:26:33 +0000 (15 14:26 +0100)]
Merge pull request #106 from chuchuhao/patch-1
Update HACKING
chunhao [Thu, 12 Jan 2017 08:16:05 +0000 (12 16:16 +0800)]
Update HACKING
Nirgal Vourgère [Mon, 24 Oct 2016 20:54:13 +0000 (24 22:54 +0200)]
Spelling fixes
Thanks lintian
Brian Bruns [Tue, 30 Aug 2016 12:52:32 +0000 (30 08:52 -0400)]
bug fix for 'bad' data with odd number of UCS-2 bytes
Brian Bruns [Tue, 30 Aug 2016 12:43:34 +0000 (30 08:43 -0400)]
add support for LIMIT clause in SQL engine
leecher1337 [Fri, 21 Aug 2015 12:50:34 +0000 (21 14:50 +0200)]
At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it.
leecher1337 [Sun, 16 Aug 2015 09:39:17 +0000 (16 11:39 +0200)]
Fixed a severe design flaw in ODBC driver that prevented the driver from using multiple SELECTs at once and instead crashed the driver
leecher1337 [Sat, 15 Aug 2015 22:58:34 +0000 (16 00:58 +0200)]
Fixed bug in ODBC driver causing incomplete data on SQLGetData when doing SQLFetch and SQLGetData for one column in a loop if there was an incomplete fetch of some previous dataset
Brian Bruns [Mon, 29 Aug 2016 13:40:51 +0000 (29 09:40 -0400)]
Merge pull request #94 from ewen-naos-nz/boolean_data_as_words
mdb-export: Add boolean words option (TRUE/FALSE)
Brian Bruns [Mon, 29 Aug 2016 13:40:28 +0000 (29 09:40 -0400)]
Merge pull request #101 from joshuashort/master
Adding option for user-defined NULL token in CSV output
Brian Bruns [Mon, 29 Aug 2016 13:39:17 +0000 (29 09:39 -0400)]
Merge pull request #95 from ewen-naos-nz/jet4_index_flags
JET 4: index flags (eg, UNIQUE) 4 bytes later
Brian Bruns [Mon, 29 Aug 2016 13:15:16 +0000 (29 09:15 -0400)]
Merge pull request #87 from danchr/tweaks+ole
OLE support for the ODBC driver
Brian Bruns [Mon, 29 Aug 2016 13:13:10 +0000 (29 09:13 -0400)]
Merge pull request #91 from samshawsds/master
Improve Oracle Support
Joshua Short [Mon, 1 Aug 2016 16:11:21 +0000 (1 09:11 -0700)]
Adding option to for user-defined NULL token in CSV output (not sure if it should be escaped..)
Nirgal Vourgère [Wed, 27 Apr 2016 02:58:17 +0000 (27 04:58 +0200)]
Use 'official' words for GFDL license
Ewen McNeill [Thu, 7 Apr 2016 22:23:10 +0000 (8 10:23 +1200)]
JET 4: index flags (eg, UNIQUE) 4 bytes later
Re-reverse engineered index meta information layout in JET 4
file format, based particularly on jackcess (Java) JET/Access
database library (https://github.com/jahlborn/jackcess), and
hexdumps of JET 4 database index meta information. Based both
on byte counting of jackcess reading of index definitions and
also expected flag values (0x80, 0x89, etc), the flags of JET 4
index definition are 4 bytes later than mdbtools previously thought.
See IndexData.read() and private static class Jet4Format in
src/main/java/com/healthmarketscience/jackcess/impl/IndexData.java
src/main/java/com/healthmarketscience/jackcess/impl/JetFormat.java
in jackcess source for layout reference.
Now appears to get sensible "CREATE INDEX"/"CREATE UNIQUE INDEX"
behaviour on export to PostgreSQL schema.
Also added extensive index definition byte layout reference to top
of src/libmdb/index.c for ease of reference, plus more debugging
assistance (and comments of phases reading index for readability).
Ewen McNeill [Wed, 6 Apr 2016 20:45:06 +0000 (7 08:45 +1200)]
mdb-export: Add boolean words option (TRUE/FALSE)
Adds "-B" (--boolean-words) option to mdb-export, which will reconfigure
mdb/data.c to export TRUE/FALSE for boolean values instead of 1/0. The
option is needed to support BOOLEAN fields on PostgreSQL, which will not
implicitly cast bare 1/0 into a BOOLEAN value. Value literals are the
SQL TRUE/FALSE, and _quoted_ words meaning true/false and _quoted_
'1'/'0'. With this flag the SQL TRUE/FALSE values are output, which should
work with several SQL databases.
PostgreSQL Reference:
http://www.postgresql.org/docs/current/static/datatype-boolean.html
Sam Shaw [Tue, 12 Jan 2016 01:58:17 +0000 (12 09:58 +0800)]
Oracle Foreign Keys
Oracle doesn't support the "ON UPDATE" clause for foreign keys.
Sam Shaw [Wed, 23 Dec 2015 05:46:31 +0000 (23 13:46 +0800)]
Oracle BLOB & CLOB
BLOB and CLOB do not have a size constraint in Oracle
Sam Shaw [Wed, 23 Dec 2015 05:31:05 +0000 (23 13:31 +0800)]
Oracle Indexes
Add syntax for creating indexes in oracle (it's the same as PostgreSQL)
Dan Villiom Podlaski Christiansen [Mon, 28 Sep 2015 11:21:35 +0000 (28 13:21 +0200)]
odbc: support reading OLE entries
This adds support for reading OLE objects to the ODBC driver. The APIs
for reading OLE appear somewhat idiosyncratic, so we read the string
fully and stash it in a static variable.
Tested by reading an old Access database, with checking for memory leaks.
Dan Villiom Podlaski Christiansen [Mon, 28 Sep 2015 10:53:52 +0000 (28 12:53 +0200)]
odbc: don't assume sizeof(int) == sizeof(long)
Most 64-bit environments use 64 bit longs and 32 bit ints; as such,
comparing an int to LONG_MIN/MAX makes no sense. Since SQL LONGs
appear limited to 32 bits, I assume INT_MIN/MAX was intended.
Dan Villiom Podlaski Christiansen [Sun, 27 Sep 2015 23:08:53 +0000 (28 01:08 +0200)]
allow building without gnome-doc-utils
'gnome-doc-utils' is a rather large dependency on OS X, and the build
system has checks for gnome-doc-utils surrounding its use, but the
autoconf check errors out in its absence.
nirgal [Mon, 28 Sep 2015 08:25:59 +0000 (28 10:25 +0200)]
Merge pull request #86 from steko/patch-1
Fix typo in list of command line utils
Stefano Costa [Sat, 26 Sep 2015 20:40:04 +0000 (26 22:40 +0200)]
Fix typo in list of command line utils
leecher1337 [Sun, 30 Aug 2015 09:23:57 +0000 (30 11:23 +0200)]
Added strptime function to SQL parser as a feature. This is needed to i.e. be able to query time-fields in DB and to use dates <1.1.1970 and >19.1.2038. All changes should be backwards-compatible to not break existing queries.
leecher1337 [Fri, 21 Aug 2015 12:50:34 +0000 (21 14:50 +0200)]
At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it.
leecher1337 [Thu, 20 Aug 2015 12:35:09 +0000 (20 14:35 +0200)]
Added simple support for count(*) to SQL parser to quickly get number of rows in table
leecher1337 [Sun, 16 Aug 2015 09:39:17 +0000 (16 11:39 +0200)]
Fixed a severe design flaw in ODBC driver that prevented the driver from using multiple SELECTs at once and instead crashed the driver
leecher1337 [Sat, 15 Aug 2015 22:58:34 +0000 (16 00:58 +0200)]
Fixed bug in ODBC driver causing incomplete data on SQLGetData when doing SQLFetch and SQLGetData for one column in a loop if there was an incomplete fetch of some previous dataset
Nirgal Vourgère [Sat, 30 May 2015 13:40:58 +0000 (30 15:40 +0200)]
Split bash-completion snippet in small ones
/usr/share/bash-completion/completions/ now uses dynamic loading based on file name.
Nirgal Vourgère [Tue, 26 May 2015 15:34:51 +0000 (26 17:34 +0200)]
Merge pull request 78
Nirgal Vourgère [Tue, 26 May 2015 15:34:34 +0000 (26 17:34 +0200)]
Space normalisation
William Rogers [Sun, 24 May 2015 23:04:14 +0000 (24 18:04 -0500)]
Freed memory on SQL engine termination
Modified mdb_sql_exit to free the memory allocated for the SQL engine in mdb_sql_init
William Rogers [Sun, 24 May 2015 22:38:50 +0000 (24 17:38 -0500)]
Added proper SQL engine termination
Since the SQL engine is initialized in _SQLAllocEnv, the engine should be also terminated in SQLFreeEnv.
William Rogers [Sun, 24 May 2015 22:15:52 +0000 (24 17:15 -0500)]
Corrected memory being improperly freed
The memory for sql->bound_values is now freed by mdb_sql_reset, so these values no longer should be freed in dump_results_pp. Also, this fixes a memory leak that was occurring when results were not being pretty printed.
William Rogers [Sun, 24 May 2015 22:12:29 +0000 (24 17:12 -0500)]
Fixed memory leak - sql->bound_values
Memory allocated by mdb_sql_bind_all for sql->bound_values was being leaked at each query execution. Memory is now freed in mdb_sql_reset
William Rogers [Sun, 24 May 2015 22:05:41 +0000 (24 17:05 -0500)]
Consolidated calls to mdb_sql_reset
SQL engine was being reset in both dump_results functions. Rather than having several different functions responsible for resetting the engine depending on the circumstances, the reset now only occurs in run_query, the same function where the query is executed.
William Rogers [Sun, 24 May 2015 21:49:44 +0000 (24 16:49 -0500)]
Fixed memory leak in _SQLFreeEnv
Memory allocated for the _henv structure was not being freed which caused a small memory leak.
William Rogers [Sat, 23 May 2015 01:10:10 +0000 (22 20:10 -0500)]
Correction to SQLGetData string length handling
According to http://download.oracle.com/otn_hosted_doc/timesten/703/TimesTen-Documentation/ms.odbc.pdf and https://msdn.microsoft.com/en-us/library/ms710980(v=vs.85).aspx, the string length should not include the NULL character at the end.
Previous behavior would likely work without problems for any language that uses C-style null terminated strings, but adds a null character in the string when using the driver with a language that does not use C-style strings.
William Rogers [Fri, 22 May 2015 21:30:13 +0000 (22 16:30 -0500)]
Implemented SQL_DESC_UNSIGNED attribute in SQLColAttributes
nirgal [Fri, 6 Mar 2015 15:54:56 +0000 (6 15:54 +0000)]
Merge pull request #69 from czarkoff/readme
State in README that glib is required
nirgal [Thu, 5 Mar 2015 13:57:17 +0000 (5 14:57 +0100)]
Merge pull request #73 from rutsky/patch-3
fix typo: "popluated"
Vladimir Rutsky [Thu, 5 Mar 2015 13:20:12 +0000 (5 16:20 +0300)]
fix typo: "popluated"
nirgal [Wed, 4 Mar 2015 13:29:19 +0000 (4 14:29 +0100)]
Merge pull request #72 from rutsky/patch-2
fix typo: "over-ride"
Vladimir Rutsky [Wed, 4 Mar 2015 11:11:07 +0000 (4 14:11 +0300)]
fix typo: "over-ridden"
Vladimir Rutsky [Wed, 4 Mar 2015 11:08:52 +0000 (4 14:08 +0300)]
fix typo: "over-ride"
nirgal [Wed, 4 Mar 2015 10:57:26 +0000 (4 11:57 +0100)]
Merge pull request #71 from rutsky/patch-1
fix typo: "enought"
Vladimir Rutsky [Wed, 4 Mar 2015 10:23:23 +0000 (4 13:23 +0300)]
fix typo: "enought"
Dmitrij D. Czarkoff [Sat, 21 Feb 2015 05:51:47 +0000 (21 06:51 +0100)]
State that glib is required
Currently build system requires Glib, so it should be listed as hard dependency
nirgal [Mon, 16 Feb 2015 14:15:26 +0000 (16 15:15 +0100)]
Merge pull request #67 from rutsky/patch-1
add missing comma
Vladimir Rutsky [Mon, 16 Feb 2015 12:11:12 +0000 (16 15:11 +0300)]
add missing comma
nirgal [Tue, 20 Jan 2015 19:20:07 +0000 (20 19:20 +0000)]
Merge pull request #65 from greenskeleton/master
Fix configure for CentOS 6
Sam Stuck [Tue, 20 Jan 2015 17:42:42 +0000 (20 12:42 -0500)]
Fix configure for CentOS 6
Nirgal Vourgère [Mon, 12 Jan 2015 17:17:50 +0000 (12 18:17 +0100)]
Clarify usage of --no-comments in mdb-schema
Jimmytaker [Mon, 22 Dec 2014 19:14:40 +0000 (22 20:14 +0100)]
Fix not being able to handle blobs > 16 MB. Limit now at 256 MB
Nirgal Vourgère [Mon, 29 Dec 2014 12:14:45 +0000 (29 13:14 +0100)]
Avoid dynamic array allocation on stack.
This might help some non C99 compliant compilers, while being a trivial change.
Nirgal Vourgère [Mon, 29 Dec 2014 12:10:01 +0000 (29 13:10 +0100)]
Decrease POSIX required level to 1
One can now compile with CFLAGS="-std=c99 -D_POSIX_C_SOURCE=1 -pedantic"
Trade getopt.h function for glib equivalents:
This mean all utilities now have long option names.
Adjust manuals and bash_completion accordingly.
Added missing manual and bash_completion for mdb-import.
Nirgal Vourgère [Sun, 28 Dec 2014 11:36:55 +0000 (28 12:36 +0100)]
Allow CFLGAS="-std=c99 -D_POSIX_C_SOURCE=2"
Use glib function:
strcasecmp -> g_ascii_strcasecmp
bzero -> memset
strdup -> g_strdump
Don't use arithmetic void*+int
Jimmytaker [Mon, 22 Dec 2014 19:14:40 +0000 (22 20:14 +0100)]
Fix not being able to handle blobs > 16 MB. Limit now at 256 MB
Jimmytaker [Mon, 22 Dec 2014 19:13:31 +0000 (22 20:13 +0100)]
New useful function (generate_table_schemas) for Windows but not only
Jimmytaker [Mon, 22 Dec 2014 19:09:43 +0000 (22 20:09 +0100)]
Compiles with VC++ as a .dll. Set up to use static glib, libiconv, libintl for ease of use.
Jimmytaker [Mon, 22 Dec 2014 18:47:12 +0000 (22 19:47 +0100)]
VS2012 Build project and gitignore update
Nirgal Vourgère [Mon, 20 Oct 2014 09:29:54 +0000 (20 11:29 +0200)]
Revert previous commit
Files where already there
Nirgal Vourgère [Sat, 18 Oct 2014 05:19:10 +0000 (18 07:19 +0200)]
Added bash-completion and desktop files in dist/
Shane Mc Cormack [Sun, 5 Jan 2014 12:21:00 +0000 (5 13:21 +0100)]
Fix for dates in mdb-props
Maurus Cuelenaere [Mon, 17 Mar 2014 12:30:40 +0000 (17 13:30 +0100)]
Add MySQL support to mdb_print_indexes()
Maurus Cuelenaere [Mon, 17 Mar 2014 12:30:28 +0000 (17 13:30 +0100)]
Introduce MDB_BACKEND_* enum
Nirgal Vourgère [Fri, 17 Oct 2014 15:15:46 +0000 (17 17:15 +0200)]
fix ENABLE_SK undefined, autoconf summary
Nirgal Vourgère [Fri, 17 Oct 2014 12:55:58 +0000 (17 14:55 +0200)]
Normalise configure.ac help messages
Nirgal Vourgère [Fri, 17 Oct 2014 10:49:49 +0000 (17 12:49 +0200)]
Using iodbc-config --cflags --libs to get config
Nirgal Vourgère [Fri, 17 Oct 2014 09:10:22 +0000 (17 11:10 +0200)]
autoconf graciously fail on missing pkg-config
nirgal [Fri, 17 Oct 2014 04:09:38 +0000 (17 04:09 +0000)]
Merge pull request #59 from paulfitz/prune-headers
remove unneeded headers
Paul Fitzpatrick [Thu, 16 Oct 2014 22:40:13 +0000 (16 18:40 -0400)]
remove unneeded headers
tyzhaoqi [Thu, 24 Jul 2014 06:10:49 +0000 (24 08:10 +0200)]
Fix binary outout
Closes issue #44
lovelytwo [Fri, 2 May 2014 13:12:16 +0000 (2 15:12 +0200)]
Segfault fix on memo zero length multiple page
While converting memo field to string, stop processing on zero length multiple
page.
Nirgal Vourgère [Fri, 2 May 2014 12:52:27 +0000 (2 14:52 +0200)]
README update: mdb-dump is in extra
Thanks scottfurry
Closes github issue #50
Maurus Cuelenaere [Mon, 17 Mar 2014 12:30:40 +0000 (17 13:30 +0100)]
Add MySQL support to mdb_print_indexes()
Maurus Cuelenaere [Mon, 17 Mar 2014 12:30:28 +0000 (17 13:30 +0100)]
Introduce MDB_BACKEND_* enum
Nirgal Vourgère [Sat, 4 Jan 2014 14:16:46 +0000 (4 15:16 +0100)]
Spelling fix
Suppress has 2 p in English, thanks lintian.
Nirgal Vourgère [Thu, 24 Oct 2013 17:09:06 +0000 (24 19:09 +0200)]
Moved gmdb help arch from rarian to gnome-doc
And fixed gmdb.xml: <listitem> cannot contains <guiitem> dirrectly. Added a <para> wrapper.
Nirgal Vourgère [Tue, 22 Oct 2013 08:50:19 +0000 (22 10:50 +0200)]
Added bash-completion snipets
Nirgal Vourgère [Tue, 22 Oct 2013 08:46:03 +0000 (22 10:46 +0200)]
Added .desktop file for gmdb
Nirgal Vourgère [Mon, 21 Oct 2013 07:36:45 +0000 (21 09:36 +0200)]
Fixed typo in README
nirgal [Sun, 13 Oct 2013 18:33:00 +0000 (13 11:33 -0700)]
Merge pull request #35 from chatcannon/master
Fixes build error introduced by previous commit
Chris Kerr [Sun, 13 Oct 2013 18:11:10 +0000 (13 19:11 +0100)]
Fixes build error introduced by previous commit
Chris Kerr [Sun, 13 Oct 2013 16:57:29 +0000 (13 18:57 +0200)]
Fix parallel builds (make -jN) in SQL lexer/parser
Initial bug repport:
https://bugs.gentoo.org/show_bug.cgi?id=486434
Thanks to Patrick Lauer.
Problem is that generated parser.h is not ready when lexer.l is compiled.
See
https://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html
https://www.gnu.org/software/automake/manual/automake.html#Yacc-and-Lex
Nirgal Vourgère [Sun, 13 Oct 2013 08:51:24 +0000 (13 10:51 +0200)]
Releasing version 0.7.1
Nirgal Vourgère [Sun, 13 Oct 2013 07:05:18 +0000 (13 09:05 +0200)]
Fix buffer overflow in sql error message buffer
Also use existing buffer when printing to stderr
nirgal [Sat, 12 Oct 2013 10:10:53 +0000 (12 03:10 -0700)]
Merge pull request #34 from bokic/master
FIX: mdb-sql crashed with SIGSEGV in _IO_vfprintf_internal() on amd64
bokic [Sun, 6 Oct 2013 04:23:35 +0000 (6 06:23 +0200)]
FIX: mdb-sql crashed with SIGSEGV in _IO_vfprintf_internal() on amd64
https://bugs.launchpad.net/ubuntu/+source/mdbtools/+bug/
1227033
Nirgal Vourgère [Sun, 11 Aug 2013 12:02:02 +0000 (11 14:02 +0200)]
Refresh help makefiles from gnome-doc-utils
Nirgal Vourgère [Thu, 18 Jul 2013 13:21:14 +0000 (18 15:21 +0200)]
Prints "file not found" when that happens
... rather than the obscure "Can't alloc filename"