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
707def6f
Commit
707def6f
authored
Sep 07, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better fix for bug#5001
parent
001dfd3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
23 deletions
+14
-23
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+14
-23
No files found.
scripts/mysqld_safe.sh
View file @
707def6f
...
...
@@ -322,36 +322,26 @@ do
# but should work for the rest of the servers.
# The only thing is ps x => redhat 5 gives warnings when using ps -x.
# kill -9 is used or the process won't react on the kill.
if
test
-n
"
$mysql_tcp_port
"
then
numofproces
=
`
ps xa |
grep
-v
"grep"
|
grep
$ledir
/
$MYSQLD
|
grep
-c
"port=
$mysql_tcp_port
"
`
else
numofproces
=
`
ps xa |
grep
-v
"grep"
|
grep
-c
$ledir
/
$MYSQLD
`
fi
numofproces
=
`
ps xa |
grep
-v
"grep"
|
grep
"
$ledir
/
$MYSQLD
\>
"
|
grep
-c
"pid-file=
$pid_file
"
`
echo
-e
"
\n
Number of processes running now:
$numofproces
"
|
tee
-a
$err_log
I
=
1
while
test
"
$I
"
-le
"
$numofproces
"
do
if
test
-n
"
$mysql_tcp_port
"
PROC
=
`
ps xa |
grep
"
$ledir
/
$MYSQLD
\>
"
|
grep
-v
"grep"
|
grep
"pid-file=
$pid_file
"
|
sed
-n
'$p'
`
for
T
in
$PROC
do
break
done
# echo "TEST $I - $T **"
if
kill
-9
$T
then
PROC
=
`
ps xa |
grep
"
$ledir
/
$MYSQLD
\>
"
|
grep
-v
"grep"
|
grep
"port=
$mysql_tcp_port
"
|
sed
-n
'$p'
`
else
PROC
=
`
ps xa |
grep
"
$ledir
/
$MYSQLD
\>
"
|
grep
-v
"grep"
|
sed
-n
'$p'
`
echo
"
$MYSQLD
process hanging, pid
$T
- killed"
|
tee
-a
$err_log
else
break
fi
for
T
in
$PROC
do
break
done
# echo "TEST $I - $T **"
if
kill
-9
$T
then
echo
"
$MYSQLD
process hanging, pid
$T
- killed"
|
tee
-a
$err_log
else
break
fi
I
=
`
expr
$I
+ 1
`
I
=
`
expr
$I
+ 1
`
done
fi
echo
"
`
date
+
'%y%m%d %H:%M:%S'
`
mysqld restarted"
|
tee
-a
$err_log
...
...
@@ -359,3 +349,4 @@ done
echo
"
`
date
+
'%y%m%d %H:%M:%S'
`
mysqld ended"
|
tee
-a
$err_log
echo
""
|
tee
-a
$err_log
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