Commit Graph

971 Commits

Author SHA1 Message Date
Evan Miller
fa01a6fe27 Implement g_option_context_get_help (fake GLib)
This fixes the crashing issues, but the command-line tools are still
useless.
2020-08-03 19:55:03 -04:00
Evan Miller
cb7b694d4b Merge branch 'master' into no-glib 2020-08-03 18:59:01 -04:00
Evan Miller
68724b2cf2 Fix JET4 warnings brianb/mdbtools#158 2020-08-03 17:34:53 -04:00
Evan Miller
8a63560ca1 Merge https://github.com/markord/mdbtools
Enable memo field filtering. See:

brianb/mdbtools#140
brianb/mdbtools#141
2020-08-03 17:25:09 -04:00
Evan Miller
e9f4c6c786 Remove GLib dependency WIP
Add a shim implementing half-assed versions of most of the GLib
functions used by MDB Tools. If GLib is detected at compile-time,
use it, otherwise use the shim.

This work is not complete, as the option-parsing code is not yet
implemented - so most of the command-line tools crash.
2020-08-03 17:19:40 -04:00
Evan Miller
a2fa34c0cb Merge https://github.com/Kaukov/mdbtools 2020-08-03 16:55:40 -04:00
Evan Miller
61d928ea68 Fix warning when compiling without Readline 2020-08-03 15:13:11 -04:00
Peter Kaukov
55858b6fe1 Fix flex library linking 2019-07-13 23:56:32 +03:00
Evan Miller
7b3721a4e1 Merge github.com:cyberemissary/mdbtools 2019-06-03 11:58:16 -04:00
VJ
c8fd67bf84 Fix more warnings as a result of #14 2019-05-31 21:59:37 -04:00
Evan Miller
cdde7c3268 Enable strict prototypes warnings, and fix warnings
If a host project has -Wstrict-prototypes enabled, the mdbtools header
results in warnings. Turn on -Wstrict-prototypes for the whole project
so that these never occur again.
2018-12-29 10:34:54 -05:00
Evan Miller
2b84f6c7f5 Fix buffer overflow 2018-09-20 13:02:32 -07:00
Mark Ord
f893efb401 Unable to filter on memo field #140
* Added case statement for comparing memo fields
2018-05-26 10:37:05 -07:00
Evan Miller
0e9c1810f1 Improved support for Access 2010, 2013, and 2016
Some Access 2010 files use 0x03 as the version number rather than
0x0103. For this reason I have changed the call to mdb_get_int32 to
mdb_get_byte.

In addition, according to the Library of Congress page:

https://www.loc.gov/preservation/digital/formats/fdd/fdd000463.shtml

Access 2016 uses 0x05 as the version number. I have inferred from the
Wikipedia page that Access 2013 likely uses 0x04.
2018-03-05 06:39:57 -05:00
Cyber Emissary
40b7818906 Merge pull request #2 from mdjnewman/unknown-version-logging
Print unknown Jet versions in libmdb
2018-02-12 16:43:37 -05:00
Cyber Emissary
3a245f13d5 Merge branch 'mdb-count' of https://github.com/kodonnell/mdbtools 2018-02-12 16:22:52 -05:00
Cyber Emissary
104d952cda Merge pull request #6 from jimmytaker/omaster
Use bigger buffer when reading big blobs to increase performance
2018-02-12 15:48:30 -05:00
Cyber Emissary
278f9ba441 Implemented bulk insert 2018-02-12 15:21:15 -05:00
Cyber Emissary
dbc7e51e98 do not include table name in MySQL indexes. 2018-02-06 13:11:13 -05:00
Cyber Emissary
fd230f68f2 precision and scale were used other way around. Flipped their usage
in all places
2018-02-06 13:10:56 -05:00
Cyber Emissary
702ce2b7cd fixed mysql types, and numeric scale/precision 2018-02-06 13:10:13 -05:00
Bruce Johnson
5bfd423e19 Update mdb_index_hash_text() call to match latest signature 2018-01-19 05:51:00 -05:00
Matt Newman
d196436a27 Print unknown Jet versions in libmdb 2018-01-16 18:24:53 -05:00
leecher1337
e9ec53f6bd 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. 2017-12-05 00:13:28 +01:00
leecher1337
c81d35f2ea Optimization: Assuming that the index is sorted, I guess an index search can bail out as soon as target value has been found? 2017-12-03 23:25:35 +01:00
leecher1337
4edb48ed17 Bugfixes for JET4 indices. 2017-12-03 23:20:11 +01:00
leecher1337
42cdc6727e index.c: Centralised debugging helper 2017-12-03 18:18:21 +01:00
leecher1337
f8aa3f1104 Let debug hexdump-function output as unsigned hex value properly 2017-12-03 17:57:24 +01:00
leecher1337
5c32359f3e Fixed severe double-free bug on mdb_clone_handle with immediate mdb_close() afterwards leading to memory corruption 2017-12-03 17:53:41 +01:00
leecher1337
135f452407 Merge branch 'master' into master 2017-12-03 17:02:15 +01:00
kodonnell
b92f4cc882 added (trivial) mdb-count utility 2017-02-05 08:56:24 +13:00
Richard Mansfield
62f79ec3f3 Obey -e flag when quoting is disabled 2017-01-31 10:50:56 +13:00
Edward Abraham
4f10f09df8 Escape troublesome characters using a -e flag, following comment on issue #40 2017-01-26 17:26:01 +13:00
Nirgal Vourgère
492df3e927 Spelling fixes
Thanks lintian
2016-10-24 22:54:13 +02:00
Brian Bruns
9d56b0c3d8 bug fix for 'bad' data with odd number of UCS-2 bytes 2016-08-30 08:52:32 -04:00
Brian Bruns
23bab7c2d6 add support for LIMIT clause in SQL engine 2016-08-30 08:43:34 -04:00
leecher1337
2355aec912 At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it. 2016-08-29 12:14:51 -04:00
leecher1337
83ee854263 Fixed a severe design flaw in ODBC driver that prevented the driver from using multiple SELECTs at once and instead crashed the driver 2016-08-29 12:14:30 -04:00
leecher1337
786add6537 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 2016-08-29 12:12:44 -04:00
Brian Bruns
15230b5b73 Merge pull request #94 from ewen-naos-nz/boolean_data_as_words
mdb-export: Add boolean words option (TRUE/FALSE)
2016-08-29 09:40:51 -04:00
Brian Bruns
0443daa7d6 Merge pull request #101 from joshuashort/master
Adding option for user-defined NULL token in CSV output
2016-08-29 09:40:28 -04:00
Brian Bruns
1c04bcb308 Merge pull request #95 from ewen-naos-nz/jet4_index_flags
JET 4: index flags (eg, UNIQUE) 4 bytes later
2016-08-29 09:39:17 -04:00
Brian Bruns
09d113f182 Merge pull request #87 from danchr/tweaks+ole
OLE support for the ODBC driver
2016-08-29 09:15:16 -04:00
Joshua Short
e85c3438ec Adding option to for user-defined NULL token in CSV output (not sure if it should be escaped..) 2016-08-01 09:11:21 -07:00
Ewen McNeill
999f6f5f10 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).
2016-04-08 10:23:10 +12:00
Ewen McNeill
8b1db6c08e 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
2016-04-07 08:45:06 +12:00
Sam Shaw
ffccc9d1cf Oracle Foreign Keys
Oracle doesn't support the "ON UPDATE" clause for foreign keys.
2016-01-12 09:58:17 +08:00
Sam Shaw
7f21d4e030 Oracle BLOB & CLOB
BLOB and CLOB do not have a size constraint in Oracle
2015-12-23 13:46:31 +08:00
Sam Shaw
ffbc492a8b Oracle Indexes
Add syntax for creating indexes in oracle (it's the same as PostgreSQL)
2015-12-23 13:31:05 +08:00
Jimmytaker
55d57c65cf Use bigger buffer when reading big blobs to increase performance 2015-10-06 20:43:10 +02:00