Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Normally in auto-commit mode the driver begins a new transaction
implicitly at the first statement, by sending a BEGIN statement. However,
some commands, like VACUUM, cannot be run in a transaction block, and you
will get an error like "VACUUM cannot run inside a transaction block" from
the server. In UseServerSidePrepare=0 mode, the code looks at the first word
of the query to determine if the statement is one of the special ones, and
if so, didn't begin a new transaction even when auto-commit mode is
disabled. However, in UseServerSidePrepare=1 mode, when using SQLPrepare/
SQLExecute to run the VACUUM, that check was not made. Fix that.
There was one more related inconsistency between UseServerSidePrepare modes.
Without server-side-prepares, if you issued an explicit BEGIN in auto-commit
mode, the implicit BEGIN was ont sent. But without server-side prepares, it
was. It seems best to send the implicit BEGIN in both cases, because then
you get a warning from the backend about the second BEGIN. That's a good
thing, because a sane ODBC application should be using the ODBC function
SQLEndTran() for transaction control, not explicit BEGIN/COMMIT.
Also add a test case for executing VACUUM, with and without autocommit.
|
|
It was always passed as TRUE.
|
|
1. Remove pointlessly complicated AsyncThreads stuff. Instead use
_beginthread() to clean up threads.
2. Make pgenlist.dll from the structure change of ConnectionClass.
The driver dlls exports the functions described in connexp.h
which are used by pgenlist.dll.
3. Isolate the current communication path if necessary.
While an IAsyncPG object is alive, a ConnectionClass object (hereinafter
refered to as conn-obj) is assigned to it. The assignment has to be
changed in the following cases.
a) SQLDisconnect() is called for the current connection handle which
is assigned to an IAsyncPG object.
Allocate another conn-obj and move the current communication
path (*sock* member of the current conn-obj) to the new conn-obj.
The communicaation path is lost from the current conn-obj and
the new conn-obj is assigned to the IAsyncPG object.
b) Another (global) transaction is about to begin but the current
global transaction is not PREPARED yet.
Same as case a) but will open a new communication path for
the current conn-obj for the subsequent ODBC API calls.
c) Another (global) transaction is about to begin and the current
global transaction is already PREPARED.
Allocate another conn-obj and open a new communication path for
the conn-obj. The new conn-obj is assigned to the IAsyncPG
object only to issue COMMIT/ROLLBACK PREPARED command.
communication pass (*sock* member of the current ConnectionClass
object) to the new object and change the state of the current
object NOT CONNECTED. The IAsyncPG object uses new object instead
of the current object. In case b) the current object will open a
new communication path.
|
|
statements reported by Joe Conway.
|
|
When DeUseDeclareFetch=1 and UseServerSidePrepare=1, issue COMMIT commands properly in case of AUTOCOMMIT on mode,
|
|
If you passed a VARCHAR parameter with column_size 5 to SQLPrepare, and you
had UseServerSideprepare=0 and BoolsAsChar=1, the code describes the
parameters before running the query, so that it can check if the parameter
is a boolean. That produced a bogus extra empty result set to the caller in
subsequent SQLExecute().
This fixes the two regression test failures.
Patch by Hiroshi Inoue, with minor copy-editing by me.
|
|
There was at least one real bug caused by the multiple evaluation of 2nd
argument to SC_set_result(). SC_pre_execute() passed QR_Constructor() call
as the 2nd argument, so we ended up creating extra result sets that were
leaked.
|
|
To silence a Coverity warning that the semicolon might be misplaced.
|
|
It's a good habit to mark constants as such. But I'm also hoping that this
would silence Coverity from complaining that ver2str and ver3str might
not fit in 6 bytes.
|
|
Coverity doesn't like the fact that the struct is passed to
SC_set_rowset_start without initializing rowset_start field. It's OK,
SC_set_rowset_start doesn't actually use the 'incr' value calculated from
the field if the 3rd arg is FALSE, so this is a false positive, but seems
like a good idea to be tidy here anyway.
|
|
The problem is that if the loop above doesn't find a result set with
command tag "FETCH ...", res is left to point to an already-freed result
set, and we'll go ahead and call QR_set_withhold on the already-freed
struct. That can't happen in practice, because the backend does always
return a result set with "FETCH ..." command tag when a FETCH statement is
issued, but better safe than sorry.
|
|
BTW, the error and notice handling could be made much smarter wrt.
truncation. The caller of handle_notice/error_message knows the message size
in advance, so it could easily pass it down and we could allocate a buffer
of the right size, instead of using a fixed size buffer that can be too
small.
|
|
|
|
|
|
notice.txt doesn't exist anymore, the copyright and license information is
in readme.txt now. Update references in comments.
|
|
|
|
for the pending extended query.
|
|
|
|
the operation is SQL_FETCH_ABSOLUTE or SQL_FETCH_LAST.
|
|
|
|
while reading tuples so that we can continue to use the connection.
|
|
SQLResultNumCols(), SQLDescribeCol() or SQLColAttribute() available for insert/update/delete .. returning statements.
|
|
|
|
This fixes an infinite loop reported by Nelson Andre.
|
|
I hope this would fix a bug report by Andreas(maps.on@gmx.net).
|
|
keyset-driven ones. This fixs the bug report by Werner Kuhnle.
|
|
as a type oid parameter as an extension of pgtype_xxxx functions so that SQLColumns and SQLDescribeCol(SQLColAttrinute) could use common functions.
2.Call PQconnectdbParams instead of PQconnectdb when it's available.
3.Make cursor open check at transaction end a little more effective.
4.Added code for SQL_INTERVAL support and refcursor support though
they are disabled.
|
|
2.Fix a bug when creating a connection string.
|
|
2. Take comments or line comments in a query into account.
3. Fix a crash bug on authentication failures.
|
|
2) Add a new data source option which makes it possible to use
Kerberos for Windows library to reply to GSSAPI authentication
request.
3) Native support for SSPI Kerberos or Negaotiate service. It may
be useful for the 64-bit drivers.
4) Fix an oversight of Memory overflow handling.
|
|
of ODBC escape { .
|
|
2. Fix a bug about UTF8 handling.
3. Wait a ReadyForQuery Message after errors correctly.
|
|
1.Fix a column uodatability problem reported by Tom Goodman.
2.Display SSL mode list properly on setup dialog.
3.Don't truncate the result of msgtowstr()/wstrtomsg().
4.Implement ConfigDriver() function.
|
|
to the sslmode option.
2. Take the platforms where char is unsigned into account per report from Alex Goncharov.
|
|
|
|
1. Close (holdable) cursors on commit if possible.
2. Recycle columns cache info if the size becomes pretty large.
3. Add sslverify=none to conninfo in case of SSL connections
via libpq of version 8.4.
4. Add a functionality to change the directory for logging.
5. Correct the error code for communication errors.
|
|
SQLDescribeCol() -> add a column to the table -> SQLExec *select for the table* -> SQLDescribeCol() for the added column causes a bad result.
2) Use strncpy_null() instead of strncpy().
|
|
2. Check strerror_r function's return type.
3. Suppress some compiler warnings.
|
|
1. Reset the column binding information after SQLMoreResults().
2. Save the rowset size properly for the FETCH_NEXT operation
in case of >= 3.0 drivers.
Enable geqo optiomizer by default.
|
|
1. SQLGUID type support thanks to Jan-Willem Goossens.
2. Fix a bug about silently adding a *for read only* clause.
3. Fix a 64bit mode bug about handling of arrays of parameters.
4. Change the implemetatin of SQLForeignKeys() for 8.3+ servers.
5. Not commit the transaction too early in useDeclareFetch mode.
6. Add a cursor open check for SQLPrepare().
|
|
2. Support column alias without "as" so that links from
the SQLServer work.
3. Take ';' into account when the driver adds "for read only"
clause.
4. Use the E'.. ' notation not only in '=' expressions but
also in LIKE expressions.
5. Change to return milliseconds parts for timestamp fields.
6. Change to return a specific sqlstate in case of multiple
parameters.
|
|
|
|
1. Correct the COLUMN_LENGTH return value of SQLColumns() for varchar/bpchar
type columns (Unicode driver).
2. Change to not return database name if case of MS Query.
3. The first cut to use Windows SSPI. The trial to use Schannel service
for SSL support.
4. Be more careful about <for locking clause> in UseDeclareFetch mode.
Add missing? "for read only" clause for read only queries for 8.3
or later servers for safety.
|
|
1. Support SQLColAttribute for MS specific SQL_CA_SS_COLUMN_KEY.
Some MS applications use this.
2. Improve the check of updatability of queries by checking
if they have multiple tables.
3. Reduce the round trip overhead in FE/BE communications
(especially in useDeclareFetch mode).
4. Fix a bug in ResolveOneParam() pointed out by Rainer Bauer.
5. Add a flag which lets SQLTables() show only accessible tables.
6. The unicode driver now can handle utf-16 surrogate pairs.
|
|
. Fix some bugs in case without MSDTC support.
. Refine the realloc handling.
. Put back the @@IDENTITY implementation so as not to use lastval().
. Change SQLColumns() to return correct column length in the Unicode driver.
. Remove the connection count limitation.
. Fix Protocol=7.4--1 notation (should be Protocol=7.4).
. Fix a typo in socket.c (bug report from Rainer bauer).
|
|
. Append DETAIL messages to GetDiag...() messages.
. Use SQL_SUCCEEDED macros so as to simplify the code.
. Use lastval() function to replace IDENTITY on 8.1 or later servers.
. Remove WSAStartup() and WSACleanup() from DllMain.
. Load libpq from the driver's folder.
. Use QR_get_value_backend_int/_text() funcs instead of
QR_get_value_backend_row().
. Improve the implemetation of SQLSetPos(.., SQL_ADD/SQL_UPDATE)
using the 8.2 new feature INSERT/UPDATE .. returning .
. Seaparate DTC code as a Delayload DLL.
|