Commit Graph

886 Commits

Author SHA1 Message Date
Jimmytaker
aab7a561f1 VS2012 Build project and gitignore update 2014-12-22 19:55:11 +01:00
Mihai Draghicioiu
a2587a6830 Add database comments in mysql exports 2014-10-18 11:46:01 +02:00
Shane Mc Cormack
a3ab6c7969 Fix for dates in mdb-props 2014-10-18 06:25:54 +02:00
Maurus Cuelenaere
e2c46bad8b Add MySQL support to mdb_print_indexes() 2014-10-17 22:18:34 +02:00
Maurus Cuelenaere
97ddfcf8b2 Introduce MDB_BACKEND_* enum 2014-10-17 22:16:49 +02:00
nirgal
85f8efc85f Merge pull request #59 from paulfitz/prune-headers
remove unneeded headers
2014-10-17 04:09:38 +00:00
Paul Fitzpatrick
3f52803c19 remove unneeded headers 2014-10-16 18:40:13 -04:00
tyzhaoqi
9ab40e83e6 Fix binary outout
Closes issue #44
2014-07-24 08:10:49 +02:00
David Hicks
f2890dc1d0 Add hexadecimal binary output conversion option
This commit adds another binary output conversion option to convert
binary blobs into hexadecimal notation, similar to the output of the
following command:
  xxd -p binaryfile.bin | tr -d '\n'

(In other words, a single line string of hexadecimal characters
representing a binary blob)

When exporting SQL INSERT statements for SQLite and PostgreSQL and when
the hexadecimal notation is specified with 'mdb-export -b hex ...',
special consideration is given to ensure that binary blobs are safely
written to the SQLite or PostgreSQL database.

Signed-off-by: David Hicks <david@hicks.id.au>
2014-06-29 04:12:06 +10:00
Ugo Di Girolamo
5057419da9 Add new binary util - mdb-exportjson
A new binary util for exporting mdb rows as json lines.
This is very useful for importing mdb data to mongo in combination with mongoimport.

The code is vastly similar to the mdb-export but there are enough dissimilarities and disagreement
about flag values that I thought a separate util is warranted.
2014-05-21 22:35:06 -04: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
Maurus Cuelenaere
65b573637e Add MySQL support to mdb_print_indexes() 2014-03-17 13:30:40 +01:00
Maurus Cuelenaere
cce6cfead2 Introduce MDB_BACKEND_* enum 2014-03-17 13:30:28 +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
b5fb8243a1 Moved gmdb help arch from rarian to gnome-doc
And fixed gmdb.xml: <listitem> cannot contains <guiitem> dirrectly. Added a <para> wrapper.
2013-10-24 21:48:51 +02:00
Nirgal Vourgère
d9d58d3cae Added bash-completion snipets 2013-10-22 11:01:15 +02:00
Nirgal Vourgère
b449ed159d Added .desktop file for gmdb 2013-10-22 11:01:07 +02:00
Chris Kerr
2f4b2d12fe Fixes build error introduced by previous commit 2013-10-13 19:11:10 +01:00
Chris Kerr
2892d519f3 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
2013-10-13 18:57:29 +02:00
Nirgal Vourgère
1213f84859 Fix buffer overflow in sql error message buffer
Also use existing buffer when printing to stderr
2013-10-13 09:05:18 +02:00
bokic
bb08d92bfb FIX: mdb-sql crashed with SIGSEGV in _IO_vfprintf_internal() on amd64
https://bugs.launchpad.net/ubuntu/+source/mdbtools/+bug/1227033
2013-10-06 06:23:35 +02:00
Nirgal Vourgère
a7a39a34ee Refresh help makefiles from gnome-doc-utils 2013-08-11 14:02:02 +02:00
Nirgal Vourgère
4a3f3492cd Prints "file not found" when that happens
... rather than the obscure "Can't alloc filename"
2013-07-18 15:21:14 +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
5312060544 Changed gmdb2 output filenames to textentries
GtkFileChooserButton was cripled by gtk developers so that it now only support
selecting an existing file for overwrite.
https://bugzilla.gnome.org/show_bug.cgi?id=157384

TextEntries is really not user friendly, but it's better than forced overwrite.
2013-07-14 19:06:59 +02:00
Nirgal Vourgère
088493d499 Update autoconf/automake standards
Generated files config.guess config.sub depcomp install-sh ltmain.sh missing
and ylwrap have been moved to build-aux/

Ran autoupdate

Replaced AC_TRY_LINK/AC_TRY_COMPILE by AC_LINK_IFELSE/AC_COMPILE_IFELSE

Droped -I$(top_srcdir)/include from CFLAGS since AC_CONFIG_HEADERS already
adds the -I

Fixed bison detection

Added AM_PROG_AR as required by autoreconf -i -Wall

Updated NEWS and .gitignore
2013-07-09 18:39:03 +02:00
Nirgal Vourgère
a021708dae Move the ODBC wide support in its own file
Enabling wide functions can break ascii one, like DriveConnect()
2013-07-09 00:54:03 +02:00
Nirgal Vourgère
c908a4f4de ODBC GetData include \0 if fCType==SQL_C_CHAR 2013-07-08 17:12:47 +02:00
Nirgal Vourgère
3bdff87b9a ODBC GetData: Add support for a few fCType codes 2013-07-08 17:06:06 +02:00
Nirgal Vourgère
06ea2517e9 ODBC bug fix: reset length location on rebind 2013-07-07 19:42:49 +02:00
Nirgal Vourgère
00a66cc57f ODBC
Check column index ranges
Don't write \0 past buffer in column names
Warn if column name trucated
Repport driver version
2013-07-07 14:26:08 +02:00
Nirgal Vourgère
b728fc1e45 Drop versioning from libmdbodbc
Do use libmdbodbc.so, this is a plugin, not a versioned library
2013-07-05 00:30:43 +02:00
Nirgal Vourgère
7495034eef Fix FSF address in headers 2013-07-04 13:50:33 +02:00
Nirgal Vourgère
36a28cdfdb Drop old gmdb from repository 2013-07-04 12:05:40 +02:00
Nirgal Vourgère
603bfa365a Fix warning if large file support is enabled 2013-07-04 11:19:11 +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
66b87caf26 ODBC memory management
Check proper closure sequence of Statements/Connections/Env

SQLDisconnect now closes automatically all attached statements.
2013-07-03 19:32:53 +02:00
Nirgal Vourgère
aac9c61536 Moved ODBC ConnectParams into struct _hdbc
So now struct _hdbc contains the real allocated data.
SQLAllocConnect doesn't hack it anymore with its own stucture.
2013-07-03 13:39:08 +02:00
Nirgal Vourgère
eefddaffcc Don't distribute mdbprivate.h and mdbodbc.h
mdbprivate is.... private.

mdbodbc.h has no reason to be public: People who want to use the plugin
should use the public odbc.h headers. And having this private will permit
hdbc cleanup.
2013-07-03 11:59:28 +02:00
Nirgal Vourgère
6b24b25454 include odbcinstext.h in connectparams.c
This is possible since unixodbc version 2.2.10 as they fixed the including
of local files from public headers.
2013-06-30 15:29:16 +02:00
Nirgal Vourgère
6ef7da0597 Disabled schema comments for mysql backend
They were using an incorrect syntax
2013-06-29 12:13:09 +02:00
Nirgal Vourgère
6938e3c128 Changed the gmdb warning when SQL is disabled
--enable-sql option is no more.
2013-06-28 20:15:39 +02:00
Nirgal Vourgère
7a1637982c Fix build if yacc is missing 2013-06-28 20:07:44 +02:00
Nirgal Vourgère
8f0f167ab2 Memory leak fix
Free temporary variable in mdb_print_indexes
2013-06-28 17:54:30 +02:00
Nirgal Vourgère
687eeebe78 Memory leak fix
Need to free previous backend name when changing it.
2013-06-28 16:41:29 +02:00
Nirgal Vourgère
0196d34d7b __attribute__ change into macro
Makes it easier to port to another compiler.
Thanks Jimmy Taker
2013-06-28 01:51:52 +02:00
Nirgal Vourgère
365f7959ed Fixed password decoding
Thanks Jimmy Taker compilation warning.
2013-06-27 23:46:46 +02:00
William Rogers
0bbe5d3ee6 Memory leak fix
Free the col->sargs
2013-06-27 20:58:43 +02:00
William Rogers
1d39126de6 Memory leak wrong fix
Free col->sargs
Note this patch causes SEGV
2013-06-27 16:09:53 +02:00
William Rogers
28af8d296a Dynamic allocation of MdbSQL->bound_values
Was previously hardcoded to 256 columns max.
2013-06-27 15:09:15 +02:00