Date: Friday, February 10, 2006 @ 09:54:24
  Author: gilles
    Path: /cvsroot/carob/carob/src

Modified: Connection.cpp (1.61 -> 1.62)

Check if we are not committing or rollbacking an empty transaction (reflected 
SEQUOIA-289 fix)


----------------+
 Connection.cpp |    9 +++++++++
 1 files changed, 9 insertions(+)


Index: carob/src/Connection.cpp
diff -u carob/src/Connection.cpp:1.61 carob/src/Connection.cpp:1.62
--- carob/src/Connection.cpp:1.61       Fri Feb 10 09:49:49 2006
+++ carob/src/Connection.cpp    Fri Feb 10 09:54:24 2006
@@ -419,6 +419,11 @@
   {
     throw DriverException(L"Trying to commit a connection in autocommit mode");
   }
+
+  // Check if we are not committing an empty transaction (not started yet)
+  if (mustBeginTransaction)
+    return;
+
   try
   {
     sendCommand(*driverSocketPtr, Commit);
@@ -484,6 +489,10 @@
     throw DriverException(L"Trying to rollback a connection in autocommit 
mode");
   }
 
+  // Check if we are not rollbacking an empty transaction (not started yet)
+  if (mustBeginTransaction)
+    return;
+
   try
   {
     sendCommand(*driverSocketPtr, Rollback);

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to