Commit 650e06af authored by unknown's avatar unknown

BUG#30134 restore of backup from different endian can work for timestamp column

(recommit for 5.1.22 target)


storage/ndb/tools/restore/Restore.cpp:
  Convert byte order of timestamp data type
parent fc766e51
...@@ -607,7 +607,10 @@ RestoreDataIterator::getNextTuple(int & res) ...@@ -607,7 +607,10 @@ RestoreDataIterator::getNextTuple(int & res)
attr_data->size = 4*sz; attr_data->size = 4*sz;
//if (m_currentTable->getTableId() >= 2) { ndbout << "fix i=" << i << " off=" << ptr-buf_ptr << " attrId=" << attrId << endl; } //if (m_currentTable->getTableId() >= 2) { ndbout << "fix i=" << i << " off=" << ptr-buf_ptr << " attrId=" << attrId << endl; }
if(!m_hostByteOrder
&& attr_desc->m_column->getType() == NdbDictionary::Column::Timestamp)
attr_data->u_int32_value[0] = Twiddle32(attr_data->u_int32_value[0]);
if(!Twiddle(attr_desc, attr_data)) if(!Twiddle(attr_desc, attr_data))
{ {
res = -1; res = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment