List:Internals« Previous MessageNext Message »
From:Mats Kindahl Date:May 7 2005 1:12pm
Subject:bk commit into 5.1 tree (mats:1.1829)
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.1829 05/05/07 15:11:53 mats@stripped +1 -0
  WL#2325: Minor bugfix in debug code (printing table names of null tables).

  sql/rpl_tblmap.cc
    1.6 05/05/07 15:11:30 mats@stripped +9 -8
    Printing null table names as "<>"

# 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.5/sql/rpl_tblmap.cc	2005-05-07 14:44:49 +02:00
+++ 1.6/sql/rpl_tblmap.cc	2005-05-07 15:11:30 +02:00
@@ -3,6 +3,8 @@
 #include "rpl_tblmap.h"
 #include "my_pthread.h"
 
+#define MAYBE_TABLE_NAME(T) ((T) ? (T)->s->table_name : "<>")
+
 table_mapping::
 table_mapping()
   : m_array(0), m_count(0), m_reserve(16)
@@ -68,7 +70,7 @@
   {
     DBUG_PRINT("info", ("tid %d -> table %p (%s)", 
 			table_id, m_array[pos].table,
-			m_array[pos].table->s->table_name));
+			MAYBE_TABLE_NAME(m_array[pos].table)));
     DBUG_RETURN(m_array[pos].table);
   }
 
@@ -83,19 +85,19 @@
   sentry sentry(&m_mutex);	// Aquire exclusive access
 
   DBUG_ENTER("table_mapping::get_table_id(st_table*)");
-  DBUG_PRINT("enter", ("table=%p (%s)", 
-		       table, table ? table->s->table_name : "<>"));
+  DBUG_PRINT("enter", ("table=%p (%s)", table, MAYBE_TABLE_NAME(table)));
   pos_type const pos = find_pos(table);
   if (pos < m_count)
   {
     DBUG_PRINT("info", ("table %p (%s) -> table id %d", 
 			m_array[pos].table,
-			m_array[pos].table->s->table_name,
+			MAYBE_TABLE_NAME(m_array[pos].table),
 			m_array[pos].table_id));
     DBUG_RETURN(m_array[pos].table_id);
   }
   DBUG_PRINT("info", ("table %p (%s) is not mapped!", 
-		      table, table->s->table_name));
+		      table, 
+		      MAYBE_TABLE_NAME(table)));
   DBUG_RETURN(NO_TABLE);
 }
 
@@ -107,8 +109,7 @@
   DBUG_ENTER("table_mapping::set_table(ulong,TABLE*)");
   DBUG_PRINT("enter", ("table_id=%d, table=%p (%s)", 
 		       table_id, 
-		       table, 
-		       (table ? table->s->table_name : "<>")));
+		       table, MAYBE_TABLE_NAME(table)));
   pos_type const pos = find_pos(table_id);
 
   if (pos == m_count && m_reserve == m_count) 
@@ -140,7 +141,7 @@
   m_array[pos].table = table;
   DBUG_PRINT("info", ("tid %d -> table %p (%s)", 
 		      table_id, m_array[pos].table,
-		      m_array[pos].table->s->table_name));
+		      MAYBE_TABLE_NAME(m_array[pos].table)));
   DBUG_RETURN(0);		// All OK
 }
 
Thread
bk commit into 5.1 tree (mats:1.1829)Mats Kindahl7 May