List:Commits« Previous MessageNext Message »
From:tomas Date:January 30 2006 8:32am
Subject:bk commit into 5.1 tree (tomas:1.2090)
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.2090 06/01/30 09:32:00 tomas@stripped +1 -0
  Merge tulin@stripped:/home/bk/mysql-5.1-new
  into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new

  sql/ha_ndbcluster.cc
    1.246 06/01/30 09:31:52 tomas@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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new/RESYNC

--- 1.245/sql/ha_ndbcluster.cc	2006-01-26 09:28:04 +01:00
+++ 1.246/sql/ha_ndbcluster.cc	2006-01-30 09:31:52 +01:00
@@ -844,14 +844,29 @@
                                 buf, (uint) blob_len));
             if (ndb_blob->readData(buf, len) != 0)
               DBUG_RETURN(-1);
+            DBUG_PRINT("info", ("blob field %d offset=%u len=%u [ptrdiff=%d]",
+                                i, offset, len, (int)ptrdiff));
             DBUG_ASSERT(len == blob_len);
             // Ugly hack assumes only ptr needs to be changed
-            field_blob->ptr += ptrdiff;
+            field_blob->ptr+= ptrdiff;
             field_blob->set_ptr(len, buf);
-            field_blob->ptr -= ptrdiff;
+            field_blob->ptr-= ptrdiff;
           }
           offset+= blob_size;
         }
+        else
+        {
+          if (loop == 1)
+          {
+            // have to set length even in this case
+            char *buf= buffer + offset;
+            uint32 len= 0;
+            field_blob->ptr+= ptrdiff;
+            field_blob->set_ptr(len, buf);
+            field_blob->ptr-= ptrdiff;
+            DBUG_PRINT("info", ("blob field %d isNull=%d", i, isNull));
+          }
+        }
       }
     }
     if (loop == 0 && offset > buffer_size)
@@ -2735,21 +2750,29 @@
       else
       {
         NdbBlob *ndb_blob= (*value).blob;
+        uint col_no = ndb_blob->getColumn()->getColumnNo();
         int isNull;
         ndb_blob->getDefined(isNull);
-        if (isNull != 0)
+        if (isNull == 1)
         {
-          uint col_no = ndb_blob->getColumn()->getColumnNo();
-          if (isNull == 1)
-          {
-            DBUG_PRINT("info",("[%u] NULL", col_no))
-            field->set_null(row_offset);
-          }
-          else
-          {
-            DBUG_PRINT("info",("[%u] UNDEFINED", col_no));
-            bitmap_clear_bit(defined, col_no);
-          }
+          DBUG_PRINT("info",("[%u] NULL", col_no))
+          field->set_null(row_offset);
+        }
+        else if (isNull == -1)
+        {
+          DBUG_PRINT("info",("[%u] UNDEFINED", col_no));
+          bitmap_clear_bit(defined, col_no);
+        }
+        else
+        {
+#ifndef DBUG_OFF
+          // pointer vas set in get_ndb_blobs_value
+          Field_blob *field_blob= (Field_blob*)field;
+          char* ptr;
+          field_blob->get_ptr(&ptr, row_offset);
+          uint32 len= field_blob->get_length(row_offset);
+          DBUG_PRINT("info",("[%u] SET ptr=%p len=%u", col_no, ptr, len));
+#endif
         }
       }
     }
Thread
bk commit into 5.1 tree (tomas:1.2090)tomas30 Jan