You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-27 08:21:15 +03:00
MCOL-3680 mysqld will abort if Columnstore.xml is missing
Add try-catch blocks in the plugin code to prevent mysqld from aborting if configcpp cannot access Columnstore.xml.
This commit is contained in:
@@ -114,19 +114,17 @@ Config* Config::makeConfig(const char* cf)
|
||||
Config::Config(const string& configFile) :
|
||||
fDoc(0), fConfigFile(configFile), fMtime(0), fParser()
|
||||
{
|
||||
for ( int i = 0 ; i < 20 ; i++ )
|
||||
int i = 0;
|
||||
for ( ; i < 2 ; i++ )
|
||||
{
|
||||
if (access(fConfigFile.c_str(), R_OK) != 0)
|
||||
{
|
||||
if ( i >= 15 )
|
||||
throw runtime_error("Config::Config: error accessing config file " + fConfigFile);
|
||||
|
||||
sleep (1);
|
||||
}
|
||||
else
|
||||
if (access(fConfigFile.c_str(), R_OK) == 0)
|
||||
break;
|
||||
sleep (1);
|
||||
}
|
||||
|
||||
if ( i == 2 )
|
||||
throw runtime_error("Config::Config: error accessing config file " + fConfigFile);
|
||||
|
||||
struct stat statbuf;
|
||||
|
||||
if (stat(configFile.c_str(), &statbuf) == 0)
|
||||
|
||||
Reference in New Issue
Block a user