#At file:///C:/Users/Reggie/work/connector-net/trunk/ based on revid:reggie.burnett@stripped
955 Reggie Burnett 2011-02-14 [merge]
merged
modified:
Installer/core.wxs
Installer/main.wxs
Installer/webproviders.wxs
MySql.Data/Provider/Source/command.cs
MySql.Data/Tests/Source/CommandTests.cs
MySql.VisualStudio/MySql.VisualStudio.VS2010.csproj
=== modified file 'Installer/core.wxs'
=== modified file 'Installer/core.wxs'
--- a/Installer/core.wxs 2010-12-22 21:21:41 +0000
+++ b/Installer/core.wxs 2011-01-07 22:57:06 +0000
@@ -93,6 +93,7 @@
<InstallExecuteSequence>
<!-- v2 custom action scheduling -->
+ <Custom Action="Setv2InstallUtil" After="InstallValidate"/>
<Custom Action='Setv4InstallUtil' After='InstallValidate'>NETFRAMEWORK40FULL</Custom>
<Custom Action='ManagedDataInstallSetup' After="InstallFiles">NOT Installed</Custom>
<Custom Action='ManagedDataInstall' After="ManagedDataInstallSetup">NOT Installed</Custom>
@@ -101,11 +102,12 @@
</InstallExecuteSequence>
<!-- Custom Actions -->
- <CustomAction Id="Setv4InstallUtil" Property="InstallUtil" Value="c:\windows\microsoft.net\framework\v4.0.30319"/>
+ <CustomAction Id="Setv2InstallUtil" Property="INSTALLUTIL" Value="[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\installUtil.exe"/>
+ <CustomAction Id="Setv4InstallUtil" Property="INSTALLUTIL" Value="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\installUtil.exe"/>
<CustomAction Id="ManagedDataInstallSetup" Property="ManagedDataInstall"
- Value='"[InstallUtil]\installUtil.exe" /LogToConsole=false /LogFile= "[#MySql.Data.v2]"'/>
+ Value='"[INSTALLUTIL]" /LogToConsole=false /LogFile= "[#MySql.Data.v2]"'/>
<CustomAction Id='ManagedDataUnInstallSetup' Property="ManagedDataUnInstall"
- Value='"[InstallUtil]\installUtil.exe" /LogToConsole=false /LogFile= /u "[#MySql.Data.v2]"'/>
+ Value='"[INSTALLUTIL]" /LogToConsole=false /LogFile= /u "[#MySql.Data.v2]"'/>
<CustomAction Id="ManagedDataInstall" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Execute='deferred' Impersonate='no'/>
<CustomAction Id="ManagedDataUnInstall" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Execute='deferred' Impersonate='no'/>
</Fragment>
=== modified file 'Installer/main.wxs'
--- a/Installer/main.wxs 2011-01-06 16:04:23 +0000
+++ b/Installer/main.wxs 2011-01-07 22:57:06 +0000
@@ -110,7 +110,6 @@
<Binary Id="H2Reg" SourceFile="Binary\H2Reg.exe"/>
<Property Id="WIXUI_INSTALLDIR" Value='INSTALLDIR'/>
- <Property Id='INSTALLUTIL' Value='[NETFRAMEWORK20INSTALLROOTDIR]'/>
<!-- Remove the license agreement dialog -->
<UIRef Id='WixUI_MySQL'/>
=== modified file 'Installer/webproviders.wxs'
--- a/Installer/webproviders.wxs 2010-12-22 21:21:41 +0000
+++ b/Installer/webproviders.wxs 2011-01-07 22:57:06 +0000
@@ -48,9 +48,9 @@
</InstallExecuteSequence>
<CustomAction Id="ManagedWebInstallSetup" Property="ManagedWebInstall"
- Value='"[InstallUtil]\installUtil.exe" /LogToConsole=false /LogFile= "[#MySqlWeb.v2]"'/>
+ Value='"[INSTALLUTIL]" /LogToConsole=false /LogFile= "[#MySqlWeb.v2]"'/>
<CustomAction Id='ManagedWebUnInstallSetup' Property="ManagedWebUnInstall"
- Value='"[InstallUtil]\installUtil.exe" /LogToConsole=false /LogFile= /u "[#MySqlWeb.v2]"'/>
+ Value='"[INSTALLUTIL]" /LogToConsole=false /LogFile= /u "[#MySqlWeb.v2]"'/>
<CustomAction Id="ManagedWebInstall" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Execute='deferred' Impersonate='no'/>
<CustomAction Id="ManagedWebUnInstall" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Execute='deferred' Impersonate='no'/>
</Fragment>
=== modified file 'MySql.Data/Provider/Source/command.cs'
--- a/MySql.Data/Provider/Source/command.cs 2010-10-11 18:30:02 +0000
+++ b/MySql.Data/Provider/Source/command.cs 2011-02-14 17:19:36 +0000
@@ -410,11 +410,11 @@
commandTimer = new CommandTimer(connection, CommandTimeout);
lastInsertedId = -1;
- if (cmdText == null ||
- cmdText.Trim().Length == 0)
+ cmdText = cmdText.Trim();
+ if (String.IsNullOrEmpty(cmdText))
throw new InvalidOperationException(Resources.CommandTextNotInitialized);
- string sql = TrimSemicolons(cmdText);
+ string sql = cmdText.Trim(';');
if (CommandType == CommandType.TableDirect)
sql = "SELECT * FROM " + sql;
@@ -580,18 +580,6 @@
internal AsyncDelegate caller = null;
internal Exception thrownException;
- private static string TrimSemicolons(string sql)
- {
- int start = 0;
- while (sql[start] == ';')
- start++;
-
- int end = sql.Length - 1;
- while (sql[end] == ';')
- end--;
- return sql.Substring(start, end-start+1);
- }
-
internal object AsyncExecuteWrapper(int type, CommandBehavior behavior)
{
thrownException = null;
=== modified file 'MySql.Data/Tests/Source/CommandTests.cs'
--- a/MySql.Data/Tests/Source/CommandTests.cs 2010-12-14 15:25:24 +0000
+++ b/MySql.Data/Tests/Source/CommandTests.cs 2011-02-14 17:19:36 +0000
@@ -487,6 +487,33 @@
Assert.IsTrue(c.State == ConnectionState.Closed);
}
}
+
+ /// <summary>
+ /// Bug #59537 Different behavior from console and
+ /// </summary>
+ [Test]
+ public void EmptyOrJustSemiCommand()
+ {
+ MySqlCommand cmd = new MySqlCommand("", conn);
+ try
+ {
+ cmd.ExecuteNonQuery();
+ Assert.Fail();
+ }
+ catch (InvalidOperationException)
+ {
+ }
+
+ cmd.CommandText = ";";
+ try
+ {
+ cmd.ExecuteNonQuery();
+ }
+ catch (MySqlException)
+ {
+ }
+
+ }
}
=== modified file 'MySql.VisualStudio/MySql.VisualStudio.VS2010.csproj'
--- a/MySql.VisualStudio/MySql.VisualStudio.VS2010.csproj 2011-01-06 16:04:23 +0000
+++ b/MySql.VisualStudio/MySql.VisualStudio.VS2010.csproj 2011-02-14 17:15:44 +0000
@@ -429,7 +429,7 @@
</PropertyGroup>
<PropertyGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
| Thread |
|---|
| • bzr commit into connector-net-trunk branch (reggie.burnett:955) | Reggie Burnett | 14 Feb |