mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Bug#28012 Patch : IM crashes instead of reporting an error when mysqldpath is bad
On the windows platform, if an instance object failed to initialize during program start, the instance manager would crash. This could happen if an incorrect mysqld path was supplied in the defaults configuration file. The patch prevents the program from crashing and makes it show an error message instead.
This commit is contained in:
@@ -524,24 +524,17 @@ bool Instance::init(const LEX_STRING *name_arg)
|
||||
|
||||
|
||||
/**
|
||||
Complete instance options initialization.
|
||||
@brief Complete instance options initialization.
|
||||
|
||||
SYNOPSIS
|
||||
complete_initialization()
|
||||
|
||||
RETURN
|
||||
FALSE - ok
|
||||
TRUE - error
|
||||
@return Error status.
|
||||
@retval FALSE ok
|
||||
@retval TRUE error
|
||||
*/
|
||||
|
||||
bool Instance::complete_initialization()
|
||||
{
|
||||
configured= ! options.complete_initialization();
|
||||
return FALSE;
|
||||
/*
|
||||
TODO: return actual status (from
|
||||
Instance_options::complete_initialization()) here.
|
||||
*/
|
||||
return !configured;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@@ -644,25 +637,24 @@ bool Instance::is_mysqld_running()
|
||||
|
||||
|
||||
/**
|
||||
Start mysqld.
|
||||
@brief Start mysqld.
|
||||
|
||||
SYNOPSIS
|
||||
start_mysqld()
|
||||
Reset flags and start Instance Monitor thread, which will start mysqld.
|
||||
|
||||
DESCRIPTION
|
||||
Reset flags and start Instance Monitor thread, which will start mysqld.
|
||||
@note Instance must be locked before calling the operation.
|
||||
|
||||
MT-NOTE: instance must be locked before calling the operation.
|
||||
|
||||
RETURN
|
||||
FALSE - ok
|
||||
TRUE - could not start instance
|
||||
@return Error status code
|
||||
@retval FALSE Ok
|
||||
@retval TRUE Could not start instance
|
||||
*/
|
||||
|
||||
bool Instance::start_mysqld()
|
||||
{
|
||||
Instance_monitor *instance_monitor;
|
||||
|
||||
if (!configured)
|
||||
return TRUE;
|
||||
|
||||
/*
|
||||
Prepare instance to start Instance Monitor thread.
|
||||
|
||||
|
Reference in New Issue
Block a user