psqlodbc.git
11 years agoFix the warning MSB8028: The intermediate directory (..\x86_Unicode_Release\) contain...
Hiroshi Inoue [Sun, 15 Jun 2014 12:22:29 +0000 (21:22 +0900)]
Fix the warning MSB8028: The intermediate directory (..\x86_Unicode_Release\) contains files shared from another project (pgxalib.vcxproj).  This can lead to incorrect clean and rebuild behavior.

11 years agoIt's safe to add this change in addition to the previous commit.
U-Lenovo-PC\hiroshi [Sat, 14 Jun 2014 13:28:22 +0000 (22:28 +0900)]
It's safe to add this change in addition to the previous commit.
d0c993d3f6f0a4496a20486f2ec19b14591baba7
Author: U-Lenovo-PC\hiroshi <hiroshi@Lenovo-PC.(none)>
Date:   Sat Jun 14 21:53:57 2014 +0900

    Fix potentially uninitialized local pointer access which causes
    fatal compilation errors on vs2012/2013 reported by Craig Ringer.

11 years agoFix potentially uninitialized local pointer access which causes
U-Lenovo-PC\hiroshi [Sat, 14 Jun 2014 12:53:57 +0000 (21:53 +0900)]
Fix potentially uninitialized local pointer access which causes
fatal compilation errors on vs2012/2013 reported by Craig Ringer.

11 years agoAdd top-level Windows makefile targets for building installers.
Heikki Linnakangas [Fri, 13 Jun 2014 12:34:36 +0000 (15:34 +0300)]
Add top-level Windows makefile targets for building installers.

You can now do "nmake /f win64.mak world" to build both x86 and x64
versions of the installers in one command.

11 years agoMake sure that the psqlodbc ANSI driver is ODBC3.5.
Hiroshi Inoue [Sun, 1 Jun 2014 04:02:10 +0000 (13:02 +0900)]
Make sure that the psqlodbc ANSI driver is ODBC3.5.

11 years agoChanges by a patch and a request from Craig Ringer <craig@2ndquadrant.com>.
Hiroshi Inoue [Fri, 13 Jun 2014 02:51:40 +0000 (08:36 +0545)]
Changes by a patch and a request from Craig Ringer <craig@2ndquadrant.com>.
Applied a patch [ODBC] PATCH: WiX has moved.
Register 64bit XA DLL on installation per discussion with him.

11 years agoFix a PowerShell syntax error.
Hiroshi Inoue [Sun, 1 Jun 2014 04:31:07 +0000 (13:31 +0900)]
Fix a PowerShell syntax error.
Also handle the case when GSSBINDIR parameter is given as an empty string in psqodbcm_cpu.wxs.

11 years agoSupport running regression tests on Windows.
Heikki Linnakangas [Thu, 12 Jun 2014 18:55:03 +0000 (21:55 +0300)]
Support running regression tests on Windows.

Some tests fail, and numeric test crashes for me, but at least it's
relatively easy to run the suite on Windows now.

Michael Paquier and me

11 years agoFix ODBC function escape for SPACE function.
Heikki Linnakangas [Thu, 12 Jun 2014 14:02:18 +0000 (17:02 +0300)]
Fix ODBC function escape for SPACE function.

Also add a regression test case for SPACE and a few other ODBC function
escapes.

11 years agoSilence compiler warnings from regression tests.
Heikki Linnakangas [Wed, 11 Jun 2014 21:43:48 +0000 (00:43 +0300)]
Silence compiler warnings from regression tests.

Three categories of warnings:

1. Missing return at end of main() function
2. Unused variables (copy-pasted from another test)
3. Data type mismatch in printfs, e.g. passing SQLULEN param to %d

11 years agoOops, forgot to git add some last-minute changes to the new regression test.
Heikki Linnakangas [Wed, 11 Jun 2014 21:28:16 +0000 (00:28 +0300)]
Oops, forgot to git add some last-minute changes to the new regression test.

11 years agoRewrite the conversion functions between strings and SQL_NUMERIC_STRUCT.
Heikki Linnakangas [Tue, 10 Jun 2014 10:35:05 +0000 (13:35 +0300)]
Rewrite the conversion functions between strings and SQL_NUMERIC_STRUCT.

Aside from making the functions more readable and faster, this fixes
a number of bugs:

1. When converting a large number from decimal to binary, the least
significant byte might be wrong (reported by Walter Couto)

2. In binary->decimal conversion, a number with small precision but large
scale caused a "Floating point exception".

3. In binary->decimal conversion, building the final string was wrong, picking
up "digits" from outside the reserved stack space, if scale was larger than 40

4. The param_string buffer allocated for the result of binary->decimal
conversion was too small.

Also add a test cases for all of these bugs.

11 years agoMinor code cleanup.
Heikki Linnakangas [Mon, 9 Jun 2014 18:29:42 +0000 (21:29 +0300)]
Minor code cleanup.

The main change is to move the responsibility of adding the "length" header
to the QueryBuild from ResolveOneParam to its caller, when constructing the
parameters to send over to the server in a Bind message. ResolveOneParam
is complicated enough without that, so it seems more clear this way.

The rest is just fixes to the macros to make them deal with a "&qb" argument,
by adding parens around the macro argument. And while at it, clean up the
whitespace in them.

11 years agoMisc whitespace and comment fixes. Remove dead, commented-out code.
Heikki Linnakangas [Sat, 7 Jun 2014 18:48:46 +0000 (21:48 +0300)]
Misc whitespace and comment fixes. Remove dead, commented-out code.

For sake of readability.

11 years agoFix crash if connection is closed while sending a query to the server.
Heikki Linnakangas [Wed, 4 Jun 2014 16:58:51 +0000 (19:58 +0300)]
Fix crash if connection is closed while sending a query to the server.

This is a similar bug that was fixed in commit 22b151eb. Some functions
reset conn->sock to NULL on a socket error, so we must not keep a copy of
it in a local variable. Also, SOCK_get_id should check for NULL argument
like all the rest of the SOCK_get/put_* functions.

11 years agoRemove unused NDEBUG and PSQLODBC_EXPORTS defines from makefiles.
Heikki Linnakangas [Wed, 4 Jun 2014 07:42:16 +0000 (10:42 +0300)]
Remove unused NDEBUG and PSQLODBC_EXPORTS defines from makefiles.

11 years agoRemove more unused stuff from win64.mak
Heikki Linnakangas [Wed, 4 Jun 2014 07:24:22 +0000 (10:24 +0300)]
Remove more unused stuff from win64.mak

11 years agoSilence misc issues flagged up by Clang's static analyzer, scan-build
Heikki Linnakangas [Tue, 3 Jun 2014 16:37:21 +0000 (19:37 +0300)]
Silence misc issues flagged up by Clang's static analyzer, scan-build

11 years agoUsing tolower() requires ctype.h with some compilers.
Heikki Linnakangas [Tue, 3 Jun 2014 14:57:35 +0000 (17:57 +0300)]
Using tolower() requires ctype.h with some compilers.

gcc and MSVC were happy without it, but clang warns.

11 years agoMerge 32-bit and 64-bit .wxs files used to build the .MSM files on Windows
Heikki Linnakangas [Tue, 3 Jun 2014 14:52:49 +0000 (17:52 +0300)]
Merge 32-bit and 64-bit .wxs files used to build the .MSM files on Windows

11 years agoUnify the 32-bit and 64-bit installer build processes.
Heikki Linnakangas [Tue, 3 Jun 2014 13:56:03 +0000 (16:56 +0300)]
Unify the 32-bit and 64-bit installer build processes.

Use the same .wxs file for both builds. The MSM files is still generated
differently, but this is a step in the right direction.

11 years agoFix Debug-mode builds with win64.mak
Heikki Linnakangas [Tue, 3 Jun 2014 12:38:28 +0000 (15:38 +0300)]
Fix Debug-mode builds with win64.mak

It apparently hasn't worked for a very long time. Copy some tricks from
the already-deleted win32.mak to make it work: Use /MDd rather than /MD
when compiling in Debug mode, and replace /GZ with /RTC1, to silence a
deprecation warning from the compiler

11 years agoFix Windows build with MSDTC=no.
Heikki Linnakangas [Tue, 3 Jun 2014 09:35:49 +0000 (12:35 +0300)]
Fix Windows build with MSDTC=no.

11 years agoRename Windows output folders, for clarity.
Heikki Linnakangas [Tue, 3 Jun 2014 08:23:26 +0000 (11:23 +0300)]
Rename Windows output folders, for clarity.

11 years agoRemove obsolete Windows build files.
Heikki Linnakangas [Tue, 3 Jun 2014 07:38:28 +0000 (10:38 +0300)]
Remove obsolete Windows build files.

buildx86.ps1 and buildx64.ps1 were used to invoke the nmake makefiles, but
have been obsoleted by the scripts in winbuild/. win64.mak can be used to
build 32-bit and 64-bit binaries now, so win32.mak is no longer needed.

11 years agoSimplify win32.mak and win64.mak a little bit.
Heikki Linnakangas [Mon, 2 Jun 2014 19:23:26 +0000 (22:23 +0300)]
Simplify win32.mak and win64.mak a little bit.

Change the way we test whether a directory exists, so that we don't need
a version check for Windows NT. (although we probably don't need to support
compiling on NT anymore anyway)

11 years agoImprove Windows compilation instructions in the docs.
Heikki Linnakangas [Mon, 2 Jun 2014 17:48:47 +0000 (20:48 +0300)]
Improve Windows compilation instructions in the docs.

11 years agoRefactor win64.mak to allow passing options in local file.
Heikki Linnakangas [Mon, 2 Jun 2014 17:16:49 +0000 (20:16 +0300)]
Refactor win64.mak to allow passing options in local file.

Move all the default values for external library paths to
windows-defaults.mak. Add an include for file called windows-local.mak,
this allows you to put local config options in that file, which is much
easier than passing them on the command line every time.

11 years agoRemove /incremental option from linker call on Windows / nmake
Heikki Linnakangas [Mon, 2 Jun 2014 17:03:51 +0000 (20:03 +0300)]
Remove /incremental option from linker call on Windows / nmake

The linker defaults to what were passing, so should work fine without it.

Also remove an unused variable from win32.mak

11 years agoRemove special check for nmake version 6.00.9782.0
Heikki Linnakangas [Mon, 2 Jun 2014 16:19:10 +0000 (19:19 +0300)]
Remove special check for nmake version 6.00.9782.0

Surely we don't need to support that old versions anymore. Besides, it
was bizarre to check for that exact version, and not any older or newer
versions of that era.

11 years agoRemove unused cruft from Windows build files.
Heikki Linnakangas [Mon, 2 Jun 2014 16:13:47 +0000 (19:13 +0300)]
Remove unused cruft from Windows build files.

11 years agoAdd comments to modify_msi.vbs.
Heikki Linnakangas [Mon, 2 Jun 2014 15:51:37 +0000 (18:51 +0300)]
Add comments to modify_msi.vbs.

It took me quite a while to reverse-engineer what it does, and more
importantly, why. Add comment to save time for the next reader.

11 years agoClean up Windows makefiles
Heikki Linnakangas [Mon, 2 Jun 2014 10:33:46 +0000 (13:33 +0300)]
Clean up Windows makefiles

Get rid of the CPU and CPUTYPE variables in win64.mak. Instead, assume that
the TARGET_CPU variable has been set correctly in the environment.
TARGET_CPU is set by "setenv" script that comes with the Microsoft Visual
Studio C compiler package. It never worked to pass a "CPU=x86" and using a
x64 compiler, for example, so seems better to determine the correct target
from the environment, than fail with a cryptic error message if the CPU
argument and the environment don't match. To build 32-bit binaries with
win64.mak, simply do "setenv /x86" before running "nmake -f win64.mak".
Similarly, to build 64-bit binaries, use "setenv /x64".

It should now be possible to build both 32-bit and 64-bit binaries with
win64.mak. Ideally, we could now remove win32.mak altogether, but there are
small differences between win64.mak and win32.mak in the build options that
they use. I don't understand the differences enough to dare to remove
win32.mak yet.

The CPU=AMD64 alias for x64 is no longer supported (as the whole parameter
is now gone).

Also do whitespace & other cosmetic fixes to win32.mak and win64, to make
them more similar. This helps when comparing the two with "diff".

Remove remains of the long-gone "MULTIBYTE" setting (it was misspelled in
win64.mak, anyway)

11 years agoRip out broken retry/timeout logic in SOCK_wait_for_ready.
Heikki Linnakangas [Tue, 27 May 2014 14:10:53 +0000 (17:10 +0300)]
Rip out broken retry/timeout logic in SOCK_wait_for_ready.

At a quick glance, the logic looked like retry with progressive timeout, but
it was horribly broken. First of all, the timeout was only used if
retry_count was passed as 0. And in that case, the timeout was 0. So
retry_count == 0 actually meant "check if data can be read/written without
blocking", while retry_count > 0 meant "sleep until data is available". There
was also some code to handle retry_count < 0, but that was dead code because
none of the callers passed a negative value.

The hardcoded max. retry count of 30 retries was quite bogus too. Filling
the output buffer more 30 times is not necessary an error, and it's not
clear that the ssl library could not return SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE more than 30 times. Unlikely, yes, but possible.

So, just rip out the retry_count and progressive timeout logic. Replace
the retry_count argument with a simple "should block?" argument. I didn't
dare to remove the condition that we always wait if SSL is enabled, although
I don't understand that at all. But perhaps there's some well-hidden reason
for that.

Per report from Prakash Itnal, although this just removes the broken code,
and won't enable the kind of a timeout that he wanted.

11 years agoFix broken expected output of catalogfunctions regression test.
Heikki Linnakangas [Tue, 27 May 2014 13:18:23 +0000 (16:18 +0300)]
Fix broken expected output of catalogfunctions regression test.

11 years agoAdd Windows build directories to .gitignore
Heikki Linnakangas [Mon, 19 May 2014 11:27:27 +0000 (14:27 +0300)]
Add Windows build directories to .gitignore

Michael Paquier

11 years agocorresponds to notice the message level change. REL-09_03_0300
Hiroshi Saito [Thu, 15 May 2014 13:32:20 +0000 (22:32 +0900)]
corresponds to notice the message level change.

11 years agoFixed test/expected.
Hiroshi Saito [Wed, 14 May 2014 14:37:48 +0000 (23:37 +0900)]
Fixed test/expected.

11 years agoPrep release ver 09.03.0300
Hiroshi Saito [Tue, 13 May 2014 15:24:27 +0000 (00:24 +0900)]
Prep release ver 09.03.0300

11 years agoFix typo in error message.
Heikki Linnakangas [Mon, 12 May 2014 07:09:39 +0000 (10:09 +0300)]
Fix typo in error message.

11 years agoFix crash if connection is closed during CC_send_query_append function.
Heikki Linnakangas [Mon, 5 May 2014 07:26:36 +0000 (10:26 +0300)]
Fix crash if connection is closed during CC_send_query_append function.

Malcolm MacLeod

11 years agoFix two UseDeclareFetch bugs.
Heikki Linnakangas [Fri, 11 Apr 2014 12:14:26 +0000 (15:14 +0300)]
Fix two UseDeclareFetch bugs.

1. NOTICE messages were not delivered to the application, if they arrived
as response to the DECLARE CURSOR statement.

2. Array-bound parameters on SELECT-queries caused a "cursor already open"
error.

These bugs were found by running the regression suite with
UseDeclareFetch=1. It's now clean.

11 years agoFix typo in test case
Heikki Linnakangas [Fri, 11 Apr 2014 06:31:39 +0000 (09:31 +0300)]
Fix typo in test case

11 years agoDon't clear error number when SQLGetDiagRec is called.
Heikki Linnakangas [Thu, 10 Apr 2014 19:00:58 +0000 (22:00 +0300)]
Don't clear error number when SQLGetDiagRec is called.

Calls to SQLGetDiagRec are supposed to be nondestructive, per ODBC spec.
Also add a test case for that.

11 years agoPrint a better error message in regression tests on an invalid handle.
Heikki Linnakangas [Thu, 10 Apr 2014 18:59:39 +0000 (21:59 +0300)]
Print a better error message in regression tests on an invalid handle.

Has no effect at the moment, but I've seen it happen during development
of new regression tests, when I've passed an invalid handle to print_diag
by accident.

11 years agoAdd test case for error-rollback behavior.
Heikki Linnakangas [Tue, 25 Mar 2014 11:33:50 +0000 (13:33 +0200)]
Add test case for error-rollback behavior.

The rollback behavior is specified in the Protocol setting.

Michael Paquier

11 years agoAvoid deprecated SQLAllocStmt/SQLFreeStmt in regression tests.
Heikki Linnakangas [Mon, 24 Mar 2014 06:49:26 +0000 (08:49 +0200)]
Avoid deprecated SQLAllocStmt/SQLFreeStmt in regression tests.

The deprecated functions have a test case of their own.

Michael Paquier

11 years agoAdd test case for SQLGetConnectOption
Heikki Linnakangas [Mon, 24 Mar 2014 06:45:24 +0000 (08:45 +0200)]
Add test case for SQLGetConnectOption

Michael Paquier

11 years agoAdd a new test case to test ODBC functions deprecated in ODBC 3.0
Heikki Linnakangas [Thu, 20 Mar 2014 08:19:27 +0000 (09:19 +0100)]
Add a new test case to test ODBC functions deprecated in ODBC 3.0

Michael Paquier

11 years agoAdd more test cases for ODBC catalog functions.
Heikki Linnakangas [Tue, 18 Mar 2014 19:35:29 +0000 (21:35 +0200)]
Add more test cases for ODBC catalog functions.

Michael Paquier

11 years agoAdd test/Makefile to .gitignore.
Heikki Linnakangas [Tue, 18 Mar 2014 07:03:38 +0000 (09:03 +0200)]
Add test/Makefile to .gitignore.

It's generated from test/Makefile.in now.

11 years agoUse the PG_CONFIG setting from ./configure cmd line in regression tests.
Heikki Linnakangas [Mon, 17 Mar 2014 13:50:11 +0000 (15:50 +0200)]
Use the PG_CONFIG setting from ./configure cmd line in regression tests.

If compiling without libpq (configure --without-libpq), then you still need
to have pg_config in path to build the regression tests, or specify
PG_CONFIG at the make command line.

11 years agoReplace NOT_USE_LIBPQ with USE_LIBPQ #define.
Heikki Linnakangas [Mon, 17 Mar 2014 13:38:15 +0000 (15:38 +0200)]
Replace NOT_USE_LIBPQ with USE_LIBPQ #define.

This avoids the cumbersome double-negatives, "#ifndef NOT_USE_LIBPQ",
making the code easier to read.

11 years agoUse the same CFLAGS/LDFLAGS to build regression tests as used to build driver.
Heikki Linnakangas [Mon, 17 Mar 2014 08:31:02 +0000 (10:31 +0200)]
Use the same CFLAGS/LDFLAGS to build regression tests as used to build driver.

11 years agoAdd missing function declarations.
Heikki Linnakangas [Wed, 12 Mar 2014 07:40:21 +0000 (09:40 +0200)]
Add missing function declarations.

These are not actually used outside of pgtypes.c, but let's be consistent
and declare them in pgtypes.h anyway.

Michael Paquier

11 years agoUse "function(void)" instead of "function()" to declare 0-arg functions.
Heikki Linnakangas [Wed, 12 Mar 2014 07:24:14 +0000 (09:24 +0200)]
Use "function(void)" instead of "function()" to declare 0-arg functions.

"function(void)" is the correct syntax in a function declaration, although
in practice compilers accept the latter too. It's OK in a function
definition, but change those too for consistency.

Michael Paquier and me.

11 years agoRemove a couple of unused functions, and fix a typeo.
Heikki Linnakangas [Tue, 11 Mar 2014 11:28:14 +0000 (13:28 +0200)]
Remove a couple of unused functions, and fix a typeo.

11 years agoMore whitespace cleanup.
Heikki Linnakangas [Tue, 11 Mar 2014 11:15:55 +0000 (13:15 +0200)]
More whitespace cleanup.

Make whitespace and indentation more consistent in SQL_API function
declarations.

11 years agoWhitespace and indentation fixes.
Heikki Linnakangas [Tue, 11 Mar 2014 08:47:05 +0000 (10:47 +0200)]
Whitespace and indentation fixes.

This also changed the file permissions stored in git for a couple of header
files, removing the executable bit. Didn't realize they were different from
all the others, but apparently my editor decided to change them. Now
they're the same as all the other files, which seems good.

Michael Paquier and me.

11 years agoPass the argument to isalpha/isspace etc. routines as unsigned char.
Heikki Linnakangas [Mon, 10 Mar 2014 17:44:34 +0000 (19:44 +0200)]
Pass the argument to isalpha/isspace etc. routines as unsigned char.

Per the C standard, the routine should be passed an int, with a value that's
representable as an unsigned char or EOF. Passing a signed char is wrong,
because a negative value is not representable as an unsigned char.
Unfortunately no compiler warns about that.

11 years agoFix implicit casts between SQLCHAR and char. Don't rely on -Wno-pointer-sign.
Heikki Linnakangas [Mon, 10 Mar 2014 17:44:30 +0000 (19:44 +0200)]
Fix implicit casts between SQLCHAR and char. Don't rely on -Wno-pointer-sign.

11 years agoPrep release 09.03.0210. REL-09_03_0210
Hiroshi Saito [Thu, 6 Mar 2014 14:06:54 +0000 (23:06 +0900)]
Prep release 09.03.0210.

11 years agoAdd a .gitignore file to ignore test/results dir.
Heikki Linnakangas [Thu, 6 Mar 2014 11:45:24 +0000 (13:45 +0200)]
Add a .gitignore file to ignore test/results dir.

Michael Paquier

11 years agoUse "exit(1);" instead of "return;" to exit from main().
Heikki Linnakangas [Thu, 6 Mar 2014 11:45:21 +0000 (13:45 +0200)]
Use "exit(1);" instead of "return;" to exit from main().

Per Michael Paquier, at least some compiler on OS X didn't like it.

11 years agoRemove some dead code.
Heikki Linnakangas [Thu, 6 Mar 2014 11:45:17 +0000 (13:45 +0200)]
Remove some dead code.

11 years agoPass the content of POSTGRES_RESOURCE_VERSION variable to the resource
Hiroshi Inoue [Wed, 5 Mar 2014 08:00:45 +0000 (17:00 +0900)]
Pass the content of POSTGRES_RESOURCE_VERSION variable to the resource
compiler correctly so that FileVersion and ProductVersion are properly set.

11 years agoSilence another compiler warning.
Heikki Linnakangas [Mon, 3 Mar 2014 19:43:54 +0000 (21:43 +0200)]
Silence another compiler warning.

conn_settings cannot be NULL here.

11 years agoSilence compiler warning.
Heikki Linnakangas [Mon, 3 Mar 2014 19:23:06 +0000 (21:23 +0200)]
Silence compiler warning.

Michael Paquier

11 years agoRecord the result of Build in configuration.xml.
Hiroshi Inoue [Fri, 28 Feb 2014 14:01:37 +0000 (23:01 +0900)]
Record the result of Build in configuration.xml.

11 years agoIt's preferable to leave PRODUCTCODE history.
Hiroshi Inoue [Wed, 26 Feb 2014 06:17:36 +0000 (15:17 +0900)]
It's preferable to leave PRODUCTCODE history.

11 years agoAdd test case for CTE queries (WITH ...)
Heikki Linnakangas [Fri, 28 Feb 2014 08:47:41 +0000 (10:47 +0200)]
Add test case for CTE queries (WITH ...)

Tests for the bug fixed by commit b547553233b52fa5a84c24801c468530d8dd9a18.
None of the existing test cases covered that, so seems good to add one. This
test case gives a different error message than the original one, but it's
the same underlying issue.

11 years agoFix encoding of release-7.3.html
Heikki Linnakangas [Mon, 24 Feb 2014 14:25:39 +0000 (16:25 +0200)]
Fix encoding of release-7.3.html

The Content-type meta tag claimed it to be US-ASCII, but there was in fact
one non-ASCII character in there. Change the claimed encoding to UTF-8, and
fix the special character to the right byte sequence in UTF-8.

11 years agoConvert line-endings from CT+LF to LF.
Heikki Linnakangas [Mon, 24 Feb 2014 14:14:49 +0000 (16:14 +0200)]
Convert line-endings from CT+LF to LF.

All the other files were using LF, so let's be consistent.

11 years agoFix locking in SC_set_prepared
Heikki Linnakangas [Mon, 24 Feb 2014 13:44:50 +0000 (15:44 +0200)]
Fix locking in SC_set_prepared

Commit 2f4f8eabf6ce685c38d69da3e98132b77d38d188 added ENTER/LEAVE_CRIT_CS
calls in SC_set_prepared, as a belt-and-suspenders fix for the race condition
already fixed by commit 7065a7af196bb09f80beddce82fa728c8a6dfcba. But it
didn't take a NULL connection into account.

11 years agoUpdate EXTRA_DIST in Makefile.am
Heikki Linnakangas [Mon, 24 Feb 2014 13:28:19 +0000 (15:28 +0200)]
Update EXTRA_DIST in Makefile.am

Files for the new lfconversion test case were missing. Also, move bindcol
in the right place to keep the list in alphabetical order.

11 years agoSSL verify[-(ca|full)] is avaiable since 8.4. There seems no need to
Hiroshi Inoue [Sun, 23 Feb 2014 06:25:25 +0000 (15:25 +0900)]
SSL verify[-(ca|full)] is avaiable since 8.4. There seems no need to
check it. Also there's no need to call lt_dlopen currently.

11 years agoCurrently PQConnectdbParams() not yet used anyway.
Hiroshi Inoue [Sun, 23 Feb 2014 04:33:32 +0000 (13:33 +0900)]
Currently PQConnectdbParams() not yet used anyway.

11 years agochange version number. REL-09_03_0200
Hiroshi Saito [Sun, 23 Feb 2014 04:47:17 +0000 (13:47 +0900)]
change version number.

11 years agochange version number.
Hiroshi Saito [Sun, 23 Feb 2014 04:30:34 +0000 (13:30 +0900)]
change version number.

11 years agochange version number.
Hiroshi Saito [Sun, 23 Feb 2014 04:19:57 +0000 (13:19 +0900)]
change version number.

11 years agoOoops missing change.
Hiroshi Saito [Sun, 23 Feb 2014 00:28:51 +0000 (09:28 +0900)]
Ooops missing change.

11 years agoForget win_md5.c.
Hiroshi Saito [Sun, 23 Feb 2014 00:15:24 +0000 (09:15 +0900)]
Forget win_md5.c.

11 years agoPrep release ver 09.03.0200.
Hiroshi Saito [Sat, 22 Feb 2014 14:42:47 +0000 (23:42 +0900)]
Prep release ver 09.03.0200.

11 years agoPrep release ver 09.03.0200.
Hiroshi Saito [Sat, 22 Feb 2014 14:39:43 +0000 (23:39 +0900)]
Prep release ver 09.03.0200.

11 years agoAdditional modules, and etc.
Hiroshi Saito [Sat, 22 Feb 2014 13:45:45 +0000 (22:45 +0900)]
Additional modules, and etc.

11 years agowinresrc.h instead of winres.h.
Hiroshi Inoue [Sat, 22 Feb 2014 13:25:10 +0000 (22:25 +0900)]
winresrc.h instead of winres.h.

11 years agoChange to supply non-NULL parameters for SC_set_error().
Hiroshi Inoue [Sat, 22 Feb 2014 13:15:55 +0000 (22:15 +0900)]
Change to supply non-NULL parameters for SC_set_error().

11 years agoIt's safe to lock SC_set_prepared() itself.
Hiroshi Inoue [Sat, 22 Feb 2014 03:49:02 +0000 (12:49 +0900)]
It's safe to lock SC_set_prepared() itself.

11 years agoThe next release allows minor version up from 09.03.0100.
Hiroshi Inoue [Sat, 22 Feb 2014 03:45:48 +0000 (12:45 +0900)]
The next release allows minor version up from 09.03.0100.

11 years agoFix compilation errors caused by the commit 3116f70ab51d0218ceff241fd1323f436bb4fd60.
Hiroshi Inoue [Thu, 20 Feb 2014 15:08:40 +0000 (00:08 +0900)]
Fix compilation errors caused by the commit 3116f70ab51d0218ceff241fd1323f436bb4fd60.

11 years agoThe 2dn argument of SC_set_prepared() is int(enum) not BOOL.
Hiroshi Inoue [Thu, 20 Feb 2014 14:28:28 +0000 (23:28 +0900)]
The 2dn argument of SC_set_prepared() is int(enum) not BOOL.

11 years agoFix the judgement condition of minor or major upgrade.
Hiroshi Inoue [Tue, 4 Feb 2014 12:59:09 +0000 (21:59 +0900)]
Fix the judgement condition of minor or major upgrade.

11 years agoAdd locking to SQLFreeStmt and SQLFreeHandle.
Heikki Linnakangas [Thu, 20 Feb 2014 07:09:47 +0000 (09:09 +0200)]
Add locking to SQLFreeStmt and SQLFreeHandle.

This fixes a race condition, where SQLFreeStmt is called while the
connection is busy executing another statement. SC_set_prepared would see
that the connection is busy (CONN_EXECUTING), and not issue a DEALLOCATE
statement to free the prepared statement in the backend, leaking it.

11 years agoRefactor utf8_to_ucs_lf.
Heikki Linnakangas [Thu, 20 Feb 2014 07:05:58 +0000 (09:05 +0200)]
Refactor utf8_to_ucs_lf.

A macro is difficult to debug, so turn it into a regular function.

Also, add a new test case for LF->CR+LF conversion, to test the bug that
Nils Gösche reported (which was already fixed).

11 years agoRevert "When LF->CR+LF conversion causes an buffer truncation, supress the conversion...
Hiroshi Inoue [Wed, 19 Feb 2014 12:50:41 +0000 (21:50 +0900)]
Revert "When LF->CR+LF conversion causes an buffer truncation, supress the conversion (in case of unicode)."
This reverts commit 3666c87c1440862bde2e6b8f43ee585deed70d31.

11 years agoThe driver takes SQL_C_LONG to mean SQLINTEGER rather than "long".
Heikki Linnakangas [Fri, 14 Feb 2014 12:52:16 +0000 (14:52 +0200)]
The driver takes SQL_C_LONG to mean SQLINTEGER rather than "long".

The regression test was failing on the s390x architecture because of that.
It's big-endian, with sizeof(long) == 8.

11 years agoAdd regression test for SQLBindCol.
Heikki Linnakangas [Fri, 14 Feb 2014 12:24:13 +0000 (14:24 +0200)]
Add regression test for SQLBindCol.

We were already doing SQLBindCol as part of the positioned-update test, but
seems good to have one explicitly for it.

11 years agoFix cursors test case on big-endian systems.
Heikki Linnakangas [Thu, 13 Feb 2014 20:30:44 +0000 (22:30 +0200)]
Fix cursors test case on big-endian systems.

The SQL_CURSOR_COMMIT_BEHAVIOR property is a SQLUSMALLINT, not SQLUINTEGER.
On a little-endian system, you wouldn't notice, provided that the target
variable was initialized to 0 before the SQLGetInfo call.

Per report from Christoph Berg that the cursors test was failing on mipsel
and other big-endian architectures.

11 years agoMSBuild instead of nmake to build binaries using 10.0 or later version of VC.
Hiroshi Inoue [Mon, 3 Feb 2014 04:59:32 +0000 (13:59 +0900)]
MSBuild instead of nmake to build binaries using 10.0 or later version of VC.
See readme_winbuild.txt or winbuild/readme.txt about the use.

11 years agoSet TCP keepalive by default.
Hiroshi Inoue [Tue, 14 Jan 2014 10:54:28 +0000 (19:54 +0900)]
Set TCP keepalive by default.