summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make_binary_distribution.sh2
-rw-r--r--scripts/mysqlbug.sh8
-rw-r--r--scripts/mysqld_multi.sh18
-rw-r--r--scripts/mysqld_safe.sh1
-rw-r--r--scripts/mysqldumpslow.sh10
5 files changed, 34 insertions, 5 deletions
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 9469cca875d..90ce1c6269f 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -246,7 +246,7 @@ $CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
mysql-test/std_data/*.MYD mysql-test/std_data/*.MYI \
mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
- mysql-test/std_data/*.cnf \
+ mysql-test/std_data/*.cnf mysql-test/std_data/*.MY* \
$BASE/mysql-test/std_data
$CP mysql-test/t/*.test mysql-test/t/*.imtest \
mysql-test/t/*.disabled mysql-test/t/*.opt \
diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh
index 6aed140b79d..880ab248a90 100644
--- a/scripts/mysqlbug.sh
+++ b/scripts/mysqlbug.sh
@@ -132,7 +132,13 @@ if test -z "$VISUAL"
then
if test -z "$EDITOR"
then
- EDIT=emacs
+ # Honor debian sensible-editor
+ if test -x "/usr/bin/sensible-editor"
+ then
+ EDIT=/usr/bin/sensible-editor
+ else
+ EDIT=emacs
+ fi
else
EDIT="$EDITOR"
fi
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 12758ae8290..91afe49b46b 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -472,6 +472,14 @@ sub find_groups
{
$data[$i] = $line;
}
+ if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
+ {
+ open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ }
+ for (; ($line = shift @tmp); $i++)
+ {
+ $data[$i] = $line;
+ }
if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" &&
-r "$ENV{MYSQL_HOME}/my.cnf")
{
@@ -482,6 +490,14 @@ sub find_groups
{
$data[$i] = $line;
}
+ if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
+ {
+ open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ }
+ for (; ($line = shift @tmp); $i++)
+ {
+ $data[$i] = $line;
+ }
if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf")
{
open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
@@ -491,7 +507,7 @@ sub find_groups
$data[$i] = $line;
}
}
- chop @data;
+ chomp @data;
# Make a list of the wanted group ids
if (defined($raw_gids))
{
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 02a961dc3ec..52fe282f916 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -211,6 +211,7 @@ if [ ! -d $mysql_unix_port_dir ]
then
mkdir $mysql_unix_port_dir
chown $user $mysql_unix_port_dir
+ chmod 755 $mysql_unix_port_dir
fi
# Use the mysqld-max binary by default if the user doesn't specify a binary
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh
index ccb006f692d..ff82a35ec3f 100644
--- a/scripts/mysqldumpslow.sh
+++ b/scripts/mysqldumpslow.sh
@@ -40,6 +40,7 @@ unless (@ARGV) {
warn "basedir=$basedir\n" if $opt{v};
my $datadir = ($defaults =~ m/--datadir=(.*)/)[0];
+ my $slowlog = ($defaults =~ m/--log-slow-queries=(.*)/)[0];
if (!$datadir or $opt{i}) {
# determine the datadir from the instances section of /etc/my.cnf, if any
my $instances = `my_print_defaults instances`;
@@ -55,8 +56,13 @@ unless (@ARGV) {
warn "datadir=$datadir\n" if $opt{v};
}
- @ARGV = <$datadir/$opt{h}-slow.log>;
- die "Can't find '$datadir/$opt{h}-slow.log'\n" unless @ARGV;
+ if ( -f $slowlog ) {
+ @ARGV = ($slowlog);
+ die "Can't find '$slowlog'\n" unless @ARGV;
+ } else {
+ @ARGV = <$datadir/$opt{h}-slow.log>;
+ die "Can't find '$datadir/$opt{h}-slow.log'\n" unless @ARGV;
+ }
}
warn "\nReading mysql slow query log from @ARGV\n";