List:Commits« Previous MessageNext Message »
From:rburnett Date:November 5 2007 8:47pm
Subject:Connector/NET commit: r1069 - in branches/5.0: . Driver/Source TestSuite/Source
View as plain text  
Modified:
   branches/5.0/CHANGES
   branches/5.0/Driver/Source/datareader.cs
   branches/5.0/TestSuite/Source/StoredProcedure.cs
Log:
fixed problem where a syntax error in a set of batch statements could leave the data
adapter in a state that appears hung (bug #31930)


Modified: branches/5.0/CHANGES
===================================================================
--- branches/5.0/CHANGES	2007-11-05 19:44:20 UTC (rev 1068)
+++ branches/5.0/CHANGES	2007-11-05 19:47:18 UTC (rev 1069)
@@ -24,7 +24,9 @@
     (Bug #32094)    
   - fixed problem where old code was preventing creating parameter objects with non-input
direction using
     just a constructor (Bug #32093)     
-    
+  - fixed problem where a syntax error in a set of batch statements could leave the data
adapter in a state
+    that appears hung (bug #31930)
+        
 Version 5.0.8   8/16/2007
 
   Bug #28706 Log messages are truncated  

Modified: branches/5.0/Driver/Source/datareader.cs
===================================================================
--- branches/5.0/Driver/Source/datareader.cs	2007-11-05 19:44:20 UTC (rev 1068)
+++ branches/5.0/Driver/Source/datareader.cs	2007-11-05 19:47:18 UTC (rev 1069)
@@ -857,7 +857,9 @@
 			{
 				if (ex.IsFatal)
 					connection.Abort();
-				throw;
+                nextResultDone = true;
+                hasRows = canRead = false; 
+                throw;
 			}
 
 		}

Modified: branches/5.0/TestSuite/Source/StoredProcedure.cs
===================================================================
--- branches/5.0/TestSuite/Source/StoredProcedure.cs	2007-11-05 19:44:20 UTC (rev 1068)
+++ branches/5.0/TestSuite/Source/StoredProcedure.cs	2007-11-05 19:47:18 UTC (rev 1069)
@@ -1275,15 +1275,18 @@
         {
             execSQL("CREATE TABLE t1 (id INT)");
             execSQL("CREATE TABLE t2 (id1 INT, id INT)");
-            execSQL("CREATE PROCEDURE spTest() BEGIN SELECT id FROM t1 JOIN t2 on
t1.id=t2.id; END");
+            execSQL(@"CREATE PROCEDURE spTest() BEGIN SELECT * FROM t1; 
+                        SELECT id FROM t1 JOIN t2 on t1.id=t2.id; 
+                        SELECT * FROM t2; END");
 
             MySqlCommand cmd = new MySqlCommand("spTest", conn);
             cmd.CommandType = CommandType.StoredProcedure;
+            cmd.CommandTimeout = 0;
             MySqlDataAdapter da = new MySqlDataAdapter(cmd);
-            DataTable dt = new DataTable();
+            DataSet ds = new DataSet();
             try
             {
-                da.Fill(dt);
+                da.Fill(ds);
                 Assert.Fail("The above should have thrown an exception");
             }
             catch (Exception ex)

Thread
Connector/NET commit: r1069 - in branches/5.0: . Driver/Source TestSuite/Sourcerburnett5 Nov