Commit 9b55f51a authored by unknown's avatar unknown
Browse files

bug#17183

  ndb_restore in 5.1.6 with files from < 5.1.3


storage/ndb/tools/restore/Restore.cpp:
  Fix backward compatible...
parent 293c92c6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -515,7 +515,8 @@ RestoreDataIterator::getNextTuple(int & res)
    const AttributeDesc * attr_desc = m_tuple.getDesc(attrId);
    
    // just a reminder - remove when backwards compat implemented
    if(false && attr_desc->m_column->getNullable()){
    if(m_currentTable->backupVersion < MAKE_VERSION(5,1,3) && 
       attr_desc->m_column->getNullable()){
      const Uint32 ind = attr_desc->m_nullBitIndex;
      if(BitmaskImpl::get(m_currentTable->m_nullBitmaskSize, 
			  buf_ptr,ind)){
@@ -525,6 +526,11 @@ RestoreDataIterator::getNextTuple(int & res)
      }
    }

    if (m_currentTable->backupVersion < MAKE_VERSION(5,1,3))
    {
      sz *= 4;
    }
    
    attr_data->null = false;
    attr_data->void_value = &data->Data[0];
    attr_data->size = sz;
@@ -842,7 +848,7 @@ void TableS::createAttr(NdbDictionary::Column *column)
  }

  // just a reminder - does not solve backwards compat
  if (backupVersion < MAKE_VERSION(5,1,0))
  if (backupVersion < MAKE_VERSION(5,1,3))
  {
    d->m_nullBitIndex = m_noOfNullable; 
    m_noOfNullable++;