From 2bc490d42b49a56b06f6c91ee873d951794eb911 Mon Sep 17 00:00:00 2001 From: "tomas@poseidon.ndb.mysql.com" <> Date: Thu, 20 Apr 2006 22:04:09 +0200 Subject: [PATCH] BUG#18594 ndb_restore log boken in 5.1 - corrected log read after fragment id addition --- storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp | 2 +- storage/ndb/tools/restore/Restore.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp b/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp index 92680a5b6c9..ac41b78fef1 100644 --- a/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp +++ b/storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp @@ -144,7 +144,7 @@ struct BackupFormat { // If TriggerEvent & 0x10000 == true then GCI is right after data Uint32 TriggerEvent; Uint32 FragId; - Uint32 Data[1]; // Len = Length - 2 + Uint32 Data[1]; // Len = Length - 3 }; }; diff --git a/storage/ndb/tools/restore/Restore.cpp b/storage/ndb/tools/restore/Restore.cpp index 928cfbc6580..779cddd1a38 100644 --- a/storage/ndb/tools/restore/Restore.cpp +++ b/storage/ndb/tools/restore/Restore.cpp @@ -1036,7 +1036,7 @@ RestoreLogIterator::getNextLogEntry(int & res, bool *alloc_flag) { m_logEntry.clear(); AttributeHeader * ah = (AttributeHeader *)&logE->Data[0]; - AttributeHeader *end = (AttributeHeader *)&logE->Data[len - 2]; + AttributeHeader *end = (AttributeHeader *)&logE->Data[len - 3]; AttributeS * attr; m_logEntry.m_frag_id = ntohl(logE->FragId); while(ah < end){