List:Internals« Previous MessageNext Message »
From:Mats Kindahl Date:April 13 2005 5:46pm
Subject:bk commit into 5.1 tree (mats:1.1867)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1867 05/04/13 19:46:22 mats@stripped +3 -0
  WL#2324: Ensuring that events are flushed to disk when rows 
  are injected through the injector interface.

  sql/sql_class.h
    1.232 05/04/13 19:46:17 mats@stripped +5 -3
    Toggling OPTION_BEGIN and start and end of transaction.

  sql/log_event.h
    1.112 05/04/13 19:46:17 mats@stripped +3 -0
    Implementing get_db() member function needed by MYSQL_LOG.

  sql/log_event.cc
    1.174 05/04/13 19:46:17 mats@stripped +1 -1
    Reading database from table instead of thd.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mats
# Host:	romeo.kindahl.net
# Root:	/home/bk/w2325-mysql-5.1

--- 1.173/sql/log_event.cc	2005-04-12 19:01:28 +02:00
+++ 1.174/sql/log_event.cc	2005-04-13 19:46:17 +02:00
@@ -4726,7 +4726,7 @@
 Rows_log_event(THD* thd_arg, TABLE* tbl_arg, ulong tid, 
 	       bitvector const& cols, bool is_transactional)
   : Log_event(thd_arg, 0, is_transactional),
-    m_dbnam(thd_arg->db), m_dblen(m_dbnam ? strlen(m_dbnam) : 0),
+    m_dbnam(tbl_arg->s->db), m_dblen(m_dbnam ? strlen(m_dbnam) : 0),
     m_table(tbl_arg), 
     m_tblnam(tbl_arg->s->table_name),
     m_tbllen(strlen(tbl_arg->s->table_name)),

--- 1.111/sql/log_event.h	2005-04-12 19:01:29 +02:00
+++ 1.112/sql/log_event.h	2005-04-13 19:46:17 +02:00
@@ -1633,6 +1633,7 @@
 
   virtual bool write_data_header(IO_CACHE* file);
   virtual bool write_data_body(IO_CACHE* file);
+  virtual const char* get_db() { return m_dbnam; }
 
 #ifndef MYSQL_CLIENT
 #ifdef HAVE_REPLICATION
@@ -1733,6 +1734,7 @@
 
   virtual bool write_data_header(IO_CACHE* file);
   virtual bool write_data_body(IO_CACHE* file);
+  virtual const char* get_db() { return m_dbnam; }
 
 protected:
   // The constructors are protected since you're supposed to inherit
@@ -1766,6 +1768,7 @@
 
   uint16 m_rows_flags;		// Flags for row-level events
   bool   m_is_transactional;	// The table handler is transactional
+
 private:
 #ifndef MYSQL_CLIENT
   virtual bool do_write_to_binlog() const {

--- 1.231/sql/sql_class.h	2005-04-12 19:01:29 +02:00
+++ 1.232/sql/sql_class.h	2005-04-13 19:46:17 +02:00
@@ -1117,12 +1117,14 @@
   void set_server_id(uint32 sid) { server_id = sid; }
 
   int transaction_begin() { 
-      return 0;
+    this->options |= OPTION_BEGIN;
+    return 0;
   }
 
   int transaction_end() { 
-    
-    return flush_pending_event(true); 
+    int error = flush_pending_event(true); 
+    this->options &= ~OPTION_BEGIN;
+    return error;
   }
 
 private:
Thread
bk commit into 5.1 tree (mats:1.1867)Mats Kindahl13 Apr