1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1330 Make debug flag let valgrind work

Add a '-d' flag to WriteEngine, ExeMgr and PrimProc to let valgrind work
with them.
This commit is contained in:
Andrew Hutchings
2018-06-25 15:10:28 +01:00
parent 1ca68f63e2
commit 9e3f92b6a3
3 changed files with 40 additions and 3 deletions

View File

@ -1354,7 +1354,9 @@ int main(int argc, char* argv[])
setenv("CALPONT_CSC_IDENT", "um", 1); setenv("CALPONT_CSC_IDENT", "um", 1);
#endif #endif
setupSignalHandlers(); setupSignalHandlers();
int err = setupResources(); int err = 0;
if (!gDebug)
err = setupResources();
string errMsg; string errMsg;
switch (err) switch (err)
{ {

View File

@ -299,6 +299,22 @@ int main(int argc, char* argv[])
// This is unset due to the way we start it // This is unset due to the way we start it
program_invocation_short_name = const_cast<char*>("PrimProc"); program_invocation_short_name = const_cast<char*>("PrimProc");
int gDebug = 0;
int c;
while ((c = getopt(argc, argv, "d")) != EOF)
{
switch(c)
{
case 'd':
gDebug++;
break;
case '?':
default:
break;
}
}
Config* cf = Config::makeConfig(); Config* cf = Config::makeConfig();
setupSignalHandlers(); setupSignalHandlers();
@ -307,7 +323,9 @@ int main(int argc, char* argv[])
mlp = new primitiveprocessor::Logger(); mlp = new primitiveprocessor::Logger();
int err = setupResources(); int err = 0;
if (!gDebug)
err = setupResources();
string errMsg; string errMsg;
switch (err) switch (err)
{ {

View File

@ -103,6 +103,21 @@ int main(int argc, char** argv)
printf ("Locale is : %s\n", systemLang.c_str() ); printf ("Locale is : %s\n", systemLang.c_str() );
int gDebug = 0;
int c;
while ((c = getopt(argc, argv, "d")) != EOF)
{
switch (c)
{
case 'd':
gDebug++;
break;
case '?':
default:
break;
}
}
//set BUSY_INIT state //set BUSY_INIT state
{ {
// Is there a reason to have a seperate Oam instance for this? // Is there a reason to have a seperate Oam instance for this?
@ -196,7 +211,9 @@ int main(int argc, char** argv)
} }
} }
int err = setupResources(); int err = 0;
if (!gDebug)
err = setupResources();
string errMsg; string errMsg;
switch (err) switch (err)
{ {