diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-06-06 16:51:04 +0200 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-06-06 16:51:04 +0200 |
commit | 035b5005496f867c5424606613e312533c33f75d (patch) | |
tree | 7ed66ec9c48e2c938b389e440918b3386ac3db7a /storage/ndb/tools | |
parent | 6b81af5f488d5e84d94427978023dc13aad28158 (diff) | |
parent | ab4c64b49d85c1f5cf3d03baf5138438ec591cf2 (diff) | |
download | mariadb-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.cpp | 29 |
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); |