Heikki Linnakangas [Wed, 21 Jan 2015 17:00:10 +0000 (19:00 +0200)]
Fix reference to free'd plan name.
libpq_bind_and_exec fetched a pointer to the statement's plan name to a
local variable, but then called prepareParameters which free'd it, and
allocated a new plan name. The already-free'd name was then passed to
PQexecParams().
Spotted by valgrind
Heikki Linnakangas [Wed, 21 Jan 2015 16:44:52 +0000 (18:44 +0200)]
Fix read-after-free bug in error handler.
If a connection dies, CC_on_abort() calls PQfinish() which frees the error
message. handle_pgres_error better deal with the error message before
calling CC_on_abort().
Spotted by valgrind, on the "diagnostic" regression test.
Heikki Linnakangas [Wed, 21 Jan 2015 16:43:09 +0000 (18:43 +0200)]
Fix bug in determining the datatypes when binding.
In the big libpq patch, I accidentally removed the line where
current_exec_param was reset to 0. It's still required (which is a very
fiddly way to pass that value to ParseAndDescribeWithLibpq, but let's live
with it for now..)
Heikki Linnakangas [Wed, 21 Jan 2015 15:36:30 +0000 (17:36 +0200)]
Minor cleanup.
Remove local variable that was never used for anything real (just passed as
NULL to mylog/qlog). Replace with real query in the logs, and add some extra
logging.
Heikki Linnakangas [Tue, 20 Jan 2015 22:00:49 +0000 (00:00 +0200)]
Remove unused arguments.
Heikki Linnakangas [Tue, 20 Jan 2015 21:05:25 +0000 (23:05 +0200)]
Mark functions that are not used outside convert.c as static. Remove dead code.
Heikki Linnakangas [Tue, 20 Jan 2015 20:57:39 +0000 (22:57 +0200)]
Add test cases for conversions from string to date/time/timestamps.
Also improve a comment.
Heikki Linnakangas [Tue, 20 Jan 2015 11:18:20 +0000 (13:18 +0200)]
Add a few tests for conversions between binary and text.
Just noticed that it was not tested.
Heikki Linnakangas [Mon, 19 Jan 2015 21:29:59 +0000 (23:29 +0200)]
Remove long-since obsolete FAR/NEAR decorations from pointers.
We haven't supported a segmented memory model for ages, probably never.
Heikki Linnakangas [Mon, 19 Jan 2015 20:54:00 +0000 (22:54 +0200)]
Misc cleanup, mostly dead code removal.
Heikki Linnakangas [Mon, 19 Jan 2015 20:42:01 +0000 (22:42 +0200)]
Don't insist that Server, Username and Database options are set.
Libpq will use sensible defaults if they are not set. In particular, it's
very useful that if you don't specify a Server, on Unix systems we will now
try to connect to a local installation via Unix domain sockets. That was
difficult to configure otherwise.
Heikki Linnakangas [Sun, 18 Jan 2015 20:13:02 +0000 (22:13 +0200)]
Remove obsolete CancelAsFreeStmt option.
It became obsolete when support for ODBC versions < 3.51 was removed, as
it never did anything in 3.51 version.
Heikki Linnakangas [Sun, 18 Jan 2015 17:41:02 +0000 (19:41 +0200)]
Change URL to FAQ to point to new domain, odbc.postgresql.org.
Heikki Linnakangas [Fri, 16 Jan 2015 21:25:48 +0000 (23:25 +0200)]
The project's website was moved to odbc.postgresql.org.
Change links in the readmes accordingly.
Heikki Linnakangas [Fri, 16 Jan 2015 21:18:47 +0000 (23:18 +0200)]
Send proper datatypes to the server when binding parameters.
We used to always send 0 as the parameter type, which means that the server
should deduce the datatype from the context. That usually works well, but
we can do better. Sometimes there is ambiguity, like in "SELECT '555' > ?".
If the parameter is bound as a string, '6' would return true, but if it's
bound as an integer, it returns false.
When the application calls SQLBindParameter, it specifies the datatype, so
we should make use of that.
Add a test case for the "SELECT '555' > ?" case.
Heikki Linnakangas [Fri, 16 Jan 2015 21:12:53 +0000 (23:12 +0200)]
More fixes to building query with SQL_INTEGER and SQL_SMALLINT params.
Jeremy Faith pointed out that the code still incorrectly accepted '-' as
a valid integer. But a bigger issue with negative numbers is that even a
valid negative integer can lead to bogus queries. Consider "SELECT 0-?",
where the parameter is -123. It was expanded to "SELECT 0--123".
To fix, don't accept '-' as a valid integer, forcing it to be quoted. And
if the value is negative, put parens around it, so that the previous
example becomes "SELECT 0-(-123)".
Add test cases for these issues. While we're at it, improve the output of
the param-conversions-test to be more readable.
Heikki Linnakangas [Thu, 15 Jan 2015 16:41:01 +0000 (18:41 +0200)]
Fix passing username to the server.
In commit
e85fbb2, as part of removing non-libpq code, I removed the code
that determined the username of the currently logged-in user, and send it
to the server during authentication. However, I accidentally also removed
the code that passed any explicitly-given username to the server. Oops.
Heikki Linnakangas [Thu, 15 Jan 2015 09:04:33 +0000 (11:04 +0200)]
Silence compiler warnings on 64-bit Windows build.
Be more careful about using size_t with variables that count offsets or
lengths of strings. In theory, a string longer than 2^31 could overflow an
int. I'm not sure if such a string can occur in practice, but let's be
tidy.
Heikki Linnakangas [Thu, 15 Jan 2015 08:59:39 +0000 (10:59 +0200)]
Fix Windows build.
In the previous commit, I missed a reference to the autocommit_public
field that was inside an #ifdef _HANDLE_ENLIST_IN_DTC_ section.
Heikki Linnakangas [Thu, 15 Jan 2015 08:30:52 +0000 (10:30 +0200)]
Don't reset autocommit attribute at SQLDriverConnect.
It should be possible to call SQLSetConnectAttr to disable autocommit
before establishing a connection. It was incorrectly reset when the
per-datasource options were read. To fix, move autocommit_public flag from
ConnInfo struct to Connection, like we've always done with login_timeout.
Also add a test case.
Reported by Ivan Zhang
Heikki Linnakangas [Wed, 14 Jan 2015 16:19:11 +0000 (18:19 +0200)]
Silence compiler warnings about variables being used uninitialized.
Heikki Linnakangas [Tue, 13 Jan 2015 21:29:48 +0000 (23:29 +0200)]
Fix various quoting issues in sending query parameters to server.
The code used to just assume that if the parameter's SQL type is SQL_INTEGER
or SQL_SMALLINT, it doesn't need quoting. While that's true for valid
integers values, there were no safeguards that the bound string is actually
valid input. The server will just throw an error on invalid input, but we
need to quote it correctly to send it to the server in the first place.
For example, if the string "123, 'inject'" is bound to an SQL_INTEGER param,
we need to quote it or the server will interpret it as part of the query.
Also add a test case for this.
Reported by Jeremy Faith.
Heikki Linnakangas [Tue, 13 Jan 2015 19:48:29 +0000 (21:48 +0200)]
Minor cleanup of the way binary parameter format is chosen.
Rather than have the caller guess whether ResolveOneParam chooses to use
the binary format, add an explicit return value for it.
Heikki Linnakangas [Tue, 6 Jan 2015 09:36:57 +0000 (11:36 +0200)]
Fix building with MSDTC=no.
Heikki Linnakangas [Tue, 6 Jan 2015 08:55:27 +0000 (10:55 +0200)]
Silence compiler warning about unused variable.
Heikki Linnakangas [Wed, 31 Dec 2014 12:49:20 +0000 (14:49 +0200)]
Use libpq for everything.
Instead of speaking the frontend/backend protocol directly, use libpq's
functions for executing queries. This makes it libpq a hard dependency, but
removes direct dependencies to SSL and SSPI, and a lot of related code.
Heikki Linnakangas [Mon, 22 Dec 2014 18:19:45 +0000 (20:19 +0200)]
Add a test case for error handling.
The current behavior isn't actually quite correct with some configurations,
but seems better to add the regression test now anyway, even though the
errors_2.out basically memorizes the bogus behavior. It should be removed
when the bug is fixed.
Heikki Linnakangas [Mon, 22 Dec 2014 16:47:25 +0000 (18:47 +0200)]
Remove spurious semicolon from the end of default ExtraSysTablePrefixes.
The code that forms a new connection string from current settings doesn't
escape it correctly, so that the connection string looks like
"...;C2=dd_;;CX=...". Of course, the code that forms the connection string
should be fixed, but that's a much bigger job.
Heikki Linnakangas [Fri, 5 Dec 2014 22:52:37 +0000 (00:52 +0200)]
On second thoughts, treat a bookmark as a 32-bit integer, not SQLULEN.
This seems more reliable.
Add a test case for SQLBulkOperations(SQL_FETCH_BY_BOOKMARK), although it's
disabled because it doesn't seem to work correctly (fetches wrong rows).
I don't have the energy to actually fix that now.
Heikki Linnakangas [Fri, 5 Dec 2014 21:16:03 +0000 (23:16 +0200)]
Fix confusion on whether a bookmark is 4 or 8 bytes long.
In some places, we used SQLULEN to refer to a bookmark, and in others,
UInt4. But SQLULEN is 8 bytes long on some platforms, which caused all
kinds of strange issues.
Also add a test case for SQLBulkOperations. This revealed the bug.
Heikki Linnakangas [Fri, 5 Dec 2014 19:17:21 +0000 (21:17 +0200)]
Add test for fetching deleted/updated rows in an updateable cursor.
Heikki Linnakangas [Fri, 5 Dec 2014 18:45:36 +0000 (20:45 +0200)]
Add test case for SQLSetCursorName and SQLGetCursorName.
The test case also contains tests for UPDATE ... WHERE CURRENT OF, but
it's disabled because the driver doesn't actually support it. I wrote the
test before I realized that, and didn't want to throw it away, in case we
ever want to add support for it.
It also contains an #ifdef'd out test for cursor names that contain quotes.
The driver doesn't handle that correctly, but I didn't want to fix it right
now. No sane application does that anyway.
Heikki Linnakangas [Fri, 5 Dec 2014 17:50:19 +0000 (19:50 +0200)]
Enhance the error-rollback test case.
This covers some cases that I found to contain bugs in a patch that I'm
working on. Current master is correct, but extra coverage is good.
Heikki Linnakangas [Tue, 2 Dec 2014 16:55:45 +0000 (18:55 +0200)]
Modify test case to call SQLPutData twice.
For increased test coverage.
Heikki Linnakangas [Tue, 2 Dec 2014 14:03:36 +0000 (16:03 +0200)]
Fix SQL_DESC_OCTET_LENGTH for 'unknown' type columns.
This makes 'unknown' to behave the same as 'varchar' without typmod.
Also add a regression test for it.
This addresses the bug reported originally on the pgsql-bugs mailing list as
bug #11767, by Keyur Govande.
Heikki Linnakangas [Tue, 2 Dec 2014 11:15:57 +0000 (13:15 +0200)]
Add test cases for:
* getting a bookmark with SQLBindCol,
* unbinding columns with SQLBindCol and SQLFreeStmt(SQL_UNBIND), and
* the procedure call "{ CALL ... }", and date, time, and timestamp escape
syntaxes.
Heikki Linnakangas [Tue, 2 Dec 2014 11:00:28 +0000 (13:00 +0200)]
Misc cleanup.
Fix some misc issues pointed out by clang's static analyzer, scan-build.
Mostly dead assignments.
Heikki Linnakangas [Fri, 28 Nov 2014 14:18:54 +0000 (16:18 +0200)]
Add tests for Nan, Infinity, -Infinity float values.
Heikki Linnakangas [Fri, 28 Nov 2014 13:41:54 +0000 (15:41 +0200)]
Silence compiler warning about unused variable.
Heikki Linnakangas [Fri, 28 Nov 2014 06:32:51 +0000 (08:32 +0200)]
odbc.ini and odbcinst.ini are now generated, add them to .gitignore
Michael Paquier
Heikki Linnakangas [Thu, 27 Nov 2014 13:38:51 +0000 (15:38 +0200)]
Add a Makefile target to run the tests with different config options.
Heikki Linnakangas [Thu, 27 Nov 2014 13:32:09 +0000 (15:32 +0200)]
Make the regression test output independent of some settings.
Namely, UseServerSidePrepare, UseDeclareFetch and Protocol.
Heikki Linnakangas [Thu, 27 Nov 2014 12:32:32 +0000 (14:32 +0200)]
Run the odbc[inst].ini generation script in a more Makefile fashion.
The expected output didn't match what I got on my laptop. Not sure why,
or if it worked for anyone, but in any case it's more straightforward to
let make run the script directly, rather than through pg_regress.
In the passing, allow passing extra command line options to odbcini-gen.sh,
which will be appended to the generated odbc.ini. This makes it handy to
run the regressions with extra non-default options.
Heikki Linnakangas [Wed, 26 Nov 2014 12:50:45 +0000 (14:50 +0200)]
Add more test cases.
This adds coverage for SQLConnect, SQLRowCount, and moving a cursor with
SQLFetchScroll, and for bookmarks.
Heikki Linnakangas [Wed, 26 Nov 2014 11:04:12 +0000 (13:04 +0200)]
Remove some remnants of old protocol support
Heikki Linnakangas [Thu, 13 Nov 2014 21:47:37 +0000 (23:47 +0200)]
Another round of -Wformat fixes.
Heikki Linnakangas [Thu, 13 Nov 2014 20:29:12 +0000 (22:29 +0200)]
Fix test case for big-endian systems.
Heikki Linnakangas [Thu, 13 Nov 2014 19:44:27 +0000 (21:44 +0200)]
Silence more compiler warnings in -Wformat mode, in regression test.
Heikki Linnakangas [Thu, 13 Nov 2014 18:46:38 +0000 (20:46 +0200)]
Silence compiler warnings in -Wformat mode.
Passing SQLINTEGER/SQLUINTEGER sprintf "%d", "%ld" modifiers gave a warning
on some systems (at least on my 32-bit Debian system) .
Hiroshi Inoue [Tue, 21 Oct 2014 07:57:28 +0000 (16:57 +0900)]
Allow building test suite in a different place other than the source code is.
Change the test suite so that it works not only with unixODBC but also with iodbc.
Hiroshi Inoue [Thu, 13 Nov 2014 07:43:09 +0000 (16:43 +0900)]
Avoid buffer overrun by makeKeepaliveConnectString().
Heikki Linnakangas [Mon, 3 Nov 2014 16:25:48 +0000 (18:25 +0200)]
Fix Windows compilation with libpq enabled, but without SSPI
GetUserNameEx function requires secur32.dll. It is now referenced in the
code, regardless of SSPI, so we need to link with secur32.dll.
Heikki Linnakangas [Mon, 3 Nov 2014 13:06:25 +0000 (15:06 +0200)]
Add test case for large objects.
Heikki Linnakangas [Mon, 3 Nov 2014 09:05:01 +0000 (11:05 +0200)]
Add test case.
This tests a codepath in QR_next_tuple that had no coverage before.
Hiroshi Inoue [Thu, 30 Oct 2014 03:40:13 +0000 (12:40 +0900)]
Avoid conflicts of external symbols other than ODBC APis.
Hiroshi Inoue [Sun, 2 Nov 2014 05:00:27 +0000 (14:00 +0900)]
Change *ANSI* in the title of 32-bit Unicode driver setup dialog to *Unicode*.
Heikki Linnakangas [Fri, 31 Oct 2014 17:53:24 +0000 (19:53 +0200)]
Remove dead code
Heikki Linnakangas [Wed, 29 Oct 2014 18:00:59 +0000 (20:00 +0200)]
Remove option to disable geqo.
You can use the generic ConnSettings option for that.
Heikki Linnakangas [Thu, 30 Oct 2014 07:27:54 +0000 (09:27 +0200)]
Minor code simplification.
Any compiler worth its salt will turn "strlen(constant)" into a constant,
so let's get rid of the fancy logic to precalculate those.
Heikki Linnakangas [Thu, 30 Oct 2014 20:43:56 +0000 (22:43 +0200)]
Fix max identifier length stuff.
CC_get_max_idlen function didn't work correctly. It sent the "show
identifier_length" query to the backend, but assumed that the value comes
back in the command tag. It doesnt; the command tag is always "SHOW".
We fell back to the compiled in NAMEDATALEN_V73 default. But that's
off-by-one; the actual max identifier length is NAMEDATALEN - 1.
Heikki Linnakangas [Wed, 29 Oct 2014 20:39:34 +0000 (22:39 +0200)]
Remove support for receiving 'P' or 'B' responses from server.
Server versions >= 7.4 don't send these anymore.
Heikki Linnakangas [Wed, 29 Oct 2014 20:47:17 +0000 (22:47 +0200)]
Remove some unused #defines
Heikki Linnakangas [Wed, 29 Oct 2014 19:16:26 +0000 (21:16 +0200)]
Avoid unnecessary round-trip to server at connection startup.
When connecting with libpq, we issued an explicit query,
"SELECT pg_client_encoding()" at the connection startup to get the
effective client_encoding. That's not really required; the server reports
that automatically right after the authentication handshake. We just have
to ask libpq for the current setting.
Heikki Linnakangas [Wed, 29 Oct 2014 17:36:26 +0000 (19:36 +0200)]
Merge info30.c and info.c
We no longer support ODBC 3.0, so these don't need to be separate anymore.
This removes some duplicated code at the bottom of each GetInfoAPI.
Michael Paquier
Heikki Linnakangas [Wed, 29 Oct 2014 17:21:26 +0000 (19:21 +0200)]
Remove odbcapi25w.c
All the functions in that file are obsolete, as we no longer support old
ODBC versions.
Michael Paquier
Heikki Linnakangas [Wed, 29 Oct 2014 17:35:38 +0000 (19:35 +0200)]
Remove some remnants of ODBCVER < 3.51 support.
Heikki Linnakangas [Wed, 29 Oct 2014 17:32:50 +0000 (19:32 +0200)]
Remove hack for Windows 95 & 98.
Let's not pretend that we still support those.
Heikki Linnakangas [Wed, 29 Oct 2014 17:16:33 +0000 (19:16 +0200)]
Remove references to removed KSQO and protocol options from the docs.
And some other stuff that was only relevant to very old server versions.
Michael Paquier, with some tweaks by me.
Heikki Linnakangas [Wed, 29 Oct 2014 17:00:33 +0000 (19:00 +0200)]
Remove support for ODBC versions < 3.51.
Older versions have been obsolete for a very long time by now. Removing the
support lets us get rid of a lot of code that no-one has in practice been
even compiling for a long time.
Michael Paquier
Heikki Linnakangas [Wed, 29 Oct 2014 14:35:05 +0000 (16:35 +0200)]
Remove support for protocol versions older than 3.
PostgreSQL added support for protocol version 3 in server version 7.4.
There's no need to support servers older than that. This simplifies the
code a lot, removing a lot of corner cases that haven't been properly
regression tested for a long time anyway.
Original patch by me, with some tweaks by Michael Paquier.
Hiroshi Saito [Sat, 25 Oct 2014 16:15:01 +0000 (01:15 +0900)]
Prep next release version 09.03.0400.
Hiroshi Saito [Sat, 25 Oct 2014 15:54:20 +0000 (00:54 +0900)]
Oops, two files forget..
Hiroshi Saito [Sat, 25 Oct 2014 15:43:54 +0000 (00:43 +0900)]
Prep next release Version 09.03.0400.
Hiroshi Saito [Sat, 25 Oct 2014 15:38:35 +0000 (00:38 +0900)]
Add some files.
Hiroshi Saito [Sat, 25 Oct 2014 15:21:18 +0000 (00:21 +0900)]
Prep next release version 09.03.0400.
Hiroshi Inoue [Sat, 25 Oct 2014 13:57:53 +0000 (22:57 +0900)]
Fix some differnces in regression test.
1. result-convrsion-test.c
Explicitly specify an appropriate time zone.
isprint() doesn't work as expected in my environment. It's safe
to verify that the parameter is a single byte before calling
isprint().
2. prepare-test.c
Explicitly specify "postgres_verbose" intervalstyle.
3. diagnostics.c
pg_terminate_backend() sometimes succeeds with no error message.
Hiroshi Inoue [Mon, 13 Oct 2014 04:52:52 +0000 (13:52 +0900)]
Enable -Wall compile option if it's available.
Hiroshi Inoue [Sat, 11 Oct 2014 10:29:40 +0000 (19:29 +0900)]
PG_BUILD_VERSION seems no longer needed.
Hiroshi Inoue [Sat, 11 Oct 2014 07:18:04 +0000 (16:18 +0900)]
Include pdb files in the contents of installers.
Hiroshi Inoue [Sat, 11 Oct 2014 07:45:32 +0000 (16:45 +0900)]
Removed RESET_CRYPTO_CALLBACKS preprocessor symbol definition.
This is no longer needed and rather dangerous.
The removal also make it possible to remove the dependency to libeay32.
Hiroshi Inoue [Thu, 9 Oct 2014 23:53:03 +0000 (08:53 +0900)]
Removed a duplicated description.
Hiroshi Inoue [Thu, 9 Oct 2014 06:45:47 +0000 (15:45 +0900)]
Suppress option button from the bootstrapper dialog using BalExtention.
Hiroshi Inoue [Wed, 8 Oct 2014 23:10:32 +0000 (08:10 +0900)]
Don't continue to build installers in case the compilation failed.
Hiroshi Inoue [Wed, 8 Oct 2014 21:26:33 +0000 (06:26 +0900)]
Use 1ST, 2ND or 3RD PAGE instead of PREV or NEXT PAGE for the setup
program.
Hiroshi Inoue [Tue, 24 Jun 2014 01:02:53 +0000 (10:02 +0900)]
Add a powershell script buildBootStrapper.ps1 which builds bootStrapper program
with some optional parameters. Quote the version number of bootstrapper from
the configuration xml file unless specified. Also change the name of 32bit MSI
in the bootstrapper according to changes of 32bit installer build system.
Change buildInstallers.ps1 build the bootstrapper together.
Change ALLUSERS from "2" to "1" of the 64bit installer.
Hiroshi Inoue [Wed, 8 Oct 2014 08:17:53 +0000 (17:17 +0900)]
Fix the wrong use of snprintf format in the previous commit.
Hiroshi Inoue [Wed, 8 Oct 2014 07:44:50 +0000 (16:44 +0900)]
Avoid the registry operation to set XADLL entry from wow64 process.
Hiroshi Inoue [Thu, 3 Jul 2014 03:47:41 +0000 (12:47 +0900)]
Cleanup the code for *test* button and add the functionality to test
MSDTC support.
Hiroshi Inoue [Wed, 1 Oct 2014 04:01:54 +0000 (13:01 +0900)]
Add a new dialog page to the setup program and allow the setting
of PREFERLIBPQ and XAOPT option.
Heikki Linnakangas [Tue, 7 Oct 2014 07:45:30 +0000 (10:45 +0300)]
Silence compilers warnings without _HANDLE_ENLIST_IN_DTC_ or USE_LIBPQ.
Compiler complained about unused variable.
Heikki Linnakangas [Tue, 7 Oct 2014 07:36:14 +0000 (10:36 +0300)]
Fix SQLTables column names to be ODBC version 3 compliant
In ODBC3, TABLE_QUALIFIER was renamed to TABLE_CAT, and TABLE_OWNER to
TABLE_SCHEM.
David Hedberg
Heikki Linnakangas [Tue, 7 Oct 2014 07:14:38 +0000 (10:14 +0300)]
Improve regression test for reading a bytea column to SQL_C_CHAR.
When converting a bytea to SQL_C_CHAR, the driver uses upper-case letters in
the hex output, while the backend uses lower-case letters. That leads to
different output when using bytea_output=hex than with bytea_output=escape.
Set bytea_output explicitly in the regression test, so that it works
regardless of the current bytea_output setting. And test both settings - the
code path taken in the driver is quite different.
Hiroshi Inoue [Mon, 6 Oct 2014 14:16:39 +0000 (23:16 +0900)]
Add the libpq use parameter to the dtc connection string.
Hiroshi Inoue [Wed, 24 Sep 2014 13:22:29 +0000 (22:22 +0900)]
Additonal improvement on MSDTC enlistment.
Unfortunately the current pgxalib.dll can't recover transactions which use
sslmode verify-[ca|full] or whose authentication is SSPI, certificate or
ident.
When MSDTC.exe tries to connect to PostgreSQL it does so under Windows user
NETWORKSERVICE, which won't match the username the original user connected
to PostgreSQL as. So PostgreSQL will reject the connection.
In addition XARMcreate() doesn't detect it on enlistment because invoked
xa_open() doesn't connect to the specified datasource. Though it has no
problem unless crash occurs between PREAPARE and COMMIT, the recovery of
the transaction is impossible when such a crash occurs.
Now 3 diffrent behaviors can be speicified using the xaopt connection
string option.
1: The current default behavior.
2: Same as above except it simply examines if the recovery for the specified
datasource is unavailable before calling XARMcreate(). Currently it only
examines whether the connection uses sslmode verify-[ca|full]. I can't find
the way to detect SSPI, certicate or ident authentication.
3: Invoked xa_open() tries to connect to the specified datasource immediately
as user Network Service.
Hiroshi Inoue [Fri, 26 Sep 2014 02:38:18 +0000 (11:38 +0900)]
Register the XA DLL on installation.
MSDTC runs in 64bit mode on 64bit machines and 32bit mode on 32bit machines.
We had better register the XA DLL on installation.
Hiroshi Inoue [Fri, 26 Sep 2014 01:06:29 +0000 (10:06 +0900)]
Fix the regkey search bug when XARMcreate() causes an error at enlistment
in DTC.
Hiroshi Inoue [Thu, 25 Sep 2014 00:11:55 +0000 (09:11 +0900)]
Add '#ifdef USE_LIBPQ' around the code which use PreferLibpq option
introduced in the previous commit.
Hiroshi Inoue [Tue, 16 Sep 2014 07:51:38 +0000 (16:51 +0900)]
Add an option to explicitly force/avoid the use of libpq library.
Hiroshi Inoue [Tue, 24 Jun 2014 00:58:46 +0000 (09:58 +0900)]
Improve pgxalib.dll(MSDTC support).
1. Add an option which lets xa_open() try to connect to the database
immediately. This would cause an error at enlistment in dtc when
the authentication method depends not only on the db user but also
on the OS user, which means the automatic transaction recovery is
unavailable.
2. Log the error message in case of SQLDriverConnect() error.
3. Improve the logging.
Hiroshi Inoue [Sun, 21 Sep 2014 04:59:09 +0000 (13:59 +0900)]
Fix the bug reported by Phillippe Champignon.
The function SC_setInsertedTable() prepares an info for subsequent
'select @@IDENTITY' command. Take table name like catalog.schema.table
into account in the function.