Bug #16276 xa transaction not available with connector/net 1.x and mysql 5.x
Submitted: 7 Jan 2006 11:01 Modified: 13 Feb 2006 1:19
Reporter: Frank Xia Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:connector/net 1.x and mysql 5.x OS:Windows (windows xp sp2 / server 2003)
Assigned to: Assigned Account CPU Architecture:Any

[7 Jan 2006 11:01] Frank Xia
Description:
pls refer to my post in the forum:
http://forums.mysql.com/read.php?38,52900,52900

How to repeat:
using System; 
using System.Data; 
using System.Data.SqlClient; 
using System.EnterpriseServices; 

using MySql.Data.MySqlClient; 

namespace XAResearch 
{ 
public class MainClass 
{ 
const string mySqlDsn = "Server=127.0.0.1;Database=Test;Uid=root;Pwd=***"; 
const string msSqlConn = "Server=127.0.0.1;Database=Test;Uid=sa;Pwd=***"; 

[STAThread] 
public static void Main() 
{ 
Console.WriteLine("START"); 

ServiceConfig scopeConfig = new ServiceConfig(); 
scopeConfig.Transaction = TransactionOption.Required; 
ServiceDomain.Enter(scopeConfig); 
try 
{ 
MySqlAction(); 
MsSqlAction(); 
throw new Exception("Exception occured"); // abort the transaction 
} 
catch(Exception e) 
{ 
ContextUtil.SetAbort(); 
Console.WriteLine(e.Message); 
} 
finally 
{ 
ServiceDomain.Leave(); 
} 
Console.WriteLine("END"); 
Console.ReadLine(); 
} 

static void MySqlAction() 
{ 
using(MySqlConnection conn = new MySqlConnection(mySqlDsn)) 
{ 
conn.Open(); 
string sql = "UPDATE Products SET Name='Qtek8100' WHERE ID=1;"; 
MySqlCommand command = new MySqlCommand(sql, conn); 
command.ExecuteNonQuery(); 
} 
} 

static void MsSqlAction() 
{ 
using(SqlConnection conn = new SqlConnection(msSqlDsn)) 
{ 
conn.Open(); 
string sql = "UPDATE Products SET Name='Qtek8100' WHERE ID=1;"; 
SqlCommand command = new SqlCommand(sql, conn); 
command.ExecuteNonQuery(); 
} 
} 
} 
}
[13 Jan 2006 1:19] Vasily Kishkin
Could you please say me table definition of Products ?
[14 Feb 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".