List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:September 21 2006 4:05pm
Subject:bk commit into 5.1 tree (mats:1.2326) BUG#22550
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@stripped, 2006-09-21 18:05:02+02:00, mats@romeo.(none) +2 -0
  BUG#22550 (Replication of BIT column failing):
  Using move_field_offset() to move field pointer to other record before
  calling pack()/unpack().

  sql/log_event.cc@stripped, 2006-09-21 18:04:58+02:00, mats@romeo.(none) +9 -2
    Using move_field_offset() to move the field pointer. It is necessary
    for unpack() and pack() of BIT fields to operate correctly.
    Adding debug printouts.

  sql/sql_class.cc@stripped, 2006-09-21 18:04:59+02:00, mats@romeo.(none) +11 -2
    Using move_field_offset() to move the field pointer. It is necessary
    for unpack() and pack() of BIT fields to operate correctly.
    Adding debug printouts to packing of update rows event.

# 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.(none)
# Root:	/home/bk/fix-mysql-5.1-new-rpl

--- 1.242/sql/log_event.cc	2006-09-21 18:05:10 +02:00
+++ 1.243/sql/log_event.cc	2006-09-21 18:05:10 +02:00
@@ -5375,7 +5375,9 @@
 
     if (bitmap_is_set(cols, field_ptr -  begin_ptr))
     {
-      ptr= f->unpack(f->ptr + offset, ptr);
+      f->move_field_offset(offset);
+      ptr= f->unpack(f->ptr, ptr);
+      f->move_field_offset(-offset);
       /* Field...::unpack() cannot return 0 */
       DBUG_ASSERT(ptr != NULL);
     }
@@ -6589,7 +6591,7 @@
     /* We have a key: search the table using the index */
     if (!table->file->inited && (error= table->file->ha_index_init(0, FALSE)))
       return error;
-    
+
     /*
       We need to set the null bytes to ensure that the filler bit are
       all set when returning.  There are storage engines that just set
@@ -6675,6 +6677,7 @@
         table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
       table->record[1][pos]= 0xFF;
       error= table->file->rnd_next(table->record[1]);
+
       switch (error)
       {
       case 0:
@@ -6955,6 +6958,10 @@
                     table, m_width, m_after_image,
                     row_start, &m_cols, row_end, &m_master_reclength,
                     table->write_set, UPDATE_ROWS_EVENT);
+
+  DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
+  DBUG_DUMP("m_after_image", m_after_image, table->s->reclength);
+
 
   /*
     If we will access rows using the random access method, m_key will

--- 1.289/sql/sql_class.cc	2006-09-21 18:05:10 +02:00
+++ 1.290/sql/sql_class.cc	2006-09-21 18:05:10 +02:00
@@ -2529,7 +2529,9 @@
     {
       my_ptrdiff_t const offset=
         field->is_null(rec_offset) ? def_offset : rec_offset;
-      ptr= (byte*)field->pack((char *) ptr, field->ptr + offset);
+      field->move_field_offset(offset);
+      ptr= (byte*)field->pack((char *) ptr, field->ptr);
+      field->move_field_offset(-offset);
     }
   }
   return (static_cast<my_size_t>(ptr - row_data));
@@ -2614,12 +2616,19 @@
   my_size_t const after_size= pack_row(table, cols, after_row, 
                                        after_record);
   
+  DBUG_DUMP("before_record", before_record, table->s->reclength);
+  DBUG_DUMP("after_record", after_record, table->s->reclength);
+  DBUG_DUMP("before_row", before_row, before_size);
+  DBUG_DUMP("after_row", after_row, after_size);
+
   Rows_log_event* const ev=
     binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
 				      before_size + after_size, is_trans,
 				      static_cast<Update_rows_log_event*>(0));
 
-  error= (unlikely(!ev)) || ev->add_row_data(before_row, before_size) ||
+  error=
+    unlikely(!ev) ||
+    ev->add_row_data(before_row, before_size) ||
     ev->add_row_data(after_row, after_size);
 
   if (!table->write_row_record)
Thread
bk commit into 5.1 tree (mats:1.2326) BUG#22550Mats Kindahl21 Sep