From 2664605c04ad7ccc5fc2977026cbd62f9d86f0cc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Apr 2006 19:57:50 -0700 Subject: Fix for bug #17353. scripts/mysqld_safe.sh: Moved core file changing command outside of root-user only conditional --- scripts/mysqld_safe.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index a584c384712..02a961dc3ec 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -321,10 +321,13 @@ then ulimit -n $open_files args="--open-files-limit=$open_files $args" fi - if test -n "$core_file_size" - then - ulimit -c $core_file_size - fi +fi + +# Try to set the core file size (even if we aren't root) because many systems +# don't specify a hard limit on core file size. +if test -n "$core_file_size" +then + ulimit -c $core_file_size fi # -- cgit v1.2.1 From 754a0923d05bb824e6eb8225a6ecd29e58ded2e4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Jul 2006 10:48:34 -0400 Subject: Bug #19779: mysql_explain_log documentation is outdated. scripts/mysql_explain_log.sh: Changed explain_log.pl to mysql_explain_log. Added usage information for printerror. Minor cleanup. --- scripts/mysql_explain_log.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/mysql_explain_log.sh b/scripts/mysql_explain_log.sh index 973d9e8a363..fd468fdf091 100644 --- a/scripts/mysql_explain_log.sh +++ b/scripts/mysql_explain_log.sh @@ -1,5 +1,6 @@ -#!@PERL@ -w +#!@PERL@ use strict; +use warnings; use DBI; use Getopt::Long; @@ -58,7 +59,7 @@ else { } else { $Param->{Start} = time; - while() { + while(<>) { $Param->{LineCount} ++ ; if ($Param->{ViewDate} ) { @@ -317,6 +318,8 @@ Usage: $0 [OPTIONS] < LOGFILE -p=PASSWORD --socket=SOCKET mysqld socket file to connect -s=SOCKET +--printerror=1 enable error output +-e 1 Read logfile from STDIN an try to EXPLAIN all SELECT statements. All UPDATE statements are rewritten to an EXPLAIN SELECT statement. The results of the EXPLAIN statement are collected and counted. All results with type=ALL are collected in an separete list. Results are printed to STDOUT. @@ -331,7 +334,7 @@ __END__ =head1 NAME -explain_log.pl +mysql_explain_log Feed a mysqld general logfile (created with mysqld --log) back into mysql and collect statistics about index usage with EXPLAIN. @@ -348,7 +351,7 @@ Then add indices to avoid table scans and remove those which aren't used. =head1 USAGE -explain_log.pl [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw] [--socket=/path/to/socket] < logfile +mysql_explain_log [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw] [--socket=/path/to/socket] < logfile --date=YYMMDD select only entrys of date @@ -370,21 +373,20 @@ explain_log.pl [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw] -s=SOCKET +--printerror=1 enable error output + +-e 1 + =head1 EXAMPLE -explain_log.pl --host=localhost --user=foo --password=bar < /var/lib/mysql/mobile.log +mysql_explain_log --host=localhost --user=foo --password=bar < /var/lib/mysql/mobile.log =head1 AUTHORS Stefan Nitz - Jan Willamowius , http://www.mobile.de + Jan Willamowius , http://www.willamowius.de Dennis Haney (Added socket support) -=head1 RECRUITING - -If you are looking for a MySQL or Perl job, take a look at http://www.mobile.de -and send me an email with your resume (you must be speaking German!). - =head1 SEE ALSO mysql documentation -- cgit v1.2.1