summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-07-13 13:01:30 -0400
committerunknown <cmiller@zippy.(none)>2006-07-13 13:01:30 -0400
commit316577d69537d49d359a1928c6f54194aef19620 (patch)
treea14157af169b7a80fd7207fd6b3e755b7f322563
parentb974fa85a35d187499d255a8b5e6f192068efaf2 (diff)
parente553b82825db79b593b546ca5ec34df487a8d653 (diff)
downloadmariadb-git-316577d69537d49d359a1928c6f54194aef19620.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into zippy.(none):/home/cmiller/work/mysql/m50--07C2P
-rw-r--r--configure.in2
-rw-r--r--mysql-test/lib/mtr_cases.pl2
-rwxr-xr-xmysql-test/mysql-test-run.pl1
-rw-r--r--scripts/mysql_explain_log.sh24
-rw-r--r--scripts/mysqld_safe.sh11
-rw-r--r--tests/mysql_client_test.c14
6 files changed, 35 insertions, 19 deletions
diff --git a/configure.in b/configure.in
index 192b35f56d8..cf3d7b72040 100644
--- a/configure.in
+++ b/configure.in
@@ -651,7 +651,7 @@ AC_ARG_ENABLE(assembler,
AC_MSG_CHECKING(if we should use assembler functions)
# For now we only support assembler on i386 and sparc systems
-AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386")
+AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index d8f3e61bd11..ed0395abd9d 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -116,7 +116,7 @@ sub collect_test_cases ($) {
while ( <DISABLED> )
{
chomp;
- if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
+ if ( /^\s*([^\s:]+)\s*:\s*(.*?)\s*$/ )
{
$disabled{$1}= $2;
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 14bd9b198a2..91a9a758d1d 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3074,6 +3074,7 @@ sub run_mysqltest ($) {
my $cmdline_mysql_client_test=
"$exe_mysql_client_test --no-defaults --testcase --user=root --silent " .
"--port=$master->[0]->{'path_myport'} " .
+ "--vardir=$opt_vardir " .
"--socket=$master->[0]->{'path_mysock'}";
if ( $glob_use_embedded_server )
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(<STDIN>) {
+ 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 <jan@mobile.de>, http://www.mobile.de
+ Jan Willamowius <jan@willamowius.de>, http://www.willamowius.de
Dennis Haney <davh@davh.dk> (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
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
#
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 7ad902afb6c..04eb427b35f 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -58,6 +58,7 @@ static unsigned int iter_count= 0;
static my_bool have_innodb= FALSE;
static const char *opt_basedir= "./";
+static const char *opt_vardir= "mysql-test/var";
static longlong opt_getopt_ll_test= 0;
@@ -14883,6 +14884,7 @@ static void test_bug17667()
struct buffer_and_length *statement_cursor;
FILE *log_file;
+ char *master_log_filename;
myheader("test_bug17667");
@@ -14894,7 +14896,13 @@ static void test_bug17667()
}
sleep(1); /* The server may need time to flush the data to the log. */
- log_file= fopen("var/log/master.log", "r");
+
+ master_log_filename = (char *) malloc(strlen(opt_vardir) + strlen("/log/master.log") + 1);
+ strcpy(master_log_filename, opt_vardir);
+ strcat(master_log_filename, "/log/master.log");
+ log_file= fopen(master_log_filename, "r");
+ free(master_log_filename);
+
if (log_file != NULL) {
for (statement_cursor= statements; statement_cursor->buffer != NULL;
@@ -14918,7 +14926,7 @@ static void test_bug17667()
}
else
{
- fprintf(stderr, "Could not find the log file, var/log/master.log, so "
+ fprintf(stderr, "Could not find the log file, VARDIR/log/master.log, so "
"test_bug17667 is \ninconclusive. Run test from the "
"mysql-test/mysql-test-run* program \nto set up the correct "
"environment for this test.\n\n");
@@ -15062,6 +15070,8 @@ static struct my_option client_test_long_options[] =
{"user", 'u', "User for login if not current user", (char **) &opt_user,
(char **) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"vardir", 'v', "Data dir for tests.", (gptr*) &opt_vardir,
+ (gptr*) &opt_vardir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"getopt-ll-test", 'g', "Option for testing bug in getopt library",
(char **) &opt_getopt_ll_test, (char **) &opt_getopt_ll_test, 0,
GET_LL, REQUIRED_ARG, 0, 0, LONGLONG_MAX, 0, 0, 0},