You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Merge branch 'develop-1.2' into develop-merge-up-20190514
This commit is contained in:
@ -1141,7 +1141,8 @@ void ExtentMap::loadVersion4(ifstream& in)
|
||||
in.read((char*) &flNumElements, sizeof(int));
|
||||
idbassert(emNumElements > 0);
|
||||
|
||||
memset(fExtentMap, 0, fEMShminfo->allocdSize);
|
||||
void *fExtentMapPtr = static_cast<void*>(fExtentMap);
|
||||
memset(fExtentMapPtr, 0, fEMShminfo->allocdSize);
|
||||
fEMShminfo->currentSize = 0;
|
||||
|
||||
// init the free list
|
||||
@ -1226,7 +1227,8 @@ void ExtentMap::loadVersion4(IDBDataFile* in)
|
||||
throw runtime_error("ExtentMap::loadVersion4(): read failed. Check the error log.");
|
||||
}
|
||||
|
||||
memset(fExtentMap, 0, fEMShminfo->allocdSize);
|
||||
void *fExtentMapPtr = static_cast<void*>(fExtentMap);
|
||||
memset(fExtentMapPtr, 0, fEMShminfo->allocdSize);
|
||||
fEMShminfo->currentSize = 0;
|
||||
|
||||
// init the free list
|
||||
|
@ -189,7 +189,8 @@ void MasterSegmentTable::makeMSTSegment()
|
||||
|
||||
void MasterSegmentTable::initMSTData()
|
||||
{
|
||||
memset(fShmDescriptors, 0, MSTshmsize);
|
||||
void *dp = static_cast<void*>(&fShmDescriptors);
|
||||
memset(dp, 0, MSTshmsize);
|
||||
}
|
||||
|
||||
MSTEntry* MasterSegmentTable::getTable_read(int num, bool block) const
|
||||
|
@ -51,12 +51,14 @@ using namespace idbdatafile;
|
||||
|
||||
namespace
|
||||
{
|
||||
#ifdef USE_VERY_COMPLEX_DROP_CACHES
|
||||
void timespec_sub(const struct timespec& tv1,
|
||||
const struct timespec& tv2,
|
||||
double& tm)
|
||||
{
|
||||
tm = (double)(tv2.tv_sec - tv1.tv_sec) + 1.e-9 * (tv2.tv_nsec - tv1.tv_nsec);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace BRM
|
||||
@ -2176,8 +2178,12 @@ void SlaveComm::do_flushInodeCache()
|
||||
|
||||
if ((fd = open("/proc/sys/vm/drop_caches", O_WRONLY)) >= 0)
|
||||
{
|
||||
write(fd, "3\n", 2);
|
||||
close(fd);
|
||||
ssize_t written = write(fd, "3\n", 2);
|
||||
int rc = close(fd);
|
||||
if ( !written || rc )
|
||||
{
|
||||
std::cerr << "Could not write into or close /proc/sys/vm/drop_caches" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user