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
This commit is contained in:
unknown 2007-08-23 15:17:44 +02:00
commit 650e06af70

View file

@ -607,7 +607,10 @@ RestoreDataIterator::getNextTuple(int & res)
attr_data->size = 4*sz;
//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))
{
res = -1;