title: Using MySqlTransaction to rollback
body: <p>I have a Visual Studio 2008 C# .NET 3.5 project using MySql 5.1.53 and MySql Connector/Net 6.4.4. </p>
  
  <pre><code>'protocol_version', '10'
  'version', '5.1.53-community-log'
  'version_comment', 'MySQL Community Server (GPL)'
  'version_compile_machine', 'unknown'
  'version_compile_os', 'Win64'
  </code></pre>
  
  <p>I create a table in my database like this.</p>
  
  <pre><code>using (MySqlConnection c = new MySqlConnection(connection_string))
  {
      c.Open();
      using (MySqlCommand cmd = c.CreateCommand())
      using (MySqlTransaction xt = c.BeginTransaction())
      {
          cmd.Connection = c;
          cmd.Transaction = xt;
          try
          {
              cmd.CommandText =
                  @"CREATE TABLE `my_table` (
                    ...
                  ) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=latin1";
              cmd.ExecuteNonQuery();
  
              throw new System.Exception("This is a simulated failure!!!");
  
              xt.Commit();
          }
          catch
          {
              xt.Rollback();
              throw;
          }
      }
  }
  </code></pre>
  
  <p>But, after the simulated failure the table still exists in my database.</p>
  
  <p>What Do I need to do to make the transaction roll back correctly?</p>