List:Commits« Previous MessageNext Message »
From:tomas Date:March 26 2007 5:57pm
Subject:bk commit into 5.0 tree (tomas:1.2420)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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@stripped, 2007-03-26 17:57:00+02:00, tomas@stripped +3 -0
      correct medium int printout
      correct cit printout
      correct bit store retrieve

  ndb/include/ndbapi/NdbRecAttr.hpp@stripped, 2007-03-26 17:56:58+02:00, tomas@stripped +2 -5
    correct medium int printout

  ndb/src/ndbapi/NdbRecAttr.cpp@stripped, 2007-03-26 17:56:59+02:00, tomas@stripped +6 -17
    correct cit printout

  sql/ha_ndbcluster.cc@stripped, 2007-03-26 17:56:59+02:00, tomas@stripped +7 -2
    correct bit store retrieve

# 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:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.0-ndb

--- 1.19/ndb/include/ndbapi/NdbRecAttr.hpp	2007-03-08 09:37:46 +01:00
+++ 1.20/ndb/include/ndbapi/NdbRecAttr.hpp	2007-03-26 17:56:58 +02:00
@@ -336,10 +336,7 @@
 Int32
 NdbRecAttr::medium_value() const
 {
-  Uint32 tmp = *(Uint32*)theRef;
-  if (tmp & (0x1<<23))
-    tmp|= (0xFF<<24);
-  return (Int32)tmp;
+  return sint3korr((unsigned char *)theRef);
 }
 
 inline
@@ -367,7 +364,7 @@
 Uint32
 NdbRecAttr::u_medium_value() const
 {
-  return *(Uint32*)theRef;
+  return uint3korr((unsigned char*)theRef);
 }
 
 inline

--- 1.32/ndb/src/ndbapi/NdbRecAttr.cpp	2007-03-08 09:37:46 +01:00
+++ 1.33/ndb/src/ndbapi/NdbRecAttr.cpp	2007-03-26 17:56:59 +02:00
@@ -236,24 +236,13 @@
       break;
     case NdbDictionary::Column::Bit:
       out << f.hex_prefix << "0x";
-      if (length < 33)
       {
-        out.print("%X", r.u_32_value());
-      }
-      else if (length < 65)
-      {
-        out.print("%llX", r.u_64_value());
-      }
-      else
-      {
-        const unsigned char *buf = (unsigned char *)r.aRef();
-        int k = 4*((length+31)/32);
-        while (k > 0 && (*(buf + --k) == 0));
-        do
-        {
-          out.print("%X", (Uint32)*(buf + k--));
-        }
-        while (k >= 0);
+        const Uint32 *buf = (Uint32 *)r.aRef();
+        int k = (length+31)/32;
+        while (k > 0 && (buf[--k] == 0));
+        out.print("%X", buf[k]);
+        while (k > 0)
+          out.print("%.8X", buf[--k]);
       }
       break;
     case NdbDictionary::Column::Unsigned:

--- 1.303/sql/ha_ndbcluster.cc	2007-03-26 14:48:50 +02:00
+++ 1.304/sql/ha_ndbcluster.cc	2007-03-26 17:56:59 +02:00
@@ -727,7 +727,8 @@
         DBUG_DUMP("value", (char*)&bits, pack_len);
 #ifdef WORDS_BIGENDIAN
         /* store lsw first */
-        bits = (bits >> 32) | (bits << 32);
+        bits = ((bits >> 32) & 0x00000000FFFFFFFF)
+          |    ((bits << 32) & 0xFFFFFFFF00000000);
 #endif
         DBUG_RETURN(ndb_op->setValue(fieldnr, (char*)&bits, pack_len) != 0);
       }
@@ -2653,7 +2654,11 @@
 #ifdef WORDS_BIGENDIAN
             /* lsw is stored first */
             Uint32 *buf= (Uint32 *)(*value).rec->aRef();
-            ((Field_bit *) *field)->store(*buf | (((longlong)*(buf+1)) << 32),
+            ((Field_bit *) *field)->store((((longlong)*buf)
+                                           & 0x000000000FFFFFFFF)
+                                          |
+                                          ((((longlong)*(buf+1)) << 32)
+                                           & 0xFFFFFFFF00000000),
                                           TRUE);
 #else
             ((Field_bit *) *field)->store((longlong)
Thread
bk commit into 5.0 tree (tomas:1.2420)tomas26 Mar