diff options
author | tomas@poseidon.mysql.com <> | 2007-06-05 18:00:42 +0200 |
---|---|---|
committer | tomas@poseidon.mysql.com <> | 2007-06-05 18:00:42 +0200 |
commit | 8fd5212a9fda200db2141f60ab4cdef4ca7b7cf6 (patch) | |
tree | c6da4bd0ef95a5e8a40913290d0c6519ed43b6ea /storage/ndb/tools | |
parent | 50d2a6de0c14002b232a6e11b56dd95546b77790 (diff) | |
parent | ce93bc3d13e39ed4e042adacf4ea1e4f8567df61 (diff) | |
download | mariadb-git-8fd5212a9fda200db2141f60ab4cdef4ca7b7cf6.tar.gz |
Merge poseidon.mysql.com:/home/tomas/mysql-5.1-telco-gca
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
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); |