List:Commits« Previous MessageNext Message »
From:rburnett Date:October 30 2006 4:50pm
Subject:Connector/NET commit: r441 - in branches/1.0: . TestSuite mysqlclient
View as plain text  
Modified:
   branches/1.0/CHANGES
   branches/1.0/TestSuite/StoredProcedure.cs
   branches/1.0/mysqlclient/StoredProcedure.cs
Log:
Bug #23749 VarChar field size over 255 causes a System.OverflowException 

Modified: branches/1.0/CHANGES
===================================================================
--- branches/1.0/CHANGES	2006-10-30 16:48:31 UTC (rev 440)
+++ branches/1.0/CHANGES	2006-10-30 16:50:34 UTC (rev 441)
@@ -12,6 +12,7 @@
     Bug #23268 System.FormatException when invoking procedure with ENUM input parameter 
 		Bug #23538 Exception thrown when GetSchemaTable is called and "fields" is null. 
     Bug #23758 Unable to connect to any server - IPv6 related 
+    Bug #23749 VarChar field size over 255 causes a System.OverflowException 
 		
 Version 1.0.8 RC
 

Modified: branches/1.0/TestSuite/StoredProcedure.cs
===================================================================
--- branches/1.0/TestSuite/StoredProcedure.cs	2006-10-30 16:48:31 UTC (rev 440)
+++ branches/1.0/TestSuite/StoredProcedure.cs	2006-10-30 16:50:34 UTC (rev 441)
@@ -123,7 +123,7 @@
 		{
 			// create our procedure
 			execSQL("DROP PROCEDURE IF EXISTS spCount");
-			execSQL("CREATE PROCEDURE spCount(out value VARCHAR(50), OUT intVal INT, " +
+			execSQL("CREATE PROCEDURE spCount(out value VARCHAR(350), OUT intVal INT, " +
 				"OUT dateVal TIMESTAMP, OUT floatVal FLOAT, OUT noTypeVarChar VARCHAR(20), " +
 				"OUT noTypeInt INT) " +
 				"BEGIN  SET value='42';  SET intVal=33; SET dateVal='2004-06-05 07:58:09'; " +

Modified: branches/1.0/mysqlclient/StoredProcedure.cs
===================================================================
--- branches/1.0/mysqlclient/StoredProcedure.cs	2006-10-30 16:48:31 UTC (rev 440)
+++ branches/1.0/mysqlclient/StoredProcedure.cs	2006-10-30 16:50:34 UTC (rev 441)
@@ -365,9 +365,14 @@
 			{
 				size = type.Substring(start + 1, end - (start + 1));
 				string[] parts = size.Split(new char[] { ',' });
-				p.Size = p.Precision = Byte.Parse(parts[0]);
-				if (parts.Length > 1)
-					p.Scale = Byte.Parse(parts[1]);
+				p.Size = Int32.Parse(parts[0]);
+				if (p.MySqlDbType == MySqlDbType.Decimal)
+				{
+					p.Precision = (byte)p.Size;
+					p.Size = 0;
+					if (parts.Length > 1)
+						p.Scale = Byte.Parse(parts[1]);
+				}
 			}
 		}
 

Thread
Connector/NET commit: r441 - in branches/1.0: . TestSuite mysqlclientrburnett30 Oct