List:Commits« Previous MessageNext Message »
From:tomas Date:March 26 2007 2:48pm
Subject:bk commit into 5.0 tree (tomas:1.2418) BUG#26986
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 14:48:52+02:00, tomas@stripped +1 -0
  Bug #26986  	BIT(33) for ndb is broken on solaris.
  - always store lsw first in ndb

  sql/ha_ndbcluster.cc@stripped, 2007-03-26 14:48:50+02:00, tomas@stripped +9
-5
    Bug #26986  	BIT(33) for ndb is broken on solaris.
    - always store lsw first in ndb

# 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.302/sql/ha_ndbcluster.cc	2007-03-22 12:55:05 +01:00
+++ 1.303/sql/ha_ndbcluster.cc	2007-03-26 14:48:50 +02:00
@@ -726,11 +726,8 @@
         DBUG_PRINT("info", ("bit field"));
         DBUG_DUMP("value", (char*)&bits, pack_len);
 #ifdef WORDS_BIGENDIAN
-        if (pack_len < 5)
-        {
-          DBUG_RETURN(ndb_op->setValue(fieldnr, 
-                                       ((char*)&bits)+4, pack_len) != 0);
-        }
+        /* store lsw first */
+        bits = (bits >> 32) | (bits << 32);
 #endif
         DBUG_RETURN(ndb_op->setValue(fieldnr, (char*)&bits, pack_len) != 0);
       }
@@ -2653,8 +2650,15 @@
             DBUG_PRINT("info", ("bit field H'%.8X%.8X",
                                 *(Uint32 *)(*value).rec->aRef(),
                                 *((Uint32 *)(*value).rec->aRef()+1)));
+#ifdef WORDS_BIGENDIAN
+            /* lsw is stored first */
+            Uint32 *buf= (Uint32 *)(*value).rec->aRef();
+            ((Field_bit *) *field)->store(*buf | (((longlong)*(buf+1)) << 32),
+                                          TRUE);
+#else
             ((Field_bit *) *field)->store((longlong)
                                           (*value).rec->u_64_value(), TRUE);
+#endif
           }
         }
       }
Thread
bk commit into 5.0 tree (tomas:1.2418) BUG#26986tomas26 Mar