List:Commits« Previous MessageNext Message »
From:rburnett Date:May 18 2009 9:21pm
Subject:Connector/NET commit: r1609 - in branches/5.2: . MySql.Data/Provider MySql.Data/Provider/Properties MySql.Data/Provider/Source MySql.Data/Tests MySql....
View as plain text  
Added:
   branches/5.2/MySql.Data/Provider/Properties/VersionInfo.cs
Modified:
   branches/5.2/CHANGES
   branches/5.2/MySql.Data/Provider/MySql.Data.CF.csproj
   branches/5.2/MySql.Data/Provider/MySql.Data.csproj
   branches/5.2/MySql.Data/Provider/Properties/AssemblyInfo.cs
   branches/5.2/MySql.Data/Provider/Source/CompressedStream.cs
   branches/5.2/MySql.Data/Provider/Source/SchemaProvider.cs
   branches/5.2/MySql.Data/Tests/MySql.Data.Tests.csproj
   branches/5.2/MySql.Data/Tests/Properties/AssemblyInfo.cs
   branches/5.2/MySql.Data/Tests/Source/GetSchemaTests.cs
   branches/5.2/MySql.VisualStudio/MySql.VisualStudio.csproj
   branches/5.2/MySql.VisualStudio/Properties/AssemblyInfo.cs
   branches/5.2/MySql.Web/Providers/MySql.Web.csproj
   branches/5.2/MySql.Web/Providers/Properties/AssemblyInfo.cs
   branches/5.2/MySql.Web/Tests/MySql.Web.Tests.csproj
   branches/5.2/MySql.Web/Tests/Properties/AssemblyInfo.cs
Log:
merged

Modified: branches/5.2/CHANGES
===================================================================
--- branches/5.2/CHANGES	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/CHANGES	2009-05-18 21:21:06 UTC (rev 1609)
@@ -8,6 +8,10 @@
 - fixed bug in role provider that was causing it to not correctly fetch the application
   id which caused it to incorrectly report roles (bug #44414)
 - fixed Visual Studio 2005 solution so that it builds  
+- fixed potential endless loop in CompressedStream in case where end of stream occurs before 
+  packet is fully read (bug #43678)
+- fixed ReservedWords schema collection to not incorrectly include blank words and to use the
+  right column name
   
 Version 5.2.6
 - cleaned up how stored procedure execution operated when the user does or does not have execute privs

Modified: branches/5.2/MySql.Data/Provider/MySql.Data.CF.csproj
===================================================================
--- branches/5.2/MySql.Data/Provider/MySql.Data.CF.csproj	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Provider/MySql.Data.CF.csproj	2009-05-18 21:21:06 UTC (rev 1609)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{587A47FB-C1CC-459D-93B6-179D95E41EFB}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -60,6 +60,7 @@
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\Resources.Designer.cs" />
+    <Compile Include="Properties\VersionInfo.cs" />
     <Compile Include="Source\base\DbConnectionStringBuilder.cs" />
     <Compile Include="Source\base\DbException.cs" />
     <Compile Include="Source\cf\BufferedStream.cs" />

Modified: branches/5.2/MySql.Data/Provider/MySql.Data.csproj
===================================================================
--- branches/5.2/MySql.Data/Provider/MySql.Data.csproj	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Provider/MySql.Data.csproj	2009-05-18 21:21:06 UTC (rev 1609)
@@ -218,6 +218,7 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <Compile Include="Properties\VersionInfo.cs" />
     <Compile Include="Source\common\Cache.cs" />
     <Compile Include="Source\common\SqlTokenizer.cs" />
     <Compile Include="Source\BulkLoader.cs" />

Modified: branches/5.2/MySql.Data/Provider/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.2/MySql.Data/Provider/Properties/AssemblyInfo.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Provider/Properties/AssemblyInfo.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -42,19 +42,7 @@
 #if !CF
 [assembly: AllowPartiallyTrustedCallers()]
 #endif
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
 
-[assembly: AssemblyVersion("5.2.7")]
-
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 
 // Microsoft .NET Framework documentation for more information on assembly signing.

Added: branches/5.2/MySql.Data/Provider/Properties/VersionInfo.cs
===================================================================
--- branches/5.2/MySql.Data/Provider/Properties/VersionInfo.cs	                        (rev 0)
+++ branches/5.2/MySql.Data/Provider/Properties/VersionInfo.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -0,0 +1,39 @@
+// Copyright (C) 2004-2007 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation
+//
+// There are special exceptions to the terms and conditions of the GPL 
+// as it is applied to this software. View the full text of the 
+// exception in file EXCEPTIONS in the directory of this software 
+// distribution.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("5.2.7")]
+

Modified: branches/5.2/MySql.Data/Provider/Source/CompressedStream.cs
===================================================================
--- branches/5.2/MySql.Data/Provider/Source/CompressedStream.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Provider/Source/CompressedStream.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -37,6 +37,7 @@
         // reading fields
         private byte[] localByte;
         private byte[] inBuffer;
+        private byte[] lengthBytes;
         private WeakReference inBufferRef;
         private int inPos;
         private int maxInPos;
@@ -46,6 +47,7 @@
         {
             this.baseStream = baseStream;
             localByte = new byte[1];
+            lengthBytes = new byte[7];
 			cache = new MemoryStream();
             inBufferRef = new WeakReference(inBuffer, false);
         }
@@ -94,8 +96,15 @@
 
         public override int ReadByte()
         {
-            Read(localByte, 0, 1);
-            return localByte[0];
+            try
+            {
+                Read(localByte, 0, 1);
+                return localByte[0];
+            }
+            catch (EndOfStreamException)
+            {
+                return -1;
+            }
         }
 
         public override int Read(byte[] buffer, int offset, int count)
@@ -131,16 +140,12 @@
 
         private void PrepareNextPacket()
         {
-            // read off the uncompressed and compressed lengths
-            byte b1 = (byte) baseStream.ReadByte();
-            byte b2 = (byte) baseStream.ReadByte();
-            byte b3 = (byte) baseStream.ReadByte();
-            int compressedLength = b1 + (b2 << 8) + (b3 << 16);
+            ReadFully(lengthBytes, 7);
+            int compressedLength = lengthBytes[0] + (lengthBytes[1] << 8) + (lengthBytes[2] << 16);
+            // lengthBytes[3] is seq
+            int unCompressedLength = lengthBytes[4] + (lengthBytes[5] << 8) +
+                                     (lengthBytes[6] << 16);
 
-            baseStream.ReadByte(); // seq
-            int unCompressedLength = baseStream.ReadByte() + (baseStream.ReadByte() << 8) +
-                                     (baseStream.ReadByte() << 16);
-
             if (unCompressedLength == 0)
             {
                 unCompressedLength = compressedLength;
@@ -163,11 +168,20 @@
             inBuffer = (byte[])inBufferRef.Target;
             if (inBuffer == null || inBuffer.Length < len)
                 inBuffer = new byte[len];
+            ReadFully(inBuffer, len);
+        }
+        
+        private void ReadFully(byte[] buffer, int len)
+        {
             int numRead = 0;
             int numToRead = len;
             while (numToRead > 0)
             {
-                int read = baseStream.Read(inBuffer, numRead, numToRead);
+                int read = baseStream.Read(buffer, numRead, numToRead);
+                if (read == 0)
+                {
+                    throw new EndOfStreamException();
+                }
                 numRead += read;
                 numToRead -= read;
             }

Modified: branches/5.2/MySql.Data/Provider/Source/SchemaProvider.cs
===================================================================
--- branches/5.2/MySql.Data/Provider/Source/SchemaProvider.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Provider/Source/SchemaProvider.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -782,7 +782,7 @@
         private static DataTable GetReservedWords()
         {
             DataTable dt = new DataTable("ReservedWords");
-            dt.Columns.Add(new DataColumn("Reserved Word", typeof (string)));
+            dt.Columns.Add(new DataColumn(DbMetaDataColumnNames.ReservedWord, typeof(string)));
 
             Stream str = Assembly.GetExecutingAssembly().GetManifestResourceStream(
                 "MySql.Data.MySqlClient.Properties.ReservedWords.txt");
@@ -793,6 +793,7 @@
                 string[] keywords = line.Split(new char[] {' '});
                 foreach (string s in keywords)
                 {
+                    if (String.IsNullOrEmpty(s)) continue;
                     DataRow row = dt.NewRow();
                     row[0] = s;
                     dt.Rows.Add(row);

Modified: branches/5.2/MySql.Data/Tests/MySql.Data.Tests.csproj
===================================================================
--- branches/5.2/MySql.Data/Tests/MySql.Data.Tests.csproj	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Tests/MySql.Data.Tests.csproj	2009-05-18 21:21:06 UTC (rev 1609)
@@ -36,10 +36,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\..\..\Program Files\NUnit 2.4.7\bin\nunit.framework.dll</HintPath>
-    </Reference>
+    <Reference Include="nunit.framework" />
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
@@ -47,6 +44,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\Provider\Properties\VersionInfo.cs">
+      <Link>Properties\VersionInfo.cs</Link>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Source\AsyncTests.cs" />
     <Compile Include="Source\BaseTest.cs" />

Modified: branches/5.2/MySql.Data/Tests/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.2/MySql.Data/Tests/Properties/AssemblyInfo.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Tests/Properties/AssemblyInfo.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -36,19 +36,6 @@
 [assembly: AssemblyCulture("")]		
 
 //
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("5.2.7")]
-
-//
 // In order to sign your assembly you must specify a key to use. Refer to the 
 // Microsoft .NET Framework documentation for more information on assembly signing.
 //

Modified: branches/5.2/MySql.Data/Tests/Source/GetSchemaTests.cs
===================================================================
--- branches/5.2/MySql.Data/Tests/Source/GetSchemaTests.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Data/Tests/Source/GetSchemaTests.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -638,5 +638,13 @@
 			Assert.AreEqual("test1", dt.Rows[0][2]);
 			Assert.AreEqual("`test1`", restrictions[2]);
 		}
+
+        [Test]
+        public void ReservedWords()
+        {
+            DataTable dt = conn.GetSchema("ReservedWords");
+            foreach (DataRow row in dt.Rows)
+                Assert.IsFalse(String.IsNullOrEmpty(row[0] as string));
+        }
 	}
 }

Modified: branches/5.2/MySql.VisualStudio/MySql.VisualStudio.csproj
===================================================================
--- branches/5.2/MySql.VisualStudio/MySql.VisualStudio.csproj	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.VisualStudio/MySql.VisualStudio.csproj	2009-05-18 21:21:06 UTC (rev 1609)
@@ -111,6 +111,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\MySql.Data\Provider\Properties\VersionInfo.cs">
+      <Link>Properties\VersionInfo.cs</Link>
+    </Compile>
     <Compile Include="Commands\CloneCommand.cs" />
     <Compile Include="Commands\CommandHandlerAttribute.cs" />
     <Compile Include="Commands\CreateNewFunctionCommand.cs" />

Modified: branches/5.2/MySql.VisualStudio/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.2/MySql.VisualStudio/Properties/AssemblyInfo.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.VisualStudio/Properties/AssemblyInfo.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -19,15 +19,4 @@
 
 // The following GUID is for the ID of the typelib if this project is exposed to COM
 [assembly : Guid("5860AC5F-9DE5-4e2b-9FDA-D2AC4B1D6FA5")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-[assembly : AssemblyVersion("5.2.7")]
 [assembly: AssemblyKeyName("ConnectorNet")]

Modified: branches/5.2/MySql.Web/Providers/MySql.Web.csproj
===================================================================
--- branches/5.2/MySql.Web/Providers/MySql.Web.csproj	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Web/Providers/MySql.Web.csproj	2009-05-18 21:21:06 UTC (rev 1609)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{C28B1166-1380-445D-AEC1-8A18B990DD18}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -51,6 +51,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\..\MySql.Data\Provider\Properties\VersionInfo.cs">
+      <Link>Properties\VersionInfo.cs</Link>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>

Modified: branches/5.2/MySql.Web/Providers/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.2/MySql.Web/Providers/Properties/AssemblyInfo.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Web/Providers/Properties/AssemblyInfo.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -44,14 +44,4 @@
 // The following GUID is for the ID of the typelib if this project is exposed to COM
 //[assembly: Guid("01520f33-9ecd-4574-96d0-5e6604e0f3aa")]
 
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("5.2.7")]
 [assembly: AssemblyKeyName("ConnectorNet")]

Modified: branches/5.2/MySql.Web/Tests/MySql.Web.Tests.csproj
===================================================================
--- branches/5.2/MySql.Web/Tests/MySql.Web.Tests.csproj	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Web/Tests/MySql.Web.Tests.csproj	2009-05-18 21:21:06 UTC (rev 1609)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{DC704374-EC50-4167-93AA-8D262136502E}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -33,7 +33,7 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
+    <Reference Include="nunit.framework" />
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
@@ -41,6 +41,9 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\..\MySql.Data\Provider\Properties\VersionInfo.cs">
+      <Link>Properties\VersionInfo.cs</Link>
+    </Compile>
     <Compile Include="BaseTest.cs" />
     <Compile Include="ProfileTests.cs" />
     <Compile Include="RoleManagement.cs" />

Modified: branches/5.2/MySql.Web/Tests/Properties/AssemblyInfo.cs
===================================================================
--- branches/5.2/MySql.Web/Tests/Properties/AssemblyInfo.cs	2009-05-18 20:32:34 UTC (rev 1608)
+++ branches/5.2/MySql.Web/Tests/Properties/AssemblyInfo.cs	2009-05-18 21:21:06 UTC (rev 1609)
@@ -22,13 +22,3 @@
 // The following GUID is for the ID of the typelib if this project is exposed to COM
 [assembly: Guid("5ea74c78-c679-464f-99ba-ae1b0b54550b")]
 
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("5.2.7")]

Thread
Connector/NET commit: r1609 - in branches/5.2: . MySql.Data/Provider MySql.Data/Provider/Properties MySql.Data/Provider/Source MySql.Data/Tests MySql....rburnett18 May