You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4328 There is a new option in both cpimport and cpimport.bin to asign
an owner for all data files created by cpimport The patch consists of two parts: cpimport.bin changes, cpimport splitter changes cpimport.bin computes uid_t and gid_t early and propagates it down the stack where MCS creates data files
This commit is contained in:
@ -452,6 +452,12 @@ std::string RBMetaWriter::openMetaFile ( uint16_t dbRoot )
|
||||
throw WeException( oss.str(), ERR_FILE_OPEN );
|
||||
}
|
||||
|
||||
{
|
||||
std::ostringstream ossChown;
|
||||
if (chownFileDir(ossChown, tmpMetaFileName, bulkRollbackPath))
|
||||
throw WeException(ossChown.str(), ERR_FILE_CHOWN);
|
||||
}
|
||||
|
||||
fMetaDataStream <<
|
||||
"# VERSION: 4" << std::endl <<
|
||||
"# APPLICATION: " << fAppDesc << std::endl <<
|
||||
@ -1196,6 +1202,7 @@ int RBMetaWriter::writeHWMChunk(
|
||||
std::ostringstream ossFile;
|
||||
ossFile << "/" << columnOID << ".p" << partition << ".s" << segment;
|
||||
std::string fileName;
|
||||
std::string dirPath;
|
||||
int rc = getSubDirPath( dbRoot, fileName );
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -1207,6 +1214,8 @@ int RBMetaWriter::writeHWMChunk(
|
||||
return ERR_METADATABKUP_COMP_OPEN_BULK_BKUP;
|
||||
}
|
||||
|
||||
dirPath = fileName;
|
||||
|
||||
fileName += ossFile.str();
|
||||
|
||||
std::string fileNameTmp = fileName;
|
||||
@ -1325,9 +1334,14 @@ int RBMetaWriter::writeHWMChunk(
|
||||
return ERR_METADATABKUP_COMP_RENAME;
|
||||
}
|
||||
|
||||
{
|
||||
std::ostringstream ossChown;
|
||||
if (chownFileDir(ossChown, fileName, dirPath))
|
||||
throw WeException(ossChown.str(), ERR_FILE_CHOWN);
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Returns the directory path to be used for storing any backup data files.
|
||||
//
|
||||
|
Reference in New Issue
Block a user