Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-29 22:52:32+01:00, msvensson@shellback.(none) +15 -0
Merge 192.168.0.10:mysql/work/my51-work
into shellback.(none):/home/msvensson/mysql/mysql-5.1-merge-from5.0-maint
MERGE: 1.2384.1.21
BitKeeper/etc/ignore@stripped, 2006-11-29 22:52:21+01:00, msvensson@shellback.(none) +0 -0
auto-union
MERGE: 1.262.1.2
client/mysql.cc@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.243.1.2
mysql-test/lib/mtr_process.pl@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.60.1.1
mysql-test/lib/mtr_report.pl@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.40.1.3
mysql-test/mysql-test-run.pl@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.241.1.4
mysql-test/r/func_misc.result@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.27.1.2
mysql-test/r/mysql.result@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +5 -0
Auto merged
MERGE: 1.28.1.1
mysql-test/r/rpl_000015.result@stripped, 2006-11-29 22:52:26+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.38.1.1
mysql-test/t/mysql.test@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +4 -0
Auto merged
MERGE: 1.27.1.2
mysql-test/t/rpl_000015.test@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.36.1.1
sql-common/my_time.c@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.28.2.4
sql/item_func.h@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.152.1.2
sql/item_timefunc.cc@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.137.7.4
sql/mysqld.cc@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.593.1.2
sql/sql_parse.cc@stripped, 2006-11-29 22:52:27+01:00, msvensson@shellback.(none) +0 -0
Auto merged
MERGE: 1.595.3.3
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-5.1-merge-from5.0-maint/RESYNC
--- 1.594/sql/mysqld.cc 2006-11-29 22:52:38 +01:00
+++ 1.595/sql/mysqld.cc 2006-11-29 22:52:38 +01:00
@@ -1610,7 +1610,7 @@
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
{
sql_print_error("The socket file path is too long (> %u): %s",
- sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
+ (uint) sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
unireg_abort(1);
}
if ((unix_sock= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
@@ -2121,7 +2121,7 @@
#ifdef HAVE_STACKTRACE
if (!(test_flags & TEST_NO_STACKTRACE))
{
- fprintf(stderr,"thd=%p\n",thd);
+ fprintf(stderr,"thd: 0x%lx\n",(long) thd);
print_stacktrace(thd ? (gptr) thd->thread_stack : (gptr) 0,
thread_stack);
}
@@ -3219,7 +3219,7 @@
using_update_log=1;
}
- if (plugin_init(0))
+ if (plugin_init(opt_bootstrap))
{
sql_print_error("Failed to init plugins.");
return 1;
@@ -3537,7 +3537,7 @@
if (stack_size && stack_size < thread_stack)
{
if (global_system_variables.log_warnings)
- sql_print_warning("Asked for %ld thread stack, but got %ld",
+ sql_print_warning("Asked for %lu thread stack, but got %ld",
thread_stack, (long) stack_size);
#if defined(__ia64__) || defined(__ia64)
thread_stack= stack_size*2;
@@ -4083,7 +4083,7 @@
int error;
thread_created++;
threads.append(thd);
- DBUG_PRINT("info",(("creating thread %d"), thd->thread_id));
+ DBUG_PRINT("info",(("creating thread %lu"), thd->thread_id));
thd->connect_time = time(NULL);
if ((error=pthread_create(&thd->real_id,&connection_attrib,
handle_one_connection,
@@ -5347,7 +5347,8 @@
(gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"merge", OPT_MERGE, "Enable Merge storage engine. Disable with \
--skip-merge.",
- (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+ (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
+ 0},
{"myisam-recover", OPT_MYISAM_RECOVER,
"Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.",
(gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0,
--- 1.41/mysql-test/lib/mtr_report.pl 2006-11-29 22:52:39 +01:00
+++ 1.42/mysql-test/lib/mtr_report.pl 2006-11-29 22:52:39 +01:00
@@ -43,7 +43,7 @@
my $reject_file= "r/$tname.reject";
my $result_file= "r/$tname.result";
- my $log_file= "r/$tname.log";
+ my $log_file= "$::opt_vardir/log/$tname.log";
my $eval_file= "r/$tname.eval";
if ( $::opt_suite ne "main" )
@@ -252,6 +252,7 @@
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x",
"InnoDB: Warning", "missing DBUG_RETURN",
"mysqld: Warning",
+ "allocated at line",
"Attempting backtrace", "Assertion .* failed" )
{
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
--- 1.247/mysql-test/mysql-test-run.pl 2006-11-29 22:52:39 +01:00
+++ 1.248/mysql-test/mysql-test-run.pl 2006-11-29 22:52:39 +01:00
@@ -63,7 +63,6 @@
use Sys::Hostname;
use IO::Socket;
use IO::Socket::INET;
-use Data::Dumper;
use strict;
use warnings;
@@ -87,6 +86,7 @@
require "lib/mtr_match.pl";
require "lib/mtr_misc.pl";
require "lib/mtr_stress.pl";
+require "lib/mtr_unique.pl";
$Devel::Trace::TRACE= 1;
@@ -202,6 +202,7 @@
our $opt_manual_gdb;
our $opt_manual_ddd;
our $opt_manual_debug;
+our $opt_mtr_build_thread=0;
our $opt_debugger;
our $opt_client_debugger;
@@ -216,6 +217,11 @@
our $instance_manager;
+our $opt_master_myport;
+our $opt_slave_myport;
+our $im_port;
+our $im_mysqld1_port;
+our $im_mysqld2_port;
our $opt_ndbcluster_port;
our $opt_ndbconnectstring;
our $opt_ndbcluster_port_slave;
@@ -310,6 +316,7 @@
sub main ();
sub initial_setup ();
sub command_line_setup ();
+sub set_mtr_build_thread_ports($);
sub datadir_list_setup ();
sub executable_setup ();
sub environment_setup ();
@@ -439,7 +446,6 @@
mtr_exit(0);
}
-
##############################################################################
#
# Default settings
@@ -453,45 +459,26 @@
$opt_suite= "main"; # Special default suite
my $opt_comment;
- my $opt_master_myport= 9306;
- my $opt_slave_myport= 9308;
+ $opt_master_myport= 9306;
+ $opt_slave_myport= 9308;
$opt_ndbcluster_port= 9310;
$opt_ndbcluster_port_slave= 9311;
- my $im_port= 9312;
- my $im_mysqld1_port= 9313;
- my $im_mysqld2_port= 9314;
+ $im_port= 9312;
+ $im_mysqld1_port= 9313;
+ $im_mysqld2_port= 9314;
+
+ # If so requested, we try to avail ourselves of a unique build thread number.
+ if ( $ENV{'MTR_BUILD_THREAD'} ) {
+ if ( lc($ENV{'MTR_BUILD_THREAD'}) eq 'auto' ) {
+ print "Requesting build thread... ";
+ $ENV{'MTR_BUILD_THREAD'} = mtr_require_unique_id_and_wait("/tmp/mysql-test-ports", 200, 299);
+ print "got ".$ENV{'MTR_BUILD_THREAD'}."\n";
+ }
+ }
- #
- # To make it easier for different devs to work on the same host,
- # an environment variable can be used to control all ports. A small
- # number is to be used, 0 - 16 or similar.
- #
- # Note the MASTER_MYPORT has to be set the same in all 4.x and 5.x
- # versions of this script, else a 4.0 test run might conflict with a
- # 5.1 test run, even if different MTR_BUILD_THREAD is used. This means
- # all port numbers might not be used in this version of the script.
- #
- # Also note the limiteation of ports we are allowed to hand out. This
- # differs between operating systems and configuration, see
- # http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
- # But a fairly safe range seems to be 5001 - 32767
if ( $ENV{'MTR_BUILD_THREAD'} )
{
- # Up to two masters, up to three slaves
- $opt_master_myport= $ENV{'MTR_BUILD_THREAD'} * 10 + 10000; # and 1
- $opt_slave_myport= $opt_master_myport + 2; # and 3 4
- $opt_ndbcluster_port= $opt_master_myport + 5;
- $opt_ndbcluster_port_slave= $opt_master_myport + 6;
- $im_port= $opt_master_myport + 7;
- $im_mysqld1_port= $opt_master_myport + 8;
- $im_mysqld2_port= $opt_master_myport + 9;
- }
-
- if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 )
- {
- mtr_error("MTR_BUILD_THREAD number results in a port",
- "outside 5001 - 32767",
- "($opt_master_myport - $opt_master_myport + 10)");
+ set_mtr_build_thread_ports($ENV{'MTR_BUILD_THREAD'});
}
# This is needed for test log evaluation in "gen-build-status-page"
@@ -543,6 +530,7 @@
'im-port=i' => \$im_port, # Instance Manager port.
'im-mysqld1-port=i' => \$im_mysqld1_port, # Port of mysqld, controlled by IM
'im-mysqld2-port=i' => \$im_mysqld2_port, # Port of mysqld, controlled by IM
+ 'mtr-build-thread=i' => \$opt_mtr_build_thread,
# Test case authoring
'record' => \$opt_record,
@@ -623,6 +611,15 @@
$glob_scriptname= basename($0);
+ if ($opt_mtr_build_thread != 0)
+ {
+ set_mtr_build_thread_ports($opt_mtr_build_thread)
+ }
+ elsif ($ENV{'MTR_BUILD_THREAD'})
+ {
+ $opt_mtr_build_thread= $ENV{'MTR_BUILD_THREAD'};
+ }
+
# We require that we are in the "mysql-test" directory
# to run mysql-test-run
if (! -f $glob_scriptname)
@@ -771,7 +768,7 @@
{
mtr_report("Using tmpfs in $fs");
$opt_mem= "$fs/var";
- $opt_mem .= $ENV{'MTR_BUILD_THREAD'} if $ENV{'MTR_BUILD_THREAD'};
+ $opt_mem .= $opt_mtr_build_thread if $opt_mtr_build_thread;
last;
}
}
@@ -1210,6 +1207,43 @@
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
}
+#
+# To make it easier for different devs to work on the same host,
+# an environment variable can be used to control all ports. A small
+# number is to be used, 0 - 16 or similar.
+#
+# Note the MASTER_MYPORT has to be set the same in all 4.x and 5.x
+# versions of this script, else a 4.0 test run might conflict with a
+# 5.1 test run, even if different MTR_BUILD_THREAD is used. This means
+# all port numbers might not be used in this version of the script.
+#
+# Also note the limitation of ports we are allowed to hand out. This
+# differs between operating systems and configuration, see
+# http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
+# But a fairly safe range seems to be 5001 - 32767
+#
+
+sub set_mtr_build_thread_ports($) {
+ my $mtr_build_thread= shift;
+
+ # Up to two masters, up to three slaves
+ $opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1
+ $opt_slave_myport= $opt_master_myport + 2; # and 3 4
+ $opt_ndbcluster_port= $opt_master_myport + 5;
+ $opt_ndbcluster_port_slave= $opt_master_myport + 6;
+ $im_port= $opt_master_myport + 7;
+ $im_mysqld1_port= $opt_master_myport + 8;
+ $im_mysqld2_port= $opt_master_myport + 9;
+
+ if ( $opt_master_myport < 5001 or $opt_master_myport + 10 >= 32767 )
+ {
+ mtr_error("MTR_BUILD_THREAD number results in a port",
+ "outside 5001 - 32767",
+ "($opt_master_myport - $opt_master_myport + 10)");
+ }
+}
+
+
sub datadir_list_setup () {
# Make a list of all data_dirs
@@ -1488,7 +1522,7 @@
sub generate_cmdline_mysqldump ($) {
my($mysqld) = @_;
return
- "$exe_mysqldump --no-defaults -uroot " .
+ "$exe_mysqldump --no-defaults --debug-info -uroot " .
"--port=$mysqld->{'port'} " .
"--socket=$mysqld->{'path_sock'} --password=";
}
@@ -1584,7 +1618,8 @@
if ( $source_dist )
{
push(@ld_library_paths, "$glob_basedir/libmysql/.libs/",
- "$glob_basedir/libmysql_r/.libs/");
+ "$glob_basedir/libmysql_r/.libs/",
+ "$glob_basedir/zlib.libs/");
}
else
{
@@ -1664,7 +1699,7 @@
$ENV{'IM_PATH_SOCK'}= $instance_manager->{path_sock};
$ENV{'IM_USERNAME'}= $instance_manager->{admin_login};
$ENV{'IM_PASSWORD'}= $instance_manager->{admin_password};
- $ENV{MTR_BUILD_THREAD}= 0 unless $ENV{MTR_BUILD_THREAD}; # Set if not set
+ $ENV{MTR_BUILD_THREAD}= $opt_mtr_build_thread;
$ENV{'EXE_MYSQL'}= $exe_mysql;
@@ -1725,7 +1760,7 @@
# Setup env so childs can execute mysqlcheck
# ----------------------------------------------------
my $cmdline_mysqlcheck=
- "$exe_mysqlcheck --no-defaults -uroot " .
+ "$exe_mysqlcheck --no-defaults --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1776,7 +1811,7 @@
# Setup env so childs can execute mysqlimport
# ----------------------------------------------------
my $cmdline_mysqlimport=
- "$exe_mysqlimport -uroot " .
+ "$exe_mysqlimport --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1792,7 +1827,7 @@
# Setup env so childs can execute mysqlshow
# ----------------------------------------------------
my $cmdline_mysqlshow=
- "$exe_mysqlshow -uroot " .
+ "$exe_mysqlshow --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1808,7 +1843,7 @@
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
"$exe_mysqlbinlog" .
- " --no-defaults --local-load=$opt_tmpdir";
+ " --no-defaults --debug-info --local-load=$opt_tmpdir";
if ( $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
@@ -1825,7 +1860,7 @@
# Setup env so childs can execute mysql
# ----------------------------------------------------
my $cmdline_mysql=
- "$exe_mysql --no-defaults --host=localhost --user=root --password= " .
+ "$exe_mysql --no-defaults --debug-info --host=localhost --user=root --password= " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} ".
"--character-sets-dir=$path_charsetsdir";
@@ -2117,6 +2152,12 @@
}
closedir(DIR);
}
+
+ # Remove old log files
+ foreach my $name (glob("r/*.progress r/*.log r/*.warnings"))
+ {
+ unlink($name);
+ }
}
@@ -2497,8 +2538,8 @@
sub rm_ndbcluster_tables ($) {
my $dir= shift;
- foreach my $bin ( glob("$dir/cluster/apply_status*"),
- glob("$dir/cluster/schema*") )
+ foreach my $bin ( glob("$dir/mysql/apply_status*"),
+ glob("$dir/mysql/schema*"))
{
unlink($bin);
}
@@ -3057,10 +3098,6 @@
if -f $path_current_test_log;
mtr_appendfile_to_file($path_timefile, $path_mysqltest_log)
if -f $path_timefile;
-
- # Remove the file that mysqltest writes info to
- unlink($path_timefile);
-
}
@@ -3088,14 +3125,14 @@
{
my ($tinfo)= @_;
- # Open mysqltest.log
+ # Open mysqltest-time
my $F= IO::File->new($path_timefile) or
mtr_error("can't open file \"$path_timefile\": $!");
my $reason;
while ( my $line= <$F> )
{
- # Look for "reason: <reason fo skiping test>"
+ # Look for "reason: <reason for skipping test>"
if ( $line =~ /reason: (.*)/ )
{
$reason= $1;
@@ -3234,6 +3271,9 @@
my $res= run_mysqltest($tinfo);
mtr_report_test_name($tinfo);
+
+ do_after_run_mysqltest($tinfo);
+
if ( $res == 0 )
{
mtr_report_test_passed($tinfo);
@@ -3267,10 +3307,11 @@
"mysqltest returned unexpected code $res, it has probably crashed";
report_failure_and_restart($tinfo);
}
-
- do_after_run_mysqltest($tinfo);
}
+ # Remove the file that mysqltest writes info to
+ unlink($path_timefile);
+
# ----------------------------------------------------------------------
# Stop Instance Manager if we are processing an IM-test case.
# ----------------------------------------------------------------------
@@ -4219,12 +4260,12 @@
# tables ok FIXME This is a workaround so that only one mysqld
# create the tables
if ( ! sleep_until_file_created(
- "$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
+ "$master->[0]->{'path_myddir'}/mysql/apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{
- $tinfo->{'comment'}= "Failed to create 'cluster/apply_status' table";
+ $tinfo->{'comment'}= "Failed to create 'mysql/apply_status' table";
return 1;
}
}
@@ -4419,6 +4460,7 @@
mtr_add_arg($args, "--skip-safemalloc");
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
+ mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
if ($tinfo->{'component_id'} eq 'im')
{
@@ -4868,6 +4910,8 @@
slave_port=PORT Specify the port number used by the first slave
ndbcluster-port=PORT Specify the port number used by cluster
ndbcluster-port-slave=PORT Specify the port number used by slave cluster
+ mtr-build-thread=# Specify unique collection of ports. Can also be set by
+ setting the environment variable MTR_BUILD_THREAD.
Options for test case authoring
@@ -4946,4 +4990,3 @@
mtr_exit(1);
}
-
--- 1.28/mysql-test/r/func_misc.result 2006-11-29 22:52:39 +01:00
+++ 1.29/mysql-test/r/func_misc.result 2006-11-29 22:52:39 +01:00
@@ -138,7 +138,7 @@
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` bigint(21) unsigned default NULL
+ `a` bigint(21) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
End of 5.0 tests
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2394) | msvensson | 29 Nov |