[Mono-bugs] [Bug 536069] New: TransactionScope: System.NotImplementedException (connection with MySql Connector)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 1 15:31:35 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=536069


           Summary: TransactionScope: System.NotImplementedException
                    (connection with MySql Connector)
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: vvitafresh at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=316245)
 --> (http://bugzilla.novell.com/attachment.cgi?id=316245)
Solution that demonstrates problem

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.13)
Gecko/2009073022 Firefox/3.0.13 (.NET CLR 3.5.30729)

Project uses MySql Connector/NET 5.1 to connect database.

Execution of code like:
class TransTest
    {
        const string connString =
"Server=192.168.0.7;Database=depit;Uid=root;Pwd=password;";

        public bool TransactionScopeTest()
        {
            using (TransactionScope trScope = new
TransactionScope(TransactionScopeOption.Required))
            {
                using (MySqlConnection conn = new MySqlConnection(connString))
                {
                    try
                    {
                        conn.Open();  //Execution fails
                        MySqlCommand cmd1 = new MySqlCommand("CREATE TABLE IF
NOT EXISTS test3(f1 int, f2 int);", conn);
                        cmd1.ExecuteNonQuery();

                        MySqlCommand cmd2 = new MySqlCommand("INSERT INTO
test3(f1,f2) VALUES (1,2)", conn);
                        cmd2.ExecuteNonQuery();

                        trScope.Complete();
                        return true;
                    }
                    catch (Exception ex)
                    {
                        return false;
                    }
                } 
            } 
        }
fails with exception:
System.NotImplementedException: The requested feature is not implemented.
  at MySql.Data.MySqlClient.MySqlConnection.EnlistTransaction
(System.Transactions.Transaction transaction) [0x00000] 
  at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] 
  at TransactionTest.TransTest.TransactionScopeTest () [0x00000] 

This exeption did not happened on Windows with Framework 2.0 when using the
same MySql Connector/NET 5.1

Reproducible: Always




The same Connector and SQL code works fine with CommittableTransaction Class,
see attachment.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list