From: Date: September 15 2006 5:46am Subject: Connector/NET commit: r338 - in trunk: . TestSuite mysqlclient List-Archive: http://lists.mysql.com/commits/11989 X-Bug: 22042 Message-Id: <200609150346.k8F3kcbr012057@bk-internal.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: trunk/CHANGES trunk/TestSuite/MySql.Data.Tests.2005.csproj trunk/TestSuite/Transactions.cs trunk/mysqlclient/Connection.cs Log: Bug #22042 mysql-connector-net-5.0.0-alpha BeginTransaction Check for unspecified isolation level and call the non-parameter BeginTransaction in that case. Modified: trunk/CHANGES =================================================================== --- trunk/CHANGES 2006-09-14 20:12:34 UTC (rev 337) +++ trunk/CHANGES 2006-09-15 03:46:37 UTC (rev 338) @@ -1,8 +1,9 @@ Bugs fixed ---------- Bug #21521 # Symbols not allowed in column/table names. - Bug #21874 MySqlException should derive from DbException - + Bug #21874 MySqlException should derive from DbException + Bug #22042 mysql-connector-net-5.0.0-alpha BeginTransaction + Other changes ------------- Implemented simple local transactions @@ -14,6 +15,7 @@ Implemented command canceling for MySQL 5.0.0 and higher Fixed problem with executing a Fill after a FillSchema Implemented CommandTimeout for non-batch queries + Fixed socket create code related to IPv6 (thanks Mark!) Version 5.0.0.0 (Alpha) Modified: trunk/TestSuite/MySql.Data.Tests.2005.csproj =================================================================== --- trunk/TestSuite/MySql.Data.Tests.2005.csproj 2006-09-14 20:12:34 UTC (rev 337) +++ trunk/TestSuite/MySql.Data.Tests.2005.csproj 2006-09-15 03:46:37 UTC (rev 338) @@ -47,7 +47,8 @@ false false 4 - true + false + x86 bin\net-2.0\Release\ Modified: trunk/TestSuite/Transactions.cs =================================================================== --- trunk/TestSuite/Transactions.cs 2006-09-14 20:12:34 UTC (rev 337) +++ trunk/TestSuite/Transactions.cs 2006-09-15 03:46:37 UTC (rev 338) @@ -24,6 +24,7 @@ using NUnit.Framework; #if NET20 using System.Transactions; +using System.Data.Common; #endif namespace MySql.Data.MySqlClient.Tests @@ -76,6 +77,29 @@ } } + /// + /// Bug #22042 mysql-connector-net-5.0.0-alpha BeginTransaction + /// + void Bug22042() + { + DbProviderFactory factory = + new MySql.Data.MySqlClient.MySqlClientFactory(); + DbConnection conexion = factory.CreateConnection(); + + try + { + conexion.ConnectionString = GetConnectionString(true); + conexion.Open(); + DbTransaction trans = conexion.BeginTransaction(); + trans.Rollback(); + conexion.Close(); + } + catch (Exception ex) + { + Assert.Fail(ex.Message); + } + } + #if NET20 void TransactionScopeInternal(bool commit) Modified: trunk/mysqlclient/Connection.cs =================================================================== --- trunk/mysqlclient/Connection.cs 2006-09-14 20:12:34 UTC (rev 337) +++ trunk/mysqlclient/Connection.cs 2006-09-15 03:46:37 UTC (rev 338) @@ -430,6 +430,8 @@ protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) { + if (isolationLevel == IsolationLevel.Unspecified) + return BeginTransaction(); return BeginTransaction(isolationLevel); }