1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-17 01:02:23 +03:00

First cut of IOC::truncate(). Got some of the unit test

written.  Fixed some bugs.  Commented out the old truncate test
for now; depends on IOC::write() to extend a file.
This commit is contained in:
Patrick LeBlanc
2019-04-01 16:23:35 -05:00
parent d0aeffca07
commit b4ebf7c3c0
7 changed files with 232 additions and 51 deletions

View File

@@ -160,11 +160,10 @@ int Replicator::addJournalEntry(const char *filename, const uint8_t *data, off_t
return count;
}
int Replicator::remove(const char *filename, Flags flags)
int Replicator::remove(const boost::filesystem::path &filename, Flags flags)
{
int ret = 0;
boost::filesystem::path p(filename);
try
{
boost::filesystem::remove_all(filename);
@@ -177,9 +176,16 @@ int Replicator::remove(const char *filename, Flags flags)
return ret;
}
int Replicator::updateMetadata(const char *filename, const MetadataFile &meta)
int Replicator::remove(const char *filename, Flags flags)
{
return 0;
boost::filesystem::path p(filename);
return remove(p);
}
int Replicator::updateMetadata(const char *filename, MetadataFile &meta)
{
return meta.writeMetadata(filename);
}
}