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
f8fb8bc1
Commit
f8fb8bc1
authored
Jun 15, 2004
by
tomas@mc05.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adden ndb faster start to mysql-test-run
parent
8278d716
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
10 deletions
+43
-10
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+1
-1
mysql-test/ndb/ndb_config_2_node.ini
mysql-test/ndb/ndb_config_2_node.ini
+4
-3
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+38
-6
No files found.
mysql-test/mysql-test-run.sh
View file @
f8fb8bc1
...
...
@@ -1439,7 +1439,7 @@ then
if
[
-z
"
$USE_RUNNING_NDBCLUSTER
"
]
then
echo
"Starting ndbcluster"
./ndb/ndbcluster
--initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
./ndb/ndbcluster
--
small
--discless
--
initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
export
NDB_CONNECTSTRING
=
`
cat
Ndb.cfg
`
else
export
NDB_CONNECTSTRING
=
"
$USE_RUNNING_NDBCLUSTER
"
...
...
mysql-test/ndb/ndb_config_2_node.ini
View file @
f8fb8bc1
[DB DEFAULT]
#NoOfFragmentLogfiles: 1
#TimeBetweenLocalCheckpoints: 31
NoOfReplicas:
2
MaxNoOfConcurrentOperations:
100000
MaxNoOfConcurrentOperations:
CHOOSE_MaxNoOfConcurrentOperations
DataMemory:
CHOOSE_DataMemory
IndexMemory:
CHOOSE_IndexMemory
Discless:
CHOOSE_Discless
[COMPUTER]
Id:
1
...
...
mysql-test/ndb/ndbcluster.sh
View file @
f8fb8bc1
...
...
@@ -41,6 +41,12 @@ pidfile=ndbcluster.pid
cfgfile
=
Ndb.cfg
stop_ndb
=
initial_ndb
=
status_ndb
=
ndb_discless
=
0
ndb_con_op
=
100000
ndb_dmem
=
80M
ndb_imem
=
24M
while
test
$#
-gt
0
;
do
case
"
$1
"
in
...
...
@@ -51,6 +57,17 @@ while test $# -gt 0; do
flags_ndb
=
$flags_ndb
" -i"
initial_ndb
=
1
;;
--status
)
status_ndb
=
1
;;
--small
)
ndb_con_op
=
10000
ndb_dmem
=
40M
ndb_imem
=
12M
;;
--discless
)
ndb_discless
=
1
;;
--data-dir
=
*
)
fsdir
=
`
echo
"
$1
"
|
sed
-e
"s;--data-dir=;;"
`
;;
...
...
@@ -121,6 +138,10 @@ NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID
if
[
$initial_ndb
]
;
then
sed
\
-e
s,
"CHOOSE_MaxNoOfConcurrentOperations"
,
$ndb_con_op
,g
\
-e
s,
"CHOOSE_DataMemory"
,
$ndb_dmem
,g
\
-e
s,
"CHOOSE_IndexMemory"
,
$ndb_imem
,g
\
-e
s,
"CHOOSE_Discless"
,
$ndb_discless
,g
\
-e
s,
"CHOOSE_HOSTNAME_"
.
*
,
"
$ndb_host
"
,g
\
-e
s,
"CHOOSE_FILESYSTEM_NODE_2"
,
"
$fs_name_2
"
,g
\
-e
s,
"CHOOSE_FILESYSTEM_NODE_3"
,
"
$fs_name_3
"
,g
\
...
...
@@ -140,6 +161,7 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
NDB_ID
=
"2"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
echo
"Starting ndbd connectstring=
\"
"
$NDB_CONNECTSTRING
\"
(
cd
$fs_ndb_2
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
...
...
@@ -148,17 +170,14 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
NDB_ID
=
"3"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
echo
"Starting ndbd connectstring=
\"
"
$NDB_CONNECTSTRING
\"
(
cd
$fs_ndb_3
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
# Start management client
sleep
10
echo
"show"
|
$exec_mgmtclient
$ndb_host
$ndb_port
# test if Ndb Cluster starts properly
echo
"Waiting for started..."
NDB_ID
=
"11"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
if
(
$exec_waiter
)
|
grep
"NDBT_ProgramExit: 0 - OK"
;
then
:
;
else
...
...
@@ -169,6 +188,14 @@ fi
echo
$NDB_CONNECTSTRING
>
$cfgfile
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
status_ndbcluster
}
status_ndbcluster
()
{
# Start management client
echo
"show"
|
$exec_mgmtclient
$ndb_host
$ndb_port
}
stop_default_ndbcluster
()
{
...
...
@@ -195,12 +222,17 @@ echo "all stop" | $exec_mgmtclient
sleep
5
if
[
-f
$pidfile
]
;
then
kill
`
cat
$pidfile
`
kill
`
cat
$pidfile
`
2> /dev/null
rm
$pidfile
fi
}
if
[
$status_ndb
]
;
then
status_ndbcluster
exit
0
fi
if
[
$stop_ndb
]
;
then
stop_default_ndbcluster
else
...
...
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