From 9da4743888c95c235c2536a068346bcd8f1aaf03 Mon Sep 17 00:00:00 2001 From: "jonas@perch.ndb.mysql.com" <> Date: Tue, 14 Feb 2006 11:48:15 +0100 Subject: [PATCH 1/2] bug#17183 ndb_restore in 5.1.6 with files from < 5.1.3 --- storage/ndb/tools/restore/Restore.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/storage/ndb/tools/restore/Restore.cpp b/storage/ndb/tools/restore/Restore.cpp index 3752069a62f..9ca794c7bf4 100644 --- a/storage/ndb/tools/restore/Restore.cpp +++ b/storage/ndb/tools/restore/Restore.cpp @@ -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)){ @@ -524,6 +525,11 @@ RestoreDataIterator::getNextTuple(int & res) continue; } } + + if (m_currentTable->backupVersion < MAKE_VERSION(5,1,3)) + { + sz *= 4; + } attr_data->null = false; attr_data->void_value = &data->Data[0]; @@ -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++; From 0a311d93c92ad2c19c1a86119b59362e57dbe230 Mon Sep 17 00:00:00 2001 From: "jonas@perch.ndb.mysql.com" <> Date: Mon, 20 Feb 2006 09:03:52 +0100 Subject: [PATCH 2/2] ndb - Fix online ordered index build of varsize table --- storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp index cf71ed8f8e5..b51cc02a703 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp @@ -452,7 +452,7 @@ Dbtup::execBUILDINDXREQ(Signal* signal) } // set to first tuple position - const Uint32 firstTupleNo = ! buildPtr.p->m_build_vs ? 0 : 1; + const Uint32 firstTupleNo = 0; buildPtr.p->m_fragNo= 0; buildPtr.p->m_pageId= 0; buildPtr.p->m_tupleNo= firstTupleNo;