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
6ceb4025
Commit
6ceb4025
authored
Feb 21, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected error in ndb programs debug switch
parent
b8d46972
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
79 additions
and
121 deletions
+79
-121
ndb/include/util/ndb_opts.h
ndb/include/util/ndb_opts.h
+16
-5
ndb/src/kernel/vm/Configuration.cpp
ndb/src/kernel/vm/Configuration.cpp
+5
-8
ndb/src/mgmclient/main.cpp
ndb/src/mgmclient/main.cpp
+5
-8
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+5
-9
ndb/test/ndbapi/testBitfield.cpp
ndb/test/ndbapi/testBitfield.cpp
+3
-22
ndb/tools/delete_all.cpp
ndb/tools/delete_all.cpp
+5
-8
ndb/tools/desc.cpp
ndb/tools/desc.cpp
+5
-8
ndb/tools/drop_index.cpp
ndb/tools/drop_index.cpp
+5
-8
ndb/tools/drop_tab.cpp
ndb/tools/drop_tab.cpp
+5
-8
ndb/tools/listTables.cpp
ndb/tools/listTables.cpp
+5
-8
ndb/tools/restore/restore_main.cpp
ndb/tools/restore/restore_main.cpp
+4
-2
ndb/tools/select_all.cpp
ndb/tools/select_all.cpp
+5
-8
ndb/tools/select_count.cpp
ndb/tools/select_count.cpp
+5
-8
ndb/tools/waiter.cpp
ndb/tools/waiter.cpp
+5
-10
sql/mysqld.cc
sql/mysqld.cc
+1
-1
No files found.
ndb/include/util/ndb_opts.h
View file @
6ceb4025
...
...
@@ -33,7 +33,11 @@ const char *opt_ndb_connectstring= 0;
const
char
*
opt_connect_str
=
0
;
const
char
*
opt_ndb_mgmd
=
0
;
char
opt_ndb_constrbuf
[
1024
];
unsigned
opt_ndb_constrbuf_len
;
unsigned
opt_ndb_constrbuf_len
=
0
;
#ifndef DBUG_OFF
const
char
*
opt_debug
=
0
;
#endif
#define OPT_NDB_CONNECTSTRING 'c'
...
...
@@ -75,7 +79,8 @@ unsigned opt_ndb_constrbuf_len;
#ifndef DBUG_OFF
#define NDB_STD_OPTS(prog_name) \
{ "debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", \
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 }, \
(gptr*) &opt_debug, (gptr*) &opt_debug, \
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 }, \
NDB_STD_OPTS_COMMON
#else
#define NDB_STD_OPTS(prog_name) NDB_STD_OPTS_COMMON
...
...
@@ -101,15 +106,21 @@ enum ndb_std_options {
static
my_bool
ndb_std_get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
c
onst
c
har
*
argument
)
char
*
argument
)
{
switch
(
optid
)
{
#ifndef DBUG_OFF
case
'#'
:
if
(
argument
)
if
(
opt_debug
)
{
DBUG_PUSH
(
argument
);
DBUG_PUSH
(
opt_debug
);
}
else
{
DBUG_PUSH
(
"d:t"
);
}
break
;
#endif
case
'V'
:
ndb_std_print_version
();
exit
(
0
);
...
...
ndb/src/kernel/vm/Configuration.cpp
View file @
6ceb4025
...
...
@@ -88,13 +88,6 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndbd.trace"
);
}
bool
Configuration
::
init
(
int
argc
,
char
**
argv
)
...
...
@@ -103,7 +96,11 @@ Configuration::init(int argc, char** argv)
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndbd.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
exit
(
ho_error
);
if
(
_no_daemon
)
{
...
...
ndb/src/mgmclient/main.cpp
View file @
6ceb4025
...
...
@@ -87,13 +87,6 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_mgm.trace"
);
}
static
int
read_and_execute
(
int
_try_reconnect
)
...
...
@@ -136,7 +129,11 @@ int main(int argc, char** argv){
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_mgm.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
exit
(
ho_error
);
char
buf
[
MAXHOSTNAMELEN
+
10
];
...
...
ndb/src/mgmsrv/main.cpp
View file @
6ceb4025
...
...
@@ -175,14 +175,6 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_mgmd.trace"
);
return
0
;
}
/*
* MAIN
...
...
@@ -206,7 +198,11 @@ int main(int argc, char** argv)
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_mgmd.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
exit
(
ho_error
);
if
(
glob
.
interactive
||
...
...
ndb/test/ndbapi/testBitfield.cpp
View file @
6ceb4025
...
...
@@ -8,35 +8,16 @@
static
const
char
*
_dbname
=
"TEST_DB"
;
static
int
g_loops
=
7
;
static
void
print_version
()
{
printf
(
"MySQL distrib %s, for %s (%s)
\n
"
,
MYSQL_SERVER_VERSION
,
SYSTEM_TYPE
,
MACHINE_TYPE
);
}
static
void
usage
()
{
char
desc
[]
=
"tabname
\n
"
\
"This program list all properties of table(s) in NDB Cluster.
\n
"
\
" ex: desc T1 T2 T4
\n
"
;
print_version
();
ndb_std_print_version
();
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
switch
(
optid
)
{
case
'#'
:
DBUG_PUSH
(
argument
?
argument
:
"d:t:O,/tmp/ndb_desc.trace"
);
break
;
case
'V'
:
print_version
();
exit
(
0
);
case
'?'
:
usage
();
exit
(
0
);
}
return
0
;
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/testBitfield.trace"
);
}
static
const
NdbDictionary
::
Table
*
create_random_table
(
Ndb
*
);
...
...
ndb/tools/delete_all.cpp
View file @
6ceb4025
...
...
@@ -44,20 +44,17 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_delete_all.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_delete_all.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
Ndb_cluster_connection
con
(
opt_connect_str
);
...
...
ndb/tools/desc.cpp
View file @
6ceb4025
...
...
@@ -44,20 +44,17 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_desc.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_desc.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
Ndb_cluster_connection
con
(
opt_connect_str
);
...
...
ndb/tools/drop_index.cpp
View file @
6ceb4025
...
...
@@ -41,20 +41,17 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_drop_index.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
"d:t:O,/tmp/ndb_drop_index.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
if
(
argc
<
1
)
{
usage
();
...
...
ndb/tools/drop_tab.cpp
View file @
6ceb4025
...
...
@@ -41,20 +41,17 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_drop_table.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
"d:t:O,/tmp/ndb_drop_table.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
if
(
argc
<
1
)
{
usage
();
...
...
ndb/tools/listTables.cpp
View file @
6ceb4025
...
...
@@ -196,13 +196,6 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_show_tables.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
...
...
@@ -210,7 +203,11 @@ int main(int argc, char** argv){
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_show_tables.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
_tabname
=
argv
[
0
];
...
...
ndb/tools/restore/restore_main.cpp
View file @
6ceb4025
...
...
@@ -109,8 +109,10 @@ static my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_restore.trace"
);
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_restore.trace"
;
#endif
ndb_std_get_one_option
(
optid
,
opt
,
argument
);
switch
(
optid
)
{
case
'n'
:
if
(
ga_nodeId
==
0
)
...
...
ndb/tools/select_all.cpp
View file @
6ceb4025
...
...
@@ -85,13 +85,6 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_select_all.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
...
...
@@ -99,7 +92,11 @@ int main(int argc, char** argv){
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
const
char
*
_tabname
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_select_all.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
if
((
_tabname
=
argv
[
0
])
==
0
)
{
usage
();
...
...
ndb/tools/select_count.cpp
View file @
6ceb4025
...
...
@@ -60,20 +60,17 @@ static void usage()
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_select_count.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_select_count.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
if
(
argc
<
1
)
{
usage
();
...
...
ndb/tools/waiter.cpp
View file @
6ceb4025
...
...
@@ -60,24 +60,19 @@ static void usage()
my_print_variables
(
my_long_options
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
__attribute__
((
unused
)),
char
*
argument
)
{
return
ndb_std_get_one_option
(
optid
,
opt
,
argument
?
argument
:
"d:t:O,/tmp/ndb_drop_table.trace"
);
}
int
main
(
int
argc
,
char
**
argv
){
NDB_INIT
(
argv
[
0
]);
const
char
*
load_default_groups
[]
=
{
"mysql_cluster"
,
0
};
load_defaults
(
"my"
,
load_default_groups
,
&
argc
,
&
argv
);
const
char
*
_hostName
=
NULL
;
int
ho_error
;
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
#ifndef DBUG_OFF
opt_debug
=
"d:t:O,/tmp/ndb_waiter.trace"
;
#endif
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
ndb_std_get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
char
buf
[
255
];
_hostName
=
argv
[
0
];
if
(
_hostName
==
0
)
...
...
sql/mysqld.cc
View file @
6ceb4025
...
...
@@ -298,7 +298,7 @@ my_bool opt_console= 0, opt_bdb, opt_innodb, opt_isam, opt_ndbcluster;
const
char
*
opt_ndbcluster_connectstring
=
0
;
const
char
*
opt_ndb_connectstring
=
0
;
char
opt_ndb_constrbuf
[
1024
];
unsigned
opt_ndb_constrbuf_len
;
unsigned
opt_ndb_constrbuf_len
=
0
;
my_bool
opt_ndb_shm
,
opt_ndb_optimized_node_selection
;
ulong
opt_ndb_cache_check_time
;
const
char
*
opt_ndb_mgmd
;
...
...
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