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