Evan Miller
2e1e1ed796
Simplify bounds checking logic with snprintf
2020-08-06 23:58:34 -04:00
Nyall Dawson
3517b0eee6
Implement SQL_COLUMN_TYPE_NAME field identifier in SQLColAttributes
...
Without this use of mdbtools in UnixODBC is broken, as all calls to
SqlFetch error out
2020-08-07 13:48:45 +10:00
Evan Miller
68d3a22e77
Merge branch 'master' into no-glib
2020-08-05 18:49:24 -04:00
Evan Miller
aecee0e594
Provide SQL_DESC_UPDATABLE column attribute brianb/mdbtools#156
2020-08-05 18:19:23 -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
Peter Kaukov
55858b6fe1
Fix flex library linking
2019-07-13 23:56:32 +03:00
leecher1337
135f452407
Merge branch 'master' into master
2017-12-03 17:02:15 +01: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
Dan Villiom Podlaski Christiansen
e22791606f
odbc: support reading OLE entries
...
This adds support for reading OLE objects to the ODBC driver. The APIs
for reading OLE appear somewhat idiosyncratic, so we read the string
fully and stash it in a static variable.
Tested by reading an old Access database, with checking for memory leaks.
2015-09-28 13:56:10 +02:00
Dan Villiom Podlaski Christiansen
1b8c2ca483
odbc: don't assume sizeof(int) == sizeof(long)
...
Most 64-bit environments use 64 bit longs and 32 bit ints; as such,
comparing an int to LONG_MIN/MAX makes no sense. Since SQL LONGs
appear limited to 32 bits, I assume INT_MIN/MAX was intended.
2015-09-28 13:56:09 +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
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
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
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
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 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
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
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
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
0196d34d7b
__attribute__ change into macro
...
Makes it easier to port to another compiler.
Thanks Jimmy Taker
2013-06-28 01:51:52 +02:00
William Rogers
6043e22a43
Memory leak fix in odbc
...
Free the stmt->bind_head list on Stmt
Reset row_affected on FreeStmt
2013-06-26 11:33:26 +02:00
William Rogers
6326e54e82
Fix mem leak in SQLGetData
...
Free temporary string when we are past result length and we return SQL_NO_DATA
2013-06-26 10:13:05 +02:00
Nirgal Vourgère
ee1978161c
Check outpout buffers in ODBC SQLGetInfo
2013-06-26 00:41:12 +02:00
rogerswb
40d1ecd11f
Update _SQLGetData - Was incorrectly attempting to validate input of an output only parameter
...
According to the spec, pcbValue is designated as an output only variable, so there is no need to validate any incoming values.
Some packages do not initialize this variable before passing it into the function call; this will randomly result in an improperly thrown error.
Removed the input validation.
2013-05-23 14:58:19 -05:00
Nirgal Vourgère
473d820239
Replace map files by -export-symbols-regex use
...
We had to support -export-symbols-regex anways
And map file did not really support versions but only list which symbol
to export. So this is more simple.
2012-10-20 14:32:32 +02:00
Nirgal Vourgère
c7bbac2cab
Tweak odbc calls
...
Removed obsolete FAR from code
SQLfunction calls _SQLfunction rather than the reverse: This avoids
deprecated warning on MacOSX.
2012-10-20 14:22:59 +02:00
Nirgal Vourgère
052bb94361
Fixed some odbc prototypes
...
And also a bunch of warnings
2012-10-12 15:21:59 +02:00
Nirgal Vourgère
bd9091ce57
Backup --version-script with -export-symbols-regex
...
When ld doesn't support --version-script, use -export-symbols-regex
instead.
2012-10-12 14:33:36 +02:00
Nirgal Vourgère
ea9a4ef1e5
Drop support for SunOS style --version-script
...
Not working, and causes compilation problems on MacOS
2012-10-12 13:30:10 +02:00
Nirgal Vourgère
cca7001f98
Added support for SunOS style --version-script
2012-10-10 18:27:52 +02:00
Nirgal Vourgère
d0e7eb7d8d
Disable ODBC wide char if iconv is not available
2012-10-10 14:27:30 +02:00
Nirgal Vourgère
6b6e54bd14
Disable ld --version-script flag if not supported
...
See https://github.com/brianb/mdbtools/issues/17
Thanks libjpeg-turbo for the script (BSD license)
2012-10-04 14:31:14 +02:00
Nirgal Vourgère
1700860912
Work around for missing __attribute((alias))
...
Some platforms such as OSX 10.7 don't have __attribute((alias)) enabled.
We need a work around there
2012-08-08 16:21:32 +02:00