Commit Graph

1144 Commits

Author SHA1 Message Date
nirgal
3b6d88f347 Merge pull request #86 from steko/patch-1
Fix typo in list of command line utils
2015-09-28 10:25:59 +02:00
Stefano Costa
6dfccdd37e Fix typo in list of command line utils 2015-09-26 22:40:04 +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
leecher1337
5ce4cc5528 At least for me IS NULL and IS NOT NULL are the wrong way round in SQL, fixed it. 2015-08-21 14:50:34 +02:00
leecher1337
16bf355d6b Added simple support for count(*) to SQL parser to quickly get number of rows in table 2015-08-20 14:35:09 +02:00
leecher1337
0e508c82d8 Fixed a severe design flaw in ODBC driver that prevented the driver from using multiple SELECTs at once and instead crashed the driver 2015-08-16 11:39:17 +02:00
leecher1337
f1bc697d6a 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 2015-08-16 00:58:34 +02:00
Nirgal Vourgère
584119e415 Split bash-completion snippet in small ones
/usr/share/bash-completion/completions/ now uses dynamic loading based on file name.
2015-05-30 15:40:58 +02:00
Nirgal Vourgère
428834bbc4 Merge pull request 78 2015-05-26 17:34:51 +02:00
Nirgal Vourgère
eb7d03187f Space normalisation 2015-05-26 17:34:34 +02:00
William Rogers
4148518906 Freed memory on SQL engine termination
Modified mdb_sql_exit to free the memory allocated for the SQL engine in mdb_sql_init
2015-05-24 18:04:14 -05:00
William Rogers
d0472d96ba Added proper SQL engine termination
Since the SQL engine is initialized in _SQLAllocEnv, the engine should be also terminated in SQLFreeEnv.
2015-05-24 17:38:50 -05:00
William Rogers
82e3436494 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.
2015-05-24 17:15:52 -05:00
William Rogers
0123d7e1c2 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
2015-05-24 17:12:29 -05:00
William Rogers
9276aca347 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.
2015-05-24 17:05:41 -05:00
William Rogers
bcc7ad5a7a Fixed memory leak in _SQLFreeEnv
Memory allocated for the _henv structure was not being freed which caused a small memory leak.
2015-05-24 16:49:44 -05:00
William Rogers
5888c4a52c 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.
2015-05-22 20:10:10 -05:00
William Rogers
dca7552d8b Implemented SQL_DESC_UNSIGNED attribute in SQLColAttributes 2015-05-22 16:30:13 -05:00
nirgal
22b5b6222e Merge pull request #69 from czarkoff/readme
State in README that glib is required
2015-03-06 15:54:56 +00:00
nirgal
74b85d782a Merge pull request #73 from rutsky/patch-3
fix typo: "popluated"
2015-03-05 14:57:17 +01:00
Vladimir Rutsky
772b5675dd fix typo: "popluated" 2015-03-05 16:20:12 +03:00
nirgal
ea44a36f50 Merge pull request #72 from rutsky/patch-2
fix typo: "over-ride"
2015-03-04 14:29:19 +01:00
Vladimir Rutsky
2f996874af fix typo: "over-ridden" 2015-03-04 14:11:07 +03:00
Vladimir Rutsky
270e0ae8cb fix typo: "over-ride" 2015-03-04 14:08:52 +03:00
nirgal
6e6a410f68 Merge pull request #71 from rutsky/patch-1
fix typo: "enought"
2015-03-04 11:57:26 +01:00
Vladimir Rutsky
9fb36c0f07 fix typo: "enought" 2015-03-04 13:23:23 +03:00
Dmitrij D. Czarkoff
f32e2d975e State that glib is required
Currently build system requires Glib, so it should be listed as hard dependency
2015-02-21 06:51:47 +01:00
Vladimir Rutsky
9f6e630246 ignore mdb-exportjson compiled binary 2015-02-20 20:23:17 +03:00
Vladimir Rutsky
3216c8de03 output all non-binary fields as unicode strings and binary fields as MongoDB extended JSON binary field
Now mdb-exportjson output can be successfully imported into MongoDB with
mongoimport even if:

 * columns have unicode names
 * there are fields of binary types (e.g. OLE)
2015-02-19 21:05:49 +03:00
Vladimir Rutsky
f894cc708f add base64 encoding implementation from Wikibooks
Source <https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64>.

Licensed probably under CC-BY-SA. Compatibility with mdb-tools GPL
license should be checked.
2015-02-19 21:05:49 +03:00
Vladimir Rutsky
bc1483429d use JSON unicode escape \uUUUU instead \xXX for [0, 0x20) characters
JSON specification doesn't allow `\xXX` escape sequences
2015-02-19 21:05:49 +03:00
Vladimir Rutsky
47c0698609 treat only characters with codes in [0, 0x20) range as non-ascii 2015-02-19 21:05:49 +03:00
Vladimir Rutsky
d8cba08493 fix delimiter outputting when some fields values are missing 2015-02-19 20:51:57 +03:00
Vladimir Rutsky
b842480cd5 don't drop non-ascii characters by default
This corresponds to `-A` option description.
2015-02-19 20:48:44 +03:00
Vladimir Rutsky
1758d99d4d Merge PR #52 - mdb-exportjson added 2015-02-19 20:46:33 +03:00
nirgal
c314913b25 Merge pull request #67 from rutsky/patch-1
add missing comma
2015-02-16 15:15:26 +01:00
Vladimir Rutsky
776416ebfc add missing comma 2015-02-16 15:11:12 +03:00
nirgal
603601982e Merge pull request #65 from greenskeleton/master
Fix configure for CentOS 6
2015-01-20 19:20:07 +00:00
Sam Stuck
3a62b29a75 Fix configure for CentOS 6 2015-01-20 12:42:42 -05:00
Nirgal Vourgère
13e339c1a4 Clarify usage of --no-comments in mdb-schema 2015-01-12 18:17:50 +01: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
9b4d5e624b Avoid dynamic array allocation on stack.
This might help some non C99 compliant compilers, while being a trivial change.
2014-12-29 13:14:45 +01: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
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
49bc1e3c40 New useful function (generate_table_schemas) for Windows but not only 2014-12-22 20:13:31 +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
Jimmytaker
aab7a561f1 VS2012 Build project and gitignore update 2014-12-22 19:55:11 +01:00
Nirgal Vourgère
4b52d6bfd9 Revert previous commit
Files where already there
2014-10-20 11:29:54 +02:00
Mihai Draghicioiu
a2587a6830 Add database comments in mysql exports 2014-10-18 11:46:01 +02:00