1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

extentmap iterator (#2540)

This commit is contained in:
Leonid Fedorov
2022-08-29 13:30:03 +03:00
committed by GitHub
parent 568ac5ba7b
commit b5d8e0324b
2 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ int8_t setupCwd()
string workdir = startup::StartUp::tmpDir(); string workdir = startup::StartUp::tmpDir();
if (workdir.length() == 0) if (workdir.length() == 0)
workdir = "."; workdir = std::string(".");
int8_t rc = chdir(workdir.c_str()); int8_t rc = chdir(workdir.c_str());
return rc; return rc;

View File

@ -1089,7 +1089,7 @@ void ExtentMap::mergeExtentsMaxMin(CPMaxMinMergeMap_t& cpMap, bool useLock)
grabEMIndex(WRITE); grabEMIndex(WRITE);
} }
for (it = cpMap.begin(); it != cpMap.end(); ++it) for (auto it = cpMap.begin(); it != cpMap.end(); /* bottom erase will increase */)
{ {
auto emIt = findByLBID(it->first); auto emIt = findByLBID(it->first);
if (emIt == fExtentMapRBTree->end()) if (emIt == fExtentMapRBTree->end())
@ -1265,7 +1265,7 @@ void ExtentMap::mergeExtentsMaxMin(CPMaxMinMergeMap_t& cpMap, bool useLock)
return; // Leave when all extents in map are matched return; // Leave when all extents in map are matched
// Deleting objects from map, may speed up successive searches // Deleting objects from map, may speed up successive searches
cpMap.erase(it); it = cpMap.erase(it);
} }
throw logic_error("ExtentMap::mergeExtentsMaxMin(): lbid not found"); throw logic_error("ExtentMap::mergeExtentsMaxMin(): lbid not found");