List:Internals« Previous MessageNext Message »
From:kent Date:May 28 2005 1:16pm
Subject:bk commit into 5.1 tree (kent:1.1895)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mysqldev. When mysqldev 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.1895 05/05/28 15:16:11 kent@stripped +1 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.1-wl2325
  into mysql.com:/data0/mysqldev/alcatel/mysql-5.1-wl2325

  sql/sql_class.cc
    1.194 05/05/28 15:16:09 kent@stripped +0 -0
    Auto merged

# 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:	kent
# Host:	production.mysql.com
# Root:	/data0/mysqldev/alcatel/mysql-5.1-wl2325/RESYNC

--- 1.193/sql/sql_class.cc	2005-05-27 19:05:07 +02:00
+++ 1.194/sql/sql_class.cc	2005-05-28 15:16:09 +02:00
@@ -28,6 +28,7 @@
 
 #include "mysql_priv.h"
 #include "my_bitmap.h"
+#include "log_event.h"
 #include <m_ctype.h>
 #include <sys/stat.h>
 #include <thr_alarm.h>
@@ -1856,19 +1857,19 @@
  */
 
 template <class RowsEventT>
-Rows_log_event* THD::
-prepare_pending(TABLE* table, uint32 server_id, 
+Rows_log_event* 
+prepare_pending(THD* thd, TABLE* table, uint32 server_id, 
 		MY_BITMAP const* cols, size_t colcnt, 
                 size_t needed, bool is_transactional) 
 {
   // Fetch the type code for the RowsEventT template parameter
   int const type_code= RowsEventT::TYPE_CODE;
-  DBUG_ENTER("THD::prepare_pending<RowsEventT>(TABLE*, ...)");
+  DBUG_ENTER("prepare_pending<RowsEventT>(THD*, TABLE*, ...)");
   DBUG_PRINT("enter", ("table=%p (%s), type_code=%d, needed=%d", 
 		       table, table->s->table_name,
 		       type_code, needed));
 
-  Rows_log_event* pending= get_pending_event();
+  Rows_log_event* pending= thd->get_pending_event();
 
   if (pending) 
   {
@@ -1889,7 +1890,7 @@
   // event. Also check if the table provided is mapped: if it is not,
   // then we have switched to writing to a new table.
   bool was_mapped = false;
-  ulong const table_id= get_table_id(table);
+  ulong const table_id= thd->get_table_id(table);
   if (!pending ||
       pending->server_id != server_id || 
       pending->get_table_id() != table_id ||
@@ -1897,13 +1898,13 @@
       pending->get_data_size() + needed > opt_binlog_rows_event_max_size || 
       pending->get_width() != colcnt ||
       !bitmap_cmp(pending->get_cols(), cols) || 
-      !(was_mapped= is_table_mapped(table))) 
+      !(was_mapped= thd->is_table_mapped(table))) 
   {
     // If not, flush the event and create a new RowsEventT.
     Rows_log_event* const 
-	ev = new RowsEventT(this, table, table_id, cols, is_transactional);
+	ev = RowsEventT::Create(thd, table, table_id, cols, is_transactional);
     ev->server_id = server_id; // I don't like this, it's too easy to forget. 
-    if (!ev->write_to_binlog() || flush_and_set_pending_event(ev)) {
+    if (!ev->write_to_binlog() || thd->flush_and_set_pending_event(ev)) {
       delete ev;
       DBUG_RETURN(NULL);
     }
@@ -1912,7 +1913,7 @@
     // to write a map for it: unless the table was previously mapped,
     // of course.
     if (!was_mapped)
-      write_table_map(table, is_transactional);
+      thd->write_table_map(table, is_transactional);
     DBUG_RETURN(ev);
   }
   DBUG_RETURN(pending);
@@ -1923,18 +1924,18 @@
   compiling option.
 */
 
-template Rows_log_event* THD::
-prepare_pending<Write_rows_log_event>(TABLE*, uint32, 
+template Rows_log_event* 
+prepare_pending<Write_rows_log_event>(THD*, TABLE*, uint32, 
                                       MY_BITMAP const*, size_t colcnt, 
                                       size_t, bool);
 
-template Rows_log_event* THD::
-prepare_pending<Delete_rows_log_event>(TABLE*, uint32, 
+template Rows_log_event* 
+prepare_pending<Delete_rows_log_event>(THD*, TABLE*, uint32, 
                                        MY_BITMAP const*, size_t colcnt, 
                                        size_t, bool);
 
-template Rows_log_event* THD::
-prepare_pending<Update_rows_log_event>(TABLE*, uint32, 
+template Rows_log_event* 
+prepare_pending<Update_rows_log_event>(THD*, TABLE*, uint32, 
                                        MY_BITMAP const*, size_t colcnt, 
                                        size_t, bool);
 
@@ -2132,8 +2133,8 @@
   size_t const len= pack_row(table, cols, row_data, max_len, record);
 
   Rows_log_event* const
-    ev= thd->prepare_pending<Write_rows_log_event>(table, server_id, cols, 
-						   colcnt, len, is_trans);
+    ev= prepare_pending<Write_rows_log_event>(thd, table, server_id, cols, 
+					      colcnt, len, is_trans);
 
   if (ev)
   {
@@ -2192,10 +2193,10 @@
 				    after_maxlen, after_record);
   
   Rows_log_event* const
-    ev= thd->prepare_pending<Update_rows_log_event>(table, server_id, 
-                                                    cols, colcnt,
-						    before_size + after_size,
-                                                    is_trans);
+    ev= prepare_pending<Update_rows_log_event>(thd, table, server_id, 
+					       cols, colcnt,
+					       before_size + after_size,
+					       is_trans);
 
   if (likely(ev != 0))
   {
@@ -2228,6 +2229,8 @@
   if (!opt_binlog_row_level || !mysql_bin_log.is_open())
     DBUG_RETURN(0);
 
+  THD* const thd = current_thd;
+
   /* 
      Pack records into format for transfer. We are allocating more
      memory than needed, but that doesn't matter.
@@ -2240,7 +2243,7 @@
   size_t const len= pack_row(table, cols, row_data, max_len, record);
 
   Rows_log_event* const
-    ev= prepare_pending<Delete_rows_log_event>(table, server_id, 
+    ev= prepare_pending<Delete_rows_log_event>(thd, table, server_id, 
                                                cols, colcnt,
 					       len, is_trans);
 
Thread
bk commit into 5.1 tree (kent:1.1895)kent28 May