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-07-30 09:01:11+00:00, lzhou@dev3-63.(none) +1 -0
BUG#30024 Restore of backup from different endian can work for datetime
storage/ndb/tools/restore/Restore.cpp@stripped, 2007-07-30 09:00:01+00:00, lzhou@dev3-63.(none) +12 -0
Convert datetime datatype to native endian
# 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/bug30024
--- 1.51/storage/ndb/tools/restore/Restore.cpp 2007-07-30 09:01:33 +00:00
+++ 1.52/storage/ndb/tools/restore/Restore.cpp 2007-07-30 09:01:33 +00:00
@@ -664,6 +664,18 @@ RestoreDataIterator::getNextTuple(int &
*/
const Uint32 arraySize = sz / (attr_desc->size / 8);
assert(arraySize <= attr_desc->arraySize);
+
+ //convert datetime type
+ if(!m_hostByteOrder
+ && attr_desc->m_column->getType() == NdbDictionary::Column::Datetime)
+ {
+ char* p = (char*)&attr_data->u_int64_value[0];
+ Uint64 x;
+ memcpy(&x, p, sizeof(Uint64));
+ x = Twiddle64(x);
+ memcpy(p, &x, sizeof(Uint64));
+ }
+
if(!Twiddle(attr_desc, attr_data, attr_desc->arraySize))
{
res = -1;
| Thread |
|---|
| • bk commit into 5.1 tree (lzhou:1.2523) BUG#30024 | lzhou | 30 Jul |