Added:
branches/6.0/Installer/Binary/GlobalInstaller.exe
branches/6.0/Installer/register.cmd
Modified:
branches/6.0/MySQL-VS2005.sln
branches/6.0/MySQLClient.sln
branches/6.0/MySql.Data/Provider/MySql.Data.CF.csproj
branches/6.0/MySql.Data/Provider/Properties/Resources.Designer.cs
branches/6.0/MySql.Data/Provider/Properties/Resources.resx
branches/6.0/MySql.Data/Provider/Source/CharSetMap.cs
branches/6.0/MySql.Data/Provider/Source/ISSchemaProvider.cs
branches/6.0/MySql.Data/Provider/Source/NativeDriver.cs
branches/6.0/MySql.Data/Provider/Source/ProcedureCache.cs
branches/6.0/MySql.Data/Provider/Source/StoredProcedure.cs
branches/6.0/MySql.Data/Provider/Source/Types/MySqlString.cs
branches/6.0/MySql.Data/Tests/Source/StoredProcedure.cs
branches/6.0/MySql.Web/Providers/Source/Application.cs
branches/6.0/MySql.Web/Providers/Source/RoleProvider.cs
branches/6.0/MySql.Web/Tests/MySql.Web.Tests.csproj
Log:
merged
Copied: branches/6.0/Installer/Binary/GlobalInstaller.exe (from rev 1601, branches/5.2/Installer/Binary/GlobalInstaller.exe)
===================================================================
(Binary files differ)
Copied: branches/6.0/Installer/register.cmd (from rev 1601, branches/5.2/Installer/register.cmd)
===================================================================
--- branches/6.0/Installer/register.cmd (rev 0)
+++ branches/6.0/Installer/register.cmd 2009-05-15 14:15:05 UTC (rev 1603)
@@ -0,0 +1,8 @@
+echo off
+gacutil /u mysql.data
+gacutil /u mysql.web
+gacutil /i MySql.Data\provider\bin\debug\mysql.data.dll
+installutil mysql.data\provider\bin\debug\mysql.data.dll
+gacutil /i MySql.Web\providers\bin\debug\mysql.web.dll
+installutil mysql.web\providers\bin\debug\mysql.web.dll
+installer\binary\globalinstaller mysql.visualstudio\bin\debug\mysql.visualstudio.dll version=VS2008 debug=true
Modified: branches/6.0/MySQL-VS2005.sln
===================================================================
--- branches/6.0/MySQL-VS2005.sln 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySQL-VS2005.sln 2009-05-15 14:15:05 UTC (rev 1603)
@@ -1,20 +1,18 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data", "Driver\MySql.Data.csproj", "{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Web", "MySql.Web\Providers\MySql.Web.csproj", "{C28B1166-1380-445D-AEC1-8A18B990DD18}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data.CF", "Driver\MySql.Data.CF.csproj", "{587A47FB-C1CC-459D-93B6-179D95E41EFB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Web.Tests", "MySql.Web\Tests\MySql.Web.Tests.csproj", "{DC704374-EC50-4167-93AA-8D262136502E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data.Tests", "TestSuite\MySql.Data.Tests.csproj", "{F29E5B3D-7F76-4CF9-BF5E-8E3A1377B1E4}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data", "MySql.Data\Provider\MySql.Data.csproj", "{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data.Tests.CF", "TestSuite\MySql.Data.Tests.CF.csproj", "{710D9251-17A3-4429-9A91-63F03267F310}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data.CF", "MySql.Data\Provider\MySql.Data.CF.csproj", "{587A47FB-C1CC-459D-93B6-179D95E41EFB}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Web", "MySql.Web\Providers\MySql.Web.csproj", "{C28B1166-1380-445D-AEC1-8A18B990DD18}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data.Tests", "MySql.Data\Tests\MySql.Data.Tests.csproj", "{F29E5B3D-7F76-4CF9-BF5E-8E3A1377B1E4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Web.Tests", "MySql.Web\Tests\MySql.Web.Tests.csproj", "{DC704374-EC50-4167-93AA-8D262136502E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.VisualStudio", "MySql.VisualStudio\MySql.VisualStudio.csproj", "{DC3517FF-AC26-4755-9B7A-EF658FF69593}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.VisualStudio", "VisualStudio\MySql.VisualStudio.csproj", "{DC3517FF-AC26-4755-9B7A-EF658FF69593}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET 2.0 = Debug|.NET 2.0
@@ -27,15 +25,33 @@
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|.NET 2.0.ActiveCfg = Debug|.NET 2.0
- {E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|.NET 2.0.Build.0 = Debug|.NET 2.0
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|.NET 2.0.ActiveCfg = Debug|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|.NET 2.0.ActiveCfg = Release|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|x64.ActiveCfg = Release|Any CPU
+ {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|x86.ActiveCfg = Release|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Debug|.NET 2.0.ActiveCfg = Debug|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Release|.NET 2.0.ActiveCfg = Release|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Release|x64.ActiveCfg = Release|Any CPU
+ {DC704374-EC50-4167-93AA-8D262136502E}.Release|x86.ActiveCfg = Release|Any CPU
+ {E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|.NET 2.0.ActiveCfg = Debug|x86
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|x64.ActiveCfg = Debug|x86
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|x86.ActiveCfg = Debug|x86
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Debug|x86.Build.0 = Debug|x86
- {E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Release|.NET 2.0.ActiveCfg = Release|.NET 2.0
- {E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Release|.NET 2.0.Build.0 = Release|.NET 2.0
+ {E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Release|.NET 2.0.ActiveCfg = Release|x86
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Release|Any CPU.Build.0 = Release|Any CPU
{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}.Release|x64.ActiveCfg = Release|x86
@@ -61,36 +77,6 @@
{F29E5B3D-7F76-4CF9-BF5E-8E3A1377B1E4}.Release|Any CPU.Build.0 = Release|Any CPU
{F29E5B3D-7F76-4CF9-BF5E-8E3A1377B1E4}.Release|x64.ActiveCfg = Release|Any CPU
{F29E5B3D-7F76-4CF9-BF5E-8E3A1377B1E4}.Release|x86.ActiveCfg = Release|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Debug|.NET 2.0.ActiveCfg = Debug|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Debug|x64.ActiveCfg = Debug|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Debug|x86.ActiveCfg = Debug|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Release|.NET 2.0.ActiveCfg = Release|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Release|Any CPU.Build.0 = Release|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Release|x64.ActiveCfg = Release|Any CPU
- {710D9251-17A3-4429-9A91-63F03267F310}.Release|x86.ActiveCfg = Release|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|.NET 2.0.ActiveCfg = Debug|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|x64.ActiveCfg = Debug|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|.NET 2.0.ActiveCfg = Release|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|Any CPU.Build.0 = Release|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|x64.ActiveCfg = Release|Any CPU
- {C28B1166-1380-445D-AEC1-8A18B990DD18}.Release|x86.ActiveCfg = Release|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Debug|.NET 2.0.ActiveCfg = Debug|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Release|.NET 2.0.ActiveCfg = Release|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Release|Any CPU.Build.0 = Release|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Release|x64.ActiveCfg = Release|Any CPU
- {DC704374-EC50-4167-93AA-8D262136502E}.Release|x86.ActiveCfg = Release|Any CPU
{DC3517FF-AC26-4755-9B7A-EF658FF69593}.Debug|.NET 2.0.ActiveCfg = Debug|x64
{DC3517FF-AC26-4755-9B7A-EF658FF69593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC3517FF-AC26-4755-9B7A-EF658FF69593}.Debug|Any CPU.Build.0 = Debug|Any CPU
Modified: branches/6.0/MySQLClient.sln
===================================================================
--- branches/6.0/MySQLClient.sln 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySQLClient.sln 2009-05-15 14:15:05 UTC (rev 1603)
@@ -278,6 +278,30 @@
{F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|x64.ActiveCfg = Commercial|x86
{F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|x86.ActiveCfg = Commercial|x86
{F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|x86.Build.0 = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Commercial|Any CPU.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Commercial|Mixed Platforms.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Commercial|Mixed Platforms.Build.0 = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Commercial|x64.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Commercial|x86.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Commercial|x86.Build.0 = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Debug|Any CPU.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Debug|Mixed Platforms.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Debug|Mixed Platforms.Build.0 = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Debug|x64.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Debug|x86.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Debug|x86.Build.0 = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.GPL|Any CPU.ActiveCfg = GPL|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.GPL|Mixed Platforms.ActiveCfg = GPL|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.GPL|Mixed Platforms.Build.0 = GPL|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.GPL|x64.ActiveCfg = GPL|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.GPL|x86.ActiveCfg = GPL|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.GPL|x86.Build.0 = GPL|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|Any CPU.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|Mixed Platforms.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|Mixed Platforms.Build.0 = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|x64.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|x86.ActiveCfg = Commercial|x86
+ {F533FC43-6C05-4A64-8AF6-72B690EB06C3}.Release|x86.Build.0 = Commercial|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: branches/6.0/MySql.Data/Provider/MySql.Data.CF.csproj
===================================================================
--- branches/6.0/MySql.Data/Provider/MySql.Data.CF.csproj 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/MySql.Data.CF.csproj 2009-05-15 14:15:05 UTC (rev 1603)
@@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{587A47FB-C1CC-459D-93B6-179D95E41EFB}</ProjectGuid>
<OutputType>Library</OutputType>
Modified: branches/6.0/MySql.Data/Provider/Properties/Resources.Designer.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Properties/Resources.Designer.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Properties/Resources.Designer.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -727,6 +727,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to Unable to retrieve stored routine parameters. Either grant access to the routine or add the 'Use Procedure Bodies=false' option to your connection string..
+ /// </summary>
+ public static string UnableToRetrieveParameters {
+ get {
+ return ResourceManager.GetString("UnableToRetrieveParameters", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Unable to retrieve stored procedure metadata. Either grant SELECT privilege to mysql.proc for this user or use "use procedure bodies=false" with your connection string..
/// </summary>
public static string UnableToRetrieveSProcData {
Modified: branches/6.0/MySql.Data/Provider/Properties/Resources.resx
===================================================================
--- branches/6.0/MySql.Data/Provider/Properties/Resources.resx 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Properties/Resources.resx 2009-05-15 14:15:05 UTC (rev 1603)
@@ -345,6 +345,9 @@
<data name="ValueNotSupportedForGuid" xml:space="preserve">
<value>The requested column value could not be treated as or conveted to a Guid.</value>
</data>
+ <data name="UnableToRetrieveParameters" xml:space="preserve">
+ <value>Unable to retrieve stored routine parameters. Either grant access to the routine or add the 'Use Procedure Bodies=false' option to your connection string.</value>
+ </data>
<data name="UnableToEnumerateUDF" xml:space="preserve">
<value>An error occured attempting to enumerate the user-defined functions. Do you have SELECT privileges on the mysql.func table?</value>
</data>
Modified: branches/6.0/MySql.Data/Provider/Source/CharSetMap.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Source/CharSetMap.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Source/CharSetMap.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -51,7 +51,7 @@
InitializeMapping();
}
- public static CharacterSet GetChararcterSet(DBVersion version, string CharSetName)
+ public static CharacterSet GetCharacterSet(DBVersion version, string CharSetName)
{
CharacterSet cs = (CharacterSet) mapping[CharSetName];
if (cs == null)
@@ -69,7 +69,7 @@
{
try
{
- CharacterSet cs = GetChararcterSet(version, CharSetName);
+ CharacterSet cs = GetCharacterSet(version, CharSetName);
return Encoding.GetEncoding(cs.name);
}
catch (NotSupportedException)
Modified: branches/6.0/MySql.Data/Provider/Source/ISSchemaProvider.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Source/ISSchemaProvider.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Source/ISSchemaProvider.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -303,6 +303,34 @@
return parms;
}
+ internal DataTable CreateParametersTable()
+ {
+ DataTable dt = new DataTable("Procedure Parameters");
+ dt.Columns.Add("SPECIFIC_CATALOG", typeof(string));
+ dt.Columns.Add("SPECIFIC_SCHEMA", typeof(string));
+ dt.Columns.Add("SPECIFIC_NAME", typeof(string));
+ dt.Columns.Add("ORDINAL_POSITION", typeof(Int32));
+ dt.Columns.Add("PARAMETER_MODE", typeof(string));
+ dt.Columns.Add("PARAMETER_NAME", typeof(string));
+ dt.Columns.Add("DATA_TYPE", typeof(string));
+ dt.Columns.Add("CHARACTER_MAXIMUM_LENGTH", typeof(Int32));
+ dt.Columns.Add("CHARACTER_OCTET_LENGTH", typeof(Int32));
+ dt.Columns.Add("NUMERIC_PRECISION", typeof(byte));
+ dt.Columns.Add("NUMERIC_SCALE", typeof(Int32));
+ dt.Columns.Add("CHARACTER_SET_NAME", typeof(string));
+ dt.Columns.Add("COLLATION_NAME", typeof(string));
+ dt.Columns.Add("DTD_IDENTIFIER", typeof(string));
+ dt.Columns.Add("ROUTINE_TYPE", typeof(string));
+ return dt;
+ }
+
+ internal bool CanRetrieveProcedureParameters()
+ {
+ if (connection.driver.Version.isAtLeast(6, 0, 6) ||
+ connection.Settings.UseProcedureBodies) return true;
+ return false;
+ }
+
/// <summary>
/// Return schema information about parameters for procedures and functions
/// Restrictions supported are:
@@ -313,28 +341,14 @@
{
if (connection.driver.Version.isAtLeast(6, 0, 6))
return GetParametersFromIS(restrictions, routines);
- else
+ else if (connection.Settings.UseProcedureBodies)
{
- DataTable dt = new DataTable("Procedure Parameters");
- dt.Columns.Add("SPECIFIC_CATALOG", typeof(string));
- dt.Columns.Add("SPECIFIC_SCHEMA", typeof(string));
- dt.Columns.Add("SPECIFIC_NAME", typeof(string));
- dt.Columns.Add("ORDINAL_POSITION", typeof(Int32));
- dt.Columns.Add("PARAMETER_MODE", typeof(string));
- dt.Columns.Add("PARAMETER_NAME", typeof(string));
- dt.Columns.Add("DATA_TYPE", typeof(string));
- dt.Columns.Add("CHARACTER_MAXIMUM_LENGTH", typeof(Int32));
- dt.Columns.Add("CHARACTER_OCTET_LENGTH", typeof(Int32));
- dt.Columns.Add("NUMERIC_PRECISION", typeof(byte));
- dt.Columns.Add("NUMERIC_SCALE", typeof(Int32));
- dt.Columns.Add("CHARACTER_SET_NAME", typeof(string));
- dt.Columns.Add("COLLATION_NAME", typeof(string));
- dt.Columns.Add("DTD_IDENTIFIER", typeof(string));
- dt.Columns.Add("ROUTINE_TYPE", typeof(string));
+ DataTable dt = CreateParametersTable();
GetParametersFromShowCreate(dt, restrictions, routines);
-
return dt;
}
+ else
+ throw new InvalidOperationException(Resources.UnableToRetrieveParameters);
}
protected override DataTable GetSchemaInternal(string collection, string[] restrictions)
Modified: branches/6.0/MySql.Data/Provider/Source/NativeDriver.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Source/NativeDriver.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Source/NativeDriver.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -29,6 +29,7 @@
#if !CF
using System.Net.Security;
using System.Security.Authentication;
+using System.Globalization;
#endif
namespace MySql.Data.MySqlClient
@@ -729,8 +730,14 @@
if (charSets != null && field.CharacterSetIndex != -1)
{
- CharacterSet cs = CharSetMap.GetChararcterSet(Version, (string) charSets[field.CharacterSetIndex]);
- field.MaxLength = cs.byteCount;
+ CharacterSet cs = CharSetMap.GetCharacterSet(Version, (string) charSets[field.CharacterSetIndex]);
+ // starting with 6.0.4 utf8 has a maxlen of 4 instead of 3. The old
+ // 3 byte utf8 is utf8mb3
+ if (cs.name.ToLower(System.Globalization.CultureInfo.InvariantCulture) == "utf-8" &&
+ Version.Major >= 6)
+ field.MaxLength = 4;
+ else
+ field.MaxLength = cs.byteCount;
field.Encoding = CharSetMap.GetEncoding(version, (string) charSets[field.CharacterSetIndex]);
}
Modified: branches/6.0/MySql.Data/Provider/Source/ProcedureCache.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Source/ProcedureCache.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Source/ProcedureCache.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -125,16 +125,20 @@
if (procTable.Rows.Count == 0)
throw new MySqlException(String.Format(Resources.InvalidProcName, name, schema));
+ DataSet ds = new DataSet();
+ ds.Tables.Add(procTable);
+
// we don't use GetSchema here because that would cause another
// query of procedures and we don't need that since we already
// know the procedure we care about.
ISSchemaProvider isp = new ISSchemaProvider(connection);
string[] rest = isp.CleanRestrictions(restrictions);
- DataTable parametersTable = isp.GetProcedureParameters(rest, procTable);
+ if (isp.CanRetrieveProcedureParameters())
+ {
+ DataTable parametersTable = isp.GetProcedureParameters(rest, procTable);
+ ds.Tables.Add(parametersTable);
+ }
- DataSet ds = new DataSet();
- ds.Tables.Add(procTable);
- ds.Tables.Add(parametersTable);
return ds;
}
}
Modified: branches/6.0/MySql.Data/Provider/Source/StoredProcedure.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Source/StoredProcedure.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Source/StoredProcedure.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -64,25 +64,17 @@
private DataSet GetParameters(string procName)
{
// if we can use mysql.proc, then do so
- if (Connection.Settings.UseProcedureBodies)
- return Connection.ProcedureCache.GetProcedure(Connection, procName);
+ //if (Connection.Settings.UseProcedureBodies)
+ DataSet ds = Connection.ProcedureCache.GetProcedure(Connection, procName);
- // we can't use mysql.proc so we attempt to "make do"
- DataSet ds = new DataSet();
- string[] restrictions = new string[4];
- int dotIndex = procName.IndexOf('.');
- restrictions[1] = procName.Substring(0, dotIndex++);
- restrictions[2] = procName.Substring(dotIndex, procName.Length - dotIndex);
- ds.Tables.Add(Connection.GetSchema("procedures", restrictions));
+ // if we got both proc and parameter data then just return
+ if (ds.Tables.Count == 2) return ds;
- // we use an internal method to create our procedure parameters table. We pass
- // in a non-null routines table and this will prevent the code from attempting
- // a show create. It will process zero routine records but will return an empty
- // parameters table we can then fill.
- DataTable zeroRoutines = new DataTable();
+ // we were not able to retrieve parameter data so we have to make do by
+ // adding the parameters from the command object to our table
+ // we use an internal method to create our procedure parameters table.
ISSchemaProvider sp = new ISSchemaProvider(Connection);
- DataTable pTable = sp.GetProcedureParameters(null, zeroRoutines);
- pTable.TableName = "procedure parameters";
+ DataTable pTable = sp.CreateParametersTable();
ds.Tables.Add(pTable);
// now we run through the parameters that were set and fill in the parameters table
Modified: branches/6.0/MySql.Data/Provider/Source/Types/MySqlString.cs
===================================================================
--- branches/6.0/MySql.Data/Provider/Source/Types/MySqlString.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Provider/Source/Types/MySqlString.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -122,11 +122,12 @@
internal static void SetDSInfo(DataTable dsTable)
{
- string[] types = new string[] { "CHAR", "VARCHAR", "SET", "ENUM",
- "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT" };
- MySqlDbType[] dbtype = new MySqlDbType[] { MySqlDbType.String,
- MySqlDbType.VarChar, MySqlDbType.Set, MySqlDbType.Enum, MySqlDbType.TinyText,
- MySqlDbType.Text, MySqlDbType.MediumText, MySqlDbType.LongText };
+ string[] types = new string[] { "CHAR", "NCHAR", "VARCHAR", "NVARCHAR", "SET",
+ "ENUM", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT" };
+ MySqlDbType[] dbtype = new MySqlDbType[] { MySqlDbType.String, MySqlDbType.String,
+ MySqlDbType.VarChar, MySqlDbType.VarChar, MySqlDbType.Set, MySqlDbType.Enum,
+ MySqlDbType.TinyText, MySqlDbType.Text, MySqlDbType.MediumText,
+ MySqlDbType.LongText };
// we use name indexing because this method will only be called
// when GetSchema is called for the DataSourceInformation
@@ -137,8 +138,8 @@
row["TypeName"] = types[x];
row["ProviderDbType"] = dbtype[x];
row["ColumnSize"] = 0;
- row["CreateFormat"] = x < 2 ? types[x] + "({0})" : types[x];
- row["CreateParameters"] = x < 2 ? "size" : null;
+ row["CreateFormat"] = x < 4 ? types[x] + "({0})" : types[x];
+ row["CreateParameters"] = x < 4 ? "size" : null;
row["DataType"] = "System.String";
row["IsAutoincrementable"] = false;
row["IsBestMatch"] = true;
Modified: branches/6.0/MySql.Data/Tests/Source/StoredProcedure.cs
===================================================================
--- branches/6.0/MySql.Data/Tests/Source/StoredProcedure.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Data/Tests/Source/StoredProcedure.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -118,6 +118,7 @@
public StoredProcedure()
{
+ pooling = false;
csAdditions = ";procedure cache size=0;logging=true;";
}
@@ -1419,5 +1420,35 @@
Assert.AreEqual(1, o);
}
}
+
+ [Test]
+ public void ParametersInReverseOrder()
+ {
+ execSQL(@"CREATE PROCEDURE spTest(IN p_1 VARCHAR(5), IN p_2 VARCHAR(5))
+ BEGIN SELECT p_1 AS P1, p_2 AS P2; END");
+ MySqlCommand cmd = new MySqlCommand("spTest", conn);
+ cmd.CommandType = CommandType.StoredProcedure;
+ cmd.CommandTimeout = 0;
+ cmd.Parameters.AddWithValue("?p_2", ("World"));
+ cmd.Parameters[0].DbType = DbType.AnsiString;
+ cmd.Parameters[0].Direction = ParameterDirection.Input;
+ cmd.Parameters.AddWithValue("?p_1", ("Hello"));
+ cmd.Parameters[1].DbType = DbType.AnsiString;
+ cmd.Parameters[1].Direction = ParameterDirection.Input;
+ MySqlDataAdapter da = new MySqlDataAdapter(cmd);
+ DataTable dt = new DataTable();
+ da.Fill(dt);
+ string s = GetConnectionString(true);
+ if (s.IndexOf("use procedure bodies=false") != -1)
+ {
+ Assert.AreEqual("World", dt.Rows[0]["P1"]);
+ Assert.AreEqual("Hello", dt.Rows[0]["P2"]);
+ }
+ else
+ {
+ Assert.AreEqual("Hello", dt.Rows[0]["P1"]);
+ Assert.AreEqual("World", dt.Rows[0]["P2"]);
+ }
+ }
}
}
Modified: branches/6.0/MySql.Web/Providers/Source/Application.cs
===================================================================
--- branches/6.0/MySql.Web/Providers/Source/Application.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Web/Providers/Source/Application.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -9,17 +9,28 @@
{
internal class Application
{
+ private int _id;
+ private string _desc;
+
public Application(string name, string desc)
{
Id = -1;
Name = name;
Description = desc;
}
-
- public int Id { get; private set; }
+ public int Id
+ {
+ get { return _id; }
+ private set { _id = value; }
+ }
public string Name;
- public string Description { get; private set; }
+ public string Description
+ {
+ get { return _desc; }
+ private set { _desc = value; }
+ }
+
public int FetchId(MySqlConnection connection)
{
if (Id == -1)
Modified: branches/6.0/MySql.Web/Providers/Source/RoleProvider.cs
===================================================================
--- branches/6.0/MySql.Web/Providers/Source/RoleProvider.cs 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Web/Providers/Source/RoleProvider.cs 2009-05-15 14:15:05 UTC (rev 1603)
@@ -183,7 +183,7 @@
{
// either create a new user or fetch the existing user id
int userId = SchemaManager.CreateOrFetchUserId(connection,
- username, app.Id, true);
+ username, app.FetchId(connection), true);
foreach (string rolename in rolenames)
{
int roleId = GetRoleId(connection, rolename);
@@ -262,7 +262,7 @@
my_aspnet_Roles r ON uir.roleId=r.id
WHERE r.name LIKE @rolename AND r.applicationId=@appId", connection);
cmd.Parameters.AddWithValue("@rolename", rolename);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
cmd.ExecuteNonQuery();
// now delete the role itself
@@ -335,7 +335,7 @@
WHERE u.applicationId=@appId";
MySqlCommand cmd = new MySqlCommand(sql, connection);
cmd.Parameters.AddWithValue("@roleId", roleId);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@@ -378,7 +378,7 @@
WHERE u.applicationId=@appId AND
u.name LIKE @userName AND r.name LIKE @roleName";
MySqlCommand cmd = new MySqlCommand(sql, connection);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
cmd.Parameters.AddWithValue("@userName", username);
cmd.Parameters.AddWithValue("@roleName", rolename);
int count = Convert.ToInt32(cmd.ExecuteScalar());
@@ -434,7 +434,7 @@
MySqlCommand cmd = new MySqlCommand(sql, connection);
cmd.Parameters.Add("@username", MySqlDbType.VarChar, 255);
cmd.Parameters.Add("@rolename", MySqlDbType.VarChar, 255);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
foreach (string username in usernames)
{
@@ -516,7 +516,7 @@
MySqlCommand cmd = new MySqlCommand(sql, connection);
cmd.Parameters.AddWithValue("@username", usernameToMatch);
cmd.Parameters.AddWithValue("@rolename", rolename);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@@ -557,7 +557,7 @@
GetUserId(connection, username);
sql += " WHERE r.applicationId=@appId";
MySqlCommand cmd = new MySqlCommand(sql, connection);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
using (MySqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
@@ -579,7 +579,7 @@
"SELECT id FROM my_aspnet_Users WHERE name=@name AND applicationId=@appId",
connection);
cmd.Parameters.AddWithValue("@name", username);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
object id = cmd.ExecuteScalar();
return Convert.ToInt32(id);
}
@@ -590,7 +590,7 @@
"SELECT id FROM my_aspnet_Roles WHERE name=@name AND applicationId=@appId",
connection);
cmd.Parameters.AddWithValue("@name", rolename);
- cmd.Parameters.AddWithValue("@appId", app.Id);
+ cmd.Parameters.AddWithValue("@appId", app.FetchId(connection));
return (int)cmd.ExecuteScalar();
}
Modified: branches/6.0/MySql.Web/Tests/MySql.Web.Tests.csproj
===================================================================
--- branches/6.0/MySql.Web/Tests/MySql.Web.Tests.csproj 2009-05-14 21:15:01 UTC (rev 1602)
+++ branches/6.0/MySql.Web/Tests/MySql.Web.Tests.csproj 2009-05-15 14:15:05 UTC (rev 1603)
@@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DC704374-EC50-4167-93AA-8D262136502E}</ProjectGuid>
<OutputType>Library</OutputType>
| Thread |
|---|
| • Connector/NET commit: r1603 - in branches/6.0: . Installer Installer/Binary MySql.Data/Provider MySql.Data/Provider/Properties MySql.Data/Provider/Sou... | rburnett | 15 May |