summaryrefslogtreecommitdiff
path: root/storage/ndb/tools
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-06-06 16:51:04 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-06-06 16:51:04 +0200
commit035b5005496f867c5424606613e312533c33f75d (patch)
tree7ed66ec9c48e2c938b389e440918b3386ac3db7a /storage/ndb/tools
parent6b81af5f488d5e84d94427978023dc13aad28158 (diff)
parentab4c64b49d85c1f5cf3d03baf5138438ec591cf2 (diff)
downloadmariadb-git-035b5005496f867c5424606613e312533c33f75d.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-build storage/ndb/src/kernel/vm/Configuration.cpp: Auto merged
Diffstat (limited to 'storage/ndb/tools')
-rw-r--r--storage/ndb/tools/restore/Restore.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/storage/ndb/tools/restore/Restore.cpp b/storage/ndb/tools/restore/Restore.cpp
index f99cacfc613..516dfe24855 100644
--- a/storage/ndb/tools/restore/Restore.cpp
+++ b/storage/ndb/tools/restore/Restore.cpp
@@ -873,13 +873,32 @@ bool RestoreDataIterator::readFragmentHeader(int & ret, Uint32 *fragmentId)
debug << "RestoreDataIterator::getNextFragment" << endl;
- if (buffer_read(&Header, sizeof(Header), 1) != 1){
+ while (1)
+ {
+ /* read first part of header */
+ if (buffer_read(&Header, 8, 1) != 1)
+ {
+ ret = 0;
+ return false;
+ } // if
+
+ /* skip if EMPTY_ENTRY */
+ Header.SectionType = ntohl(Header.SectionType);
+ Header.SectionLength = ntohl(Header.SectionLength);
+ if (Header.SectionType == BackupFormat::EMPTY_ENTRY)
+ {
+ void *tmp;
+ buffer_get_ptr(&tmp, Header.SectionLength*4-8, 1);
+ continue;
+ }
+ break;
+ }
+ /* read rest of header */
+ if (buffer_read(((char*)&Header)+8, sizeof(Header)-8, 1) != 1)
+ {
ret = 0;
return false;
- } // if
-
- Header.SectionType = ntohl(Header.SectionType);
- Header.SectionLength = ntohl(Header.SectionLength);
+ }
Header.TableId = ntohl(Header.TableId);
Header.FragmentNo = ntohl(Header.FragmentNo);
Header.ChecksumType = ntohl(Header.ChecksumType);