Commit Graph

61 Commits

Author SHA1 Message Date
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
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
c93156626c Fix all sign-compare warnings
Also flip on -Wsign-compare in the default configuration
2020-08-09 16:15:20 -04:00
Evan Miller
cac3f7aca5 Default to single quotes when exporting to Postgres
See:

brianb/mdbtools#119
brianb/mdbtools#128
2020-08-05 18:27:48 -04:00
Evan Miller
cde53c4332 Respect octal flag in mdb-export brianb/mdbtools#153
The *col_val <= 0 check appears to have been intended to print ASCII
characters as-is. But this is not a good check, and goes against the
documented behavior.
2020-08-05 13:38:50 -04:00
Cyber Emissary
278f9ba441 Implemented bulk insert 2018-02-12 15:21:15 -05: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
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
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
Nirgal Vourgère
072f7c6518 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.
2014-12-29 13:12:23 +01:00
Nirgal Vourgère
dfd752ec02 Spelling fix
Suppress has 2 p in English, thanks lintian.
2014-01-04 15:16:46 +01:00
Nirgal Vourgère
7841d30d43 Revert use of config.h
Revert
7162e8db74
088493d499

And drop AC_CONFIG_HEADERS so that config goes though the command line.
No longer generating config.h, update .gitignore
2013-07-15 02:42:12 +02:00
Nirgal Vourgère
7162e8db74 Include config.h in all .c files
Need to be the first file since it may define large files support
and other options.
2013-07-04 10:53:13 +02:00
Nirgal Vourgère
8a545120d7 Migrate mdb-export changes to gmdb2
Support for octal/stip of binary
Customisation of escape string
Quoting is done according to types rather that empiric analysis of str
conversion.
2013-01-13 21:20:00 +01:00
Nirgal Vourgère
7e8ae9b121 print_col new FILE* outfile parameter
TODO: Merge that code with the one in gmdb2
2012-12-09 13:10:09 +01:00
Nirgal Vourgère
915eeb61d4 mdb-export -b octal: Encode \0 too 2012-12-03 15:35:14 +01:00
Nirgal Vourgère
a66531c74a Added option to choose how to export blobs
Supported modes are:
- strip (don't export)
- raw (compatibility)
- octal (export as \ooo)

Note that gmdb2 dialog where updated, but not the code. Many fixes to do
there first :/
2012-12-02 20:52:21 +01:00
Nirgal Vourgère
f6cd70494c Automatically init/exit libmdb code
mdb_init() and mdb_exit() are now deprecated.
2012-07-22 02:29:04 +02:00
Will Daniels
04b6cf5232 Export REPID as string & use char(38) in mysql 2012-06-29 02:28:51 +02:00
Nirgal Vourgère
7e34078bcc Fix namespace in mdb-export when using -I
Thanks George L. Emigh for the bug report.
2012-01-30 11:41:04 +01:00
Nirgal Vourgre
dd0f4c3819 Patch docs.diff from Nirgal 2011-08-28 19:53:29 -04:00
Nirgal Vourgre
8ef50c444e Patch nosanitize.diff form Nirgal 2011-08-28 18:56:03 -04:00
Brian Bruns
5e4e31d1c9 format security patch from Nirgal Vourgère 2011-03-20 15:26:52 -04:00
Brian Bruns
b4238ac88f patch 'export' from Nirgal Vourgère 2011-02-21 14:11:41 -05:00
Brian Bruns
39277312d4 patch 'schema2' from Nirgal Vourgère 2011-02-16 18:58:22 -05:00
Brian Bruns
fa83ed0af0 patch 'ole' from Nirgal Vourgère 2011-02-16 18:57:40 -05:00
Brian Bruns
586fdebc5c fix exporting of OLE data, from Nirgal Vourgère 2011-02-07 22:08:08 -05:00
Brian Bruns
5ac44b69d9 patch from Terry Brown <terry_n_brown at yahoo.com> to add -N option to mdb-export 2010-08-03 20:09:37 -04:00
Brian Bruns
30e5a6f4bb Debian patch 150-backend-quote from Nirgal Vourgère 2010-06-20 16:27:42 -04:00
Brian Bruns
7a073df76e Patch 155-blob from Nirgal Vourgère 2010-06-17 22:12:44 -04:00
Brian Bruns
789f7803fc Debian patch 110-export-csv-null 2010-06-16 23:42:17 -04:00
brianb
5f6fc1cb9f bug #1398003. Sanitize column names when -S is given without -I 2007-03-06 01:16:54 +00:00
whydoubt
bc80bddf2b Fix typo in help text 2006-05-24 00:41:52 +00:00
brianb
a443e83ae7 Clean up for 0.6 release and some bug fixes 2005-09-07 23:27:43 +00:00
whydoubt
76c5cfe8c2 Fix a couple of leaks 2005-03-13 21:29:17 +00:00
whydoubt
d06cb3e47d Combine functions that bind a column and its length 2004-12-31 01:26:28 +00:00
whydoubt
e121a82946 Lots more gcc warnings fixes 2004-07-09 12:47:04 +00:00
whydoubt
3d47cc5570 Add function mdb_read_table_by_name 2004-07-02 12:29:09 +00:00
whydoubt
a5afa5c9e4 better utilize glib functions, fix memory leaks 2004-05-30 07:19:22 +00:00
whydoubt
0baed7b268 Use mdb_close to match mdb_open instead of mdb_free_handle 2004-04-14 05:58:52 +00:00
brianb
4953cee0af signature change to mdb_open() 2004-04-13 20:06:04 +00:00
brianb
df8bf09aa7 patch #856724/856342 and odds and ends. 2004-02-09 20:38:45 +00:00
brianb
7ef02592d0 half of patch #857342, still need to fix NULL values 2004-02-09 03:52:25 +00:00
brianb
af7b6953ad last commit failed, see ChangeLog for changes 2004-02-06 02:35:18 +00:00
brianb
8c68edba1f Basic checks on file to ensure it's an mdb database. bug # 587739 2004-01-10 21:46:14 +00:00
brianb
11b43644dc patches 00-14 from David Mansfield 2004-01-06 00:42:07 +00:00
brianb
aa19a0892f resync...no idea what's in here, it's been sitting on the shelf for a while 2003-04-29 17:55:09 +00:00
brianb
75216d7a90 index work
dmalloc headers
mem leak fixes
start on i18n
2003-01-28 23:51:06 +00:00
brianb
092e2b79af query planner stuff
some gcc -Wall fixes
added suport for _ in identifier names in SQL
gmdb2 manual additions
2003-01-20 16:04:24 +00:00
brianb
0cf1a2242d jet 4 changes 2002-12-10 23:35:24 +00:00