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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4de2f33d
Commit
4de2f33d
authored
Jun 10, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
b6fba9b4
decf8ed0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
31 deletions
+29
-31
ndb/src/cw/cpcd/main.cpp
ndb/src/cw/cpcd/main.cpp
+3
-6
ndb/test/run-test/make-config.sh
ndb/test/run-test/make-config.sh
+17
-17
ndb/test/run-test/ndb-autotest.sh
ndb/test/run-test/ndb-autotest.sh
+9
-8
No files found.
ndb/src/cw/cpcd/main.cpp
View file @
4de2f33d
...
...
@@ -32,10 +32,9 @@
#include "common.hpp"
static
const
char
*
work_dir
=
CPCD_DEFAULT_WORK_DIR
;
static
short
unsigned
int
port
;
static
int
unsigned
port
;
static
int
use_syslog
;
static
const
char
*
logfile
=
NULL
;
static
const
char
*
config_file
=
CPCD_DEFAULT_CONFIG_FILE
;
static
const
char
*
user
=
0
;
static
struct
my_option
my_long_options
[]
=
...
...
@@ -55,9 +54,6 @@ static struct my_option my_long_options[] =
{
"debug"
,
'D'
,
"Enable debug mode"
,
(
gptr
*
)
&
debug
,
(
gptr
*
)
&
debug
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"config"
,
'c'
,
"Config file"
,
(
gptr
*
)
&
config_file
,
(
gptr
*
)
&
config_file
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"user"
,
'u'
,
"Run as user"
,
(
gptr
*
)
&
user
,
(
gptr
*
)
&
user
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
@@ -142,7 +138,8 @@ int main(int argc, char** argv){
SocketServer
*
ss
=
new
SocketServer
();
CPCDAPIService
*
serv
=
new
CPCDAPIService
(
cpcd
);
if
(
!
ss
->
setup
(
serv
,
&
port
)){
unsigned
short
real_port
=
port
;
// correct type
if
(
!
ss
->
setup
(
serv
,
&
real_port
)){
logger
.
critical
(
"Cannot setup server: %s"
,
strerror
(
errno
));
sleep
(
1
);
delete
ss
;
...
...
ndb/test/run-test/make-config.sh
View file @
4de2f33d
...
...
@@ -20,40 +20,40 @@ add_procs(){
}
add_proc
(){
dir
=
""
conf
=
""
case
$type
in
mgm
)
dir
=
"ndb_mgmd"
conf
=
"[ndb_mgmd]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"
$proc_no
.ndb_mgmd"
>>
$dir_file
echo
"[ndb_mgmd]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
;;
api
)
dir
=
"ndb_api"
conf
=
"[api]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"
$proc_no
.ndb_api"
>>
$dir_file
echo
"[api]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
;;
ndb
)
dir
=
"ndbd"
conf
=
"[ndbd]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"
$proc_no
.ndbd"
>>
$dir_file
echo
"[ndbd]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
;;
mysqld
)
dir
=
"mysqld"
conf
=
"[mysqld]
\n
Id:
$node_id
\n
HostName:
$2
\n
"
echo
"
$proc_no
.mysqld"
>>
$dir_file
echo
"[ndb_mgmd]"
>>
$config_file
echo
"Id:
$node_id
"
>>
$config_file
echo
"HostName:
$2
"
>>
$config_file
node_id
=
`
expr
$node_id
+ 1
`
;;
mysql
)
dir
=
"mysql"
echo
"
$proc_no
.mysql"
>>
$dir_file
;;
esac
dir
=
"
$proc_no
.
$dir
"
proc_no
=
`
expr
$proc_no
+ 1
`
echo
-e
$dir
>>
$dir_file
if
[
"
$conf
"
]
then
echo
-e
$conf
>>
$config_file
fi
}
...
...
ndb/test/run-test/ndb-autotest.sh
View file @
4de2f33d
...
...
@@ -66,7 +66,7 @@ done
if
[
-f
$conf
]
then
.
$conf
.
./
$conf
else
echo
"Can't find config file:
$conf
"
exit
...
...
@@ -131,8 +131,10 @@ echo "$DATE $RUN" > $LOCK
# trap them, and remove the #
# Lock file before exit #
#############################
trap
"rm -f
$LOCK
"
ERR
if
[
`
uname
-s
`
!=
"SunOS"
]
then
trap
"rm -f
$LOCK
"
ERR
fi
# You can add more to this path#
################################
...
...
@@ -191,7 +193,7 @@ then
else
echo
$VERSION
>
/tmp/version.
$$
fi
match
=
`
grep
-c
"
$VERSION
"
/tmp/version.
$$
`
match
=
`
grep
-c
"
$VERSION
"
/tmp/version.
$$
| xargs
echo
`
rm
-f
/tmp/version.
$$
if
[
$match
-eq
0
]
then
...
...
@@ -229,7 +231,7 @@ filter(){
shift
while
[
$#
-gt
0
]
do
if
[
`
grep
-c
$1
$neg
`
-eq
0
]
;
then
echo
$1
;
fi
if
[
`
grep
-c
$1
$neg
| xargs
echo
`
-eq
0
]
;
then
echo
$1
;
fi
shift
done
}
...
...
@@ -294,13 +296,12 @@ choose_conf(){
if
[
-f
$test_dir
/conf-
$1
-
$HOST
.txt
]
then
echo
"
$test_dir
/conf-
$1
-
$HOST
.txt"
echo
"
$test_dir
/conf-
$1
-
$host
.txt"
elif
[
-f
$test_dir
/conf-
$1
.txt
]
then
echo
"
$test_dir
/conf-
$1
.txt"
else
echo
"Unable to find conf file looked for"
1>&2
echo
"
$testdir
/conf-
$1
-
host
.txt and"
1>&2
echo
"
$testdir
/conf-
$1
-
$HOST
.txt and"
1>&2
echo
"
$testdir
/conf-
$1
.txt"
1>&2
exit
fi
...
...
@@ -343,7 +344,7 @@ start(){
count_hosts
(){
cnt
=
`
grep
"CHOOSE_host"
$1
|
awk
'{for(i=1; i<=NF;i++) \
if(
match
($i, "CHOOSE_host") > 0) print $i;}'
|
sort
|
uniq
|
wc
-l
`
if(
index
($i, "CHOOSE_host") > 0) print $i;}'
|
sort
|
uniq
|
wc
-l
`
echo
$cnt
}
#######################################################
...
...
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