[Pkg-mysql-commits] r1149 - in branches/sid-5.1/debian: . additions
Norbert Tretkowski
nobse at alioth.debian.org
Sun Feb 17 15:55:20 UTC 2008
tags 454227 pending
tags 455010 pending
tags 455737 pending
tags 456193 pending
tags 457915 pending
tags 458695 pending
tags 458798 pending
tags 460402 pending
tags 460873 pending
tags 462158 pending
tags 462265 pending
tags 463137 pending
thanks
Author: nobse
Date: 2008-02-17 15:55:19 +0000 (Sun, 17 Feb 2008)
New Revision: 1149
Modified:
branches/sid-5.1/debian/README.Maintainer
branches/sid-5.1/debian/additions/mysqlreport
branches/sid-5.1/debian/changelog
branches/sid-5.1/debian/control
branches/sid-5.1/debian/mysql-client-5.1.dirs
branches/sid-5.1/debian/mysql-client-5.1.files
branches/sid-5.1/debian/mysql-server-5.1.dirs
branches/sid-5.1/debian/mysql-server-5.1.files
branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb-mgm.init
branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb.init
branches/sid-5.1/debian/mysql-server-5.1.mysql.init
branches/sid-5.1/debian/rules
Log:
Merge r1146
Modified: branches/sid-5.1/debian/README.Maintainer
===================================================================
--- branches/sid-5.1/debian/README.Maintainer 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/README.Maintainer 2008-02-17 15:55:19 UTC (rev 1149)
@@ -24,13 +24,10 @@
#
# Preparing a new version
#
-NEW=5.1.7
-tar xzf mysql-$NEW.tar.gz
-mv mysql-$NEW mysql-dfsg-5.1-$NEW.orig
-rm -rf mysql-dfsg-5.1-$NEW.orig/Docs/
-mv mysql-dfsg-5.1-$NEW.orig/debian mysql-dfsg-5.1-$NEW.orig/debian.upstream
-tar czf mysql-dfsg-5.1_$NEW.orig.tar.gz mysql-dfsg-5.1-$NEW.orig
-rm -rf mysql-dfsg-5.1-$NEW.orig
+The new orig.tar.gz (without non-free documentation) is created in /tmp/ when
+running this command:
+
+debian/rules get-orig-source
#
# mysqlreport
Modified: branches/sid-5.1/debian/additions/mysqlreport
===================================================================
--- branches/sid-5.1/debian/additions/mysqlreport 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/additions/mysqlreport 2008-02-17 15:55:19 UTC (rev 1149)
@@ -1,10 +1,10 @@
#!/usr/bin/perl -w
-# mysqlreport v3.0a Dec 12 2006
+# mysqlreport v3.4a Jan 23 2008
# http://hackmysql.com/mysqlreport
# mysqlreport makes an easy-to-read report of important MySQL status values.
-# Copyright (C) 2006 Daniel Nichter
+# Copyright 2006-2008 Daniel Nichter
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -37,12 +37,15 @@
my (%stats, %vars); # SHOW STATUS, SHOW VARIABLES
my (%DMS_vals, %Com_vals, %ib_vals);
my ($dbh, $query);
-my ($questions, $key_read_ratio, $key_write_ratio, $dms);
+my ($questions, $key_read_ratio, $key_write_ratio, $dms, $slow_query_t);
my ($key_cache_block_size, $key_buffer_used, $key_buffer_usage);
my ($qc_mem_used, $qc_hi_r, $qc_ip_r); # Query Cache
-my ($need_myisam_vals, $need_innodb_vals);
+my $have_innodb_vals;
my ($ib_bp_used, $ib_bp_total, $ib_bp_read_ratio);
-
+my ($relative_live, $relative_infiles);
+my $real_uptime;
+my (%stats_present, %stats_past); # For relative reports
+
GetOptions (
\%op,
"user=s",
@@ -51,21 +54,15 @@
"port=s",
"socket=s",
"no-mycnf",
- "dtq|tdq|dq",
- "dms",
- "com:i",
- "sas",
- "tab",
- "qcache",
- "id-only|ido|innodb-only",
- "id|innodb",
- "dpr|drp",
- "all",
"infile|in=s",
"outfile=s",
"flush-status",
"email=s",
- "help|?"
+ "r|relative:i",
+ "c|report-count=i",
+ "detach",
+ "help|?",
+ "debug"
);
show_help_and_exit() if $op{'help'};
@@ -78,11 +75,7 @@
$mycnf{'socket'} = $op{'socket'} if have_op 'socket';
$mycnf{'user'} = $op{'user'} if have_op 'user';
-# Default values if nothing else
-$mycnf{'host'} ||= 'localhost';
-$mycnf{'port'} ||= 3306;
-$mycnf{'socket'} ||= '/var/run/mysqld/mysqld.sock'; # Debian default
-$mycnf{'user'} ||= $ENV{'USER'};
+$mycnf{'user'} ||= $ENV{'USER'};
if(exists $op{'password'})
{
@@ -96,80 +89,101 @@
else { $mycnf{'pass'} = $op{'password'}; } # Use password given on command line
}
-if($op{'all'} and not defined $op{'com'}) { $op{'com'} = 3; }
-if(defined $op{'com'} and $op{'com'} == 0) { $op{'com'} = 3; }
+$op{'com'} ||= 3;
+$op{'c'} ||= 1; # Used in collect_reports() if --r given integer value
-# Connect to MySQL
-if(!have_op 'infile')
+if(defined $op{'r'})
{
- my $dsn;
-
- if(-S $mycnf{'socket'} && !have_op 'host') { $dsn = "DBI:mysql:mysql_socket=$mycnf{socket}"; }
- else { $dsn = "DBI:mysql:host=$mycnf{host};port=$mycnf{port}"; }
-
- $dbh = DBI->connect($dsn, $mycnf{'user'}, $mycnf{'pass'}) or die;
+ if($op{r}) { $relative_live = 1; }
+ else { $relative_infiles = 1; }
}
# The report is written to a tmp file first.
# Later it will be moved to $op{'outfile'} or emailed $op{'email'} if needed.
-($tmpfile_fh, $tmpfile) = tempfile() or die("Can't open temporary file for writing: $!\n");
+($tmpfile_fh, $tmpfile) = tempfile() or die("Cannot open temporary file for writing: $!\n");
-# Determine if we need MyISAM, InnoDB, or both vals, then
-# get vals and system vars from MySQL or infile, then
-# set vals for our own vars
-which_vals();
-get_vals_vars();
-set_myisam_vals() if $need_myisam_vals;
-set_ib_vals() if $need_innodb_vals;
+if($op{'detach'})
+{
+ $SIG{'TERM'} = 'sig_handler';
+ if(fork())
+ {
+ print "mysqlreport has forked and detached.\n";
+ print "While running detached, mysqlreport writes reports to '$tmpfile'.\n";
-# Write the reports
+ exit;
+ }
+
+ open(STDIN, "</dev/null");
+ open(STDOUT, "> $tmpfile") or die "Cannot dup STDOUT: $!\n";
+ open(STDERR, "> $tmpfile") or die "Cannot dup STDERR: $!\n";
+}
+
select $tmpfile_fh;
-$~ = 'MYSQL_TIME', write;
-if($need_myisam_vals)
+$| = 1 if ($op{'detach'} || $relative_live);
+
+# Connect to MySQL
+if(!$op{'infile'} && !$relative_infiles)
{
- $~ = 'KEY_BUFF_MAX', write;
- if($key_buffer_usage != -1) { $~ = 'KEY_BUFF_USAGE', write }
- $~ = 'KEY_RATIOS', write;
- if($op{'dtq'} or $op{'all'}) { write_DTQ(); }
- $~ = 'SLOW_DMS', write;
- if($op{'dms'} or $op{'all'}) { write_DMS(); }
- if($op{'com'} or $op{'all'}) { write_Com(); }
- if($op{'sas'} or $op{'all'}) { $~ = 'SAS', write; }
- if($op{'qcache'} or $op{'all'}) { write_qcache(); }
- $~ = 'REPORT_END', write;
- if($op{'tab'} or $op{'all'}) { $~ = 'TAB', write; }
+ my $dsn;
+
+ if($mycnf{'socket'} && -S $mycnf{'socket'})
+ {
+ $dsn = "DBI:mysql:mysql_socket=$mycnf{socket}";
+ }
+ elsif($mycnf{'host'})
+ {
+ $dsn = "DBI:mysql:host=$mycnf{host}" . ($mycnf{port} ? ";port=$mycnf{port}" : "");
+ }
+ else
+ {
+ $dsn = "DBI:mysql:host=localhost";
+ }
+
+ if($op{debug})
+ {
+ print "DBI DSN: $dsn\n";
+ }
+
+ $dbh = DBI->connect($dsn, $mycnf{'user'}, $mycnf{'pass'}) or die;
}
-write_InnoDB() if $need_innodb_vals;
-close $tmpfile_fh and select STDOUT;
-email_report($tmpfile) if have_op 'email';
+$have_innodb_vals = 1; # This might be set to 0 later in get_MySQL_version()
-cat_report($tmpfile);
+if(defined $op{'r'})
+{
+ if($relative_live)
+ {
+ print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'};
+ get_MySQL_version();
+ collect_reports();
+ }
-if(have_op 'outfile')
-{
- if($WIN) { `move $tmpfile $op{outfile}`; }
- else { `mv $tmpfile $op{outfile}`; }
+ if($relative_infiles) { read_relative_infiles(); }
}
else
{
- if($WIN) { `del $tmpfile`; }
- else { `rm -f $tmpfile`; }
-}
-
-if(!have_op 'infile')
-{
- if($op{'flush-status'})
+ if(!$op{'infile'})
{
- $query = $dbh->prepare("FLUSH STATUS;");
- $query->execute();
+ get_MySQL_version();
+ get_vals();
+ get_vars();
}
+ else
+ {
+ read_infile($op{'infile'});
+ }
- $query->finish();
- $dbh->disconnect();
+ get_Com_values();
+
+ set_myisam_vals();
+ set_ib_vals() if $have_innodb_vals;
+
+ write_report();
}
+exit_tasks_and_cleanup();
+
exit;
#
@@ -178,31 +192,29 @@
sub show_help_and_exit
{
print <<"HELP";
-mysqlreport v3.0a Dec 12 2006
+mysqlreport v3.4a Jan 23 2008
mysqlreport makes an easy-to-read report of important MySQL status values.
Command line options (abbreviations work):
- --user USER Connect to MySQL as USER
- --password PASS Use PASS or prompt for MySQL user's password
- --host ADDRESS Connect to MySQL at ADDRESS
- --port PORT Connect to MySQL at PORT
- --socket SOCKET Connect to MySQL at SOCKET
- --no-mycnf Don't read ~/.my.cnf
- --dtq Show Distribution of Total Questions
- --dms Show DMS details
- --com N Show top N number of non-DMS questions
- --sas Show SELECT and Sort report
- --tab Show Thread, Aborts, and Bytes reports
- --qcache Show Query Cache report
- --innodb Show InnoDB report
- --innodb-only Show only InnoDB report (hide all other reports)
- --dpr Show Data, Pages, Rows report in InnoDB report
- --all Show --dtq --dms --com 3 --sas --tab --qcache --innodb --dpr
- --infile FILE Read status values from FILE instead of MySQL
- --outfile FILE Write report to FILE
- --email ADDRESS Email report to ADDRESS (doesn't work on Windows)
- --flush-status Issue FLUSH STATUS; after getting current values
- --help Prints this
+ --user USER Connect to MySQL as USER
+ --password PASS Use PASS or prompt for MySQL user's password
+ --host ADDRESS Connect to MySQL at ADDRESS
+ --port PORT Connect to MySQL at PORT
+ --socket SOCKET Connect to MySQL at SOCKET
+ --no-mycnf Don't read ~/.my.cnf
+ --infile FILE Read status values from FILE instead of MySQL
+ --outfile FILE Write report to FILE
+ --email ADDRESS Email report to ADDRESS (doesn't work on Windows)
+ --flush-status Issue FLUSH STATUS; after getting current values
+ --relative X Generate relative reports. If X is an integer,
+ reports are live from the MySQL server X seconds apart.
+ If X is a list of infiles (file1 file2 etc.),
+ reports are generated from the infiles in the order
+ that they are given.
+ --report-count N Collect N number of live relative reports (default 1)
+ --detach Fork and detach from terminal (run in background)
+ --help Prints this
+ --debug Print debugging information
Visit http://hackmysql.com/mysqlreport for more information.
HELP
@@ -214,83 +226,272 @@
{
return if $WIN;
open MYCNF, "$ENV{HOME}/.my.cnf" or return;
- while(<MYCNF>) { $mycnf{$1} = $2 if /^(.+?)\s*=\s*"?(.+?)"?\s*$/; }
+ while(<MYCNF>)
+ {
+ if(/^(.+?)\s*=\s*"?(.+?)"?\s*$/)
+ {
+ $mycnf{$1} = $2;
+ print "get_user_mycnf: read '$1 = $2'\n" if $op{debug};
+ }
+ }
$mycnf{'pass'} ||= $mycnf{'password'} if exists $mycnf{'password'};
close MYCNF;
}
-sub which_vals
+sub collect_reports
{
- $need_myisam_vals = 1;
- $need_innodb_vals = 1; # This could be set to 0 later in get_vals_vars()
+ my $i;
- $need_myisam_vals = 0, return if have_op 'id-only';
- $need_innodb_vals = 0, return if (!$op{'id'} && !$op{'id-only'} && !$op{'all'});
+ get_vals();
+ get_vars();
+
+ get_Com_values();
+
+ %stats_past = %stats;
+
+ set_myisam_vals();
+ set_ib_vals() if $have_innodb_vals;
+
+ print "#\n# Beginning report, 0 0:0:0\n#\n";
+
+ write_report();
+
+ for($i = 0; $i < $op{'c'}; $i++)
+ {
+ sleep($op{'r'});
+
+ print "\n#\n# Interval report " , $i + 1 , ", +", sec_to_dhms(($i + 1) * $op{'r'}), "\n#\n";
+
+ get_vals();
+
+ write_relative_report();
+ }
}
-sub get_vals_vars
+sub read_relative_infiles
{
- if(!have_op 'infile')
+ my $slurp; # Used to check infiles for multiple sets of status values
+ my $n_stats; # Number of multiple sets of status values in an infile
+ my $infile;
+ my $report_n; # Report number
+
+ $report_n = 1;
+
+ foreach $infile (@ARGV)
{
- my @row;
+ # Read all of infile into $slurp
+ open INFILE, "< $infile" or warn and next;
+ $slurp = do { local $/; <INFILE> };
+ close INFILE;
- get_MySQL_version();
+ $n_stats = 0;
- # Get status values
- if($major >= 5 && (($minor == 0 && $patch >= 2) || $minor > 0)) {
- $query = $dbh->prepare("SHOW GLOBAL STATUS;");
+ # Count number of status value sets
+ $n_stats++ while $slurp =~ /Aborted_clients/g;
+
+ print "read_relative_infiles: found $n_stats sets of status values in file '$infile'\n"
+ if $op{debug};
+
+ if($n_stats == 1)
+ {
+ read_infile($infile);
+ relative_infile_report($report_n++);
}
- else {
- $query = $dbh->prepare("SHOW STATUS;");
- $need_innodb_vals = 0;
- }
- $query->execute();
- while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; }
- # Get server system variables
- $query = $dbh->prepare("SHOW VARIABLES;");
- $query->execute();
- while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; }
+ if($n_stats > 1)
+ {
+ my @tmpfile_fh;
+ my @tmpfile_name;
+ my $i;
+ my $stat_n; # Status value set number
+
+ # Create a tmp file for each set of status values
+ for($i = 0; $i < $n_stats; $i++)
+ {
+ my ($fh, $name) = tempfile()
+ or die("read_relative_infiles: cannot open temporary file for writing: $!\n");
+
+ push(@tmpfile_fh, $fh);
+ push(@tmpfile_name, $name);
+
+ print "read_relative_infiles: created tmp file '$name'\n" if $op{debug};
+ }
+
+ $i = 0;
+ $stat_n = 0;
+
+ select $tmpfile_fh[$i];
+
+ # Read infile again and copy each set of status values
+ # to seperate tmp files
+ open INFILE, "< $infile" or warn and next;
+ while(<INFILE>)
+ {
+ next if /^\+/;
+ next if /^$/;
+
+ print;
+
+ if(/Aborted_clients/)
+ {
+ # The infile should begin with manually inserted system
+ # var values (like key_buffer_size = 128M). Therefore,
+ # the first occurance of /Aborted_clients/ indicates
+ # the first set of status values only if no sets have
+ # occured yet ($stat_n = 0). In this case, the following
+ # status values are printed to the current fh along with
+ # the system var values read so far until /Aborted_clients/
+ # occurs again. Then begins the second and subsequent sets
+ # of status values.
+ next if $stat_n++ == 0;
+
+ select $tmpfile_fh[++$i];
+ }
+ }
+ close INFILE;
+
+ # Re-select the main tmp file into which the reports are being written.
+ select $tmpfile_fh;
+
+ for($i = 0; $i < $n_stats; $i++)
+ {
+ close $tmpfile_fh[$i];
+
+ read_infile($tmpfile_name[$i]);
+ relative_infile_report($report_n++);
+
+ if($WIN) { `del $tmpfile_name[$i]`; }
+ else { `rm -f $tmpfile_name[$i]`; }
+
+ print "read_relative_infiles: deleted tmp file '$tmpfile_name[$i]'\n"
+ if $op{debug};
+ }
+
+ } # if($n_stats > 1)
+ } # foreach $infile (@files)
+}
+
+sub relative_infile_report
+{
+ my $report_n = shift;
+
+ if($report_n == 1)
+ {
+ get_Com_values();
+
+ %stats_past = %stats;
+
+ set_myisam_vals();
+ set_ib_vals() if $have_innodb_vals;
+
+ print "#\n# Beginning report, 0 0:0:0\n#\n";
+
+ write_report();
}
else
{
- # Default values if not set in INFILE
- $vars{'version'} = "0.0.0";
- $vars{'table_cache'} = 64;
- $vars{'max_connections'} = 100;
- # key_cache_block_size
- $vars{'key_buffer_size'} = 8388600; # 8M
- # query_cache_size
- $vars{'thread_cache_size'} = 0;
+ print "\n#\n# Interval report ", $report_n - 1, ", +",
+ sec_to_dhms($stats{Uptime} - $stats_past{Uptime}),
+ "\n#\n";
- open INFILE, "< $op{infile}" or die;
- while(<INFILE>)
- {
- next if /^\+\-/;
- next if /^$/;
+ write_relative_report();
+ }
+}
- chomp;
+sub get_vals
+{
+ my @row;
- if(/([A-Za-z_]+)[\s|]+(\d+)/)
- {
- $stats{$1} = $2;
- next;
- }
+ # Get status values
+ if($major >= 5 && (($minor == 0 && $patch >= 2) || $minor > 0))
+ {
+ $query = $dbh->prepare("SHOW GLOBAL STATUS;");
+ }
+ else
+ {
+ $query = $dbh->prepare("SHOW STATUS;");
+ }
+ $query->execute();
+ while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; }
- # Explicit var = val (e.g. key_buffer_size = 128M)
- $vars{$1} = ($3 ? $2 * 1024 * 1024 : $2) and next if(/^\s*(\w+)\s*=\s*([0-9.]+)(M*)\s*$/);
-
- # print "Unrecognized line in infile: $_\n";
+ $real_uptime = $stats{'Uptime'};
+}
+
+sub get_vars
+{
+ my @row;
+
+ # Get server system variables
+ $query = $dbh->prepare("SHOW VARIABLES;");
+ $query->execute();
+ while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; }
+
+ # table_cache was renamed to table_open_cache in MySQL 5.1.3
+ if($major >= 5 && (($minor == 1 && $patch >= 3) || $minor > 1))
+ {
+ $vars{'table_cache'} = $vars{'table_open_cache'};
+ }
+}
+
+sub read_infile
+{
+ my $infile = shift;
+
+ # Default values if not set in INFILE
+ $vars{'version'} = "0.0.0" if !exists $vars{'version'};
+ $vars{'table_cache'} = 64 if !exists $vars{'table_cache'};
+ $vars{'max_connections'} = 100 if !exists $vars{'max_connections'};
+ $vars{'key_buffer_size'} = 8388600 if !exists $vars{'key_buffer_size'}; # 8M
+ $vars{'thread_cache_size'} = 0 if !exists $vars{'thread_cache_size'};
+ $vars{'tmp_table_size'} = 0 if !exists $vars{'tmp_table_size'};
+ $vars{'long_query_time'} = '?' if !exists $vars{'long_query_time'};
+ $vars{'log_slow_queries'} = '?' if !exists $vars{'log_slow_queries'};
+
+ # One should also add:
+ # key_cache_block_size
+ # query_cache_size
+ # to their infile if needed.
+
+ open INFILE, "< $infile" or warn;
+ while(<INFILE>)
+ {
+ next if /^\+\-/;
+ next if /^$/;
+
+ chomp;
+
+ if(/([A-Za-z_]+)[\s\t|]+(\d+)/)
+ {
+ $stats{$1} = $2;
+ next;
}
- close INFILE;
- get_MySQL_version();
+ # Explicit var = val (e.g. key_buffer_size = 128M)
+ if( /^\s*(\w+)\s*=\s*([0-9.]+)(M*)\s*$/ )
+ {
+ $vars{$1} = ($3 ? $2 * 1024 * 1024 : $2);
+ print "read_infile: read '$_' as $1 = $vars{$1}\n" if $op{debug};
+ next;
+ }
+ else
+ {
+ print "read_infile: unrecognized line: '$_'\n" if $op{debug};
+ }
}
+ close INFILE;
+
+ $real_uptime = $stats{'Uptime'};
+
+ $vars{'table_cache'} = $vars{'table_open_cache'} if exists $vars{'table_open_cache'};
+
+ get_MySQL_version();
}
sub get_MySQL_version
{
- if(have_op 'infile')
+ return if $major;
+
+ if($op{'infile'} || $relative_infiles)
{
($major, $minor, $patch) = ($vars{'version'} =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/);
}
@@ -303,20 +504,27 @@
@row = $query->fetchrow_array();
($major, $minor, $patch) = ($row[1] =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/);
}
+
+ # Innodb_ status values were added in 5.0.2
+ if($major <= 4 || $patch < 2)
+ {
+ $have_innodb_vals = 0;
+ print "get_MySQL_version: no InnoDB reports because MySQL version is older than 5.0.2\n" if $op{debug};
+ }
}
sub set_myisam_vals
{
$questions = $stats{'Questions'};
- $key_read_ratio = sprintf "%.3f",
+ $key_read_ratio = sprintf "%.2f",
($stats{'Key_read_requests'} ?
- $stats{'Key_reads'} / $stats{'Key_read_requests'} :
+ 100 - ($stats{'Key_reads'} / $stats{'Key_read_requests'}) * 100 :
0);
- $key_write_ratio = sprintf "%.3f",
+ $key_write_ratio = sprintf "%.2f",
($stats{'Key_write_requests'} ?
- $stats{'Key_writes'} / $stats{'Key_write_requests'} :
+ 100 - ($stats{'Key_writes'} / $stats{'Key_write_requests'}) * 100 :
0);
$key_cache_block_size = (defined $vars{'key_cache_block_size'} ?
@@ -325,14 +533,16 @@
$key_buffer_used = $stats{'Key_blocks_used'} * $key_cache_block_size;
- if(defined $stats{'Key_blocks_unused'}) { # MySQL 4.1.2+
+ if(defined $stats{'Key_blocks_unused'}) # MySQL 4.1.2+
+ {
$key_buffer_usage = $vars{'key_buffer_size'} -
($stats{'Key_blocks_unused'} * $key_cache_block_size);
}
else { $key_buffer_usage = -1; }
# Data Manipulation Statements: http://dev.mysql.com/doc/refman/5.0/en/data-manipulation.html
- %DMS_vals = (
+ %DMS_vals =
+ (
SELECT => $stats{'Com_select'},
INSERT => $stats{'Com_insert'} + $stats{'Com_insert_select'},
REPLACE => $stats{'Com_replace'} + $stats{'Com_replace_select'},
@@ -343,6 +553,9 @@
);
$dms = $DMS_vals{SELECT} + $DMS_vals{INSERT} + $DMS_vals{REPLACE} + $DMS_vals{UPDATE} + $DMS_vals{DELETE};
+
+ $slow_query_t = "($vars{long_query_time})";
+
}
sub set_ib_vals
@@ -353,12 +566,90 @@
$ib_bp_total = $stats{'Innodb_buffer_pool_pages_total'} * $stats{'Innodb_page_size'};
- $ib_bp_read_ratio = sprintf "%.3f",
+ $ib_bp_read_ratio = sprintf "%.2f",
($stats{'Innodb_buffer_pool_read_requests'} ?
- $stats{'Innodb_buffer_pool_reads'} / $stats{'Innodb_buffer_pool_read_requests'} :
+ 100 - ($stats{'Innodb_buffer_pool_reads'} /
+ $stats{'Innodb_buffer_pool_read_requests'}) * 100 :
0);
}
+sub write_relative_report
+{
+ %stats_present = %stats;
+
+ for(keys %stats)
+ {
+ if($stats_past{$_} =~ /\d+/)
+ {
+ if($stats_present{$_} >= $stats_past{$_}) # Avoid negative values
+ {
+ $stats{$_} = $stats_present{$_} - $stats_past{$_};
+ }
+ }
+ }
+
+ # These values are either "at present" or "high water marks".
+ # Therefore, it is more logical to not relativize these values.
+ # Doing otherwise causes strange and misleading values.
+ $stats{'Key_blocks_used'} = $stats_present{'Key_blocks_used'};
+ $stats{'Open_tables'} = $stats_present{'Open_tables'};
+ $stats{'Max_used_connections'} = $stats_present{'Max_used_connections'};
+ $stats{'Threads_running'} = $stats_present{'Threads_running'};
+ $stats{'Threads_connected'} = $stats_present{'Threads_connected'};
+ $stats{'Threads_cached'} = $stats_present{'Threads_cached'};
+ $stats{'Qcache_free_blocks'} = $stats_present{'Qcache_free_blocks'};
+ $stats{'Qcache_total_blocks'} = $stats_present{'Qcache_total_blocks'};
+ $stats{'Qcache_free_memory'} = $stats_present{'Qcache_free_memory'};
+ if($have_innodb_vals)
+ {
+ $stats{'Innodb_page_size'} = $stats_present{'Innodb_page_size'};
+ $stats{'Innodb_buffer_pool_pages_data'} = $stats_present{'Innodb_buffer_pool_pages_data'};
+ $stats{'Innodb_buffer_pool_pages_dirty'} = $stats_present{'Innodb_buffer_pool_pages_dirty'};
+ $stats{'Innodb_buffer_pool_pages_free'} = $stats_present{'Innodb_buffer_pool_pages_free'};
+ $stats{'Innodb_buffer_pool_pages_latched'} = $stats_present{'Innodb_buffer_pool_pages_latched'};
+ $stats{'Innodb_buffer_pool_pages_misc'} = $stats_present{'Innodb_buffer_pool_pages_misc'};
+ $stats{'Innodb_buffer_pool_pages_total'} = $stats_present{'Innodb_buffer_pool_pages_total'};
+ $stats{'Innodb_data_pending_fsyncs'} = $stats_present{'Innodb_data_pending_fsyncs'};
+ $stats{'Innodb_data_pending_reads'} = $stats_present{'Innodb_data_pending_reads'};
+ $stats{'Innodb_data_pending_writes'} = $stats_present{'Innodb_data_pending_writes'};
+
+ # Innodb_row_lock_ values were added in MySQL 5.0.3
+ if((($minor == 0 && $patch >= 3) || $minor > 0))
+ {
+ $stats{'Innodb_row_lock_current_waits'} = $stats_present{'Innodb_row_lock_current_waits'};
+ $stats{'Innodb_row_lock_time_avg'} = $stats_present{'Innodb_row_lock_time_avg'};
+ $stats{'Innodb_row_lock_time_max'} = $stats_present{'Innodb_row_lock_time_max'};
+ }
+ }
+
+ get_Com_values();
+
+ %stats_past = %stats_present;
+
+ set_myisam_vals();
+ set_ib_vals() if $have_innodb_vals;
+
+ write_report();
+}
+
+sub write_report
+{
+ $~ = 'MYSQL_TIME', write;
+ $~ = 'KEY_BUFF_MAX', write;
+ if($key_buffer_usage != -1) { $~ = 'KEY_BUFF_USAGE', write }
+ $~ = 'KEY_RATIOS', write;
+ write_DTQ();
+ $~ = 'SLOW_DMS', write;
+ write_DMS();
+ write_Com();
+ $~ = 'SAS', write;
+ write_qcache();
+ $~ = 'REPORT_END', write;
+ $~ = 'TAB', write;
+
+ write_InnoDB() if $have_innodb_vals;
+}
+
sub sec_to_dhms # Seconds to days hours:minutes:seconds
{
my $s = shift;
@@ -423,7 +714,7 @@
open SENDMAIL, "|/usr/sbin/sendmail -t";
print SENDMAIL "From: mysqlreport\n";
print SENDMAIL "To: $op{email}\n";
- print SENDMAIL "Subject: MySQL status report on $mycnf{'host'}\n\n";
+ print SENDMAIL "Subject: MySQL status report on " . ($mycnf{'host'} || 'localhost') . "\n\n";
print SENDMAIL `cat $report`;
close SENDMAIL;
}
@@ -441,6 +732,8 @@
sub get_Com_values
{
+ %Com_vals = ();
+
# Make copy of just the Com_ values
for(keys %stats)
{
@@ -470,8 +763,6 @@
my %DTQ;
my $first = 1;
- get_Com_values();
-
# Total Com values
$stat_val = 0;
for(values %Com_vals) { $stat_val += $_; }
@@ -483,7 +774,8 @@
$stat_val = 0;
for(values %DTQ) { $stat_val += $_; }
- if($questions != $stat_val) {
+ if($questions != $stat_val)
+ {
$DTQ{($questions > $stat_val ? '+Unknown' : '-Unknown')} = abs $questions - $stat_val;
}
@@ -512,10 +804,10 @@
sub write_Com # Write COM report in descending order by values
{
+ my $i = $op{'com'};
+
$~ = 'COM_1';
- get_Com_values() if !$op{'dtq'};
-
# Total Com values and write first line of COM report
$stat_label = '%Total:' unless $op{'dtq'};
$stat_val = 0;
@@ -531,7 +823,7 @@
$stat_val = $Com_vals{$_};
write;
- last if !(--$op{'com'});
+ last if !(--$i);
}
}
@@ -540,6 +832,7 @@
# Query cache was added in 4.0.1, but have_query_cache was added in 4.0.2,
# ergo this method is slightly more reliable
return if not exists $vars{'query_cache_size'};
+ return if $vars{'query_cache_size'} == 0;
$qc_mem_used = $vars{'query_cache_size'} - $stats{'Qcache_free_memory'};
$qc_hi_r = sprintf "%.2f", $stats{'Qcache_hits'} / ($stats{'Qcache_inserts'} ||= 1);
@@ -568,11 +861,9 @@
write;
}
- if($op{'dpr'} || $op{'all'}) # Data, Pages, Rows
- {
- $~ = 'IB_DPR';
- write;
- }
+ # Data, Pages, Rows
+ $~ = 'IB_DPR';
+ write;
}
sub have_op
@@ -582,14 +873,53 @@
return 0;
}
+sub sig_handler
+{
+ print "\nReceived signal at " , scalar localtime , "\n";
+ exit_tasks_and_cleanup();
+ exit;
+}
+sub exit_tasks_and_cleanup
+{
+ close $tmpfile_fh;
+ select STDOUT unless $op{'detach'};
+
+ email_report($tmpfile) if $op{'email'};
+
+ cat_report($tmpfile) unless $op{'detach'};
+
+ if($op{'outfile'})
+ {
+ if($WIN) { `move $tmpfile $op{outfile}`; }
+ else { `mv $tmpfile $op{outfile}`; }
+ }
+ else
+ {
+ if($WIN) { `del $tmpfile`; }
+ else { `rm -f $tmpfile`; }
+ }
+
+ if(!$op{'infile'} && !$relative_infiles)
+ {
+ if($op{'flush-status'})
+ {
+ $query = $dbh->prepare("FLUSH STATUS;");
+ $query->execute();
+ }
+
+ $query->finish();
+ $dbh->disconnect();
+ }
+}
+
#
# Formats
#
format MYSQL_TIME =
MySQL @<<<<<<<<<<<<<<<< uptime @<<<<<<<<<<< @>>>>>>>>>>>>>>>>>>>>>>>>
-$vars{'version'}, sec_to_dhms($stats{'Uptime'}), scalar localtime
+$vars{'version'}, sec_to_dhms($real_uptime), (($op{infile} || $relative_infiles) ? '' : scalar localtime)
.
format KEY_BUFF_MAX =
@@ -605,9 +935,9 @@
.
format KEY_RATIOS =
-Write ratio @>>>>>>
+Write hit @>>>>>%
$key_write_ratio
-Read ratio @>>>>>>
+Read hit @>>>>>%
$key_read_ratio
__ Questions ___________________________________________________________
@@ -621,8 +951,8 @@
.
format SLOW_DMS =
-Slow @>>>>>>>> @>>>>>/s @>>>>>> @>>>>> %DMS: @>>>>>
-make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), ($op{'dtq'} || $op{'all'} ? '' : '%Total:'), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms)
+Slow @<<<<< @>>>>>>>> @>>>>>/s @>>>>> %DMS: @>>>>> Log: @>>
+$slow_query_t, make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms), $vars{'log_slow_queries'}
DMS @>>>>>>>> @>>>>>/s @>>>>>
make_short($dms), t($dms), perc($dms, $questions)
.
@@ -691,7 +1021,7 @@
__ Tables ______________________________________________________________
Open @>>>>>>>> of @>>> %Cache: @>>>>>
-make_short($stats{'Open_tables'}), $vars{'table_cache'}, perc($stats{'Open_tables'}, $vars{'table_cache'})
+$stats{'Open_tables'}, $vars{'table_cache'}, perc($stats{'Open_tables'}, $vars{'table_cache'})
Opened @>>>>>>>> @>>>>>/s
make_short($stats{'Opened_tables'}), t($stats{'Opened_tables'})
@@ -704,8 +1034,8 @@
__ Created Temp ________________________________________________________
Disk table @>>>>>>>> @>>>>>/s
make_short($stats{'Created_tmp_disk_tables'}), t($stats{'Created_tmp_disk_tables'})
-Table @>>>>>>>> @>>>>>/s
-make_short($stats{'Created_tmp_tables'}), t($stats{'Created_tmp_tables'})
+Table @>>>>>>>> @>>>>>/s Size: @>>>>>
+make_short($stats{'Created_tmp_tables'}), t($stats{'Created_tmp_tables'}), make_short($vars{'tmp_table_size'}, 1, 1)
File @>>>>>>>> @>>>>>/s
make_short($stats{'Created_tmp_files'}), t($stats{'Created_tmp_files'})
.
@@ -740,7 +1070,7 @@
__ InnoDB Buffer Pool __________________________________________________
Usage @>>>>>> of @>>>>>> %Used: @>>>>>
make_short($ib_bp_used, 1), make_short($ib_bp_total, 1), perc($ib_bp_used, $ib_bp_total)
-Read ratio @>>>>>>
+Read hit @>>>>>%
$ib_bp_read_ratio;
Pages
Free @>>>>>>>> %Total: @>>>>>
@@ -798,8 +1128,8 @@
$stats{'Innodb_data_pending_reads'}, t($stats{'Innodb_data_pending_reads'})
Writes @>>>>>>>>
$stats{'Innodb_data_pending_writes'}, t($stats{'Innodb_data_pending_writes'})
- fysnc @>>>>>>>>
-$stats{'Innodb_data_pending_fsyncs'}, t($stats{'Innodb_data_pending_fysncs'})
+ fsync @>>>>>>>>
+$stats{'Innodb_data_pending_fsyncs'}, t($stats{'Innodb_data_pending_fsyncs'})
Pages
Created @>>>>>>>> @>>>>>/s
@@ -819,4 +1149,3 @@
Updated @>>>>>>>> @>>>>>/s
make_short($stats{'Innodb_rows_updated'}), t($stats{'Innodb_rows_updated'})
.
-
Modified: branches/sid-5.1/debian/changelog
===================================================================
--- branches/sid-5.1/debian/changelog 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/changelog 2008-02-17 15:55:19 UTC (rev 1149)
@@ -194,24 +194,134 @@
-- Christian Hammers <ch at debian.org> Sat, 29 Jul 2006 11:35:42 +0200
-mysql-dfsg-5.0 (5.0.45-4) UNRELEASED; urgency=low
+mysql-dfsg-5.0 (5.0.51a-2) unstable; urgency=low
+ * Replace 54_ssl-client-support.dpatch added in 5.0.51-2 with patch from
+ upstream.
+ * Ignore errors in testsuite on powerpc.
+
+ -- Norbert Tretkowski <nobse at debian.org> Sun, 17 Feb 2008 12:42:58 +0100
+
+mysql-dfsg-5.0 (5.0.51a-1) unstable; urgency=low
+
+ [ Norbert Tretkowski ]
+ * New upstream security hotfix release. Low priority upload anyway because
+ 5.0.51-3 already contained all security fixes.
+ * Remove patches:
+ + debian/patches/51_mysqlcheck-result.dpatch
+ + debian/patches/92_SECURITY_CVE-2007-6303.dpatch
+ + debian/patches/93_SECURITY_CVE-2007-6304.dpatch
+ + debian/patches/94_SECURITY_CVE-2008-0226+0227.dpatch
+ * Add recommendation on libhtml-template-perl to -server package, used by
+ ndb_size. (closes: #462265)
+ * New patch 60_raise-max-keylength.dpatch to raise the maximum key length to
+ 4005 bytes or 1335 UTF-8 characters. (closes: #463137)
+ * New patch 51_sort-order.dpatch from 5.0.52 to fix incorrect order when
+ using range conditions on 2 tables or more.
+ * Support DEB_BUILD_OPTIONS option 'nocheck' to skip tests.
+ * Update mysqlreport to 3.4a release.
+
+ [ Luk Claes ]
+ * Updated Japanese debconf translation. (closes: #462158)
+
+ -- Norbert Tretkowski <nobse at debian.org> Wed, 06 Feb 2008 11:57:45 +0100
+
+mysql-dfsg-5.0 (5.0.51-3) unstable; urgency=high
+
+ * SECURITY:
+ Fix for CVE-2008-0226 and CVE-2008-0227: Three vulnerabilities in yaSSL
+ versions 1.7.5 and earlier were discovered that could lead to a server
+ crash or execution of unauthorized code. The exploit requires a server
+ with yaSSL enabled and TCP/IP connections enabled, but does not require
+ valid MySQL account credentials. The exploit does not apply to OpenSSL.
+ (closes: #460873)
+ * Fix LSB header in init scripts (patch from Petter Reinholdtsen).
+ (closes: #458798)
+ * Run testsuite on all archs, but ignore errors on alpha, arm, armel, hppa,
+ mipsel and sparc. (closes: #460402)
+
+ -- Norbert Tretkowski <nobse at debian.org> Wed, 23 Jan 2008 11:37:11 +0100
+
+mysql-dfsg-5.0 (5.0.51-2) unstable; urgency=low
+
+ [ Monty Taylor ]
+ * Added --with-system-type to set the version_compile_os field.
+ * Cleaned up some lintian warnings.
+ * Removed 43_scripts__mysql_update__password.dpatch since we don't use
+ mysql_upgrade_shell anymore and use mysql_upgrade instead.
+ * Removed 88_mctype_attrib.dpatch, http://bugs.mysql.com/bug.php?id=25118 is
+ closed with http://lists.mysql.com/commits/24337
+ * Added mysql-community/mysql-enterprise virtual packages in provides and
+ conflicts to ease transitions between versions.
+
+ [ Norbert Tretkowski ]
+ * Add -fPIC to CFLAGS to allow other packages to be built against
+ libmysqld.a on amd64. (closes: #457915)
+ * New patch 55_testsuite-2008.dpatch to fix FTBFS in testsuite.
+ (closes: #458695)
+ * New patch 54_ssl-client-support.dpatch to fix SSL client support.
+ * Don't run testsuite on alpha, arm, hppa, mipsel and sparc.
+
+ -- Norbert Tretkowski <nobse at debian.org> Wed, 02 Jan 2008 18:40:04 +0100
+
+mysql-dfsg-5.0 (5.0.51-1) unstable; urgency=low
+
+ * New upstream release.
+ + Fix a crash in mysql_client_test due to gcc 4.x optimizations.
+ (closes: #452558)
+ * Update patches:
+ + debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
+ + debian/patches/89_ndb__staticlib.dpatch
+ * Run testsuite after build.
* Re-add manpages, they are licensed under GPL now and redistribution is
permitted.
* Drop linux-libc-dev build-dependency, it's now being pulled by libc-dev
which is build-essential. (closes: #431018)
* Remove old optimizations for MySQL 3.23.x, they are no longer required.
(closes: #436552)
- * New patch from Ubuntu to fix a crash in mysql_client_test due to gcc 4.x
- optimizations. (closes: #452558)
* Don't fail when upgrading mysql-common if $datadir is empty or not defined
(patch from Edward Allcutt). (closes: #453127)
+ * New patch from 5.0.52 to fix mysqldump because 'null' is shown as type of
+ fields for view with bad definer. (closes: #454227)
+ * New patch from 5.0.52 to fix mysqlcheck test result.
+ * New patch from 5.0.52 to fix wrong optimization in ndb code when building
+ with gcc 4.2.x.
+ * New patch from 5.0.54 to fix wrong number output due to integer overflow
+ when building with gcc 4.2.x.
* New Finnish debconf translation from Esko Arajärvi. (closes: #448776)
- * Run testsuite after build (but skip ndb tests for now).
- * Add Vcs-* and Homepage flags to source stanza in control file.
+ * Update Basque debconf translation from Aitor Ibañez. (closes: #456193)
+ * Add Vcs-* and Homepage fields to source stanza in control file.
+ * Update mysqlreport to 3.2 release.
+ * Let mysql-server-5.0 pre-depend on debconf, because it's preinst is using
+ it.
+ * Drop menu item for innotop.
- -- Norbert Tretkowski <nobse at debian.org> Fri, 30 Nov 2007 14:19:47 +0100
+ -- Norbert Tretkowski <nobse at debian.org> Fri, 14 Dec 2007 09:59:36 +0100
+mysql-dfsg-5.0 (5.0.45-5) unstable; urgency=high
+
+ * SECURITY:
+ Fix for CVE-2007-6303: ALTER VIEW retained the original DEFINER value,
+ even when altered by another user, which could allow that user to gain the
+ access rights of the view. Now ALTER VIEW is allowed only to the original
+ definer or users with the SUPER privilege. (closes: #455737)
+ * SECURITY:
+ Fix for CVE-2007-6304: When using a FEDERATED table, the local server can
+ be forced to crash if the remote server returns a result with fewer columns
+ than expected.
+
+ -- Norbert Tretkowski <nobse at debian.org> Wed, 12 Dec 2007 20:23:43 +0100
+
+mysql-dfsg-5.0 (5.0.45-4) unstable; urgency=high
+
+ * SECURITY:
+ Fix for CVE-2007-5969: Using RENAME TABLE against a table with explicit
+ DATA DIRECTORY and INDEX DIRECTORY options can be used to overwrite system
+ table information by replacing the file to which the symlink points.
+ (closes: #455010)
+
+ -- Norbert Tretkowski <nobse at debian.org> Sun, 09 Dec 2007 12:29:54 +0100
+
mysql-dfsg-5.0 (5.0.45-3) unstable; urgency=high
* SECURITY:
@@ -3337,7 +3447,7 @@
* Fixed path in libmysqlclient.la. Closes: #58875
- -- Christian Hammers <ch at debian.org> Sat, 25 Jan 2020 20:27:29 -0700
+ -- Christian Hammers <ch at debian.org> Sat, 25 Jan 2000 20:27:29 -0700
mysql-gpl (3.22.30-1) frozen unstable; urgency=low
Modified: branches/sid-5.1/debian/control
===================================================================
--- branches/sid-5.1/debian/control 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/control 2008-02-17 15:55:19 UTC (rev 1149)
@@ -4,7 +4,7 @@
Maintainer: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
Uploaders: Christian Hammers <ch at debian.org>, Sean Finney <seanius at debian.org>, Adam Conrad <adconrad at 0c3.net>, Monty Taylor <mtaylor at mysql.com>, Norbert Tretkowski <nobse at debian.org>
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper (>= 4.1.16), file (>= 3.28-1), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline5-dev | libreadline-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, gs, dpatch, gawk, bison
-Standards-Version: 3.7.2
+Standards-Version: 3.7.3
Homepage: http://dev.mysql.com/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/
Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/
@@ -102,7 +102,7 @@
Package: mysql-server-5.1
Architecture: any
Suggests: tinyca
-Recommends: mailx
+Recommends: mailx, libhtml-template-perl
Pre-Depends: mysql-common (>= ${source:Version}), adduser (>= 3.40), debconf
Depends: mysql-client-5.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10)
Conflicts: mysql-server (<< ${source:Version}), mysql-server-4.1
Modified: branches/sid-5.1/debian/mysql-client-5.1.dirs
===================================================================
--- branches/sid-5.1/debian/mysql-client-5.1.dirs 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-client-5.1.dirs 2008-02-17 15:55:19 UTC (rev 1149)
@@ -1,4 +1,3 @@
usr/bin/
usr/share/man/man1/
-usr/share/menu/
usr/share/perl5/
Modified: branches/sid-5.1/debian/mysql-client-5.1.files
===================================================================
--- branches/sid-5.1/debian/mysql-client-5.1.files 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-client-5.1.files 2008-02-17 15:55:19 UTC (rev 1149)
@@ -37,4 +37,6 @@
usr/share/man/man1/mysqlshow.1
usr/share/man/man1/mysql_tableinfo.1
usr/share/man/man1/mysql_waitpid.1
+usr/share/man/man1/mysql_client_test.1
+usr/share/man/man1/mysql_client_test_embedded.1
usr/share/perl5/InnoDBParser.pm
Modified: branches/sid-5.1/debian/mysql-server-5.1.dirs
===================================================================
--- branches/sid-5.1/debian/mysql-server-5.1.dirs 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-server-5.1.dirs 2008-02-17 15:55:19 UTC (rev 1149)
@@ -1,10 +1,8 @@
etc/init.d
etc/logrotate.d
usr/bin
-usr/lib
usr/sbin
usr/share/man/man8
-usr/share/info
usr/share/mysql
var/run/mysqld
var/lib/mysql-upgrade
Modified: branches/sid-5.1/debian/mysql-server-5.1.files
===================================================================
--- branches/sid-5.1/debian/mysql-server-5.1.files 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-server-5.1.files 2008-02-17 15:55:19 UTC (rev 1149)
@@ -59,5 +59,24 @@
usr/share/man/man1/replace.1
usr/share/man/man1/resolveip.1
usr/share/man/man1/resolve_stack_dump.1
+usr/share/man/man1/innochecksum.1
+usr/share/man/man1/mysqltest_embedded.1
+usr/share/man/man1/mysql_tzinfo_to_sql.1
+usr/share/man/man1/ndb_config.1
+usr/share/man/man1/ndb_cpcd.1
+usr/share/man/man1/ndb_delete_all.1
+usr/share/man/man1/ndb_desc.1
+usr/share/man/man1/ndb_drop_index.1
+usr/share/man/man1/ndb_drop_table.1
+usr/share/man/man1/ndb_error_reporter.1
+usr/share/man/man1/ndb_mgm.1
+usr/share/man/man1/ndb_mgmd.1
+usr/share/man/man1/ndb_restore.1
+usr/share/man/man1/ndb_select_all.1
+usr/share/man/man1/ndb_select_count.1
+usr/share/man/man1/ndb_show_tables.1
+usr/share/man/man1/ndb_size.pl.1
+usr/share/man/man1/ndb_waiter.1
+usr/share/man/man1/ndbd.1
usr/share/man/man8/mysqld.8
usr/share/mysql/
Modified: branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb-mgm.init
===================================================================
--- branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb-mgm.init 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb-mgm.init 2008-02-17 15:55:19 UTC (rev 1149)
@@ -2,10 +2,10 @@
#
### BEGIN INIT INFO
# Provides: mysql-ndb-mgm
-# Required-Start: $syslog
-# Required-Stop: $syslog mysql
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database cluster management daemon
Modified: branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb.init
===================================================================
--- branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb.init 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-server-5.1.mysql-ndb.init 2008-02-17 15:55:19 UTC (rev 1149)
@@ -2,10 +2,10 @@
#
### BEGIN INIT INFO
# Provides: mysql-ndb
-# Required-Start: $syslog mysql mysql-ndb-mgm
-# Required-Stop: $syslog mysql mysql-ndb-mgm
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
+# Required-Start: $remote_fs $syslog mysql-ndb-mgm
+# Required-Stop: $remote_fs $syslog mysql-ndb-mgm
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database cluster server daemon
Modified: branches/sid-5.1/debian/mysql-server-5.1.mysql.init
===================================================================
--- branches/sid-5.1/debian/mysql-server-5.1.mysql.init 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/mysql-server-5.1.mysql.init 2008-02-17 15:55:19 UTC (rev 1149)
@@ -2,10 +2,10 @@
#
### BEGIN INIT INFO
# Provides: mysql
-# Required-Start: $syslog mysql-ndb-mgm
-# Required-Stop: $syslog
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
+# Required-Start: $remote_fs $syslog mysql-ndb
+# Required-Stop: $remote_fs $syslog mysql-ndb
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database server daemon
Modified: branches/sid-5.1/debian/rules
===================================================================
--- branches/sid-5.1/debian/rules 2008-02-17 12:53:07 UTC (rev 1148)
+++ branches/sid-5.1/debian/rules 2008-02-17 15:55:19 UTC (rev 1149)
@@ -43,6 +43,12 @@
# FNO_EXCEPTIONS=-fno-exceptions
# endif
+ifneq ($(findstring $(ARCH), alpha arm armel hppa mipsel powerpc sparc),)
+ TESTSUITE_FAIL_CMD=true
+else
+ TESTSUITE_FAIL_CMD=exit 1
+endif
+
ifeq ($(findstring $(ARCH), amd64),$(ARCH))
FORCE_FPIC_CFLAGS=-fPIC
FORCE_FPIC=--with-pic --with-ndb-ccflags="-fPIC" --with-lib-ccflags="-fPIC"
@@ -84,6 +90,7 @@
\
--with-server-suffix="-$(DEBVERSION)" \
--with-comment="(Debian)" \
+ --with-system-type="debian-linux-gnu" \
\
--enable-shared \
--enable-static \
@@ -123,13 +130,17 @@
$(MAKE) $(MAKE_J)
- #if [ ! -f testsuite-stamp ]; then \
- # cd mysql-test ; \
- # /usr/bin/perl ./mysql-test-run.pl ; \
- #fi
- #touch testsuite-stamp
+ifeq ($(findstring $(DEB_BUILD_OPTIONS),nocheck),)
+ if [ ! -f testsuite-stamp ] ; then \
+ cd mysql-test ; \
+ /usr/bin/perl ./mysql-test-run.pl --mysqld=--user=root --force || $(TESTSUITE_FAIL_CMD) ; \
+ /usr/bin/perl ./mysql-test-run.pl --mysqld=--user=root --force --ps-protocol || $(TESTSUITE_FAIL_CMD) ; \
+ fi
+endif
+ touch testsuite-stamp
+
touch build-stamp
More information about the Pkg-mysql-commits
mailing list