diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-12-15 19:11:28 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-12-15 19:11:28 +0000 |
commit | 0cf37659c44a3d2cc88239132f4dc8b646805d9a (patch) | |
tree | c846d8de1857d382e049d08e2bfa1bbbf7eaacea /src/interfaces/odbc/options.c | |
parent | 326fbd88373f259911c24cbee4a5f0c374e97a19 (diff) |
there is one problem with Zoltan patches commited into the tree:
if we set autocommit off and issued COMMIT (or ROLLBACK) on a connection
new transaction is not started
Max Khon
Diffstat (limited to 'src/interfaces/odbc/options.c')
-rw-r--r-- | src/interfaces/odbc/options.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/interfaces/odbc/options.c b/src/interfaces/odbc/options.c index c9d6d107bd5..ccc419299dd 100644 --- a/src/interfaces/odbc/options.c +++ b/src/interfaces/odbc/options.c @@ -314,32 +314,18 @@ int i; case SQL_AUTOCOMMIT: - /* Since we are almost always in a transaction, this is now ok. - Even if we were, the logic will handle it by sending a commit - after the statement. - if (CC_is_in_trans(conn)) { - conn->errormsg = "Cannot switch commit mode while a transaction is in progres"; + conn->errormsg = "Cannot switch commit mode while a transaction is in progress"; conn->errornumber = CONN_TRANSACT_IN_PROGRES; CC_log_error(func, "", conn); return SQL_ERROR; } - */ mylog("SQLSetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, vParam); switch(vParam) { case SQL_AUTOCOMMIT_OFF: CC_set_autocommit_off(conn); - /* The following two lines are new. - With this modification the SELECT statements - are also included in the transactions. - Error handling should be written, - this is missing yet, see - SC_execute in statement.c for details. Zoltan - */ - CC_send_query(conn,"BEGIN",NULL); - CC_set_in_trans(conn); break; case SQL_AUTOCOMMIT_ON: |