List:Commits« Previous MessageNext Message »
From:rburnett Date:October 23 2007 10:54pm
Subject:Connector/NET commit: r1041 - in branches/5.1: . Driver/Properties Driver/Source
View as plain text  
Modified:
   branches/5.1/CHANGES
   branches/5.1/Driver/Properties/Resources.Designer.cs
   branches/5.1/Driver/Properties/Resources.resx
   branches/5.1/Driver/Source/Connection.cs
Log:
Fixed problem where attempting to enlist in a distributed transaction would succeed even
though Connector/Net doesn't currently support that. (Bug #31703)


Modified: branches/5.1/CHANGES
===================================================================
--- branches/5.1/CHANGES	2007-10-23 20:27:36 UTC (rev 1040)
+++ branches/5.1/CHANGES	2007-10-23 20:54:09 UTC (rev 1041)
@@ -8,6 +8,8 @@
   - Fixed problem with attempting to use a command with a connection that is not open.
     The problem was caused by the introduction of the internal method SoftClosed that is
     used with transactions.  (Bug #31262)      
+  - Fixed problem where attempting to enlist in a distributed transaction would succeed
+    even though Connector/Net doesn't currently support that. (Bug #31703)
       
 Version 5.1.3 - 9/19/2007
   - Fixed problem with using a stored procedure that takes a parameter as a select
routine

Modified: branches/5.1/Driver/Properties/Resources.Designer.cs
===================================================================
--- branches/5.1/Driver/Properties/Resources.Designer.cs	2007-10-23 20:27:36 UTC (rev
1040)
+++ branches/5.1/Driver/Properties/Resources.Designer.cs	2007-10-23 20:54:09 UTC (rev
1041)
@@ -236,6 +236,12 @@
             }
         }
         
+        internal static string DistributedTxnNotSupported {
+            get {
+                return ResourceManager.GetString("DistributedTxnNotSupported",
resourceCulture);
+            }
+        }
+
         /// <summary>
         ///   Looks up a localized string similar to Error creating socket connection.
         /// </summary>

Modified: branches/5.1/Driver/Properties/Resources.resx
===================================================================
--- branches/5.1/Driver/Properties/Resources.resx	2007-10-23 20:27:36 UTC (rev 1040)
+++ branches/5.1/Driver/Properties/Resources.resx	2007-10-23 20:54:09 UTC (rev 1041)
@@ -327,4 +327,7 @@
   <data name="MultipleConnectionsInTransactionNotSupported" xml:space="preserve">
     <value>Multiple simultaneous connections or connections with different
connection strings inside the same transaction are not currently supported.</value>
   </data>
+  <data name="DistributedTxnNotSupported" xml:space="preserve">
+    <value>MySQL Connector/Net does not currently support distributed
transactions.</value>
+  </data>
 </root>
\ No newline at end of file

Modified: branches/5.1/Driver/Source/Connection.cs
===================================================================
--- branches/5.1/Driver/Source/Connection.cs	2007-10-23 20:27:36 UTC (rev 1040)
+++ branches/5.1/Driver/Source/Connection.cs	2007-10-23 20:54:09 UTC (rev 1041)
@@ -334,7 +334,9 @@
             if (driver.CurrentTransaction == null)
             {
                 MySqlPromotableTransaction t = new MySqlPromotableTransaction(this,
transaction);
-                transaction.EnlistPromotableSinglePhase(t);
+                if (!transaction.EnlistPromotableSinglePhase(t))
+                    throw new
NotSupportedException(Resources.DistributedTxnNotSupported);
+
                 driver.CurrentTransaction = t;
                 DriverTransactionManager.SetDriverInTransaction(driver);
                 driver.IsInActiveUse = true;

Thread
Connector/NET commit: r1041 - in branches/5.1: . Driver/Properties Driver/Sourcerburnett23 Oct