Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1988 05/09/30 12:19:15 jonas@stripped +5 -0
ndb
Add support/test for using my.cnf [cluster_config]
mysql-test/std_data/ndb_config_mycnf1.cnf
1.1 05/09/30 12:19:13 jonas@stripped +15 -0
New BitKeeper file ``mysql-test/std_data/ndb_config_mycnf1.cnf''
ndb/tools/ndb_config.cpp
1.10 05/09/30 12:19:13 jonas@stripped +22 -3
Add support for ndb_config to read my.cnf
ndb/src/mgmsrv/InitConfigFileParser.cpp
1.22 05/09/30 12:19:13 jonas@stripped +1 -1
merge
mysql-test/t/ndb_config.test
1.9 05/09/30 12:19:13 jonas@stripped +2 -0
Add support for ndb_config to read my.cnf
mysql-test/std_data/ndb_config_mycnf1.cnf
1.0 05/09/30 12:19:13 jonas@stripped +0 -0
BitKeeper file /home/jonas/src/mysql-5.0/mysql-test/std_data/ndb_config_mycnf1.cnf
mysql-test/r/ndb_config.result
1.4 05/09/30 12:19:13 jonas@stripped +2 -1
Add support for ndb_config to read my.cnf
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.0
--- New file ---
+++ mysql-test/std_data/ndb_config_mycnf1.cnf 05/09/30 12:19:13
[cluster_config]
NoOfReplicas=1
DataMemory=50M
[cluster_config.jonas]
IndexMemory=50M
ndbd = localhost,localhost,localhost,localhost
ndb_mgmd = localhost
mysqld = localhost
[cluster_config.ndbd.1]
DataMemory=25M
[cluster_config.ndbd.2.jonas]
DataMemory=35M
--- 1.3/mysql-test/r/ndb_config.result 2005-09-30 11:42:29 +02:00
+++ 1.4/mysql-test/r/ndb_config.result 2005-09-30 12:19:13 +02:00
@@ -3,4 +3,5 @@
1 localhost 41943040 12582912
2 localhost 41943040 12582912
1 2
-ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3, mysqld,4, mysqld,5, mysqld,6, mysqld,7,
+ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7,
+ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,,
--- 1.8/mysql-test/t/ndb_config.test 2005-09-30 11:42:29 +02:00
+++ 1.9/mysql-test/t/ndb_config.test 2005-09-30 12:19:13 +02:00
@@ -9,3 +9,5 @@
--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null
# End of 4.1 tests
+
+--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null
--- 1.9/ndb/tools/ndb_config.cpp 2005-09-30 11:42:29 +02:00
+++ 1.10/ndb/tools/ndb_config.cpp 2005-09-30 12:19:13 +02:00
@@ -41,6 +41,7 @@
static const char * g_field_delimiter=",";
static const char * g_row_delimiter=" ";
static const char * g_config_file = 0;
+static int g_mycnf = 0;
int g_print_full_config, opt_ndb_shm;
my_bool opt_core;
@@ -94,6 +95,9 @@
{ "config-file", 256, "Path to config.ini",
(gptr*) &g_config_file, (gptr*) &g_config_file,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ { "mycnf", 256, "Read config from my.cnf",
+ (gptr*) &g_mycnf, (gptr*) &g_mycnf,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
@@ -163,11 +167,16 @@
ndb_mgm_configuration * conf = 0;
- if (g_config_file)
+ if (g_config_file || g_mycnf)
conf = load_configuration();
else
conf = fetch_configuration();
+ if (conf == 0)
+ {
+ return -1;
+ }
+
Vector<Apply*> select_list;
Vector<Match*> where_clause;
@@ -437,10 +446,20 @@
load_configuration()
{
InitConfigFileParser parser(stderr);
+ if (g_config_file)
+ {
+ if (g_verbose)
+ fprintf(stderr, "Using config.ini : %s", g_config_file);
+
+ Config* conf = parser.parseConfig(g_config_file);
+ if (conf)
+ return conf->m_configValues;
+ }
+
if (g_verbose)
- fprintf(stderr, "Using config.ini : %s", g_config_file);
+ fprintf(stderr, "Using my.cnf");
- Config* conf = parser.parseConfig(g_config_file);
+ Config* conf = parser.parse_mycnf();
if (conf)
return conf->m_configValues;
--- 1.21/ndb/src/mgmsrv/InitConfigFileParser.cpp 2005-09-30 11:42:29 +02:00
+++ 1.22/ndb/src/mgmsrv/InitConfigFileParser.cpp 2005-09-30 12:19:13 +02:00
@@ -843,7 +843,7 @@
}
- Context ctx(m_info);
+ Context ctx(m_info, m_errstream);
const char *groups[]= { "cluster_config", 0 };
if (load_defaults(options, groups))
goto end;
| Thread |
|---|
| • bk commit into 5.0 tree (jonas:1.1988) | jonas | 30 Sep |