List:Commits« Previous MessageNext Message »
From:lzhou Date:June 19 2007 5:04pm
Subject:bk commit into 5.1 tree (lzhou:1.2552) BUG#27543
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of zhl. When zhl 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-06-19 15:03:51+00:00, lzhou@dev3-63.(none) +1 -0
  Bug#27543 Backup and Restore can compatible with different endians for blob attribute

  storage/ndb/tools/restore/Restore.cpp@stripped, 2007-06-19 15:03:45+00:00,
lzhou@dev3-63.(none) +14 -0
    Convert blob length stored in main table

# 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:	lzhou
# Host:	dev3-63.(none)
# Root:	/home/zhl/mysql/mysql-5.1/bug27543

--- 1.50/storage/ndb/tools/restore/Restore.cpp	2007-06-19 15:04:10 +00:00
+++ 1.51/storage/ndb/tools/restore/Restore.cpp	2007-06-19 15:04:10 +00:00
@@ -664,6 +664,20 @@ RestoreDataIterator::getNextTuple(int  &
      */
     const Uint32 arraySize = sz / (attr_desc->size / 8);
     assert(arraySize <= attr_desc->arraySize);
+
+    //convert the length of blob(v1) and text(v1)
+    if(!m_hostByteOrder
+        && (attr_desc->m_column->getType() == NdbDictionary::Column::Blob
+           || attr_desc->m_column->getType() == NdbDictionary::Column::Text)
+        && attr_desc->m_column->getArrayType() ==
NdbDictionary::Column::ArrayTypeFixed)
+      for(int i = 0; i < 4; i++)
+      {
+        Uint8 tmp;
+        tmp = attr_data->u_int8_value[i];
+        attr_data->u_int8_value[i] = attr_data->u_int8_value[7-i];
+        attr_data->u_int8_value[7-i] = tmp; 
+      }
+
     if(!Twiddle(attr_desc, attr_data, attr_desc->arraySize))
       {
 	res = -1;
Thread
bk commit into 5.1 tree (lzhou:1.2552) BUG#27543lzhou19 Jun