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
d0bb7cc1
Commit
d0bb7cc1
authored
Nov 04, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
parents
7d204799
b8e9a612
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
8 deletions
+58
-8
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+57
-7
ndb/test/run-test/main.cpp
ndb/test/run-test/main.cpp
+1
-1
No files found.
mysql-test/ndb/ndbcluster.sh
View file @
d0bb7cc1
...
...
@@ -102,12 +102,43 @@ if [ ! -x "$exec_mgmtsrvr" ]; then
echo
"
$exec_mgmtsrvr
missing"
exit
1
fi
if
[
!
-x
"
$exec_waiter
"
]
;
then
echo
"
$exec_waiter
missing"
exit
1
fi
exec_mgmtclient
=
"
$exec_mgmtclient
--no-defaults"
exec_mgmtsrvr
=
"
$exec_mgmtsrvr
--no-defaults"
exec_ndb
=
"
$exec_ndb
--no-defaults"
exec_waiter
=
"
$exec_waiter
--no-defaults"
ndb_host
=
"localhost"
ndb_mgmd_port
=
$port_base
NDB_CONNECTSTRING
=
"host=
$ndb_host
:
$ndb_mgmd_port
"
export
NDB_CONNECTSTRING
sleep_until_file_created
()
{
file
=
$1
loop
=
$2
org_time
=
$2
message
=
$3
while
(
test
$loop
-gt
0
)
do
if
[
-r
$file
]
then
return
0
fi
sleep
1
loop
=
`
expr
$loop
- 1
`
done
if
[
$message
]
then
echo
$message
fi
echo
"ERROR:
$file
was not created in
$org_time
seconds; Aborting"
return
1
;
}
start_default_ndbcluster
()
{
# do some checks
...
...
@@ -127,8 +158,8 @@ port_transporter=`expr $ndb_mgmd_port + 2`
# Start management server as deamon
# Edit file system path and ports in config file
if
[
$initial_ndb
]
;
then
rm
-f
$fs_ndb
/ndb_
*
sed
\
-e
s,
"CHOOSE_MaxNoOfOrderedIndexes"
,
"
$ndb_no_ord
"
,g
\
-e
s,
"CHOOSE_MaxNoOfConcurrentOperations"
,
"
$ndb_con_op
"
,g
\
...
...
@@ -150,21 +181,32 @@ if ( cd "$fs_ndb" ; $exec_mgmtsrvr -f config.ini ) ; then :; else
echo
"Unable to start
$exec_mgmtsrvr
from
`
pwd
`
"
exit
1
fi
if
sleep_until_file_created
$fs_ndb
/ndb_3.pid 30
then
:
;
else
exit
1
fi
cat
`
find
"
$fs_ndb
"
-name
'ndb_*.pid'
`
>
"
$fs_ndb
/
$pidfile
"
# Start database node
echo
"Starting ndbd"
(
cd
"
$fs_ndb
"
;
$exec_ndb
$flags_ndb
&
)
if
sleep_until_file_created
$fs_ndb
/ndb_1.pid 30
then
:
;
else
stop_default_ndbcluster
exit
1
fi
cat
`
find
"
$fs_ndb
"
-name
'ndb_*.pid'
`
>
"
$fs_ndb
/
$pidfile
"
# Start database node
echo
"Starting ndbd"
(
cd
"
$fs_ndb
"
;
$exec_ndb
$flags_ndb
&
)
if
sleep_until_file_created
$fs_ndb
/ndb_2.pid 30
then
:
;
else
stop_default_ndbcluster
exit
1
fi
cat
`
find
"
$fs_ndb
"
-name
'ndb_*.pid'
`
>
"
$fs_ndb
/
$pidfile
"
# test if Ndb Cluster starts properly
...
...
@@ -172,6 +214,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile"
echo
"Waiting for started..."
if
(
$exec_waiter
)
|
grep
"NDBT_ProgramExit: 0 - OK"
;
then
:
;
else
echo
"Ndbcluster startup failed"
stop_default_ndbcluster
exit
1
fi
...
...
@@ -198,10 +241,12 @@ if [ -f "$fs_ndb/$pidfile" ] ; then
attempt
=
0
while
[
$attempt
-lt
10
]
;
do
new_kill_pid
=
""
kill_pids2
=
""
for
p
in
$kill_pids
;
do
kill
-0
$p
2> /dev/null
if
[
$?
-eq
0
]
;
then
new_kill_pid
=
"
$p
$new_kill_pid
"
kill_pids2
=
"-
$p
$kill_pids2
"
fi
done
kill_pids
=
$new_kill_pid
...
...
@@ -211,9 +256,14 @@ if [ -f "$fs_ndb/$pidfile" ] ; then
sleep
1
attempt
=
`
expr
$attempt
+ 1
`
done
if
[
"
$kill_pids
"
!=
""
]
;
then
echo
"Failed to shutdown ndbcluster, executing kill "
$kill_pids
kill
$kill_pids
if
[
"
$kill_pids2
"
!=
""
]
;
then
echo
"Failed to shutdown ndbcluster, executing kill "
$kill_pids2
kill
-9
--
$kill_pids2
2> /dev/null
/bin/kill
-9
--
$kill_pids2
2> /dev/null
/usr/bin/kill
-9
--
$kill_pids2
2> /dev/null
kill
-9
$kill_pids2
2> /dev/null
/bin/kill
-9
$kill_pids2
2> /dev/null
/usr/bin/kill
-9
$kill_pids2
2> /dev/null
fi
rm
"
$fs_ndb
/
$pidfile
"
fi
...
...
ndb/test/run-test/main.cpp
View file @
d0bb7cc1
...
...
@@ -459,7 +459,7 @@ setup_config(atrt_config& config){
proc
.
m_type
=
atrt_process
::
NDB_MGM
;
proc
.
m_proc
.
m_name
.
assfmt
(
"%d-%s"
,
index
,
"ndb_mgmd"
);
proc
.
m_proc
.
m_path
.
assign
(
dir
).
append
(
"/libexec/ndb_mgmd"
);
proc
.
m_proc
.
m_args
=
"--nodaemon -
c initconfig.txt
"
;
proc
.
m_proc
.
m_args
=
"--nodaemon -
f config.ini
"
;
proc
.
m_proc
.
m_cwd
.
appfmt
(
"%d.ndb_mgmd"
,
index
);
connect_string
.
appfmt
(
"host=%s:%d;"
,
proc
.
m_hostname
.
c_str
(),
proc
.
m_ndb_mgm_port
);
...
...
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