mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
ndb - bug in my.cnf handling on resize of vector
backport fix from 5.1 ndb/src/mgmsrv/InitConfigFileParser.cpp: backport fix from 5.1
This commit is contained in:
parent
2cd7831fb5
commit
0e39133ad7
1 changed files with 7 additions and 6 deletions
|
@ -800,6 +800,7 @@ InitConfigFileParser::parse_mycnf()
|
||||||
/**
|
/**
|
||||||
* Add ndbd, ndb_mgmd, api/mysqld
|
* Add ndbd, ndb_mgmd, api/mysqld
|
||||||
*/
|
*/
|
||||||
|
Uint32 idx = options.size();
|
||||||
{
|
{
|
||||||
struct my_option opt;
|
struct my_option opt;
|
||||||
bzero(&opt, sizeof(opt));
|
bzero(&opt, sizeof(opt));
|
||||||
|
@ -809,7 +810,6 @@ InitConfigFileParser::parse_mycnf()
|
||||||
opt.var_type = GET_STR;
|
opt.var_type = GET_STR;
|
||||||
opt.arg_type = REQUIRED_ARG;
|
opt.arg_type = REQUIRED_ARG;
|
||||||
options.push_back(opt);
|
options.push_back(opt);
|
||||||
ndbd = &options.back();
|
|
||||||
|
|
||||||
opt.name = "ndb_mgmd";
|
opt.name = "ndb_mgmd";
|
||||||
opt.id = 256;
|
opt.id = 256;
|
||||||
|
@ -817,7 +817,6 @@ InitConfigFileParser::parse_mycnf()
|
||||||
opt.var_type = GET_STR;
|
opt.var_type = GET_STR;
|
||||||
opt.arg_type = REQUIRED_ARG;
|
opt.arg_type = REQUIRED_ARG;
|
||||||
options.push_back(opt);
|
options.push_back(opt);
|
||||||
ndb_mgmd = &options.back();
|
|
||||||
|
|
||||||
opt.name = "mysqld";
|
opt.name = "mysqld";
|
||||||
opt.id = 256;
|
opt.id = 256;
|
||||||
|
@ -825,20 +824,22 @@ InitConfigFileParser::parse_mycnf()
|
||||||
opt.var_type = GET_STR;
|
opt.var_type = GET_STR;
|
||||||
opt.arg_type = REQUIRED_ARG;
|
opt.arg_type = REQUIRED_ARG;
|
||||||
options.push_back(opt);
|
options.push_back(opt);
|
||||||
mysqld = &options.back();
|
|
||||||
|
|
||||||
opt.name = "api";
|
opt.name = "ndbapi";
|
||||||
opt.id = 256;
|
opt.id = 256;
|
||||||
opt.value = (gptr*)malloc(sizeof(char*));
|
opt.value = (gptr*)malloc(sizeof(char*));
|
||||||
opt.var_type = GET_STR;
|
opt.var_type = GET_STR;
|
||||||
opt.arg_type = REQUIRED_ARG;
|
opt.arg_type = REQUIRED_ARG;
|
||||||
options.push_back(opt);
|
options.push_back(opt);
|
||||||
api = &options.back();
|
|
||||||
|
|
||||||
bzero(&opt, sizeof(opt));
|
bzero(&opt, sizeof(opt));
|
||||||
options.push_back(opt);
|
options.push_back(opt);
|
||||||
}
|
|
||||||
|
|
||||||
|
ndbd = &options[idx];
|
||||||
|
ndb_mgmd = &options[idx+1];
|
||||||
|
mysqld = &options[idx+2];
|
||||||
|
api = &options[idx+3];
|
||||||
|
}
|
||||||
|
|
||||||
Context ctx(m_info, m_errstream);
|
Context ctx(m_info, m_errstream);
|
||||||
const char *groups[]= { "cluster_config", 0 };
|
const char *groups[]= { "cluster_config", 0 };
|
||||||
|
|
Loading…
Reference in a new issue