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
Nirgal Vourgère
c1fffc5c9e
Bumped odbc lib version to 1.1.0: unicode support
...
Drop some obsolete stuff in src/odbc/Makefile.am
2012-07-14 12:56:21 +02:00
Jean-Michel Vourgère
ce022eb1c7
Add missing prototype: Fixes compiler warning
...
SQLGetPrivateProfileString was not defined before use.
2012-07-02 23:15:57 +02:00
Jean-Michel Vourgère
5e092ba331
Fixed odbc.c compiler warnings
...
Return SQL_ERROR when wanted column is lost
2012-07-02 23:02:35 +02:00
branche
433dfd028c
Although I used a workaround, it works with unicode, at least.
2012-03-03 12:06:16 +09:00
Jean-Michel Vourgère
4cc277cbcc
Version 0.7~rc1
2011-09-04 17:18:56 -04:00
Jean-Michel Vourgère
c46fdfa782
Fixed 64 compilation & odbc unittest
2011-09-04 17:17:35 -04:00
Jean-Michel Vourgère
a4a1685b1f
4c847948fc + short dates
2011-09-04 17:16:47 -04:00
Jean-Michel Vourgère
2b72bcdc6f
SQLDescribeCol: fill pcbColName even when szColName is null.
2011-09-04 17:15:52 -04:00
Jean-Michel Vourgère
0919ca2a89
More simple map file without revisions. Add ODBCINST*.
2011-09-04 17:15:00 -04:00
Jean-Michel Vourgère
0a76d5716f
Removes many compilation warnings.
2011-08-30 16:11:13 -04:00
Nirgal Vourgre
7656d25aaf
Patch odbclink.diff from Nirgal
2011-08-28 19:55:04 -04:00