Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
40a8e073
Commit
40a8e073
authored
Feb 21, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed switch name from --ndb-mgmd-host to --ndb-mgmd
+ simplified code
parent
e5c71dd0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
ndb/include/util/ndb_opts.h
ndb/include/util/ndb_opts.h
+9
-9
ndb/src/mgmapi/LocalConfig.cpp
ndb/src/mgmapi/LocalConfig.cpp
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+10
-10
No files found.
ndb/include/util/ndb_opts.h
View file @
40a8e073
...
...
@@ -31,7 +31,7 @@ int opt_ndb_nodeid;
my_bool
opt_ndb_shm
;
const
char
*
opt_ndb_connectstring
=
0
;
const
char
*
opt_connect_str
=
0
;
const
char
*
opt_ndb_mgmd
_host
=
0
;
const
char
*
opt_ndb_mgmd
=
0
;
char
opt_ndb_constrbuf
[
1024
];
unsigned
opt_ndb_constrbuf_len
;
...
...
@@ -50,10 +50,10 @@ unsigned opt_ndb_constrbuf_len;
"Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", \
(gptr*) &opt_ndb_connectstring, (gptr*) &opt_ndb_connectstring, \
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "ndb-mgmd-host", OPT_NDB_MGMD
_HOST
, \
{ "ndb-mgmd-host", OPT_NDB_MGMD, \
"Set host and port for connecting to ndb_mgmd. " \
"Syntax: <hostname>[:<port>].", \
(gptr*) &opt_ndb_mgmd
_host, (gptr*) &opt_ndb_mgmd_host
, 0, \
(gptr*) &opt_ndb_mgmd
, (gptr*) &opt_ndb_mgmd
, 0, \
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },\
{ "ndb-nodeid", OPT_NDB_NODEID, \
"Set node id for this node.", \
...
...
@@ -93,7 +93,7 @@ enum ndb_std_options {
OPT_NDB_SHM
=
256
,
OPT_NDB_SHM_SIGNUM
,
OPT_NDB_OPTIMIZED_NODE_SELECTION
,
OPT_NDB_MGMD
_HOST
,
OPT_NDB_MGMD
,
OPT_NDB_NODEID
,
NDB_STD_OPTIONS_LAST
/* should always be last in this enum */
};
...
...
@@ -126,16 +126,14 @@ ndb_std_get_one_option(int optid,
#endif
}
break
;
case
OPT_NDB_MGMD
_HOST
:
case
OPT_NDB_MGMD
:
case
OPT_NDB_NODEID
:
{
const
char
*
tmp
=
""
;
if
(
optid
==
OPT_NDB_NODEID
)
tmp
=
"nodeid="
;
int
len
=
my_snprintf
(
opt_ndb_constrbuf
+
opt_ndb_constrbuf_len
,
sizeof
(
opt_ndb_constrbuf
)
-
opt_ndb_constrbuf_len
,
"%s%s%s"
,
opt_ndb_constrbuf_len
>
0
?
","
:
""
,
tmp
,
argument
);
optid
==
OPT_NDB_NODEID
?
"nodeid="
:
""
,
argument
);
opt_ndb_constrbuf_len
+=
len
;
}
/* fall through to add the connectstring to the end
...
...
@@ -147,6 +145,8 @@ ndb_std_get_one_option(int optid,
sizeof
(
opt_ndb_constrbuf
)
-
opt_ndb_constrbuf_len
,
"%s%s"
,
opt_ndb_constrbuf_len
>
0
?
","
:
""
,
opt_ndb_connectstring
);
else
opt_ndb_constrbuf
[
opt_ndb_constrbuf_len
]
=
0
;
opt_connect_str
=
opt_ndb_constrbuf
;
break
;
}
...
...
ndb/src/mgmapi/LocalConfig.cpp
View file @
40a8e073
...
...
@@ -148,7 +148,7 @@ const char *nodeIdTokens[] = {
const
char
*
hostNameTokens
[]
=
{
"host://%[^:]:%i"
,
"host=%[^:]:%i"
,
"mgmd
-host
=%[^:]:%i"
,
"mgmd=%[^:]:%i"
,
"%[^:^=^ ]:%i"
,
"%s %i"
,
0
...
...
sql/mysqld.cc
View file @
40a8e073
...
...
@@ -296,7 +296,7 @@ char opt_ndb_constrbuf[1024];
unsigned
opt_ndb_constrbuf_len
;
my_bool
opt_ndb_shm
,
opt_ndb_optimized_node_selection
;
ulong
opt_ndb_cache_check_time
;
const
char
*
opt_ndb_mgmd
_host
;
const
char
*
opt_ndb_mgmd
;
ulong
opt_ndb_nodeid
;
#endif
my_bool
opt_readonly
,
use_temp_pool
,
relay_log_purge
;
...
...
@@ -4178,7 +4178,7 @@ enum options_mysqld
OPT_NDBCLUSTER
,
OPT_NDB_CONNECTSTRING
,
OPT_NDB_USE_EXACT_COUNT
,
OPT_NDB_FORCE_SEND
,
OPT_NDB_AUTOINCREMENT_PREFETCH_SZ
,
OPT_NDB_SHM
,
OPT_NDB_OPTIMIZED_NODE_SELECTION
,
OPT_NDB_CACHE_CHECK_TIME
,
OPT_NDB_MGMD
_HOST
,
OPT_NDB_NODEID
,
OPT_NDB_MGMD
,
OPT_NDB_NODEID
,
OPT_SKIP_SAFEMALLOC
,
OPT_TEMP_POOL
,
OPT_TX_ISOLATION
,
OPT_COMPLETION_TYPE
,
OPT_SKIP_STACK_TRACE
,
OPT_SKIP_SYMLINKS
,
...
...
@@ -4673,10 +4673,10 @@ Disable with --skip-ndbcluster (will save memory).",
(
gptr
*
)
&
opt_ndb_connectstring
,
(
gptr
*
)
&
opt_ndb_connectstring
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"ndb-mgmd-host"
,
OPT_NDB_MGMD
_HOST
,
{
"ndb-mgmd-host"
,
OPT_NDB_MGMD
,
"Set host and port for ndb_mgmd. Syntax: hostname[:port]"
,
(
gptr
*
)
&
opt_ndb_mgmd
_host
,
(
gptr
*
)
&
opt_ndb_mgmd
_host
,
(
gptr
*
)
&
opt_ndb_mgmd
,
(
gptr
*
)
&
opt_ndb_mgmd
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"ndb-nodeid"
,
OPT_NDB_NODEID
,
"Nodeid for this mysqlserver in the cluster."
,
...
...
@@ -6522,16 +6522,14 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#endif
break
;
#ifdef HAVE_NDBCLUSTER_DB
case
OPT_NDB_MGMD
_HOST
:
case
OPT_NDB_MGMD
:
case
OPT_NDB_NODEID
:
{
const
char
*
tmp
=
""
;
if
(
optid
==
OPT_NDB_NODEID
)
tmp
=
"nodeid="
;
int
len
=
my_snprintf
(
opt_ndb_constrbuf
+
opt_ndb_constrbuf_len
,
sizeof
(
opt_ndb_constrbuf
)
-
opt_ndb_constrbuf_len
,
"%s%s%s"
,
opt_ndb_constrbuf_len
>
0
?
","
:
""
,
tmp
,
argument
);
optid
==
OPT_NDB_NODEID
?
"nodeid="
:
""
,
argument
);
opt_ndb_constrbuf_len
+=
len
;
}
/* fall through to add the connectstring to the end
...
...
@@ -6543,6 +6541,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
sizeof
(
opt_ndb_constrbuf
)
-
opt_ndb_constrbuf_len
,
"%s%s"
,
opt_ndb_constrbuf_len
>
0
?
","
:
""
,
opt_ndb_connectstring
);
else
opt_ndb_constrbuf
[
opt_ndb_constrbuf_len
]
=
0
;
opt_ndbcluster_connectstring
=
opt_ndb_constrbuf
;
break
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment