Commit Graph

151 Commits

Author SHA1 Message Date
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
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
7b51824c89 Consolidate / fix UUID formatting 2020-08-19 20:53:35 -04:00
Evan Miller
3c7761f965 Support --disable-glib flag with ODBC driver 2020-08-10 15:58:22 -04:00
Evan Miller
82bbc0cef7 Improved bounds checking 2020-08-09 16:38:25 -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
2e6e88b96f Improve bounds and return-value checking
Fixes a memory leak and a number of buffer overruns
2020-08-06 15:17:04 -04:00
Evan Miller
4682ec0f8a Fix crash 2020-08-06 14:08:30 -04:00
Evan Miller
04b736c9ff Fix indentation warnings 2020-08-05 23:22:08 -04:00
Evan Miller
1d289a65b3 Fix buffer overruns and NULL pointer deferences 2020-08-05 22:35:56 -04:00
Evan Miller
2b84f6c7f5 Fix buffer overflow 2018-09-20 13:02:32 -07: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
fd230f68f2 precision and scale were used other way around. Flipped their usage
in all places
2018-02-06 13:10:56 -05:00
leecher1337
135f452407 Merge branch 'master' into master 2017-12-03 17:02:15 +01: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
Jimmytaker
55d57c65cf Use bigger buffer when reading big blobs to increase performance 2015-10-06 20:43:10 +02:00
leecher1337
e2449c11f3 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. 2015-08-30 11:23:57 +02:00
Jimmytaker
a5e1ab8a2e Fix not being able to handle blobs > 16 MB. Limit now at 256 MB 2014-12-29 14:54:25 +01:00
Nirgal Vourgère
2a70e16a8b 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
2014-12-28 12:36:55 +01:00
Jimmytaker
850d9e169d Fix not being able to handle blobs > 16 MB. Limit now at 256 MB 2014-12-22 20:14:40 +01:00
Jimmytaker
cb65d4f3dd Compiles with VC++ as a .dll. Set up to use static glib, libiconv, libintl for ease of use. 2014-12-22 20:09:43 +01:00
Shane Mc Cormack
a3ab6c7969 Fix for dates in mdb-props 2014-10-18 06:25:54 +02:00
tyzhaoqi
9ab40e83e6 Fix binary outout
Closes issue #44
2014-07-24 08:10:49 +02:00
lovelytwo
a89baeacf5 Segfault fix on memo zero length multiple page
While converting memo field to string, stop processing on zero length multiple
page.
2014-05-02 15:12:16 +02: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
tyzhaoqi
9cd05ffdcc Added missing break in switch/case
That missing break is not just a memory leak:
It results in incorrect call to mdb_unicode2ascii for binary data!
I suspect that is what is causing segfault on some db as repported on
https://github.com/brianb/mdbtools/issues/19
2013-06-23 17:56:53 +02:00
Nirgal Vourgère
c91950b157 Simple tabulation cleaning 2012-07-26 21:48:12 +02:00
jakob
88ff1c023e Basic support for Complex Columns (Access 2007+)
The major new feature in Access 2007 where so called complex columns.
These can be multivalued fields, attachments, or MEMO fields with
version history. All of them are implemented using hidden helper tables,
and the column itself has type MDB_COMPLEX (0x12) which is basically a
long int used as a key.

This commit adds basic support for this complex type to libmdb.
2012-07-07 20:23:20 +02:00
Will Daniels
04b6cf5232 Export REPID as string & use char(38) in mysql 2012-06-29 02:28:51 +02:00
Nirgal Vourgre
dd0f4c3819 Patch docs.diff from Nirgal 2011-08-28 19:53:29 -04:00
Nirgal Vourgre
aee657f603 Patch warnings.diff from Nirgal 2011-08-28 19:48:44 -04:00
Nirgal Vourgre
fba597765d Patch wheredate.diff from Nirgal 2011-08-28 19:47:18 -04:00
Nirgal Vourgre
1f2749cdfc Patch bufferdump.diff from Nirgal 2011-08-28 19:43:52 -04:00
Brian Bruns
1f3c04990d numeric patch from Jakob Egger 2011-03-20 15:23:27 -04:00
Brian Bruns
ff251e736f patch 'binaries' from Nirgal Vourgère 2011-02-21 14:11:57 -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
5c7e4216fa clean up float length, from Nirgal Vourgère 2011-02-07 22:04:30 -05:00
jakob
82b28d6845 Fixed a bug that would remove the first two digits after the decimal mark in NUMERIC (decimal) fields 2011-01-26 09:55:30 -08:00
Brian Bruns
85be8bbe68 patch 180-slowmap-fallback from Nirgal Vourgère 2010-11-01 09:26:46 -04:00
Brian Bruns
9b87b488a4 revised patch 130-export-smallfloat from Nirgal Vourgère 2010-08-03 19:59:41 -04:00
Brian Bruns
7a073df76e Patch 155-blob from Nirgal Vourgère 2010-06-17 22:12:44 -04:00
Brian Bruns
4fb8786418 Debian patch 130-export-smallfloat from Vincent Fourmond 2010-06-17 19:56:22 -04:00
Brian Bruns
09a82013a3 Debian patch 056-libmdb-data 2010-06-16 23:36:14 -04:00
brianb
c021da2555 fix negative numbers on MDB_INT types 2007-03-17 01:08:52 +00:00
brianb
2d098cd9e9 bug #1463036. do case insensitive compare in mdb_bind_column_by_name() 2007-03-06 00:28:33 +00:00
whydoubt
de1ce907a4 Fixes in reading data into bound fields 2005-11-04 12:12:11 +00:00
whydoubt
54bc9c81c6 Use correct parameter in mdb_col_to_string 2005-10-17 12:11:57 +00:00