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
d58d6e2b
Commit
d58d6e2b
authored
Jun 02, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
collapsed ndb start/stop scripts in mysql-test-run + ndb bin name changes
parent
2f714683
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
121 deletions
+83
-121
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+3
-3
mysql-test/ndb/Makefile.am
mysql-test/ndb/Makefile.am
+2
-6
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+54
-14
mysql-test/ndb/stop_ndbcluster.sh
mysql-test/ndb/stop_ndbcluster.sh
+0
-82
ndb/src/kernel/Makefile.am
ndb/src/kernel/Makefile.am
+2
-2
ndb/src/kernel/blocks/backup/restore/Makefile.am
ndb/src/kernel/blocks/backup/restore/Makefile.am
+2
-2
ndb/src/mgmclient/Makefile.am
ndb/src/mgmclient/Makefile.am
+2
-2
ndb/src/mgmsrv/Makefile.am
ndb/src/mgmsrv/Makefile.am
+2
-2
ndb/tools/Makefile.am
ndb/tools/Makefile.am
+16
-8
No files found.
mysql-test/mysql-test-run.sh
View file @
d58d6e2b
...
...
@@ -1417,7 +1417,7 @@ then
if
[
-z
"
$USE_RUNNING_NDBCLUSTER
"
]
then
# Kill any running ndbcluster stuff
./ndb/
stop_ndbcluster
./ndb/
ndbcluster
--stop
fi
fi
...
...
@@ -1438,7 +1438,7 @@ then
if
[
-z
"
$USE_RUNNING_NDBCLUSTER
"
]
then
echo
"Starting ndbcluster"
./ndb/
install_
ndbcluster
--initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
./ndb/ndbcluster
--initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
export
NDB_CONNECTSTRING
=
`
cat
Ndb.cfg
`
else
export
NDB_CONNECTSTRING
=
"
$USE_RUNNING_NDBCLUSTER
"
...
...
@@ -1538,7 +1538,7 @@ then
if
[
-z
"
$USE_RUNNING_NDBCLUSTER
"
]
then
# Kill any running ndbcluster stuff
./ndb/
stop_ndbcluster
./ndb/
ndbcluster
--stop
fi
fi
...
...
mysql-test/ndb/Makefile.am
View file @
d58d6e2b
...
...
@@ -2,13 +2,9 @@
benchdir_root
=
$(prefix)
testdir
=
$(benchdir_root)
/mysql-test/ndb
test_SCRIPTS
=
\
install_ndbcluster
\
stop_ndbcluster
test_SCRIPTS
=
ndbcluster
EXTRA_SCRIPTS
=
\
install_ndbcluster.sh
\
stop_ndbcluster.sh
EXTRA_SCRIPTS
=
ndbcluster.sh
test_DATA
=
ndb_config_2_node.ini
...
...
mysql-test/ndb/
install_
ndbcluster.sh
→
mysql-test/ndb/ndbcluster.sh
View file @
d58d6e2b
...
...
@@ -19,28 +19,34 @@ cd $CWD
if
[
-d
../sql
]
;
then
SOURCE_DIST
=
1
ndbtop
=
$BASEDIR
/ndb
exec_ndb
=
$ndbtop
/src/kernel/ndb-main/ndb
exec_mgmtsrvr
=
$ndbtop
/src/mgmsrv/
mgmtsrvr
exec_ndb
=
$ndbtop
/src/kernel/ndb-main/ndb
d
exec_mgmtsrvr
=
$ndbtop
/src/mgmsrv/
ndb_mgmd
exec_waiter
=
$ndbtop
/tools/ndb_waiter
exec_mgmtclient
=
$ndbtop
/src/mgmclient/
mgmt
client
exec_mgmtclient
=
$ndbtop
/src/mgmclient/
ndb_mgm
client
else
BINARY_DIST
=
1
if
test
-x
"
$BASEDIR
/libexec/ndb"
if
test
-x
"
$BASEDIR
/libexec/ndb
d
"
then
exec_ndb
=
$BASEDIR
/libexec/ndb
exec_mgmtsrvr
=
$BASEDIR
/libexec/
mgmtsrvr
exec_ndb
=
$BASEDIR
/libexec/ndb
d
exec_mgmtsrvr
=
$BASEDIR
/libexec/
ndb_mgmd
else
exec_ndb
=
$BASEDIR
/bin/ndb
exec_mgmtsrvr
=
$BASEDIR
/bin/
mgmtsrvr
exec_ndb
=
$BASEDIR
/bin/ndb
d
exec_mgmtsrvr
=
$BASEDIR
/bin/
ndb_mgmd
fi
exec_waiter
=
$BASEDIR
/bin/ndb_waiter
exec_mgmtclient
=
$BASEDIR
/bin/
mgmt
client
exec_mgmtclient
=
$BASEDIR
/bin/
ndb_mgm
client
fi
pidfile
=
ndbcluster.pid
cfgfile
=
Ndb.cfg
stop_ndb
=
initial_ndb
=
while
test
$#
-gt
0
;
do
case
"
$1
"
in
--stop
)
stop_ndb
=
1
;;
--initial
)
flags_ndb
=
$flags_ndb
" -i"
initial_ndb
=
1
...
...
@@ -123,7 +129,7 @@ sed \
>
"
$fs_mgm_1
/config.ini"
fi
if
(
cd
$fs_mgm_1
;
echo
$NDB_CONNECTSTRING
>
Ndb.cfg
;
$exec_mgmtsrvr
-d
-c
config.ini
)
;
then
:
;
else
if
(
cd
$fs_mgm_1
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_mgmtsrvr
-d
-c
config.ini
)
;
then
:
;
else
echo
"Unable to start
$exec_mgmtsrvr
from
`
pwd
`
"
exit
1
fi
...
...
@@ -134,7 +140,7 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
NDB_ID
=
"2"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
(
cd
$fs_ndb_2
;
echo
$NDB_CONNECTSTRING
>
Ndb.cfg
;
$exec_ndb
-d
$flags_ndb
&
)
(
cd
$fs_ndb_2
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
...
...
@@ -142,7 +148,7 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
NDB_ID
=
"3"
NDB_CONNECTSTRING
=
$NDB_CONNECTSTRING_BASE$NDB_ID
(
cd
$fs_ndb_3
;
echo
$NDB_CONNECTSTRING
>
Ndb.cfg
;
$exec_ndb
-d
$flags_ndb
&
)
(
cd
$fs_ndb_3
;
echo
$NDB_CONNECTSTRING
>
$cfgfile
;
$exec_ndb
-d
$flags_ndb
&
)
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
...
...
@@ -160,11 +166,45 @@ if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else
exit
1
fi
echo
$NDB_CONNECTSTRING
>
Ndb.cfg
echo
$NDB_CONNECTSTRING
>
$cfgfile
cat
`
find
$fs_ndb
-name
'node*.pid'
`
>
$pidfile
}
start_default_ndbcluster
stop_default_ndbcluster
()
{
#if [ ! -f $pidfile ] ; then
# exit 0
#fi
if
[
!
-f
$cfgfile
]
;
then
echo
"
$cfgfile
missing"
exit
1
fi
ndb_host
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
\(
.*
\)\:
.*,
\1
,1"
`
ndb_port
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
$ndb_host
\:\(
[0-9]*
\)
.*,
\1
,1"
`
# Start management client
exec_mgmtclient
=
"
$exec_mgmtclient
--try-reconnect=1
$ndb_host
$ndb_port
"
echo
"
$exec_mgmtclient
"
echo
"all stop"
|
$exec_mgmtclient
sleep
5
if
[
-f
$pidfile
]
;
then
kill
`
cat
$pidfile
`
rm
$pidfile
fi
}
if
[
$stop_ndb
]
;
then
stop_default_ndbcluster
else
start_default_ndbcluster
fi
exit
0
mysql-test/ndb/stop_ndbcluster.sh
deleted
100755 → 0
View file @
2f714683
#!/bin/sh
# Copyright (C) 2004 MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file
# This scripts stops the table handler ndbcluster
#BASEDIR is always one above mysql-test directory
CWD
=
`
pwd
`
cd
..
BASEDIR
=
`
pwd
`
cd
$CWD
# Are we using a source or a binary distribution?
if
[
-d
../sql
]
;
then
SOURCE_DIST
=
1
ndbtop
=
$BASEDIR
/ndb
exec_ndb
=
$ndbtop
/src/kernel/ndb-main/ndb
exec_mgmtsrvr
=
$ndbtop
/src/mgmsrv/mgmtsrvr
exec_waiter
=
$ndbtop
/tools/ndb_waiter
exec_mgmtclient
=
$ndbtop
/src/mgmclient/mgmtclient
else
BINARY_DIST
=
1
if
test
-x
"
$BASEDIR
/libexec/ndb"
then
exec_ndb
=
$BASEDIR
/libexec/ndb
exec_mgmtsrvr
=
$BASEDIR
/libexec/mgmtsrvr
else
exec_ndb
=
$BASEDIR
/bin/ndb
exec_mgmtsrvr
=
$BASEDIR
/bin/mgmtsrvr
fi
exec_waiter
=
$BASEDIR
/bin/ndb_waiter
exec_mgmtclient
=
$BASEDIR
/bin/mgmtclient
fi
pidfile
=
ndbcluster.pid
cfgfile
=
Ndb.cfg
while
test
$#
-gt
0
;
do
case
"
$1
"
in
--port-base
=
*
)
port_base
=
`
echo
"
$1
"
|
sed
-e
"s;--port-base=;;"
`
;;
--
)
shift
;
break
;;
--
*
)
$ECHO
"Unrecognized option:
$1
"
;
exit
1
;;
*
)
break
;;
esac
shift
done
stop_default_ndbcluster
()
{
#if [ ! -f $pidfile ] ; then
# exit 0
#fi
if
[
!
-f
$cfgfile
]
;
then
echo
"
$cfgfile
missing"
exit
1
fi
ndb_host
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
\(
.*
\)\:
.*,
\1
,1"
`
ndb_port
=
`
cat
$cfgfile
|
sed
-e
"s,.*host=
$ndb_host
\:\(
[0-9]*
\)
.*,
\1
,1"
`
# Start management client
exec_mgmtclient
=
"
$exec_mgmtclient
--try-reconnect=1
$ndb_host
$ndb_port
"
echo
"
$exec_mgmtclient
"
echo
"all stop"
|
$exec_mgmtclient
sleep
5
if
[
-f
$pidfile
]
;
then
kill
`
cat
$pidfile
`
rm
$pidfile
fi
}
stop_default_ndbcluster
exit
0
ndb/src/kernel/Makefile.am
View file @
d58d6e2b
...
...
@@ -2,9 +2,9 @@ SUBDIRS = error blocks vm
include
$(top_srcdir)/ndb/config/common.mk.am
ndbbin_PROGRAMS
=
ndb
ndbbin_PROGRAMS
=
ndb
d
ndb_SOURCES
=
Main.cpp SimBlockList.cpp
ndb
d
_SOURCES
=
Main.cpp SimBlockList.cpp
include
$(top_srcdir)/ndb/config/type_kernel.mk.am
...
...
ndb/src/kernel/blocks/backup/restore/Makefile.am
View file @
d58d6e2b
ndbtools_PROGRAMS
=
restore
ndbtools_PROGRAMS
=
ndb_
restore
restore_SOURCES
=
main.cpp Restore.cpp
ndb_
restore_SOURCES
=
main.cpp Restore.cpp
LDADD_LOC
=
$(top_srcdir)
/ndb/src/libndbclient.la
...
...
ndb/src/mgmclient/Makefile.am
View file @
d58d6e2b
ndbtools_PROGRAMS
=
mgmtclient
ndbtools_PROGRAMS
=
ndb_mgm
mgmtclient
_SOURCES
=
\
ndb_mgm
_SOURCES
=
\
main.cpp
\
CommandInterpreter.cpp
\
CpcClient.cpp
...
...
ndb/src/mgmsrv/Makefile.am
View file @
d58d6e2b
ndbbin_PROGRAMS
=
mgmtsrvr
ndbbin_PROGRAMS
=
ndb_mgmd
mgmtsrvr
_SOURCES
=
\
ndb_mgmd
_SOURCES
=
\
MgmtSrvr.cpp
\
MgmtSrvrGeneralSignalHandling.cpp
\
main.cpp
\
...
...
ndb/tools/Makefile.am
View file @
d58d6e2b
ndbtools_PROGRAMS
=
ndb_waiter drop_tab delete_all desc drop_index list_tables select_all select_count
ndbtools_PROGRAMS
=
\
ndb_waiter
\
ndb_drop_table
\
ndb_delete_all
\
ndb_desc
\
ndb_drop_index
\
ndb_show_tables
\
ndb_select_all
\
ndb_select_count
ndb_waiter_SOURCES
=
waiter.cpp
delete_all_SOURCES
=
delete_all.cpp
desc_SOURCES
=
desc.cpp
drop_index_SOURCES
=
drop_index.cpp
drop_tab
_SOURCES
=
drop_tab.cpp
list
_tables_SOURCES
=
listTables.cpp
select_all_SOURCES
=
select_all.cpp
select_count_SOURCES
=
select_count.cpp
ndb_
delete_all_SOURCES
=
delete_all.cpp
ndb_
desc_SOURCES
=
desc.cpp
ndb_
drop_index_SOURCES
=
drop_index.cpp
ndb_drop_table
_SOURCES
=
drop_tab.cpp
ndb_show
_tables_SOURCES
=
listTables.cpp
ndb_
select_all_SOURCES
=
select_all.cpp
ndb_
select_count_SOURCES
=
select_count.cpp
include
$(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/type_ndbapitools.mk.am
...
...
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