MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:September 19 2006 11:47am
Subject:bk commit into 5.1 tree (mats:1.2325)
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-19 13:47:15+02:00, mats@romeo.(none) +4 -0
  Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
  into  romeo.(none):/home/bk/w3259-mysql-5.1-new-rpl
  MERGE: 1.2245.1.13

  mysql-test/r/rpl_row_tabledefs_2myisam.result@stripped, 2006-09-19 13:17:30+02:00, mats@romeo.(none) +0 -4
    Auto merged
    MERGE: 1.4.1.1

  mysql-test/t/disabled.def@stripped, 2006-09-19 13:47:09+02:00, mats@romeo.(none) +0 -0
    SCCS merged
    MERGE: 1.182.1.3

  sql/field.cc@stripped, 2006-09-19 13:17:31+02:00, mats@romeo.(none) +0 -0
    Auto merged
    MERGE: 1.327.1.3

  sql/field.h@stripped, 2006-09-19 13:17:32+02:00, mats@romeo.(none) +0 -0
    Auto merged
    MERGE: 1.186.1.1

# 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/w3259-mysql-5.1-new-rpl/RESYNC

--- 1.341/sql/field.cc	2006-09-19 13:47:26 +02:00
+++ 1.342/sql/field.cc	2006-09-19 13:47:26 +02:00
@@ -1261,7 +1261,10 @@
 Field::do_last_null_byte() const
 {
   DBUG_ASSERT(null_ptr == NULL || (byte*) null_ptr >= table->record[0]);
-  return null_ptr ? (byte*) null_ptr - table->record[0] + 1 : 0;
+  if (null_ptr)
+    return (byte*) null_ptr - table->record[0] + 1;
+  else
+    return LAST_NULL_BYTE_UNDEF;
 }
 
 
@@ -8122,7 +8125,10 @@
   else
     result= bit_ptr;
 
-  return result ? (byte*) result - table->record[0] + 1 : 0;
+  if (result)
+    return (byte*) result - table->record[0] + 1;
+  else
+    return LAST_NULL_BYTE_UNDEF;
 }
 
 Field *Field_bit::new_key_field(MEM_ROOT *root,

--- 1.187/sql/field.h	2006-09-19 13:47:26 +02:00
+++ 1.188/sql/field.h	2006-09-19 13:47:26 +02:00
@@ -218,10 +218,24 @@
   inline bool maybe_null(void) { return null_ptr != 0 || table->maybe_null; }
   inline bool real_maybe_null(void) { return null_ptr != 0; }
 
+  enum {
+    LAST_NULL_BYTE_UNDEF= 0
+  };
+
   /*
-    Return a pointer to the last byte of the null bytes where the
-    field conceptually is placed.  In the case that the field does not
-    use any bits of the null bytes, a null pointer is returned.
+    Find the position of the last null byte for the field.
+
+    SYNOPSIS
+      last_null_byte()
+
+    DESCRIPTION
+      Return a pointer to the last byte of the null bytes where the
+      field conceptually is placed.
+
+    RETURN VALUE
+      The position of the last null byte relative to the beginning of
+      the record. If the field does not use any bits of the null
+      bytes, the value 0 (LAST_NULL_BYTE_UNDEF) is returned.
    */
   my_size_t last_null_byte() const {
     my_size_t bytes= do_last_null_byte();
@@ -392,6 +406,17 @@
   friend class Item_func_group_concat;
 
 private:
+  /*
+    Primitive for implementing last_null_byte().
+
+    SYNOPSIS
+      do_last_null_byte()
+
+    DESCRIPTION
+      Primitive for the implementation of the last_null_byte()
+      function. This represents the inheritance interface and can be
+      overridden by subclasses.
+   */
   virtual my_size_t do_last_null_byte() const;
 };
 
Thread
bk commit into 5.1 tree (mats:1.2325)Mats Kindahl19 Sep