List:Internals« Previous MessageNext Message »
From:tomas Date:June 14 2005 7:00pm
Subject:bk commit into 5.1 tree (tomas:1.1966)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.1966 05/06/14 20:59:55 tomas@stripped +4 -0
      removed tag_new_fields, not needed anymore after switch to using bitmap instead
      unified some ifdefs
  s   removed delete tblmap

  sql/rpl_tblmap.cc
    1.17 05/06/14 20:59:50 tomas@stripped +1 -2
    removed delete tblmap

  sql/log_event.h
    1.129 05/06/14 20:59:50 tomas@stripped +4 -10
    unified some ifdefs

  sql/log_event.cc
    1.212 05/06/14 20:59:50 tomas@stripped +9 -43
    removed tag_new_fields, not needed anymore after switch to using bitmap instead
    unified some ifdefs

  mysql-test/t/rpl_ddl.test
    1.4 05/06/14 20:59:50 tomas@stripped +1 -0
    disabled test for row based replication

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-wl2325

--- 1.211/sql/log_event.cc	2005-06-14 18:59:00 +02:00
+++ 1.212/sql/log_event.cc	2005-06-14 20:59:50 +02:00
@@ -5048,35 +5048,6 @@
   DBUG_RETURN(ptr);
 }
 
-/*
-  Tag fields as new fields based on the supplied sequence of bits.  The bits
-  are supplied as an array of bytes, where the first byte is the first 8
-  fields.  The number of bits used is given by the 'bits' parameter and is
-  really only used as a security.  The fields are tagged by setting the
-  'query_id' value of the field to the value of the 'query_id' field of the
-  thread 'thd'.
-*/
-static inline void 
-tag_new_fields(THD* thd, TABLE* table, size_t width, MY_BITMAP const* cols)
-{
-  DBUG_ENTER("tag_new_fields(THD*, TABLE*, byte*, size_t)");
-  DBUG_PRINT("info", ("Query id for thread is %lu", thd->query_id));    
-
-  // This assertion actually checks that there is at least as many
-  // columns on the slave as on the master.
-  DBUG_ASSERT(table->s->fields >= width);
-  for (size_t i= 0 ; i < table->s->fields ; ++i) 
-  {
-    // ULONG_MAX is used to flag fields that are not used and whose value
-    // should be ignored. This is similar to how InnoDB flags the fields.
-    table->field[i]->query_id= bitmap_is_set(cols,i) ? thd->query_id : ULONG_MAX;
-    DBUG_PRINT("info", ("Query id for field '%s' is %lu",
-			table->field[i]->field_name,
-			table->field[i]->query_id));    
-  }
-  DBUG_VOID_RETURN;
-}
-
 int Rows_log_event::
 exec_event(st_relay_log_info* rli)
 {
@@ -5275,7 +5246,7 @@
 /*
   Constructor used to build an event for writing to the binary log.
  */
-#ifndef MYSQL_CLIENT
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 Table_map_log_event::
 Table_map_log_event(THD* thd, TABLE* tbl, ulong tid, 
 		    bool is_transactional, uint16 flags)
@@ -5311,7 +5282,7 @@
   
   DBUG_VOID_RETURN;
 }
-#endif
+#endif // !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 
 /*
   Constructor used by slave to read the event from the binary log.
@@ -5513,7 +5484,7 @@
 }
 #endif // !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 
-#ifndef MYSQL_CLIENT
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 bool Table_map_log_event::
 write_data_header(IO_CACHE* file)
 {
@@ -5555,7 +5526,9 @@
 	      || my_b_safe_write(file, cbuf,      sizeof(cbuf))
 	      || my_b_safe_write(file, m_coltype, m_colcnt));
 }
-#else
+#endif // !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+
+#ifdef MYSQL_CLIENT
 /*
   Dummy functions to satisfy linking dependencies
 */
@@ -5572,9 +5545,7 @@
   DBUG_ASSERT(0);		// Shouldn't come here!
   return 1;
 }
-#endif
 
-#ifdef MYSQL_CLIENT
 void Table_map_log_event::
 print(FILE* file, bool short_form,
       LAST_EVENT_INFO* last_event_info)
@@ -5652,7 +5623,6 @@
   DBUG_ASSERT(table->s->fields >= m_width);
   char const* ptr= row_start;
   ptr= unpack_row(thd, table, table->record[0], ptr, &m_cols);
-  tag_new_fields(thd, table, m_width, &m_cols);
   DBUG_RETURN(ptr);
 }
 
@@ -5685,7 +5655,7 @@
 	Delete_rows_log_event member functions
 **************************************************************************/
 
-#ifndef MYSQL_CLIENT
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 static int record_compare(TABLE* table, byte const *a, byte const *b)
 {
   DBUG_ENTER("record_compare(TABLE*, byte const*, byte const*)");
@@ -5789,12 +5759,11 @@
   
   DBUG_RETURN(0);
 }
-#endif
 
 /*
   Constructor used to build an event for writing to the binary log.
  */
-#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+
 Delete_rows_log_event::
 Delete_rows_log_event(THD* thd_arg, TABLE* tbl_arg, ulong tid, 
 		      MY_BITMAP const* cols, bool is_transactional)
@@ -5810,7 +5779,7 @@
   my_free(m_memory, MYF(MY_ALLOW_ZERO_PTR));
   m_memory= 0;
 }
-#endif
+#endif /* #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
 
 /*
   Constructor used by slave to read the event from the binary log.
@@ -5891,7 +5860,6 @@
 
   DBUG_ASSERT(ptr != NULL);
   ptr = unpack_row(thd, table, table->record[0], ptr, &m_cols);
-  tag_new_fields(thd, table, m_width, &m_cols);
 
   if (table->s->keys > 0) 
   {
@@ -6030,8 +5998,6 @@
   DBUG_ASSERT(ptr != NULL);
   // record[1] is the after image for the update 
   ptr= unpack_row(thd, table, table->record[1], ptr, &m_cols);
-
-  tag_new_fields(thd, table, m_width, &m_cols);
 
   if (table->s->keys > 0) 
   {

--- 1.128/sql/log_event.h	2005-06-14 14:47:32 +02:00
+++ 1.129/sql/log_event.h	2005-06-14 20:59:50 +02:00
@@ -1713,11 +1713,9 @@
   virtual bool write_data_body(IO_CACHE* file);
   virtual const char* get_db() { return m_dbnam; }
 
-#ifndef MYSQL_CLIENT
-#ifdef HAVE_REPLICATION
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
   virtual int exec_event(struct st_relay_log_info* rli);
 #endif
-#endif
 
 #ifdef MYSQL_CLIENT
   virtual void print(FILE* file, bool short_form = 0, 
@@ -1743,13 +1741,11 @@
   ulong          m_thread_id;
 
 private:
-#ifndef MYSQL_CLIENT
-#ifdef HAVE_REPLICATION
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
   virtual bool do_write_to_binlog() const {
     return opt_binlog_row_level && Log_event::do_write_to_binlog();
   }
 #endif
-#endif
 };
 
 
@@ -1887,8 +1883,7 @@
 
 private:
 
-#ifndef MYSQL_CLIENT
-#ifdef HAVE_REPLICATION
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 
   virtual bool do_write_to_binlog() const {
     // We deliberately do not check the databases here; see
@@ -1959,8 +1954,7 @@
       
   */
   virtual int do_exec_row(TABLE* table, st_relay_log_info* rli) = 0;
-#endif
-#endif
+#endif // !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
 };
 
 

--- 1.3/mysql-test/t/rpl_ddl.test	2005-06-13 15:18:27 +02:00
+++ 1.4/mysql-test/t/rpl_ddl.test	2005-06-14 20:59:50 +02:00
@@ -29,6 +29,7 @@
 #
 
 --source include/have_innodb.inc
+--source include/have_binlog_format_statement.inc
 --source include/master-slave.inc
 
 ###############################################################

--- 1.16/sql/rpl_tblmap.cc	2005-06-14 19:33:47 +02:00
+++ 1.17/sql/rpl_tblmap.cc	2005-06-14 20:59:50 +02:00
@@ -37,8 +37,7 @@
 table_mapping::
 ~table_mapping()
 {
-  while (entry *chunk = static_cast<entry*>(m_chunks.pop()))
-    delete [] chunk;
+  /* must not delete the chunks as they are allocated on the memroot */
   hash_free(&m_table_ids);
 }
 
Thread
bk commit into 5.1 tree (tomas:1.1966)tomas14 Jun