1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-15 12:09:09 +03:00

Added more complete IOC::write logic fixed metadata bug started IOC::append.

This commit is contained in:
Ben Thompson
2019-04-04 16:53:11 -05:00
parent 806bf6365d
commit 4ec8e12266
5 changed files with 181 additions and 52 deletions

View File

@@ -229,12 +229,14 @@ vector<metadataObject> MetadataFile::metadataRead(off_t offset, size_t length) c
break;
++i;
}
// append objects until foundLen >= length or EOF
// first time thrus foundLen should be adjusted based on offset
off_t foundOffset = offset - i->offset;
while (i != mObjects.end() && foundLen < length)
{
ret.push_back(*i);
foundLen += i->length;
foundLen += (i->length - foundOffset);
foundOffset = 0; //zero on every other time thru this loop
++i;
}
return ret;