List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:February 1 2011 8:52am
Subject:bzr commit into mysql-trunk branch (magnus.blaudd:3583) Bug#58082
View as plain text  
#At file:///home/msvensson/mysql/trunk-bug58082/ based on revid:georgi.kodinov@stripped1mobu8k

 3583 Magnus Blåudd	2011-02-01
      Bug#58082	injector::transaction need rollback support
       - add suport for rollback of the pending transactions written to injector

    modified:
      sql/rpl_injector.cc
      sql/rpl_injector.h
=== modified file 'sql/rpl_injector.cc'
--- a/sql/rpl_injector.cc	2010-12-10 16:55:50 +0000
+++ b/sql/rpl_injector.cc	2011-02-01 08:51:58 +0000
@@ -99,6 +99,20 @@ int injector::transaction::commit()
 }
 
 
+int injector::transaction::rollback()
+{
+   DBUG_ENTER("injector::transaction::rollback()");
+   trans_rollback_stmt(m_thd);
+   if (!trans_rollback(m_thd))
+   {
+     close_thread_tables(m_thd);
+     if (!m_thd->locked_tables_mode)
+       m_thd->mdl_context.release_transactional_locks();
+   }
+   DBUG_RETURN(0);
+}
+
+
 int injector::transaction::use_table(server_id_type sid, table tbl)
 {
   DBUG_ENTER("injector::transaction::use_table");

=== modified file 'sql/rpl_injector.h'
--- a/sql/rpl_injector.h	2010-09-04 00:46:58 +0000
+++ b/sql/rpl_injector.h	2011-02-01 08:51:58 +0000
@@ -231,6 +231,14 @@ public:
       int commit();
 
       /*
+        Rollback a transaction.
+
+        This member function will clean up after a sequence of *_row calls by,
+        for example, releasing resource and unlocking files.
+      */
+      int rollback();
+
+      /*
         Get the position for the start of the transaction.
 
         Returns the position in the binary log of the first event in this

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110201085158-522dv82ytjpnzxt5.bundle
Thread
bzr commit into mysql-trunk branch (magnus.blaudd:3583) Bug#58082Magnus Blåudd1 Feb