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

Merge branch 'develop-1.2' into develop-merge-up-20190514

This commit is contained in:
Andrew Hutchings
2019-05-14 13:58:33 +01:00
83 changed files with 469 additions and 638 deletions

View File

@ -8,6 +8,8 @@ set(autoInstaller_SRCS autoInstaller.cpp)
add_executable(autoInstaller ${autoInstaller_SRCS})
target_compile_options(autoInstaller PRIVATE -Wno-unused-result)
target_link_libraries(autoInstaller ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS} readline ncurses)
install(TARGETS autoInstaller DESTINATION ${ENGINE_BINDIR})
@ -22,15 +24,3 @@ add_executable(autoConfigure ${autoConfigure_SRCS})
target_link_libraries(autoConfigure ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS})
install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
########### next target ###############
set(svnQuery_SRCS svnQuery.cpp)
add_executable(svnQuery ${svnQuery_SRCS})
target_link_libraries(svnQuery ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS})
install(TARGETS svnQuery DESTINATION ${ENGINE_BINDIR})

View File

@ -637,7 +637,7 @@ int main(int argc, char* argv[])
// Columnstore.xml found
//try to parse it
Config* sysConfigOld;
//Config* sysConfigOld;
ofstream file("/dev/null");
@ -649,7 +649,7 @@ int main(int argc, char* argv[])
// redirect cout to /dev/null
cerr.rdbuf(file.rdbuf());
sysConfigOld = Config::makeConfig( systemDir + "/Columnstore.xml");
//sysConfigOld = Config::makeConfig( systemDir + "/Columnstore.xml");
// restore cout stream buffer
cerr.rdbuf (strm_buffer);

View File

@ -59,11 +59,11 @@ int setUp()
{
#ifndef _MSC_VER
string cmd = "/bin/rm -f " + logFile + " >/dev/null 2>&1";
(void)system(cmd.c_str());
int rc = system(cmd.c_str());
cmd = "/bin/touch -f " + logFile + " >/dev/null 2>&1";
(void)system(cmd.c_str());
rc = system(cmd.c_str());
#endif
return 0;
return rc;
}
int checkNotThere(WriteEngine::FID fid)
@ -73,12 +73,6 @@ int checkNotThere(WriteEngine::FID fid)
return (fileOp.existsOIDDir(fid) ? -1 : 0);
}
void tearDown()
{
string file = tmpDir + "/oidbitmap";
unlink(file.c_str());
}
void usage()
{
cerr << "Usage: dbbuilder [-h|f] function" << endl
@ -131,6 +125,7 @@ int main(int argc, char* argv[])
std::string schema("tpch");
Oam oam;
bool fFlg = false;
int rc = 0;
opterr = 0;
@ -194,7 +189,10 @@ int main(int argc, char* argv[])
if ( buildOption == SYSCATALOG_ONLY )
{
setUp();
if ( setUp() )
{
cerr << "setUp() call error " << endl;
}
bool canWrite = true;
@ -210,9 +208,13 @@ int main(int argc, char* argv[])
"' > " + logFile;
if (canWrite)
(void)system(cmd.c_str());
{
rc = system(cmd.c_str());
}
else
{
cerr << cmd << endl;
}
errorHandler(sysCatalogErr,
"Build system catalog",
@ -244,7 +246,7 @@ int main(int argc, char* argv[])
string cmd(string("echo 'FAILED: ") + ex.what() + "' > " + logFile);
if (canWrite)
(void)system(cmd.c_str());
rc = system(cmd.c_str());
else
cerr << cmd << endl;
@ -256,7 +258,7 @@ int main(int argc, char* argv[])
string cmd = "echo 'FAILED: HDFS checking.' > " + logFile;
if (canWrite)
(void)system(cmd.c_str());
rc = system(cmd.c_str());
else
cerr << cmd << endl;
@ -275,7 +277,7 @@ int main(int argc, char* argv[])
std::string cmd = "echo 'OK: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
if (canWrite)
(void)system(cmd.c_str());
rc = system(cmd.c_str());
else
#ifdef _MSC_VER
(void)0;
@ -288,11 +290,9 @@ int main(int argc, char* argv[])
if (canWrite)
{
int err;
rc = system(cmd.c_str());
err = system(cmd.c_str());
if (err != 0)
if (rc != 0)
{
ostringstream os;
os << "Warning: running " << cmd << " failed. This is usually non-fatal.";
@ -310,7 +310,7 @@ int main(int argc, char* argv[])
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
if (canWrite)
(void)system(cmd.c_str());
rc = system(cmd.c_str());
else
cerr << cmd << endl;
@ -321,7 +321,7 @@ int main(int argc, char* argv[])
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
if (canWrite)
(void)system(cmd.c_str());
rc = system(cmd.c_str());
else
cerr << cmd << endl;

View File

@ -44,11 +44,11 @@ using namespace bulkloadxml;
int main(int argc, char** argv)
{
const int DEBUG_LVL_TO_DUMP_SYSCAT_RPT = 4;
#ifdef _MSC_VER
//FIXME
#else
setuid( 0 ); // set effective ID to root; ignore return status
#endif
// set effective ID to root
if( setuid( 0 ) < 0 )
{
std::cerr << " colxml: setuid failed " << std::endl;
}
setlocale(LC_ALL, "");
WriteEngine::Config::initConfigCache(); // load Columnstore.xml config settings