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
a41f46f5
Commit
a41f46f5
authored
Mar 18, 2009
by
Chad MILLER
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for 39326 and bugteam tree.
parents
c7505147
3b32eea2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
15 deletions
+33
-15
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+33
-15
No files found.
scripts/mysqld_safe.sh
View file @
a41f46f5
...
...
@@ -18,7 +18,7 @@ niceness=0
logging
=
init
want_syslog
=
0
syslog_tag
=
user
=
@MYSQLD_USER@
user
=
'@MYSQLD_USER@'
pid_file
=
err_log
=
...
...
@@ -64,9 +64,10 @@ my_which ()
{
save_ifs
=
"
${
IFS
-UNSET
}
"
IFS
=
:
ret
=
0
for
file
do
for
dir
in
$PATH
for
dir
in
"
$PATH
"
do
if
[
-f
"
$dir
/
$file
"
]
then
...
...
@@ -74,15 +75,18 @@ my_which ()
continue
2
fi
done
return
1
# Failure, didn't find file in path
ret
=
1
#signal an error
break
done
if
[
"
$save_ifs
"
=
UNSET
]
then
unset
IFS
else
IFS
=
"
$save_ifs
"
fi
return
0
# Success
return
$ret
# Success
}
log_generic
()
{
...
...
@@ -212,19 +216,30 @@ fi
MY_PWD
=
`
pwd
`
# Check for the directories we would expect from a binary release install
if
test
-
f
"
$relpkgdata
"
/english/errmsg.sys
-a
-x
./bin/mysqld
if
test
-
n
"
$MY_BASEDIR_VERSION
"
-a
-d
"
$MY_BASEDIR_VERSION
"
then
MY_BASEDIR_VERSION
=
$MY_PWD
# Where bin, share and data are
ledir
=
$MY_BASEDIR_VERSION
/bin
# Where mysqld is
# BASEDIR is already overridden on command line. Do not re-set.
# Use BASEDIR to discover le.
if
test
-x
"
$MY_BASEDIR_VERSION
/libexec/mysqld"
then
ledir
=
"
$MY_BASEDIR_VERSION
/libexec"
else
ledir
=
"
$MY_BASEDIR_VERSION
/bin"
fi
elif
test
-f
"
$relpkgdata
"
/english/errmsg.sys
-a
-x
"
$MY_PWD
/bin/mysqld"
then
MY_BASEDIR_VERSION
=
"
$MY_PWD
"
# Where bin, share and data are
ledir
=
"
$MY_PWD
/bin"
# Where mysqld is
# Check for the directories we would expect from a source install
elif
test
-f
"
$relpkgdata
"
/english/errmsg.sys
-a
-x
./libexec/mysqld
elif
test
-f
"
$relpkgdata
"
/english/errmsg.sys
-a
-x
"
$MY_PWD
/libexec/mysqld"
then
MY_BASEDIR_VERSION
=
$MY_PWD
# Where libexec, share and var are
ledir
=
$MY_BASEDIR_VERSION
/libexec
# Where mysqld is
MY_BASEDIR_VERSION
=
"
$MY_PWD
"
# Where libexec, share and var are
ledir
=
"
$MY_PWD
/libexec"
# Where mysqld is
# Since we didn't find anything, used the compiled-in defaults
else
MY_BASEDIR_VERSION
=
@prefix@
ledir
=
@libexecdir@
MY_BASEDIR_VERSION
=
'@prefix@'
ledir
=
'@libexecdir@'
fi
...
...
@@ -274,7 +289,10 @@ export MYSQL_HOME
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
# and then merge with the command line arguments
if
test
-x
./bin/my_print_defaults
if
test
-x
"
$MY_BASEDIR_VERSION
/bin/my_print_defaults"
then
print_defaults
=
"
$MY_BASEDIR_VERSION
/bin/my_print_defaults"
elif
test
-x
./bin/my_print_defaults
then
print_defaults
=
"./bin/my_print_defaults"
elif
test
-x
@bindir@/my_print_defaults
...
...
@@ -399,7 +417,7 @@ then
MYSQLD
=
mysqld
fi
if
test
!
-x
$ledir
/
$MYSQLD
if
test
!
-x
"
$ledir
/
$MYSQLD
"
then
log_error
"The file
$ledir
/
$MYSQLD
does not exist or is not executable. Please cd to the mysql installation
...
...
@@ -411,7 +429,7 @@ fi
if
test
-z
"
$pid_file
"
then
pid_file
=
$DATADIR
/
`
@HOSTNAME@
`
.pid
pid_file
=
"
$DATADIR
/
`
@HOSTNAME@
`
.pid"
else
case
"
$pid_file
"
in
/
*
)
;;
...
...
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