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
Merge branch 'develop-1.1' into 1.1-merge-up-2018-11-23
This commit is contained in:
@ -4,7 +4,7 @@ alias mcsmysql='/usr/local/mariadb/columnstore/mysql/bin/mysql --defaults-extra-
|
||||
alias ma=/usr/local/mariadb/columnstore/bin/mcsadmin
|
||||
alias mcsadmin=/usr/local/mariadb/columnstore/bin/mcsadmin
|
||||
alias cpimport=/usr/local/mariadb/columnstore/bin/cpimport
|
||||
alias home='cd /usr/local/mariadb/columnstore'
|
||||
alias mcshome='cd /usr/local/mariadb/columnstore'
|
||||
alias log='cd /var/log/mariadb/columnstore/'
|
||||
alias core='cd /var/log/mariadb/columnstore/corefiles'
|
||||
alias tmsg='tail -f /var/log/messages'
|
||||
@ -14,4 +14,4 @@ alias terror='tail -f /var/log/mariadb/columnstore/err.log'
|
||||
alias twarning='tail -f /var/log/mariadb/columnstore/warning.log'
|
||||
alias tcrit='tail -f /var/log/mariadb/columnstore/crit.log'
|
||||
alias dbrm='cd /usr/local/mariadb/columnstore/data1/systemFiles/dbrm'
|
||||
alias module='cat /usr/local/mariadb/columnstore/local/module'
|
||||
alias mcsmodule='cat /usr/local/mariadb/columnstore/local/module'
|
||||
|
@ -54,38 +54,39 @@
|
||||
using namespace std;
|
||||
using namespace oam;
|
||||
|
||||
|
||||
/* MCOL-1844. On an upgrade, the user may have customized options in their old
|
||||
* myCnf-include-args.text file. Merge it with the packaged version, and then process as we
|
||||
* have before.
|
||||
*/
|
||||
string rtrim(const string &in) {
|
||||
string::const_reverse_iterator rbegin = in.rbegin();
|
||||
while (rbegin != in.rend() && isspace(*rbegin))
|
||||
++rbegin;
|
||||
return string(in.begin(), rbegin.base());
|
||||
string::const_reverse_iterator rbegin = in.rbegin();
|
||||
while (rbegin != in.rend() && isspace(*rbegin))
|
||||
++rbegin;
|
||||
return string(in.begin(), rbegin.base());
|
||||
}
|
||||
|
||||
void mergeMycnfIncludeArgs()
|
||||
{
|
||||
string userArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text.rpmsave";
|
||||
string packagedArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text";
|
||||
ifstream userArgs(userArgsFilename.c_str());
|
||||
fstream packagedArgs(packagedArgsFilename.c_str(), ios::in);
|
||||
string userArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text.rpmsave";
|
||||
string packagedArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text";
|
||||
ifstream userArgs(userArgsFilename.c_str());
|
||||
fstream packagedArgs(packagedArgsFilename.c_str(), ios::in);
|
||||
|
||||
if (!userArgs || !packagedArgs)
|
||||
return;
|
||||
if (!userArgs || !packagedArgs)
|
||||
return;
|
||||
|
||||
// de-dup the args and comments in both files
|
||||
set<string> argMerger;
|
||||
set<string> comments;
|
||||
string line;
|
||||
while (getline(packagedArgs, line)) {
|
||||
line = rtrim(line);
|
||||
if (line[0] == '#')
|
||||
comments.insert(line);
|
||||
else if (line.size() > 0)
|
||||
argMerger.insert(line);
|
||||
}
|
||||
// de-dup the args and comments in both files
|
||||
set<string> argMerger;
|
||||
set<string> comments;
|
||||
string line;
|
||||
while (getline(packagedArgs, line)) {
|
||||
line = rtrim(line);
|
||||
if (line[0] == '#')
|
||||
comments.insert(line);
|
||||
else if (line.size() > 0)
|
||||
argMerger.insert(line);
|
||||
}
|
||||
while (getline(userArgs, line)) {
|
||||
line = rtrim(line);
|
||||
if (line[0] == '#')
|
||||
@ -93,17 +94,17 @@ void mergeMycnfIncludeArgs()
|
||||
else if (line.size() > 0)
|
||||
argMerger.insert(line);
|
||||
}
|
||||
userArgs.close();
|
||||
packagedArgs.close();
|
||||
userArgs.close();
|
||||
packagedArgs.close();
|
||||
|
||||
// write the merged version, comments first. They'll get ordered
|
||||
// alphabetically but, meh.
|
||||
packagedArgs.open(packagedArgsFilename.c_str(), ios::out | ios::trunc);
|
||||
for (set<string>::iterator it = comments.begin(); it != comments.end(); it++)
|
||||
packagedArgs << *it << endl;
|
||||
for (set<string>::iterator it = argMerger.begin(); it != argMerger.end(); it++)
|
||||
packagedArgs << *it << endl;
|
||||
packagedArgs.close();
|
||||
// write the merged version, comments first. They'll get ordered
|
||||
// alphabetically but, meh.
|
||||
packagedArgs.open(packagedArgsFilename.c_str(), ios::out | ios::trunc);
|
||||
for (set<string>::iterator it = comments.begin(); it != comments.end(); it++)
|
||||
packagedArgs << *it << endl;
|
||||
for (set<string>::iterator it = argMerger.begin(); it != argMerger.end(); it++)
|
||||
packagedArgs << *it << endl;
|
||||
packagedArgs.close();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
@ -142,9 +143,9 @@ int main(int argc, char* argv[])
|
||||
exit (1);
|
||||
}
|
||||
|
||||
// MCOL-1844. The user may have added options to their myCnf-include-args file. Merge
|
||||
// myCnf-include-args.text with myCnf-include-args.text.rpmsave, save in myCnf-include-args.text
|
||||
mergeMycnfIncludeArgs();
|
||||
// MCOL-1844. The user may have added options to their myCnf-include-args file. Merge
|
||||
// myCnf-include-args.text with myCnf-include-args.text.rpmsave, save in myCnf-include-args.text
|
||||
mergeMycnfIncludeArgs();
|
||||
|
||||
//include arguments file
|
||||
string includeFile = startup::StartUp::installDir() + "/bin/myCnf-include-args.text";
|
||||
@ -218,7 +219,7 @@ int main(int argc, char* argv[])
|
||||
ofstream newFile (mycnfFile.c_str());
|
||||
|
||||
//create new file
|
||||
int fd = open(mycnfFile.c_str(), O_RDWR | O_CREAT, 0666);
|
||||
int fd = open(mycnfFile.c_str(), O_RDWR|O_CREAT, 0644);
|
||||
|
||||
copy(lines.begin(), lines.end(), ostream_iterator<string>(newFile, "\n"));
|
||||
newFile.close();
|
||||
|
@ -97,7 +97,7 @@ string Func_concat_ws::getStrVal(Row& row,
|
||||
string tmp;
|
||||
for ( uint32_t i = 1 ; i < parm.size() ; i++)
|
||||
{
|
||||
string(stringValue(parm[i], row, isNull).c_str(), tmp);
|
||||
stringValue(parm[i], row, isNull, tmp);
|
||||
str += tmp;
|
||||
|
||||
if (isNull)
|
||||
|
Reference in New Issue
Block a user