Commit 6273db41 authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

Merge neptunus.(none):/home/msvensson/mysql/same_tools/my51-same_tools

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
parents a682379a 3d098148
...@@ -46,7 +46,8 @@ mysqladmin_SOURCES = mysqladmin.cc ...@@ -46,7 +46,8 @@ mysqladmin_SOURCES = mysqladmin.cc
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS) mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c \ mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c \
$(yassl_dummy_link_fix) $(yassl_dummy_link_fix)
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) \
$(top_builddir)/mysys/libmysys.a
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \ mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \
$(top_srcdir)/mysys/my_new.cc \ $(top_srcdir)/mysys/my_new.cc \
$(top_srcdir)/mysys/my_bit.c \ $(top_srcdir)/mysys/my_bit.c \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
-- source include/master-slave.inc -- source include/master-slave.inc
let $SERVER_VERSION=`select version()`;
create table t1 (a int); create table t1 (a int);
insert into t1 values (10); insert into t1 values (10);
create table t2 (a int); create table t2 (a int);
......
...@@ -36,6 +36,7 @@ SELECT * FROM t1; ...@@ -36,6 +36,7 @@ SELECT * FROM t1;
--echo **** On Master **** --echo **** On Master ****
connection master; connection master;
DROP TABLE t1; DROP TABLE t1;
let $SERVER_VERSION=`select version()`;
--replace_result $SERVER_VERSION SERVER_VERSION --replace_result $SERVER_VERSION SERVER_VERSION
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/ --replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS; SHOW BINLOG EVENTS;
...@@ -11,8 +11,8 @@ insert into t1 values('ab_def'); ...@@ -11,8 +11,8 @@ insert into t1 values('ab_def');
insert into t1 values('abc_ef'); insert into t1 values('abc_ef');
insert into t1 values('abcd_f'); insert into t1 values('abcd_f');
insert into t1 values('abcde_'); insert into t1 values('abcde_');
-- should return ab_def # should return ab_def
select c1 as c1u from t1 where c1 like 'ab\_def'; select c1 as c1u from t1 where c1 like 'ab\_def';
-- should return ab_def # should return ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
drop table t1; drop table t1;
let $1 = 10;
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
echo $1;
dec $1;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
echo here is the sourced script;
--source include/sourced.inc
...@@ -164,31 +164,36 @@ sub collect_test_cases ($) { ...@@ -164,31 +164,36 @@ sub collect_test_cases ($) {
# Make a mapping of test name to a string that represents how that test # Make a mapping of test name to a string that represents how that test
# should be sorted among the other tests. Put the most important criterion # should be sorted among the other tests. Put the most important criterion
# first, then a sub-criterion, then sub-sub-criterion, et c. # first, then a sub-criterion, then sub-sub-criterion, et c.
foreach $tinfo (@$cases) foreach $tinfo (@$cases)
{ {
my @this_criteria = (); my @this_criteria = ();
#
# Append the criteria for sorting, in order of importance. # Append the criteria for sorting, in order of importance.
push(@this_criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~"); # Ending with "~" makes empty sort later than filled #
push(@this_criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0")); push(@this_criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
push(@this_criteria, "restart=" . ($tinfo->{'master_restart'} ? "1" : "0")); push(@this_criteria, "restart=" . ($tinfo->{'master_restart'} ? "1" : "0"));
push(@this_criteria, "big_test=" . ($tinfo->{'big_test'} ? "1" : "0")); # Group test with similar options together.
push(@this_criteria, join("|", sort keys %{$tinfo})); # Group similar things together. The values may differ substantially. FIXME? # Ending with "~" makes empty sort later than filled
push(@this_criteria, $tinfo->{'name'}); # Finally, order by the name push(@this_criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
# Finally, order by the name
push(@this_criteria, $tinfo->{'name'});
$sort_criteria{$tinfo->{"name"}} = join(" ", @this_criteria); $sort_criteria{$tinfo->{"name"}} = join(" ", @this_criteria);
} }
@$cases = sort { $sort_criteria{$a->{"name"}} cmp $sort_criteria{$b->{"name"}}; } @$cases; @$cases = sort { $sort_criteria{$a->{"name"}} cmp $sort_criteria{$b->{"name"}}; } @$cases;
### For debugging the sort-order if ( $::opt_script_debug )
# foreach $tinfo (@$cases) {
# { # For debugging the sort-order
# print $sort_criteria{$tinfo->{"name"}}; foreach $tinfo (@$cases)
# print " -> \t"; {
# print $tinfo->{"name"}; print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n");
# print "\n"; }
# } }
} }
return $cases; return $cases;
......
...@@ -12,6 +12,7 @@ sub mtr_fromfile ($); ...@@ -12,6 +12,7 @@ sub mtr_fromfile ($);
sub mtr_tofile ($@); sub mtr_tofile ($@);
sub mtr_tonewfile($@); sub mtr_tonewfile($@);
sub mtr_lastlinefromfile($); sub mtr_lastlinefromfile($);
sub mtr_appendfile_to_file ($$);
############################################################################## ##############################################################################
# #
...@@ -170,4 +171,17 @@ sub mtr_tonewfile ($@) { ...@@ -170,4 +171,17 @@ sub mtr_tonewfile ($@) {
close FILE; close FILE;
} }
sub mtr_appendfile_to_file ($$) {
my $from_file= shift;
my $to_file= shift;
open(TOFILE,">>",$to_file) or mtr_error("can't open file \"$to_file\": $!");
open(FROMFILE,"<",$from_file)
or mtr_error("can't open file \"$from_file\": $!");
print TOFILE while (<FROMFILE>);
close FROMFILE;
close TOFILE;
}
1; 1;
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
# and is part of the translation of the Bourne shell script with the # and is part of the translation of the Bourne shell script with the
# same name. # same name.
#use Carp qw(cluck);
use Socket; use Socket;
use Errno; use Errno;
use strict; use strict;
...@@ -93,8 +92,6 @@ sub spawn_impl ($$$$$$$$) { ...@@ -93,8 +92,6 @@ sub spawn_impl ($$$$$$$$) {
my $pid_file= shift; # FIXME my $pid_file= shift; # FIXME
my $spawn_opts= shift; my $spawn_opts= shift;
mtr_error("Can't spawn with empty \"path\"") unless defined $path;
if ( $::opt_script_debug ) if ( $::opt_script_debug )
{ {
print STDERR "\n"; print STDERR "\n";
...@@ -118,6 +115,9 @@ sub spawn_impl ($$$$$$$$) { ...@@ -118,6 +115,9 @@ sub spawn_impl ($$$$$$$$) {
print STDERR "#### ", "-" x 78, "\n"; print STDERR "#### ", "-" x 78, "\n";
} }
mtr_error("Can't spawn with empty \"path\"") unless defined $path;
FORK: FORK:
{ {
my $pid= fork(); my $pid= fork();
...@@ -344,8 +344,8 @@ sub mtr_kill_leftovers () { ...@@ -344,8 +344,8 @@ sub mtr_kill_leftovers () {
# Stop or kill Instance Manager and all its children. If we failed to do # Stop or kill Instance Manager and all its children. If we failed to do
# that, we can only abort -- there is nothing left to do. # that, we can only abort -- there is nothing left to do.
mtr_error("Failed to stop Instance Manager.") # mtr_error("Failed to stop Instance Manager.")
unless mtr_im_stop($::instance_manager); # unless mtr_im_stop($::instance_manager);
# Start shutdown of masters and slaves. Don't touch IM-managed mysqld # Start shutdown of masters and slaves. Don't touch IM-managed mysqld
# instances -- they should be stopped by mtr_im_stop(). # instances -- they should be stopped by mtr_im_stop().
...@@ -377,40 +377,41 @@ sub mtr_kill_leftovers () { ...@@ -377,40 +377,41 @@ sub mtr_kill_leftovers () {
$srv->{'pid'}= 0; # Assume we are done with it $srv->{'pid'}= 0; # Assume we are done with it
} }
# Start shutdown of clusters. if ( ! $::opt_skip_ndbcluster )
mtr_debug("Shutting down cluster...");
foreach my $cluster (@{$::clusters})
{ {
mtr_debug(" - cluster " . # Start shutdown of clusters.
"(pid: $cluster->{pid}; " . mtr_debug("Shutting down cluster...");
"pid file: '$cluster->{path_pid})");
my $pid= mtr_ndbmgm_start($cluster, "shutdown");
# Save the pid of the ndb_mgm process
$admin_pids{$pid}= 1;
push(@kill_pids,{ foreach my $cluster (@{$::clusters})
pid => $cluster->{'pid'}, {
pidfile => $cluster->{'path_pid'} mtr_debug(" - cluster " .
}); "(pid: $cluster->{pid}; " .
"pid file: '$cluster->{path_pid})");
$cluster->{'pid'}= 0; # Assume we are done with it
my $pid= mtr_ndbmgm_start($cluster, "shutdown");
foreach my $ndbd (@{$cluster->{'ndbds'}}) # Save the pid of the ndb_mgm process
{ $admin_pids{$pid}= 1;
mtr_debug(" - ndbd " .
"(pid: $ndbd->{pid}; " .
"pid file: '$ndbd->{path_pid})");
push(@kill_pids,{ push(@kill_pids,{
pid => $ndbd->{'pid'}, pid => $cluster->{'pid'},
pidfile => $ndbd->{'path_pid'}, pidfile => $cluster->{'path_pid'}
}); });
$ndbd->{'pid'}= 0; # Assume we are done with it
$cluster->{'pid'}= 0; # Assume we are done with it
foreach my $ndbd (@{$cluster->{'ndbds'}})
{
mtr_debug(" - ndbd " .
"(pid: $ndbd->{pid}; " .
"pid file: '$ndbd->{path_pid})");
push(@kill_pids,{
pid => $ndbd->{'pid'},
pidfile => $ndbd->{'path_pid'},
});
$ndbd->{'pid'}= 0; # Assume we are done with it
}
} }
} }
......
#!/usr/bin/perl #!/usr/bin/perl
# -*- cperl -*- # -*- cperl -*-
# This is a transformation of the "mysql-test-run" Bourne shell script
# to Perl. There are reasons this rewrite is not the prettiest Perl
# you have seen
# #
# - The original script is huge and for most part uncommented, ##############################################################################
# not even a usage description of the flags. #
# mysql-test-run.pl
#
# Tool used for executing a suite of .test file
# #
# - There has been an attempt to write a replacement in C for the # See the "MySQL Test framework manual" for more information
# original Bourne shell script. It was kind of working but lacked # http://dev.mysql.com/doc/mysqltest/en/index.html
# lot of functionality to really be a replacement. Not to redo
# that mistake and catch all the obscure features of the original
# script, the rewrite in Perl is more close to the original script
# meaning it also share some of the ugly parts as well.
# #
# - The original intention was that this script was to be a prototype # Please keep the test framework tools identical in all versions!
# to be the base for a new C version with full functionality. Since #
# then it was decided that the Perl version should replace the ##############################################################################
# Bourne shell version, but the Perl style still reflects the wish
# to make the Perl to C step easy.
# #
# Some coding style from the original intent has been kept # Coding style directions for this perl script
# #
# - To make this Perl script easy to alter even for those that not # - To make this Perl script easy to alter even for those that not
# code Perl that often, the coding style is as close as possible to # code Perl that often, keeep the coding style as close as possible to
# the C/C++ MySQL coding standard. # the C/C++ MySQL coding standard.
# #
# - All lists of arguments to send to commands are Perl lists/arrays, # - All lists of arguments to send to commands are Perl lists/arrays,
...@@ -42,15 +36,6 @@ ...@@ -42,15 +36,6 @@
# the information. This separates the "find information" from the # the information. This separates the "find information" from the
# "do the work" and makes the program more easy to maintain. # "do the work" and makes the program more easy to maintain.
# #
# - At the moment, there are tons of "global" variables that control
# this script, even accessed from the files in "lib/*.pl". This
# will change over time, for now global variables are used instead
# of using %opt, %path and %exe hashes, because I want more
# compile time checking, that hashes would not give me. Once this
# script is debugged, hashes will be used and passed as parameters
# to functions, to more closely mimic how it would be coded in C
# using structs.
#
# - The rule when it comes to the logic of this program is # - The rule when it comes to the logic of this program is
# #
# command_line_setup() - is to handle the logic between flags # command_line_setup() - is to handle the logic between flags
...@@ -66,10 +51,6 @@ ...@@ -66,10 +51,6 @@
# "http://www.plover.com/~mjd/perl/Trace/" and run this script like # "http://www.plover.com/~mjd/perl/Trace/" and run this script like
# "perl -d:Trace mysql-test-run.pl" # "perl -d:Trace mysql-test-run.pl"
# #
# FIXME Save a PID file from this code as well, to record the process
# id we think it has. In Cygwin, a fork creates one Cygwin process,
# and then the real Win32 process. Cygwin Perl can only kill Cygwin
# processes. And "mysqld --bootstrap ..." doesn't save a PID file.
$Devel::Trace::TRACE= 0; # Don't trace boring init stuff $Devel::Trace::TRACE= 0; # Don't trace boring init stuff
...@@ -80,13 +61,17 @@ use File::Copy; ...@@ -80,13 +61,17 @@ use File::Copy;
use Cwd; use Cwd;
use Getopt::Long; use Getopt::Long;
use Sys::Hostname; use Sys::Hostname;
#use Carp;
use IO::Socket; use IO::Socket;
use IO::Socket::INET; use IO::Socket::INET;
use Data::Dumper; use Data::Dumper;
use strict; use strict;
#use diagnostics; #use diagnostics;
our $glob_win32_perl= ($^O eq "MSWin32"); # ActiveState Win32 Perl
our $glob_cygwin_perl= ($^O eq "cygwin"); # Cygwin Perl
our $glob_win32= ($glob_win32_perl or $glob_cygwin_perl);
our $glob_netware= ($^O eq "NetWare"); # NetWare
require "lib/mtr_cases.pl"; require "lib/mtr_cases.pl";
require "lib/mtr_im.pl"; require "lib/mtr_im.pl";
require "lib/mtr_process.pl"; require "lib/mtr_process.pl";
...@@ -130,10 +115,7 @@ our @mysqld_src_dirs= ...@@ -130,10 +115,7 @@ our @mysqld_src_dirs=
# structs. We let each struct be a separate hash. # structs. We let each struct be a separate hash.
# Misc global variables # Misc global variables
our $mysql_version_id;
our $glob_win32= 0; # OS and native Win32 executables
our $glob_win32_perl= 0; # ActiveState Win32 Perl
our $glob_cygwin_perl= 0; # Cygwin Perl
our $glob_mysql_test_dir= undef; our $glob_mysql_test_dir= undef;
our $glob_mysql_bench_dir= undef; our $glob_mysql_bench_dir= undef;
our $glob_hostname= undef; our $glob_hostname= undef;
...@@ -147,42 +129,36 @@ our @glob_test_mode; ...@@ -147,42 +129,36 @@ our @glob_test_mode;
our $glob_basedir; our $glob_basedir;
# The total result
our $path_charsetsdir; our $path_charsetsdir;
our $path_client_bindir; our $path_client_bindir;
our $path_language; our $path_language;
our $path_timefile; our $path_timefile;
our $path_snapshot; our $path_snapshot;
our $path_slave_load_tmpdir; # What is this?!
our $path_mysqltest_log; our $path_mysqltest_log;
our $path_current_test_log; our $path_current_test_log;
our $path_my_basedir; our $path_my_basedir;
our $opt_vardir; # A path but set directly on cmd line our $opt_vardir; # A path but set directly on cmd line
our $opt_vardir_trace; # unix formatted opt_vardir for trace files our $path_vardir_trace; # unix formatted opt_vardir for trace files
our $opt_tmpdir; # A path but set directly on cmd line our $opt_tmpdir; # A path but set directly on cmd line
our $opt_usage; our $opt_usage;
our $opt_suite; our $opt_suite;
our $opt_netware;
our $opt_script_debug= 0; # Script debugging, enable with --script-debug our $opt_script_debug= 0; # Script debugging, enable with --script-debug
our $opt_verbose= 0; # Verbose output, enable with --verbose our $opt_verbose= 0; # Verbose output, enable with --verbose
# Options FIXME not all....
our $exe_master_mysqld; our $exe_master_mysqld;
our $exe_mysql; our $exe_mysql;
our $exe_mysqladmin; our $exe_mysqladmin;
our $exe_mysqlbinlog; our $exe_mysqlbinlog;
our $exe_mysql_client_test; our $exe_mysql_client_test;
our $exe_mysqld; our $exe_mysqld;
our $exe_mysqlcheck; # Called from test case our $exe_mysqlcheck;
our $exe_mysqldump; # Called from test case our $exe_mysqldump;
our $exe_mysqlslap; # Called from test case our $exe_mysqlslap;
our $exe_mysqlimport; # Called from test case our $exe_mysqlimport;
our $exe_mysqlshow; # Called from test case our $exe_mysqlshow;
our $exe_mysql_fix_system_tables; our $exe_mysql_fix_system_tables;
our $exe_mysqltest; our $exe_mysqltest;
our $exe_ndbd; our $exe_ndbd;
...@@ -218,6 +194,7 @@ our $opt_fast; ...@@ -218,6 +194,7 @@ our $opt_fast;
our $opt_force; our $opt_force;
our $opt_reorder= 0; our $opt_reorder= 0;
our $opt_enable_disabled; our $opt_enable_disabled;
our $opt_mem;
our $opt_gcov; our $opt_gcov;
our $opt_gcov_err; our $opt_gcov_err;
...@@ -239,7 +216,7 @@ our $opt_gprof_dir; ...@@ -239,7 +216,7 @@ our $opt_gprof_dir;
our $opt_gprof_master; our $opt_gprof_master;
our $opt_gprof_slave; our $opt_gprof_slave;
our $master; # Will be struct in C our $master;
our $slave; our $slave;
our $clusters; our $clusters;
...@@ -326,7 +303,7 @@ our $exe_ndb_waiter; ...@@ -326,7 +303,7 @@ our $exe_ndb_waiter;
our $path_ndb_tools_dir; our $path_ndb_tools_dir;
our $path_ndb_examples_dir; our $path_ndb_examples_dir;
our $exe_ndb_example; our $exe_ndb_example;
our $file_ndb_testrun_log; our $path_ndb_testrun_log;
our @data_dir_lst; our @data_dir_lst;
...@@ -334,6 +311,9 @@ our $used_binlog_format; ...@@ -334,6 +311,9 @@ our $used_binlog_format;
our $debug_compiled_binaries; our $debug_compiled_binaries;
our $glob_tot_real_time= 0; our $glob_tot_real_time= 0;
# Default values read from mysqld
our $default_mysqld_port;
###################################################################### ######################################################################
# #
# Function declarations # Function declarations
...@@ -343,14 +323,14 @@ our $glob_tot_real_time= 0; ...@@ -343,14 +323,14 @@ our $glob_tot_real_time= 0;
sub main (); sub main ();
sub initial_setup (); sub initial_setup ();
sub command_line_setup (); sub command_line_setup ();
sub snapshot_setup (); sub datadir_setup ();
sub executable_setup (); sub executable_setup ();
sub environment_setup (); sub environment_setup ();
sub kill_running_server (); sub kill_running_server ();
sub cleanup_stale_files (); sub cleanup_stale_files ();
sub check_ssl_support (); sub check_ssl_support ($);
sub check_running_as_root(); sub check_running_as_root();
sub check_ndbcluster_support (); sub check_ndbcluster_support ($);
sub rm_ndbcluster_tables ($); sub rm_ndbcluster_tables ($);
sub ndbcluster_start_install ($); sub ndbcluster_start_install ($);
sub ndbcluster_start ($$); sub ndbcluster_start ($$);
...@@ -366,8 +346,8 @@ sub run_testcase_stop_servers ($$$); ...@@ -366,8 +346,8 @@ sub run_testcase_stop_servers ($$$);
sub run_testcase_start_servers ($); sub run_testcase_start_servers ($);
sub run_testcase_check_skip_test($); sub run_testcase_check_skip_test($);
sub report_failure_and_restart ($); sub report_failure_and_restart ($);
sub do_before_start_master ($$); sub do_before_start_master ($);
sub do_before_start_slave ($$); sub do_before_start_slave ($);
sub ndbd_start ($$$); sub ndbd_start ($$$);
sub ndb_mgmd_start ($); sub ndb_mgmd_start ($);
sub mysqld_start ($$$); sub mysqld_start ($$$);
...@@ -389,11 +369,6 @@ sub main () { ...@@ -389,11 +369,6 @@ sub main () {
initial_setup(); initial_setup();
command_line_setup(); command_line_setup();
executable_setup(); executable_setup();
check_ndbcluster_support();
check_ssl_support();
check_debug_support();
environment_setup(); environment_setup();
signal_setup(); signal_setup();
...@@ -441,7 +416,6 @@ sub main () { ...@@ -441,7 +416,6 @@ sub main () {
unless $need_ndbcluster; unless $need_ndbcluster;
$opt_skip_im= 1 unless $need_im; $opt_skip_im= 1 unless $need_im;
snapshot_setup();
initialize_servers(); initialize_servers();
run_suite($opt_suite, $tests); run_suite($opt_suite, $tests);
...@@ -463,13 +437,8 @@ sub initial_setup () { ...@@ -463,13 +437,8 @@ sub initial_setup () {
$glob_scriptname= basename($0); $glob_scriptname= basename($0);
$glob_win32_perl= ($^O eq "MSWin32");
$glob_cygwin_perl= ($^O eq "cygwin");
$glob_win32= ($glob_win32_perl or $glob_cygwin_perl);
# We require that we are in the "mysql-test" directory # We require that we are in the "mysql-test" directory
# to run mysql-test-run # to run mysql-test-run
if (! -f $glob_scriptname) if (! -f $glob_scriptname)
{ {
mtr_error("Can't find the location for the mysql-test-run script\n" . mtr_error("Can't find the location for the mysql-test-run script\n" .
...@@ -493,13 +462,11 @@ sub initial_setup () { ...@@ -493,13 +462,11 @@ sub initial_setup () {
chomp($glob_mysql_test_dir); chomp($glob_mysql_test_dir);
} }
$glob_basedir= dirname($glob_mysql_test_dir); $glob_basedir= dirname($glob_mysql_test_dir);
# Expect mysql-bench to be located adjacent to the source tree, by default # Expect mysql-bench to be located adjacent to the source tree, by default
$glob_mysql_bench_dir= "$glob_basedir/../mysql-bench" $glob_mysql_bench_dir= "$glob_basedir/../mysql-bench"
unless defined $glob_mysql_bench_dir; unless defined $glob_mysql_bench_dir;
# needs to be same length to test logging (FIXME what???)
$path_slave_load_tmpdir= "../../var/tmp";
$path_my_basedir= $path_my_basedir=
$opt_source_dist ? $glob_mysql_test_dir : $glob_basedir; $opt_source_dist ? $glob_mysql_test_dir : $glob_basedir;
...@@ -661,12 +628,12 @@ sub command_line_setup () { ...@@ -661,12 +628,12 @@ sub command_line_setup () {
'tmpdir=s' => \$opt_tmpdir, 'tmpdir=s' => \$opt_tmpdir,
'vardir=s' => \$opt_vardir, 'vardir=s' => \$opt_vardir,
'benchdir=s' => \$glob_mysql_bench_dir, 'benchdir=s' => \$glob_mysql_bench_dir,
'mem' => \$opt_mem,
# Misc # Misc
'comment=s' => \$opt_comment, 'comment=s' => \$opt_comment,
'debug' => \$opt_debug, 'debug' => \$opt_debug,
'fast' => \$opt_fast, 'fast' => \$opt_fast,
'netware' => \$opt_netware,
'reorder' => \$opt_reorder, 'reorder' => \$opt_reorder,
'enable-disabled' => \$opt_enable_disabled, 'enable-disabled' => \$opt_enable_disabled,
'script-debug' => \$opt_script_debug, 'script-debug' => \$opt_script_debug,
...@@ -734,6 +701,32 @@ sub command_line_setup () { ...@@ -734,6 +701,32 @@ sub command_line_setup () {
} }
mtr_report("Using binlog format '$used_binlog_format'"); mtr_report("Using binlog format '$used_binlog_format'");
# --------------------------------------------------------------------------
# Check if we should speed up tests by trying to run on tmpfs
# --------------------------------------------------------------------------
if ( $opt_mem )
{
mtr_error("Can't use --mem and --vardir at the same time ")
if $opt_vardir;
mtr_error("Can't use --mem and --tmpdir at the same time ")
if $opt_tmpdir;
# Use /dev/shm as the preferred location for vardir and
# thus implicitly also tmpdir. Add other locations to list
my @tmpfs_locations= ("/dev/shm");
# One could maybe use "mount" to find tmpfs location(s)
foreach my $fs (@tmpfs_locations)
{
if ( -d $fs )
{
mtr_report("Using tmpfs in $fs");
$opt_mem= "$fs/var";
$opt_mem .= $ENV{'MTR_BUILD_THREAD'} if $ENV{'MTR_BUILD_THREAD'};
last;
}
}
}
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Set the "var/" directory, as it is the base for everything else # Set the "var/" directory, as it is the base for everything else
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -742,9 +735,18 @@ sub command_line_setup () { ...@@ -742,9 +735,18 @@ sub command_line_setup () {
{ {
$opt_vardir= "$glob_mysql_test_dir/var"; $opt_vardir= "$glob_mysql_test_dir/var";
} }
$opt_vardir_trace= $opt_vardir; elsif ( $mysql_version_id < 50000 )
{
# --vardir was specified
# It's only supported in 4.1 as a symlink from var/
# by setting up $opt_mem that will be created
$opt_mem= $opt_vardir;
$opt_vardir= undef;
}
$path_vardir_trace= $opt_vardir;
# Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/... # Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/...
$opt_vardir_trace=~ s/^\w://; $path_vardir_trace=~ s/^\w://;
# We make the path absolute, as the server will do a chdir() before usage # We make the path absolute, as the server will do a chdir() before usage
unless ( $opt_vardir =~ m,^/, or unless ( $opt_vardir =~ m,^/, or
...@@ -765,12 +767,6 @@ sub command_line_setup () { ...@@ -765,12 +767,6 @@ sub command_line_setup () {
# Do sanity checks of command line arguments # Do sanity checks of command line arguments
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
if ( ! $opt_socket )
{ # FIXME set default before reading options?
# $opt_socket= '@MYSQL_UNIX_ADDR@';
$opt_socket= "/tmp/mysql.sock"; # FIXME
}
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Look at the command line options and set script flags # Look at the command line options and set script flags
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -1120,11 +1116,12 @@ sub command_line_setup () { ...@@ -1120,11 +1116,12 @@ sub command_line_setup () {
$path_timefile= "$opt_vardir/log/mysqltest-time"; $path_timefile= "$opt_vardir/log/mysqltest-time";
$path_mysqltest_log= "$opt_vardir/log/mysqltest.log"; $path_mysqltest_log= "$opt_vardir/log/mysqltest.log";
$path_current_test_log= "$opt_vardir/log/current_test"; $path_current_test_log= "$opt_vardir/log/current_test";
$path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/"; $path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
} }
sub snapshot_setup () { sub datadir_setup () {
# Make a list of all data_dirs # Make a list of all data_dirs
@data_dir_lst = ( @data_dir_lst = (
...@@ -1152,6 +1149,107 @@ sub snapshot_setup () { ...@@ -1152,6 +1149,107 @@ sub snapshot_setup () {
# #
############################################################################## ##############################################################################
sub check_mysqld_features () {
#
# Execute "mysqld --no-defaults --help --verbose", that will
# print out version and a list of all features and settings
#
my $found_variable_list_start= 0;
my $spec_file= "$glob_mysql_test_dir/mysqld.spec.$$";
if ( mtr_run($exe_mysqld,
["--no-defaults",
"--verbose",
"--help"],
"", "$spec_file", "$spec_file", "") != 0 )
{
mtr_error("Failed to get version and list of features from %s",
$exe_mysqld);
}
my %mysqld_variables;
my $F= IO::File->new($spec_file) or
mtr_error("can't open file \"$spec_file\": $!");
while ( my $line= <$F> )
{
# First look for version
if ( !$mysql_version_id )
{
# Look for version
if ( $line =~ /^$exe_mysqld\s\sVer\s([0-9]*)\.([0-9]*)\.([0-9]*)/ )
{
#print "Major: $1 Minor: $2 Build: $3\n";
$mysql_version_id= $1*10000 + $2*100 + $3;
#print "mysql_version_id: $mysql_version_id\n";
mtr_report("MySQL Version $1.$2.$3");
}
}
else
{
if (!$found_variable_list_start)
{
# Look for start of variables list
if ( $line =~ /[\-]+\s[\-]+/ )
{
$found_variable_list_start= 1;
}
}
else
{
# Put variables into hash
if ( $line =~ /^([\S]+)[ \t]+(.*)$/ )
{
# print "$1=$2\n";
$mysqld_variables{$1}= $2;
}
else
{
# The variable list is ended with a blank line
if ( $line =~ /^[\s]*$/ )
{
last;
}
else
{
# Send out a warning, we should fix the variables that has no
# space between variable name and it's value
# or should it be fixed width column parsing? It does not
# look like that in function my_print_variables in my_getopt.c
mtr_warning("Could not parse variable list line : $line");
}
}
}
}
}
unlink($spec_file);
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
mtr_error("Could not find variabes list") unless $found_variable_list_start;
check_ndbcluster_support(\%mysqld_variables);
check_ssl_support(\%mysqld_variables);
check_debug_support(\%mysqld_variables);
if ( $mysql_version_id < 50000 )
{
# Instance manager is not supported until 5.0
$opt_skip_im= 1;
}
if ( $mysql_version_id < 50100 )
{
# Slave cluster is not supported until 5.1
$opt_skip_ndbcluster_slave= 1;
}
# Set default values from mysqld_variables
$opt_socket= %mysqld_variables->{'socket'};
$default_mysqld_port = %mysqld_variables->{'port'};
}
sub executable_setup () { sub executable_setup () {
# #
...@@ -1169,161 +1267,135 @@ sub executable_setup () { ...@@ -1169,161 +1267,135 @@ sub executable_setup () {
} }
} }
if ( $opt_source_dist ) # Look for the path where to find the client binaries
$path_client_bindir= mtr_path_exists("$glob_basedir/client",
"$glob_basedir/client_release",
"$glob_basedir/client_debug",
"$glob_basedir/client/release",
"$glob_basedir/client/debug",
"$glob_basedir/bin");
# Look for the mysqld executable
$exe_mysqld= mtr_exe_exists ("$glob_basedir/sql/mysqld",
"$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld",
"$path_client_bindir/mysqld-debug",
"$path_client_bindir/mysqld-max",
"$glob_basedir/libexec/mysqld",
"$glob_basedir/sql/release/mysqld",
"$glob_basedir/sql/debug/mysqld");
$exe_master_mysqld= $exe_master_mysqld || $exe_mysqld;
$exe_slave_mysqld= $exe_slave_mysqld || $exe_mysqld;
# Use the mysqld found above to find out what features are available
check_mysqld_features();
# Look for language files and charsetsdir, use same share
my $path_share= mtr_path_exists("$glob_basedir/share",
"$glob_basedir/sql/share",
"$glob_basedir/share/mysql",
"$glob_basedir/share");
$path_language= mtr_path_exists("$path_share/english");
$path_charsetsdir= mtr_path_exists("$path_share/charsets");
# Look for my_print_defaults
$exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults",
"$glob_basedir/extra/my_print_defaults",
"$glob_basedir/extra/release/my_print_defaults",
"$glob_basedir/extra/debug/my_print_defaults");
# Look for perror
$exe_perror= mtr_exe_exists("$glob_basedir/extra/perror",
"$path_client_bindir/perror",
"$glob_basedir/extra/release/perror",
"$glob_basedir/extra/debug/perror");
if ( ! $opt_skip_im )
{ {
if ( $glob_win32 ) # Look for instance manager binary - mysqlmanager
{ $exe_im=
$path_client_bindir= mtr_path_exists("$glob_basedir/client_release", mtr_exe_exists(
"$glob_basedir/client_debug", "$glob_basedir/server-tools/instance-manager/mysqlmanager",
"$glob_basedir/bin", "$glob_basedir/libexec/mysqlmanager");
# New CMake locations. }
"$glob_basedir/client/release",
"$glob_basedir/client/debug");
$exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld",
"$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-debug",
"$glob_basedir/sql/release/mysqld",
"$glob_basedir/sql/debug/mysqld");
$path_language= mtr_path_exists("$glob_basedir/share/english/",
"$glob_basedir/sql/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets",
"$glob_basedir/sql/share/charsets");
$exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults",
"$glob_basedir/extra/release/my_print_defaults",
"$glob_basedir/extra/debug/my_print_defaults");
$exe_perror=
mtr_exe_exists("$path_client_bindir/perror",
"$glob_basedir/extra/release/perror",
"$glob_basedir/extra/debug/perror");
}
else
{
$path_client_bindir= mtr_path_exists("$glob_basedir/client");
$exe_mysqld= mtr_exe_exists ("$glob_basedir/sql/mysqld");
$exe_mysqlslap= mtr_exe_exists ("$path_client_bindir/mysqlslap");
$path_language= mtr_path_exists("$glob_basedir/sql/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/sql/share/charsets");
$exe_im= mtr_exe_exists(
"$glob_basedir/server-tools/instance-manager/mysqlmanager");
$exe_my_print_defaults=
mtr_exe_exists("$glob_basedir/extra/my_print_defaults");
$exe_perror=
mtr_exe_exists("$glob_basedir/extra/perror");
}
if ( $glob_use_embedded_server ) # Look for the client binaries
{ $exe_mysqlcheck= mtr_exe_exists("$path_client_bindir/mysqlcheck");
my $path_examples= "$glob_basedir/libmysqld/examples"; $exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
$exe_mysqltest= mtr_exe_exists("$path_examples/mysqltest_embedded"); $exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport");
$exe_mysql_client_test= $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
mtr_exe_exists("$path_examples/mysql_client_test_embedded", $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
"/usr/bin/false"); $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
} $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
else if ( $mysql_version_id >= 50100 )
{ {
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
$exe_mysql_client_test= }
mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
"$glob_basedir/tests/release/mysql_client_test", # Look for mysql_fix_system_table script
"$glob_basedir/tests/debug/mysql_client_test", $exe_mysql_fix_system_tables=
"$path_client_bindir/mysql_client_test", mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
"/usr/bin/false"); "$path_client_bindir/mysql_fix_privilege_tables");
}
$exe_mysqlcheck= mtr_exe_exists("$path_client_bindir/mysqlcheck"); if ( ! $opt_skip_ndbcluster)
$exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump"); {
$exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport"); # Look for ndb tols and binaries
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow"); my $ndb_path= mtr_path_exists("$glob_basedir/ndb",
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog"); "$glob_basedir/storage/ndb");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $path_ndb_tools_dir= mtr_path_exists("$ndb_path/tools",
$exe_mysql_fix_system_tables= "$glob_basedir/bin");
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables", $exe_ndb_mgm=
"/usr/bin/false"); mtr_exe_exists("$ndb_path/src/mgmclient/ndb_mgm",
$path_ndb_tools_dir= mtr_path_exists("$glob_basedir/storage/ndb/tools"); "$glob_basedir/bin/ndb_mgm");
$path_ndb_examples_dir= mtr_path_exists("$glob_basedir/storage/ndb/ndbapi-examples"); $exe_ndb_mgmd=
$exe_ndb_example= mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple"); mtr_exe_exists("$ndb_path/src/mgmsrv/ndb_mgmd",
$exe_ndb_mgm= "$glob_basedir/storage/ndb/src/mgmclient/ndb_mgm"; "$glob_basedir/bin/ndb_mgmd");
$exe_ndb_waiter= "$glob_basedir/storage/ndb/tools/ndb_waiter"; $exe_ndb_waiter=
$exe_ndbd= "$glob_basedir/storage/ndb/src/kernel/ndbd"; mtr_exe_exists("$ndb_path/tools/ndb_waiter",
$exe_ndb_mgmd= "$glob_basedir/storage/ndb/src/mgmsrv/ndb_mgmd"; "$glob_basedir/bin/ndb_waiter");
$lib_udf_example= $exe_ndbd=
mtr_file_exists("$glob_basedir/sql/.libs/udf_example.so", mtr_exe_exists("$ndb_path/src/kernel/ndbd",
"$glob_basedir/sql/release/udf_example.dll", "$glob_basedir/bin/ndbd");
"$glob_basedir/sql/debug/udf_example.dll"); }
# Look for the udf_example library
$lib_udf_example=
mtr_file_exists("$glob_basedir/sql/.libs/udf_example.so");
# Look for mysqltest executable
if ( $glob_use_embedded_server )
{
$exe_mysqltest=
mtr_exe_exists("$glob_basedir/libmysqld/examples/mysqltest_embedded",
"$path_client_bindir/mysqltest_embedded");
} }
else else
{ {
$path_client_bindir= mtr_path_exists("$glob_basedir/bin");
$exe_mysqlcheck= mtr_exe_exists("$path_client_bindir/mysqlcheck");
$exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
$exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport");
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
$exe_mysql_fix_system_tables=
mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
"$glob_basedir/scripts/mysql_fix_privilege_tables",
"/usr/bin/false");
$exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults");
$exe_perror=
mtr_exe_exists("$path_client_bindir/perror");
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
"$glob_basedir/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/mysql/charsets",
"$glob_basedir/share/charsets");
if ( $glob_win32 )
{
$exe_mysqld= mtr_exe_exists ("$glob_basedir/bin/mysqld-nt",
"$glob_basedir/bin/mysqld",
"$glob_basedir/bin/mysqld-debug",);
}
else
{
$exe_mysqld= mtr_exe_exists ("$glob_basedir/libexec/mysqld",
"$glob_basedir/bin/mysqld");
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
}
$exe_im= mtr_exe_exists("$glob_basedir/libexec/mysqlmanager",
"$glob_basedir/bin/mysqlmanager");
if ( $glob_use_embedded_server )
{
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest_embedded");
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/tests/mysql_client_test_embedded",
"$path_client_bindir/mysql_client_test_embedded",
"/usr/bin/false");
}
else
{
$exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
$exe_mysql_client_test=
mtr_exe_exists("$path_client_bindir/mysql_client_test",
"$glob_basedir/tests/release/mysql_client_test",
"$glob_basedir/tests/debug/mysql_client_test",
"/usr/bin/false"); # FIXME temporary
}
$path_ndb_tools_dir= "$glob_basedir/bin";
$path_ndb_examples_dir= "$glob_basedir/ndbapi-examples";
$exe_ndb_mgm= "$glob_basedir/bin/ndb_mgm";
$exe_ndb_waiter= "$glob_basedir/bin/ndb_waiter";
$exe_ndbd= "$glob_basedir/bin/ndbd";
$exe_ndb_mgmd= "$glob_basedir/bin/ndb_mgmd";
}
$exe_master_mysqld= $exe_master_mysqld || $exe_mysqld; }
$exe_slave_mysqld= $exe_slave_mysqld || $exe_mysqld;
$file_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log"; # Look for mysql_client_test executable
if ( $glob_use_embedded_server )
{
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded",
"$glob_basedir/tests/mysqltest_embedded");
}
else
{
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/tests/mysql_client_test");
}
} }
...@@ -1422,8 +1494,7 @@ sub environment_setup () { ...@@ -1422,8 +1494,7 @@ sub environment_setup () {
$ENV{'SLAVE_MYPORT'}= $slave->[0]->{'port'}; $ENV{'SLAVE_MYPORT'}= $slave->[0]->{'port'};
$ENV{'SLAVE_MYPORT1'}= $slave->[1]->{'port'}; $ENV{'SLAVE_MYPORT1'}= $slave->[1]->{'port'};
$ENV{'SLAVE_MYPORT2'}= $slave->[2]->{'port'}; $ENV{'SLAVE_MYPORT2'}= $slave->[2]->{'port'};
# $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME $ENV{'MYSQL_TCP_PORT'}= $default_mysqld_port;
$ENV{'MYSQL_TCP_PORT'}= 3306;
$ENV{MTR_BUILD_THREAD}= 0 unless $ENV{MTR_BUILD_THREAD}; # Set if not set $ENV{MTR_BUILD_THREAD}= 0 unless $ENV{MTR_BUILD_THREAD}; # Set if not set
...@@ -1440,12 +1511,12 @@ sub environment_setup () { ...@@ -1440,12 +1511,12 @@ sub environment_setup () {
$ENV{'NDB_BACKUP_DIR'}= $clusters->[0]->{'data_dir'}; $ENV{'NDB_BACKUP_DIR'}= $clusters->[0]->{'data_dir'};
$ENV{'NDB_DATA_DIR'}= $clusters->[0]->{'data_dir'}; $ENV{'NDB_DATA_DIR'}= $clusters->[0]->{'data_dir'};
$ENV{'NDB_TOOLS_DIR'}= $path_ndb_tools_dir; $ENV{'NDB_TOOLS_DIR'}= $path_ndb_tools_dir;
$ENV{'NDB_TOOLS_OUTPUT'}= $file_ndb_testrun_log; $ENV{'NDB_TOOLS_OUTPUT'}= $path_ndb_testrun_log;
$ENV{'NDB_CONNECTSTRING'}= $opt_ndbconnectstring; $ENV{'NDB_CONNECTSTRING'}= $opt_ndbconnectstring;
$ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir; $ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
$ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example; $ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
$ENV{'NDB_EXAMPLES_OUTPUT'}= $file_ndb_testrun_log; $ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
# ---------------------------------------------------- # ----------------------------------------------------
# Setup env for IM # Setup env for IM
...@@ -1475,7 +1546,7 @@ sub environment_setup () { ...@@ -1475,7 +1546,7 @@ sub environment_setup () {
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysqlcheck .= $cmdline_mysqlcheck .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqlcheck.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqlcheck.trace";
} }
$ENV{'MYSQL_CHECK'}= $cmdline_mysqlcheck; $ENV{'MYSQL_CHECK'}= $cmdline_mysqlcheck;
...@@ -1488,9 +1559,9 @@ sub environment_setup () { ...@@ -1488,9 +1559,9 @@ sub environment_setup () {
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysqldump .= $cmdline_mysqldump .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqldump-master.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqldump-master.trace";
$cmdline_mysqldumpslave .= $cmdline_mysqldumpslave .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqldump-slave.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqldump-slave.trace";
} }
$ENV{'MYSQL_DUMP'}= $cmdline_mysqldump; $ENV{'MYSQL_DUMP'}= $cmdline_mysqldump;
$ENV{'MYSQL_DUMP_SLAVE'}= $cmdline_mysqldumpslave; $ENV{'MYSQL_DUMP_SLAVE'}= $cmdline_mysqldumpslave;
...@@ -1499,7 +1570,7 @@ sub environment_setup () { ...@@ -1499,7 +1570,7 @@ sub environment_setup () {
# ---------------------------------------------------- # ----------------------------------------------------
# Setup env so childs can execute mysqlslap # Setup env so childs can execute mysqlslap
# ---------------------------------------------------- # ----------------------------------------------------
unless ( $glob_win32 ) if ( $exe_mysqlslap )
{ {
my $cmdline_mysqlslap= my $cmdline_mysqlslap=
"$exe_mysqlslap -uroot " . "$exe_mysqlslap -uroot " .
...@@ -1510,7 +1581,7 @@ sub environment_setup () { ...@@ -1510,7 +1581,7 @@ sub environment_setup () {
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysqlslap .= $cmdline_mysqlslap .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqlslap.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqlslap.trace";
} }
$ENV{'MYSQL_SLAP'}= $cmdline_mysqlslap; $ENV{'MYSQL_SLAP'}= $cmdline_mysqlslap;
} }
...@@ -1526,7 +1597,7 @@ sub environment_setup () { ...@@ -1526,7 +1597,7 @@ sub environment_setup () {
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysqlimport .= $cmdline_mysqlimport .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqlimport.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqlimport.trace";
} }
$ENV{'MYSQL_IMPORT'}= $cmdline_mysqlimport; $ENV{'MYSQL_IMPORT'}= $cmdline_mysqlimport;
...@@ -1542,7 +1613,7 @@ sub environment_setup () { ...@@ -1542,7 +1613,7 @@ sub environment_setup () {
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysqlshow .= $cmdline_mysqlshow .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqlshow.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqlshow.trace";
} }
$ENV{'MYSQL_SHOW'}= $cmdline_mysqlshow; $ENV{'MYSQL_SHOW'}= $cmdline_mysqlshow;
...@@ -1551,13 +1622,16 @@ sub environment_setup () { ...@@ -1551,13 +1622,16 @@ sub environment_setup () {
# ---------------------------------------------------- # ----------------------------------------------------
my $cmdline_mysqlbinlog= my $cmdline_mysqlbinlog=
"$exe_mysqlbinlog" . "$exe_mysqlbinlog" .
" --no-defaults --local-load=$opt_tmpdir" . " --no-defaults --local-load=$opt_tmpdir";
" --character-sets-dir=$path_charsetsdir"; if ( $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
}
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysqlbinlog .= $cmdline_mysqlbinlog .=
" --debug=d:t:A,$opt_vardir_trace/log/mysqlbinlog.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysqlbinlog.trace";
} }
$ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog; $ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
...@@ -1578,13 +1652,16 @@ sub environment_setup () { ...@@ -1578,13 +1652,16 @@ sub environment_setup () {
my $cmdline_mysql_client_test= my $cmdline_mysql_client_test=
"$exe_mysql_client_test --no-defaults --testcase --user=root --silent " . "$exe_mysql_client_test --no-defaults --testcase --user=root --silent " .
"--port=$master->[0]->{'port'} " . "--port=$master->[0]->{'port'} " .
"--vardir=$opt_vardir " .
"--socket=$master->[0]->{'path_sock'}"; "--socket=$master->[0]->{'path_sock'}";
if ( $mysql_version_id >= 50000 )
{
$cmdline_mysql_client_test .=" --vardir=$opt_vardir";
}
if ( $opt_debug ) if ( $opt_debug )
{ {
$cmdline_mysql_client_test .= $cmdline_mysql_client_test .=
" --debug=d:t:A,$opt_vardir_trace/log/mysql_client_test.trace"; " --debug=d:t:A,$path_vardir_trace/log/mysql_client_test.trace";
} }
if ( $glob_use_embedded_server ) if ( $glob_use_embedded_server )
...@@ -1601,7 +1678,8 @@ sub environment_setup () { ...@@ -1601,7 +1678,8 @@ sub environment_setup () {
# Setup env so childs can execute mysql_fix_system_tables # Setup env so childs can execute mysql_fix_system_tables
# ---------------------------------------------------- # ----------------------------------------------------
my $cmdline_mysql_fix_system_tables= my $cmdline_mysql_fix_system_tables=
"$exe_mysql_fix_system_tables --no-defaults --host=localhost --user=root --password= " . "$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
"--user=root --password= " .
"--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " . "--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " .
"--port=$master->[0]->{'port'} " . "--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'}"; "--socket=$master->[0]->{'path_sock'}";
...@@ -1641,12 +1719,26 @@ sub environment_setup () { ...@@ -1641,12 +1719,26 @@ sub environment_setup () {
print "Using SLAVE_MYPORT = $ENV{SLAVE_MYPORT}\n"; print "Using SLAVE_MYPORT = $ENV{SLAVE_MYPORT}\n";
print "Using SLAVE_MYPORT1 = $ENV{SLAVE_MYPORT1}\n"; print "Using SLAVE_MYPORT1 = $ENV{SLAVE_MYPORT1}\n";
print "Using SLAVE_MYPORT2 = $ENV{SLAVE_MYPORT2}\n"; print "Using SLAVE_MYPORT2 = $ENV{SLAVE_MYPORT2}\n";
print "Using NDBCLUSTER_PORT = $ENV{NDBCLUSTER_PORT}\n"; if ( ! $opt_skip_ndbcluster )
print "Using NDBCLUSTER_PORT_SLAVE = $ENV{NDBCLUSTER_PORT_SLAVE}\n"; {
print "Using IM_PORT = $ENV{IM_PORT}\n"; print "Using NDBCLUSTER_PORT = $ENV{NDBCLUSTER_PORT}\n";
print "Using IM_MYSQLD1_PORT = $ENV{IM_MYSQLD1_PORT}\n"; if ( ! $opt_skip_ndbcluster_slave )
print "Using IM_MYSQLD2_PORT = $ENV{IM_MYSQLD2_PORT}\n"; {
print "Using NDBCLUSTER_PORT_SLAVE = $ENV{NDBCLUSTER_PORT_SLAVE}\n";
}
}
if ( ! $opt_skip_im )
{
print "Using IM_PORT = $ENV{IM_PORT}\n";
print "Using IM_MYSQLD1_PORT = $ENV{IM_MYSQLD1_PORT}\n";
print "Using IM_MYSQLD2_PORT = $ENV{IM_MYSQLD2_PORT}\n";
}
} }
# Create an environment variable to make it possible
# to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
} }
...@@ -1700,6 +1792,8 @@ sub kill_running_server () { ...@@ -1700,6 +1792,8 @@ sub kill_running_server () {
sub cleanup_stale_files () { sub cleanup_stale_files () {
my $created_by_mem_file= "$glob_mysql_test_dir/var/created_by_mem";
mtr_report("Removing Stale Files"); mtr_report("Removing Stale Files");
if ( $opt_vardir eq "$glob_mysql_test_dir/var" ) if ( $opt_vardir eq "$glob_mysql_test_dir/var" )
...@@ -1707,15 +1801,26 @@ sub cleanup_stale_files () { ...@@ -1707,15 +1801,26 @@ sub cleanup_stale_files () {
# #
# Running with "var" in mysql-test dir # Running with "var" in mysql-test dir
# #
if ( -l "$glob_mysql_test_dir/var" ) if ( -l $opt_vardir)
{ {
# Some users creates a soft link in mysql-test/var to another area # var is a symlink
# - allow it if (-f $created_by_mem_file)
mtr_report("WARNING: Using the 'mysql-test/var' symlink"); {
rmtree("$opt_vardir/log"); # Remove the directory which the link points at
rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port"); rmtree(readlink($opt_vardir));
rmtree("$opt_vardir/run"); # Remove the entire "var" dir
rmtree("$opt_vardir/tmp"); rmtree("$opt_vardir/");
}
else
{
# Some users creates a soft link in mysql-test/var to another area
# - allow it
mtr_report("WARNING: Using the 'mysql-test/var' symlink");
rmtree("$opt_vardir/log");
rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port");
rmtree("$opt_vardir/run");
rmtree("$opt_vardir/tmp");
}
} }
else else
{ {
...@@ -1737,6 +1842,17 @@ sub cleanup_stale_files () { ...@@ -1737,6 +1842,17 @@ sub cleanup_stale_files () {
rmtree("$opt_vardir/"); rmtree("$opt_vardir/");
} }
if ( $opt_mem )
{
# Runinng with var as a link to some "memory" location, normally tmpfs
rmtree($opt_mem);
mkpath($opt_mem);
mtr_verbose("Creating symlink from $opt_vardir to $opt_mem");
symlink($opt_mem, $opt_vardir);
# Put a small file to recognize this dir was created by --mem
mtr_tofile($created_by_mem_file, $opt_mem);
}
mkpath("$opt_vardir/log"); mkpath("$opt_vardir/log");
mkpath("$opt_vardir/run"); mkpath("$opt_vardir/run");
mkpath("$opt_vardir/tmp"); mkpath("$opt_vardir/tmp");
...@@ -1797,8 +1913,8 @@ sub check_running_as_root () { ...@@ -1797,8 +1913,8 @@ sub check_running_as_root () {
} }
sub check_ssl_support ($) {
sub check_ssl_support () { my $mysqld_variables= shift;
if ($opt_skip_ssl || $opt_extern) if ($opt_skip_ssl || $opt_extern)
{ {
...@@ -1808,13 +1924,7 @@ sub check_ssl_support () { ...@@ -1808,13 +1924,7 @@ sub check_ssl_support () {
return; return;
} }
# check ssl support by testing using a switch if ( ! $mysqld_variables->{'ssl'} )
# that is only available in that case
if ( mtr_run($exe_mysqld,
["--no-defaults",
"--ssl",
"--help"],
"", "/dev/null", "/dev/null", "") != 0 )
{ {
if ( $opt_ssl) if ( $opt_ssl)
{ {
...@@ -1831,17 +1941,12 @@ sub check_ssl_support () { ...@@ -1831,17 +1941,12 @@ sub check_ssl_support () {
} }
sub check_debug_support () { sub check_debug_support ($) {
my $mysqld_variables= shift;
# check debug support by testing using a switch if ( ! $mysqld_variables->{'debug'} )
# that is only available in that case
if ( mtr_run($exe_mysqld,
["--no-defaults",
"--debug",
"--help"],
"", "/dev/null", "/dev/null", "") != 0 )
{ {
# mtr_report("Binaries are not debug compiled"); #mtr_report("Binaries are not debug compiled");
$debug_compiled_binaries= 0; $debug_compiled_binaries= 0;
if ( $opt_debug ) if ( $opt_debug )
...@@ -1860,7 +1965,8 @@ sub check_debug_support () { ...@@ -1860,7 +1965,8 @@ sub check_debug_support () {
# #
############################################################################## ##############################################################################
sub check_ndbcluster_support () { sub check_ndbcluster_support ($) {
my $mysqld_variables= shift;
if ($opt_skip_ndbcluster) if ($opt_skip_ndbcluster)
{ {
...@@ -1869,13 +1975,7 @@ sub check_ndbcluster_support () { ...@@ -1869,13 +1975,7 @@ sub check_ndbcluster_support () {
return; return;
} }
# check ndbcluster support by runnning mysqld using a switch if ( ! $mysqld_variables->{'ndb-connectstring'} )
# that is only available in that case
if ( mtr_run($exe_mysqld,
["--no-defaults",
"--ndb-use-exact-count",
"--help"],
"", "/dev/null", "/dev/null", "") != 0 )
{ {
mtr_report("Skipping ndbcluster, mysqld not compiled with ndbcluster"); mtr_report("Skipping ndbcluster, mysqld not compiled with ndbcluster");
$opt_skip_ndbcluster= 1; $opt_skip_ndbcluster= 1;
...@@ -1914,11 +2014,22 @@ sub ndbcluster_start_install ($) { ...@@ -1914,11 +2014,22 @@ sub ndbcluster_start_install ($) {
if (!$opt_bench) if (!$opt_bench)
{ {
# Use a smaller configuration # Use a smaller configuration
$ndb_no_ord=32; if ( $mysql_version_id < 50100 )
$ndb_con_op=5000; {
$ndb_dmem="20M"; # 4.1 and 5.0 is using a "larger" --small configuration
$ndb_imem="1M"; $ndb_no_ord=128;
$ndb_pbmem="4M"; $ndb_con_op=10000;
$ndb_dmem="40M";
$ndb_imem="12M";
}
else
{
$ndb_no_ord=32;
$ndb_con_op=5000;
$ndb_dmem="20M";
$ndb_imem="1M";
$ndb_pbmem="4M";
}
} }
my $config_file_template= "ndb/ndb_config_${nodes}_node.ini"; my $config_file_template= "ndb/ndb_config_${nodes}_node.ini";
...@@ -1941,6 +2052,11 @@ sub ndbcluster_start_install ($) { ...@@ -1941,6 +2052,11 @@ sub ndbcluster_start_install ($) {
s/CHOOSE_HOSTNAME_.*/$ndb_host/; s/CHOOSE_HOSTNAME_.*/$ndb_host/;
s/CHOOSE_FILESYSTEM/$cluster->{'data_dir'}/; s/CHOOSE_FILESYSTEM/$cluster->{'data_dir'}/;
s/CHOOSE_PORT_MGM/$cluster->{'port'}/; s/CHOOSE_PORT_MGM/$cluster->{'port'}/;
if ( $mysql_version_id < 50000 )
{
my $base_port= $cluster->{'port'} + 1;
s/CHOOSE_PORT_TRANSPORTER/$base_port/;
}
s/CHOOSE_DiskPageBufferMemory/$ndb_pbmem/; s/CHOOSE_DiskPageBufferMemory/$ndb_pbmem/;
print OUT "$_ \n"; print OUT "$_ \n";
...@@ -2062,7 +2178,10 @@ sub ndbd_start ($$$) { ...@@ -2062,7 +2178,10 @@ sub ndbd_start ($$$) {
mtr_add_arg($args, "--no-defaults"); mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--core"); mtr_add_arg($args, "--core");
mtr_add_arg($args, "--ndb-connectstring=%s", "$cluster->{'connect_string'}"); mtr_add_arg($args, "--ndb-connectstring=%s", "$cluster->{'connect_string'}");
mtr_add_arg($args, "--character-sets-dir=%s", "$path_charsetsdir"); if ( $mysql_version_id >= 50000)
{
mtr_add_arg($args, "--character-sets-dir=%s", "$path_charsetsdir");
}
mtr_add_arg($args, "--nodaemon"); mtr_add_arg($args, "--nodaemon");
mtr_add_arg($args, "$extra_args"); mtr_add_arg($args, "$extra_args");
...@@ -2163,8 +2282,6 @@ sub run_benchmarks ($) { ...@@ -2163,8 +2282,6 @@ sub run_benchmarks ($) {
chdir($glob_mysql_bench_dir) chdir($glob_mysql_bench_dir)
or mtr_error("Couldn't chdir to '$glob_mysql_bench_dir': $!"); or mtr_error("Couldn't chdir to '$glob_mysql_bench_dir': $!");
# FIXME write shorter....
if ( ! $benchmark ) if ( ! $benchmark )
{ {
mtr_add_arg($args, "--log"); mtr_add_arg($args, "--log");
...@@ -2196,9 +2313,6 @@ sub run_benchmarks ($) { ...@@ -2196,9 +2313,6 @@ sub run_benchmarks ($) {
# #
############################################################################## ##############################################################################
# FIXME how to specify several suites to run? Comma separated list?
sub run_suite () { sub run_suite () {
my ($suite, $tests)= @_; my ($suite, $tests)= @_;
...@@ -2255,6 +2369,9 @@ sub run_suite () { ...@@ -2255,6 +2369,9 @@ sub run_suite () {
############################################################################## ##############################################################################
sub initialize_servers () { sub initialize_servers () {
datadir_setup();
if ( ! $glob_use_running_server ) if ( ! $glob_use_running_server )
{ {
kill_running_server(); kill_running_server();
...@@ -2293,7 +2410,8 @@ sub mysql_install_db () { ...@@ -2293,7 +2410,8 @@ sub mysql_install_db () {
my $cluster_started_ok= 1; # Assume it can be started my $cluster_started_ok= 1; # Assume it can be started
if (ndbcluster_start_install($clusters->[0]) || if (ndbcluster_start_install($clusters->[0]) ||
$max_slave_num && ndbcluster_start_install($clusters->[1])) ($max_slave_num && !$opt_skip_ndbcluster_slave &&
ndbcluster_start_install($clusters->[1])))
{ {
mtr_warning("Failed to start install of cluster"); mtr_warning("Failed to start install of cluster");
$cluster_started_ok= 0; $cluster_started_ok= 0;
...@@ -2396,10 +2514,10 @@ sub install_db ($$) { ...@@ -2396,10 +2514,10 @@ sub install_db ($$) {
if ( $opt_debug ) if ( $opt_debug )
{ {
mtr_add_arg($args, "--debug=d:t:i:A,%s/log/bootstrap_%s.trace", mtr_add_arg($args, "--debug=d:t:i:A,%s/log/bootstrap_%s.trace",
$opt_vardir_trace, $type); $path_vardir_trace, $type);
} }
if ( ! $opt_netware ) if ( ! $glob_netware )
{ {
mtr_add_arg($args, "--language=%s", $path_language); mtr_add_arg($args, "--language=%s", $path_language);
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir); mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
...@@ -2492,9 +2610,15 @@ skip-innodb ...@@ -2492,9 +2610,15 @@ skip-innodb
skip-ndbcluster skip-ndbcluster
EOF EOF
; ;
if ( $mysql_version_id < 50100 )
{
print OUT "skip-bdb\n";
}
print OUT "nonguarded\n" if $instance->{'nonguarded'}; print OUT "nonguarded\n" if $instance->{'nonguarded'};
print OUT "log-output=FILE\n" if $instance->{'old_log_format'}; if ( $mysql_version_id >= 50100 )
{
print OUT "log-output=FILE\n" if $instance->{'old_log_format'};
}
print OUT "\n"; print OUT "\n";
} }
...@@ -2553,21 +2677,24 @@ sub run_testcase_check_skip_test($) ...@@ -2553,21 +2677,24 @@ sub run_testcase_check_skip_test($)
return 1; return 1;
} }
# If test needs cluster, check that master installed ok if ($tinfo->{'ndb_test'})
if ( $tinfo->{'ndb_test'} and !$clusters->[0]->{'installed_ok'} )
{ {
mtr_report_test_name($tinfo); foreach my $cluster (@{$clusters})
mtr_report_test_failed($tinfo); {
return 1; last if ($opt_skip_ndbcluster_slave and
} $cluster->{'name'} eq 'Slave');
# If test needs slave cluster, check that it installed ok # If test needs this cluster, check it was installed ok
if ( $tinfo->{'ndb_test'} and $tinfo->{'slave_num'} and if ( !$cluster->{'installed_ok'} )
!$clusters->[1]->{'installed_ok'} ) {
{ mtr_tofile($path_timefile,
mtr_report_test_name($tinfo); "Test marked as failed because $cluster->{'name'} " .
mtr_report_test_failed($tinfo); "was not installed ok!");
return 1; mtr_report_test_name($tinfo);
mtr_report_test_failed($tinfo);
return 1;
}
}
} }
return 0; return 0;
...@@ -2579,28 +2706,40 @@ sub do_before_run_mysqltest($) ...@@ -2579,28 +2706,40 @@ sub do_before_run_mysqltest($)
my $tinfo= shift; my $tinfo= shift;
my $tname= $tinfo->{'name'}; my $tname= $tinfo->{'name'};
# Remove old reject file # Remove old files produced by mysqltest
if ( $opt_suite eq "main" ) my $result_dir= "r";
if ( ! $opt_suite eq "main" )
{ {
unlink("r/$tname.reject"); $result_dir= "suite/$opt_suite/r";
} }
else unlink("$result_dir/$tname.reject");
{ unlink("$result_dir/$tname.progress");
unlink("suite/$opt_suite/r/$tname.reject"); unlink("$result_dir/$tname.log");
} unlink("$result_dir/$tname.warnings");
# MASV cleanup...
mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are
# output current test to ndbcluster log file to enable diagnostics # output current test to ndbcluster log file to enable diagnostics
mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n"); mtr_tofile($path_ndb_testrun_log,"CURRENT TEST $tname\n");
mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n"); mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
if ( $master->[1]->{'pid'} ) if ( $master->[1]->{'pid'} )
{ {
mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n"); mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
} }
if ( $mysql_version_id < 50000 )
{
# Set envirnoment variable NDB_STATUS_OK to 1
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "1";
}
elsif ( $mysql_version_id < 50100 )
{
# Set envirnoment variable NDB_STATUS_OK to YES
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "YES";
}
} }
sub do_after_run_mysqltest($) sub do_after_run_mysqltest($)
...@@ -2608,12 +2747,13 @@ sub do_after_run_mysqltest($) ...@@ -2608,12 +2747,13 @@ sub do_after_run_mysqltest($)
my $tinfo= shift; my $tinfo= shift;
my $tname= $tinfo->{'name'}; my $tname= $tinfo->{'name'};
#MASV cleanup mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
# Save info from this testcase run to mysqltest.log
my $testcase_log= mtr_fromfile($path_timefile) if -f $path_timefile; # Save info from this testcase run to mysqltest.log
mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n"); mtr_appendfile_to_file($path_timefile, $path_mysqltest_log)
mtr_tofile($path_mysqltest_log, $testcase_log); if -f $path_timefile;
}
}
############################################################################## ##############################################################################
...@@ -2824,24 +2964,17 @@ sub report_failure_and_restart ($) { ...@@ -2824,24 +2964,17 @@ sub report_failure_and_restart ($) {
############################################################################## ##############################################################################
# The embedded server needs the cleanup so we do some of the start work sub do_before_start_master ($) {
# but stop before actually running mysqld or anything. my ($tinfo)= @_;
sub do_before_start_master ($$) {
my $tname= shift; my $tname= $tinfo->{'name'};
my $init_script= shift; my $init_script= $tinfo->{'master_sh'};
# FIXME what about second master..... # FIXME what about second master.....
# Remove stale binary logs except for 2 tests which need them FIXME here???? foreach my $bin ( glob("$opt_vardir/log/master*-bin*") )
if ( $tname ne "rpl_crash_binlog_ib_1b" and
$tname ne "rpl_crash_binlog_ib_2b" and
$tname ne "rpl_crash_binlog_ib_3b")
{ {
# FIXME we really want separate dir for binlogs unlink($bin);
foreach my $bin ( glob("$opt_vardir/log/master*-bin*") )
{
unlink($bin);
}
} }
# FIXME only remove the ones that are tied to this master # FIXME only remove the ones that are tied to this master
...@@ -2861,31 +2994,23 @@ sub do_before_start_master ($$) { ...@@ -2861,31 +2994,23 @@ sub do_before_start_master ($$) {
# mtr_warning("$init_script exited with code $ret"); # mtr_warning("$init_script exited with code $ret");
} }
} }
# for gcov FIXME needed? If so we need more absolute paths
# chdir($glob_basedir);
} }
sub do_before_start_slave ($$) { sub do_before_start_slave ($) {
my $tname= shift; my ($tinfo)= @_;
my $init_script= shift;
my $tname= $tinfo->{'name'};
my $init_script= $tinfo->{'master_sh'};
# Remove stale binary logs and old master.info files foreach my $bin ( glob("$opt_vardir/log/slave*-bin*") )
# except for too tests which need them
if ( $tname ne "rpl_crash_binlog_ib_1b" and
$tname ne "rpl_crash_binlog_ib_2b" and
$tname ne "rpl_crash_binlog_ib_3b" )
{ {
# FIXME we really want separate dir for binlogs unlink($bin);
foreach my $bin ( glob("$opt_vardir/log/slave*-bin*") )
{
unlink($bin);
}
# FIXME really master?!
unlink("$slave->[0]->{'path_myddir'}/master.info");
unlink("$slave->[0]->{'path_myddir'}/relay-log.info");
} }
unlink("$slave->[0]->{'path_myddir'}/master.info");
unlink("$slave->[0]->{'path_myddir'}/relay-log.info");
# Run slave initialization shell script if one exists # Run slave initialization shell script if one exists
if ( $init_script ) if ( $init_script )
{ {
...@@ -2931,7 +3056,11 @@ sub mysqld_arguments ($$$$$) { ...@@ -2931,7 +3056,11 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir); mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir); mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix); if ( $mysql_version_id >= 50000 )
{
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
}
mtr_add_arg($args, "%s--default-character-set=latin1", $prefix); mtr_add_arg($args, "%s--default-character-set=latin1", $prefix);
mtr_add_arg($args, "%s--language=%s", $prefix, $path_language); mtr_add_arg($args, "%s--language=%s", $prefix, $path_language);
mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix); mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
...@@ -2980,7 +3109,10 @@ sub mysqld_arguments ($$$$$) { ...@@ -2980,7 +3109,10 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--ndbcluster", $prefix); mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix, mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$cluster->{'connect_string'}); $cluster->{'connect_string'});
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix); if ( $mysql_version_id >= 50100 )
{
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
} }
} }
...@@ -2998,7 +3130,7 @@ sub mysqld_arguments ($$$$$) { ...@@ -2998,7 +3130,7 @@ sub mysqld_arguments ($$$$$) {
$opt_vardir, $sidx); # FIXME use own dir for binlogs $opt_vardir, $sidx); # FIXME use own dir for binlogs
mtr_add_arg($args, "%s--log-slave-updates", $prefix); mtr_add_arg($args, "%s--log-slave-updates", $prefix);
} }
# FIXME option duplicated for slave
mtr_add_arg($args, "%s--log=%s", $prefix, mtr_add_arg($args, "%s--log=%s", $prefix,
$slave->[$idx]->{'path_mylog'}); $slave->[$idx]->{'path_mylog'});
mtr_add_arg($args, "%s--master-retry-count=10", $prefix); mtr_add_arg($args, "%s--master-retry-count=10", $prefix);
...@@ -3019,8 +3151,9 @@ sub mysqld_arguments ($$$$$) { ...@@ -3019,8 +3151,9 @@ sub mysqld_arguments ($$$$$) {
# Directory where slaves find the dumps generated by "load data" # Directory where slaves find the dumps generated by "load data"
# on the server. The path need to have constant length otherwise # on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used. # test results will vary, thus a relative path is used.
my $slave_load_path= "../tmp";
mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix, mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix,
"../tmp"); $slave_load_path);
mtr_add_arg($args, "%s--socket=%s", $prefix, mtr_add_arg($args, "%s--socket=%s", $prefix,
$slave->[$idx]->{'path_sock'}); $slave->[$idx]->{'path_sock'});
mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix); mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix);
...@@ -3055,7 +3188,10 @@ sub mysqld_arguments ($$$$$) { ...@@ -3055,7 +3188,10 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--ndbcluster", $prefix); mtr_add_arg($args, "%s--ndbcluster", $prefix);
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix, mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$clusters->[$slave->[$idx]->{'cluster'}]->{'connect_string'}); $clusters->[$slave->[$idx]->{'cluster'}]->{'connect_string'});
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix); if ( $mysql_version_id >= 50100 )
{
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
} }
} # end slave } # end slave
...@@ -3064,12 +3200,12 @@ sub mysqld_arguments ($$$$$) { ...@@ -3064,12 +3200,12 @@ sub mysqld_arguments ($$$$$) {
if ( $type eq 'master' ) if ( $type eq 'master' )
{ {
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/master%s.trace", mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/master%s.trace",
$prefix, $opt_vardir_trace, $sidx); $prefix, $path_vardir_trace, $sidx);
} }
if ( $type eq 'slave' ) if ( $type eq 'slave' )
{ {
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/slave%s.trace", mtr_add_arg($args, "%s--debug=d:t:i:A,%s/log/slave%s.trace",
$prefix, $opt_vardir_trace, $sidx); $prefix, $path_vardir_trace, $sidx);
} }
} }
...@@ -3077,7 +3213,6 @@ sub mysqld_arguments ($$$$$) { ...@@ -3077,7 +3213,6 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--key_buffer_size=1M", $prefix); mtr_add_arg($args, "%s--key_buffer_size=1M", $prefix);
mtr_add_arg($args, "%s--sort_buffer=256K", $prefix); mtr_add_arg($args, "%s--sort_buffer=256K", $prefix);
mtr_add_arg($args, "%s--max_heap_table_size=1M", $prefix); mtr_add_arg($args, "%s--max_heap_table_size=1M", $prefix);
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
if ( $opt_ssl_supported ) if ( $opt_ssl_supported )
{ {
...@@ -3255,10 +3390,13 @@ sub stop_all_servers () { ...@@ -3255,10 +3390,13 @@ sub stop_all_servers () {
print "Stopping All Servers\n"; print "Stopping All Servers\n";
print "Shutting-down Instance Manager\n"; if ( ! $opt_skip_im )
unless (mtr_im_stop($instance_manager, "stop_all_servers"))
{ {
mtr_error("Failed to stop Instance Manager.") print "Shutting-down Instance Manager\n";
unless (mtr_im_stop($instance_manager, "stop_all_servers"))
{
mtr_error("Failed to stop Instance Manager.")
}
} }
my %admin_pids; # hash of admin processes that requests shutdown my %admin_pids; # hash of admin processes that requests shutdown
...@@ -3384,6 +3522,11 @@ sub run_testcase_need_master_restart($) ...@@ -3384,6 +3522,11 @@ sub run_testcase_need_master_restart($)
join(" ", @{$tinfo->{'master_opt'}}) . "' != '" . join(" ", @{$tinfo->{'master_opt'}}) . "' != '" .
join(" ", @{$master->[0]->{'start_opts'}}) . "'" ); join(" ", @{$master->[0]->{'start_opts'}}) . "'" );
} }
elsif( ! $master->[0]->{'pid'} )
{
$do_restart= 1;
mtr_verbose("Restart because: master is not started");
}
return $do_restart; return $do_restart;
} }
...@@ -3395,57 +3538,35 @@ sub run_testcase_need_slave_restart($) ...@@ -3395,57 +3538,35 @@ sub run_testcase_need_slave_restart($)
# We try to find out if we are to restart the slaves # We try to find out if we are to restart the slaves
my $do_slave_restart= 0; # Assumes we don't have to my $do_slave_restart= 0; # Assumes we don't have to
# FIXME only restart slave when necessary if ( $max_slave_num == 0)
$do_slave_restart= 1; {
mtr_verbose("No testcase use slaves, no slave restarts");
# if ( ! $slave->[0]->{'pid'} ) }
# { else
# # mtr_verbose("Slave not started, no need to check slave restart"); {
# }
# elsif ( $do_restart ) # Check if any slave is currently started
# { my $any_slave_started= 0;
# $do_slave_restart= 1; # Always restart if master restart foreach my $mysqld (@{$slave})
# mtr_verbose("Restart slave because: Master restart"); {
# } if ( $mysqld->{'pid'} )
# elsif ( $tinfo->{'slave_sh'} ) {
# { $any_slave_started= 1;
# $do_slave_restart= 1; # Always restart if script to run last;
# mtr_verbose("Restart slave because: Always restart if script to run"); }
# } }
# elsif ( ! $opt_skip_ndbcluster_slave and
# $tinfo->{'ndb_test'} == 0 and if ($any_slave_started)
# $clusters->[1]->{'pid'} != 0 ) {
# { mtr_verbose("Any slave is started, need to restart");
# $do_slave_restart= 1; # Restart without slave cluster $do_slave_restart= 1;
# mtr_verbose("Restart slave because: Test does not need slave cluster"); }
# } elsif ( $tinfo->{'slave_num'} )
# elsif ( ! $opt_with_ndbcluster_slave and {
# $tinfo->{'ndb_test'} == 1 and mtr_verbose("Test need slave, check for restart");
# $clusters->[1]->{'pid'} == 0 ) $do_slave_restart= 1;
# { }
# $do_slave_restart= 1; # Restart with slave cluster }
# mtr_verbose("Restart slave because: Test need slave cluster");
# }
# elsif ( $tinfo->{'slave_restart'} )
# {
# $do_slave_restart= 1;
# mtr_verbose("Restart slave because: slave_restart");
# }
# elsif ( $slave->[0]->{'running_slave_is_special'} )
# {
# $do_slave_restart= 1;
# mtr_verbose("Restart slave because: running_slave_is_special");
# }
# # Check that running slave was started with same options
# # as the current test requires
# elsif (! mtr_same_opts($slave->[0]->{'start_opts'},
# $tinfo->{'slave_opt'}) )
# {
# $do_slave_restart= 1;
# mtr_verbose("Restart slave because: running with different options '" .
# join(" ", @{$tinfo->{'slave_opt'}}) . "' != '" .
# join(" ", @{$slave->[0]->{'start_opts'}}) . "'" );
# }
return $do_slave_restart; return $do_slave_restart;
...@@ -3610,6 +3731,11 @@ sub run_testcase_start_servers($) { ...@@ -3610,6 +3731,11 @@ sub run_testcase_start_servers($) {
return; return;
} }
# -------------------------------------------------------
# Init variables that can change between server starts
# -------------------------------------------------------
$ENV{'TZ'}= $tinfo->{'timezone'};
if ( $tinfo->{'component_id'} eq 'mysqld' ) if ( $tinfo->{'component_id'} eq 'mysqld' )
{ {
if ( ! $opt_skip_ndbcluster and if ( ! $opt_skip_ndbcluster and
...@@ -3623,7 +3749,7 @@ sub run_testcase_start_servers($) { ...@@ -3623,7 +3749,7 @@ sub run_testcase_start_servers($) {
if ( !$master->[0]->{'pid'} ) if ( !$master->[0]->{'pid'} )
{ {
# Master mysqld is not started # Master mysqld is not started
do_before_start_master($tname,$tinfo->{'master_sh'}); do_before_start_master($tinfo);
mysqld_start($master->[0],$tinfo->{'master_opt'},[]); mysqld_start($master->[0],$tinfo->{'master_opt'},[]);
...@@ -3633,16 +3759,21 @@ sub run_testcase_start_servers($) { ...@@ -3633,16 +3759,21 @@ sub run_testcase_start_servers($) {
{ {
# Test needs cluster, start an extra mysqld connected to cluster # Test needs cluster, start an extra mysqld connected to cluster
# First wait for first mysql server to have created ndb system tables ok if ( $mysql_version_id >= 50100 )
# FIXME This is a workaround so that only one mysqld creates the tables
if ( ! sleep_until_file_created(
"$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{ {
mtr_report("Failed to create 'cluster/apply_status' table"); # First wait for first mysql server to have created ndb system
report_failure_and_restart($tinfo); # tables ok FIXME This is a workaround so that only one mysqld
return; # create the tables
if ( ! sleep_until_file_created(
"$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{
mtr_report_test_name($tinfo);
mtr_report("Failed to create 'cluster/apply_status' table");
report_failure_and_restart($tinfo);
return;
}
} }
mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n"); mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
...@@ -3666,6 +3797,7 @@ sub run_testcase_start_servers($) { ...@@ -3666,6 +3797,7 @@ sub run_testcase_start_servers($) {
unless ( mtr_im_start($instance_manager, $tinfo->{im_opts}) ) unless ( mtr_im_start($instance_manager, $tinfo->{im_opts}) )
{ {
mtr_report_test_name($tinfo);
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
mtr_report("Failed to start Instance Manager. " . mtr_report("Failed to start Instance Manager. " .
"The test '$tname' is marked as failed."); "The test '$tname' is marked as failed.");
...@@ -3682,7 +3814,7 @@ sub run_testcase_start_servers($) { ...@@ -3682,7 +3814,7 @@ sub run_testcase_start_servers($) {
restore_slave_databases($tinfo->{'slave_num'}); restore_slave_databases($tinfo->{'slave_num'});
do_before_start_slave($tname,$tinfo->{'slave_sh'}); do_before_start_slave($tinfo);
if ( ! $opt_skip_ndbcluster_slave and if ( ! $opt_skip_ndbcluster_slave and
!$clusters->[1]->{'pid'} and !$clusters->[1]->{'pid'} and
...@@ -3856,11 +3988,6 @@ sub run_mysqltest ($) { ...@@ -3856,11 +3988,6 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--big-test"); mtr_add_arg($args, "--big-test");
} }
if ( $opt_valgrind )
{
mtr_add_arg($args, "--valgrind");
}
if ( $opt_compress ) if ( $opt_compress )
{ {
mtr_add_arg($args, "--compress"); mtr_add_arg($args, "--compress");
...@@ -3874,7 +4001,7 @@ sub run_mysqltest ($) { ...@@ -3874,7 +4001,7 @@ sub run_mysqltest ($) {
if ( $opt_debug ) if ( $opt_debug )
{ {
mtr_add_arg($args, "--debug=d:t:A,%s/log/mysqltest.trace", mtr_add_arg($args, "--debug=d:t:A,%s/log/mysqltest.trace",
$opt_vardir_trace); $path_vardir_trace);
} }
if ( $opt_ssl_supported ) if ( $opt_ssl_supported )
...@@ -3971,11 +4098,6 @@ sub run_mysqltest ($) { ...@@ -3971,11 +4098,6 @@ sub run_mysqltest ($) {
} }
} }
# -------------------------------------------------------
# Init variables that change for each testcase
# -------------------------------------------------------
$ENV{'TZ'}= $tinfo->{'timezone'};
my $res = mtr_run_test($exe,$args,"","",$path_timefile,""); my $res = mtr_run_test($exe,$args,"","",$path_timefile,"");
if ( $opt_check_testcases ) if ( $opt_check_testcases )
...@@ -4205,9 +4327,7 @@ sub usage ($) { ...@@ -4205,9 +4327,7 @@ sub usage ($) {
print STDERR <<HERE; print STDERR <<HERE;
mysql-test-run [ OPTIONS ] [ TESTCASE ] $0 [ OPTIONS ] [ TESTCASE ]
FIXME when is TESTCASE arg used or not?!
Options to control what engine/variation to run Options to control what engine/variation to run
...@@ -4231,6 +4351,9 @@ Options to control directories to use ...@@ -4231,6 +4351,9 @@ Options to control directories to use
vardir=DIR The directory where files generated from the test run vardir=DIR The directory where files generated from the test run
is stored (default: ./var). Specifying a ramdisk or is stored (default: ./var). Specifying a ramdisk or
tmpfs will speed up tests. tmpfs will speed up tests.
mem=DIR Run testsuite in "memory" using tmpfs if
available(default: /dev/shm)
Options to control what test suites or cases to run Options to control what test suites or cases to run
......
...@@ -195,7 +195,7 @@ select (@before:=unix_timestamp())*0; ...@@ -195,7 +195,7 @@ select (@before:=unix_timestamp())*0;
(@before:=unix_timestamp())*0 (@before:=unix_timestamp())*0
0 0
begin; begin;
select * from t1 for update; select * from t1 for update;
insert into t2 values (20); insert into t2 values (20);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select (@after:=unix_timestamp())*0; select (@after:=unix_timestamp())*0;
......
drop table if exists t1; drop table if exists t1;
create table t1(n int not null, key(n), key(n), key(n), key(n)); create table t1(n int not null, key(n), key(n), key(n), key(n));
check table t1 extended; check table t1 extended;
insert into t1 values (200000); insert into t1 values (200000);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
......
...@@ -4913,8 +4913,7 @@ bonfire ...@@ -4913,8 +4913,7 @@ bonfire
Colombo Colombo
nondecreasing nondecreasing
DROP TABLE t1; DROP TABLE t1;
ALTER TABLE t2 RENAME t1 ALTER TABLE t2 RENAME t1;
#;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
......
...@@ -79,9 +79,9 @@ drop table if exists t1; ...@@ -79,9 +79,9 @@ drop table if exists t1;
create table t1 (i int); create table t1 (i int);
lock tables t1 read; lock tables t1 read;
create database mysqltest; create database mysqltest;
drop table t1; drop table t1;
show open tables; show open tables;
drop database mysqltest; drop database mysqltest;
select 1; select 1;
1 1
1 1
......
...@@ -9,13 +9,13 @@ n ...@@ -9,13 +9,13 @@ n
flush tables with read lock; flush tables with read lock;
drop table t2; drop table t2;
ERROR HY000: Can't execute the query because you have a conflicting read lock ERROR HY000: Can't execute the query because you have a conflicting read lock
drop table t2; drop table t2;
unlock tables; unlock tables;
create database mysqltest; create database mysqltest;
create table mysqltest.t1(n int); create table mysqltest.t1(n int);
insert into mysqltest.t1 values (23); insert into mysqltest.t1 values (23);
flush tables with read lock; flush tables with read lock;
drop database mysqltest; drop database mysqltest;
select * from mysqltest.t1; select * from mysqltest.t1;
n n
23 23
...@@ -51,7 +51,7 @@ drop table t1, t2, t3; ...@@ -51,7 +51,7 @@ drop table t1, t2, t3;
create table t1 (c1 int); create table t1 (c1 int);
create table t2 (c1 int); create table t2 (c1 int);
lock table t1 write; lock table t1 write;
flush tables with read lock; flush tables with read lock;
insert into t2 values(1); insert into t2 values(1);
unlock tables; unlock tables;
drop table t1, t2; drop table t1, t2;
...@@ -5,7 +5,7 @@ insert into t1 values(1); ...@@ -5,7 +5,7 @@ insert into t1 values(1);
flush tables with read lock; flush tables with read lock;
select * from t1; select * from t1;
a a
commit; commit;
select * from t1; select * from t1;
a a
unlock tables; unlock tables;
...@@ -14,8 +14,8 @@ select * from t1 for update; ...@@ -14,8 +14,8 @@ select * from t1 for update;
a a
1 1
begin; begin;
select * from t1 for update; select * from t1 for update;
flush tables with read lock; flush tables with read lock;
commit; commit;
a a
1 1
...@@ -45,7 +45,7 @@ flush tables with read lock; ...@@ -45,7 +45,7 @@ flush tables with read lock;
show master status; show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102 master-bin.000001 102
commit; commit;
show master status; show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 102 master-bin.000001 102
......
drop table if exists t1; drop table if exists t1;
create table t1 (kill_id int); create table t1 (kill_id int);
insert into t1 values(connection_id()); insert into t1 values(connection_id());
flush tables with read lock; flush tables with read lock;
select ((@id := kill_id) - kill_id) from t1; select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id) ((@id := kill_id) - kill_id)
0 0
......
...@@ -9,7 +9,7 @@ test.t1 check status OK ...@@ -9,7 +9,7 @@ test.t1 check status OK
unlock tables; unlock tables;
lock table t1 read; lock table t1 read;
lock table t1 read; lock table t1 read;
flush table t1; flush table t1;
select * from t1; select * from t1;
a a
1 1
...@@ -19,7 +19,7 @@ a ...@@ -19,7 +19,7 @@ a
1 1
unlock tables; unlock tables;
lock table t1 write; lock table t1 write;
lock table t1 read; lock table t1 read;
flush table t1; flush table t1;
select * from t1; select * from t1;
a a
...@@ -27,7 +27,7 @@ a ...@@ -27,7 +27,7 @@ a
unlock tables; unlock tables;
unlock tables; unlock tables;
lock table t1 read; lock table t1 read;
lock table t1 write; lock table t1 write;
flush table t1; flush table t1;
select * from t1; select * from t1;
a a
......
...@@ -63,7 +63,7 @@ FROM t1 ...@@ -63,7 +63,7 @@ FROM t1
WHERE conn = 'default'; WHERE conn = 'default';
IS_USED_LOCK('bug16501') = connection_id IS_USED_LOCK('bug16501') = connection_id
1 1
SELECT GET_LOCK('bug16501',600); SELECT GET_LOCK('bug16501',600);
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID(); SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
IS_USED_LOCK('bug16501') = CONNECTION_ID() IS_USED_LOCK('bug16501') = CONNECTION_ID()
1 1
......
...@@ -336,12 +336,12 @@ drop database mysqltest_1; ...@@ -336,12 +336,12 @@ drop database mysqltest_1;
set password = password("changed"); set password = password("changed");
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql' ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
lock table mysql.user write; lock table mysql.user write;
flush privileges; flush privileges;
grant all on *.* to 'mysqltest_1'@'localhost'; grant all on *.* to 'mysqltest_1'@'localhost';
unlock tables; unlock tables;
lock table mysql.user write; lock table mysql.user write;
set password for 'mysqltest_1'@'localhost' = password(''); set password for 'mysqltest_1'@'localhost' = password('');
revoke all on *.* from 'mysqltest_1'@'localhost'; revoke all on *.* from 'mysqltest_1'@'localhost';
unlock tables; unlock tables;
drop user 'mysqltest_1'@'localhost'; drop user 'mysqltest_1'@'localhost';
create database TESTDB; create database TESTDB;
......
...@@ -476,7 +476,7 @@ handler t1 read first; ...@@ -476,7 +476,7 @@ handler t1 read first;
c1 c1
1 1
send the below to another connection, do not wait for the result send the below to another connection, do not wait for the result
optimize table t1; optimize table t1;
proceed with the normal connection proceed with the normal connection
handler t1 read next; handler t1 read next;
c1 c1
...@@ -502,7 +502,7 @@ flush tables with read lock; ...@@ -502,7 +502,7 @@ flush tables with read lock;
drop table t1; drop table t1;
ERROR HY000: Can't execute the query because you have a conflicting read lock ERROR HY000: Can't execute the query because you have a conflicting read lock
send the below to another connection, do not wait for the result send the below to another connection, do not wait for the result
drop table t1; drop table t1;
proceed with the normal connection proceed with the normal connection
select * from t1; select * from t1;
c1 c1
......
...@@ -476,7 +476,7 @@ handler t1 read first; ...@@ -476,7 +476,7 @@ handler t1 read first;
c1 c1
1 1
send the below to another connection, do not wait for the result send the below to another connection, do not wait for the result
optimize table t1; optimize table t1;
proceed with the normal connection proceed with the normal connection
handler t1 read next; handler t1 read next;
c1 c1
...@@ -502,7 +502,7 @@ flush tables with read lock; ...@@ -502,7 +502,7 @@ flush tables with read lock;
drop table t1; drop table t1;
ERROR HY000: Can't execute the query because you have a conflicting read lock ERROR HY000: Can't execute the query because you have a conflicting read lock
send the below to another connection, do not wait for the result send the below to another connection, do not wait for the result
drop table t1; drop table t1;
proceed with the normal connection proceed with the normal connection
select * from t1; select * from t1;
c1 c1
......
...@@ -10,7 +10,7 @@ start transaction; ...@@ -10,7 +10,7 @@ start transaction;
select f1(); select f1();
f1() f1()
100 100
update t1 set col2=0 where col1=1; update t1 set col2=0 where col1=1;
select * from t1; select * from t1;
col1 col2 col1 col2
1 100 1 100
......
...@@ -22,7 +22,7 @@ create table t2 (id int unsigned not null); ...@@ -22,7 +22,7 @@ create table t2 (id int unsigned not null);
insert into t2 select id from t1; insert into t2 select id from t1;
create table t3 (kill_id int); create table t3 (kill_id int);
insert into t3 values(connection_id()); insert into t3 values(connection_id());
select id from t1 where id in (select distinct id from t2); select id from t1 where id in (select distinct id from t2);
select ((@id := kill_id) - kill_id) from t3; select ((@id := kill_id) - kill_id) from t3;
((@id := kill_id) - kill_id) ((@id := kill_id) - kill_id)
0 0
...@@ -32,7 +32,7 @@ drop table t1, t2, t3; ...@@ -32,7 +32,7 @@ drop table t1, t2, t3;
select get_lock("a", 10); select get_lock("a", 10);
get_lock("a", 10) get_lock("a", 10)
1 1
select get_lock("a", 10); select get_lock("a", 10);
get_lock("a", 10) get_lock("a", 10)
NULL NULL
select 1; select 1;
......
...@@ -2,8 +2,8 @@ drop table if exists t1,t2; ...@@ -2,8 +2,8 @@ drop table if exists t1,t2;
create table t1(n int); create table t1(n int);
insert into t1 values (1); insert into t1 values (1);
lock tables t1 write; lock tables t1 write;
update low_priority t1 set n = 4; update low_priority t1 set n = 4;
select n from t1; select n from t1;
unlock tables; unlock tables;
n n
4 4
...@@ -11,8 +11,8 @@ drop table t1; ...@@ -11,8 +11,8 @@ drop table t1;
create table t1(n int); create table t1(n int);
insert into t1 values (1); insert into t1 values (1);
lock tables t1 read; lock tables t1 read;
update low_priority t1 set n = 4; update low_priority t1 set n = 4;
select n from t1; select n from t1;
unlock tables; unlock tables;
n n
1 1
...@@ -23,7 +23,7 @@ insert into t1 values(1,1); ...@@ -23,7 +23,7 @@ insert into t1 values(1,1);
insert into t1 values(2,2); insert into t1 values(2,2);
insert into t2 values(1,2); insert into t2 values(1,2);
lock table t1 read; lock table t1 read;
update t1,t2 set c=a where b=d; update t1,t2 set c=a where b=d;
select c from t2; select c from t2;
c c
2 2
...@@ -32,14 +32,14 @@ drop table t2; ...@@ -32,14 +32,14 @@ drop table t2;
create table t1 (a int); create table t1 (a int);
create table t2 (a int); create table t2 (a int);
lock table t1 write, t2 write; lock table t1 write, t2 write;
insert t1 select * from t2; insert t1 select * from t2;
drop table t2; drop table t2;
ERROR 42S02: Table 'test.t2' doesn't exist ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1; drop table t1;
create table t1 (a int); create table t1 (a int);
create table t2 (a int); create table t2 (a int);
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write; lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
insert t1 select * from t2; insert t1 select * from t2;
drop table t2; drop table t2;
ERROR 42S02: Table 'test.t2' doesn't exist ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1; drop table t1;
...@@ -54,7 +54,7 @@ use mysql; ...@@ -54,7 +54,7 @@ use mysql;
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE; LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
FLUSH TABLES; FLUSH TABLES;
use mysql; use mysql;
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1; SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
OPTIMIZE TABLES columns_priv, db, host, user; OPTIMIZE TABLES columns_priv, db, host, user;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
mysql.columns_priv optimize status OK mysql.columns_priv optimize status OK
...@@ -68,14 +68,14 @@ use test; ...@@ -68,14 +68,14 @@ use test;
use test; use test;
CREATE TABLE t1 (c1 int); CREATE TABLE t1 (c1 int);
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
FLUSH TABLES WITH READ LOCK; FLUSH TABLES WITH READ LOCK;
CREATE TABLE t2 (c1 int); CREATE TABLE t2 (c1 int);
UNLOCK TABLES; UNLOCK TABLES;
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1, t2; DROP TABLE t1, t2;
CREATE TABLE t1 (c1 int); CREATE TABLE t1 (c1 int);
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
FLUSH TABLES WITH READ LOCK; FLUSH TABLES WITH READ LOCK;
CREATE TABLE t2 AS SELECT * FROM t1; CREATE TABLE t2 AS SELECT * FROM t1;
ERROR HY000: Table 't2' was not locked with LOCK TABLES ERROR HY000: Table 't2' was not locked with LOCK TABLES
UNLOCK TABLES; UNLOCK TABLES;
...@@ -83,7 +83,7 @@ UNLOCK TABLES; ...@@ -83,7 +83,7 @@ UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
CREATE DATABASE mysqltest_1; CREATE DATABASE mysqltest_1;
FLUSH TABLES WITH READ LOCK; FLUSH TABLES WITH READ LOCK;
DROP DATABASE mysqltest_1; DROP DATABASE mysqltest_1;
DROP DATABASE mysqltest_1; DROP DATABASE mysqltest_1;
ERROR HY000: Can't execute the query because you have a conflicting read lock ERROR HY000: Can't execute the query because you have a conflicting read lock
UNLOCK TABLES; UNLOCK TABLES;
...@@ -91,7 +91,7 @@ DROP DATABASE mysqltest_1; ...@@ -91,7 +91,7 @@ DROP DATABASE mysqltest_1;
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb; create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
lock tables t1 write; lock tables t1 write;
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; // alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; // alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
unlock tables; unlock tables;
drop table t1; drop table t1;
...@@ -39,14 +39,14 @@ ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL inste ...@@ -39,14 +39,14 @@ ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL inste
lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL; lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL;
unlock tables; unlock tables;
lock tables mysql.general_log READ LOCAL; lock tables mysql.general_log READ LOCAL;
flush logs; flush logs;
unlock tables; unlock tables;
select "Mark that we woke up from flush logs in the test" select "Mark that we woke up from flush logs in the test"
as "test passed"; as "test passed";
test passed test passed
Mark that we woke up from flush logs in the test Mark that we woke up from flush logs in the test
lock tables mysql.general_log READ LOCAL; lock tables mysql.general_log READ LOCAL;
truncate mysql.general_log; truncate mysql.general_log;
unlock tables; unlock tables;
select "Mark that we woke up from TRUNCATE in the test" select "Mark that we woke up from TRUNCATE in the test"
as "test passed"; as "test passed";
......
...@@ -509,8 +509,8 @@ create table t2 (a int); ...@@ -509,8 +509,8 @@ create table t2 (a int);
insert into t2 values (10), (20), (30); insert into t2 values (10), (20), (30);
create view v1 as select a as b, a/10 as a from t2; create view v1 as select a as b, a/10 as a from t2;
lock table t1 write; lock table t1 write;
alter table t1 add column c int default 100 after a; alter table t1 add column c int default 100 after a;
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a; update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
unlock tables; unlock tables;
select * from t1; select * from t1;
a c b a c b
......
...@@ -152,8 +152,38 @@ mysqltest: At line 1: Missing delimiter ...@@ -152,8 +152,38 @@ mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: End of line junk detected: "sleep 7 mysqltest: At line 1: End of line junk detected: "sleep 7
# Another comment # Another comment
" "
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: End of line junk detected: "disconnect default
#
# comment
# comment2
# comment 3
--disable_query_log
"
mysqltest: At line 1: End of line junk detected: "disconnect default # comment
# comment part2
# comment 3
--disable_query_log
"
mysqltest: At line 1: Extra delimiter ";" found mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Extra delimiter ";" found mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Missing argument(s) to 'error'
mysqltest: At line 1: Missing argument(s) to 'error'
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
mysqltest: At line 1: The error name definition must start with an uppercase E
mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9]
mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9]
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
mysqltest: At line 1: The sqlstate may only consist of digits[0-9] and _uppercase_ letters
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
mysqltest: At line 1: Unknown SQL error name 'E9999'
mysqltest: At line 1: Invalid argument to error: '999e9' - the errno may only consist of digits[0-9]
mysqltest: At line 1: Invalid argument to error: '9b' - the errno may only consist of digits[0-9]
mysqltest: At line 1: Too many errorcodes specified
MySQL MySQL
"MySQL" "MySQL"
MySQL: The world''s most popular open source database MySQL: The world''s most popular open source database
...@@ -239,7 +269,7 @@ mysqltest: At line 1: Missing assignment operator in let ...@@ -239,7 +269,7 @@ mysqltest: At line 1: Missing assignment operator in let
1 1
# Execute: echo $success ; # Execute: echo $success ;
1 1
mysqltest: At line 1: Missing file name in source mysqltest: At line 1: Missing required argument 'filename' to command 'source'
mysqltest: At line 1: Could not open file ./non_existingFile mysqltest: At line 1: Could not open file ./non_existingFile
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
...@@ -332,16 +362,16 @@ Counter is greater than 0, (counter=10) ...@@ -332,16 +362,16 @@ Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0) Counter is not 0, (counter=0)
1 1
Testing while with not Testing while with not
mysqltest: In included file "./include/mysqltest_while.inc": At line 64: Nesting too deeply mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
mysqltest: At line 1: missing '(' in while mysqltest: At line 1: missing '(' in while
mysqltest: At line 1: missing ')' in while mysqltest: At line 1: missing ')' in while
mysqltest: At line 1: Missing '{' after while. Found "dec $i" mysqltest: At line 1: Missing '{' after while. Found "dec $i"
mysqltest: At line 1: Stray '}' - end of block before beginning mysqltest: At line 1: Stray '}' - end of block before beginning
mysqltest: At line 1: Stray 'end' command - end of block before beginning mysqltest: At line 1: Stray 'end' command - end of block before beginning
mysqltest: At line 1: query '' failed: 1065: Query was empty mysqltest: At line 1: query '{' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{' at line 1
mysqltest: At line 1: Missing '{' after while. Found "echo hej" mysqltest: At line 1: Missing '{' after while. Found "echo hej"
mysqltest: At line 3: Missing end of block mysqltest: At line 3: Missing end of block
mysqltest: At line 1: Missing newline between while and '{' mysqltest: At line 3: Missing end of block
mysqltest: At line 1: missing '(' in if mysqltest: At line 1: missing '(' in if
mysqltest: At line 1: Stray 'end' command - end of block before beginning mysqltest: At line 1: Stray 'end' command - end of block before beginning
select "b" bs col1, "c" bs col2; select "b" bs col1, "c" bs col2;
...@@ -371,17 +401,15 @@ mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 ...@@ -371,17 +401,15 @@ mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1
mysqltest: At line 1: Invalid integer argument "10!" mysqltest: At line 1: Invalid integer argument "10!"
mysqltest: At line 1: End of line junk detected: "!" mysqltest: At line 1: End of line junk detected: "!"
mysqltest: At line 1: Invalid integer argument "a" mysqltest: At line 1: Invalid integer argument "a"
mysqltest: At line 1: Syntax error in connect - expected '(' found 'mysqltest: At line 1: Missing connection host mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
mysqltest: At line 1: Missing connection host mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
mysqltest: At line 1: Missing connection user mysqltest: At line 1: Missing required argument 'host' to command 'connect'
mysqltest: At line 1: Missing connection user mysqltest: At line 1: Missing required argument 'host' to command 'connect'
mysqltest: At line 1: Missing connection password mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
mysqltest: At line 1: Missing connection db
mysqltest: At line 1: Could not open connection 'con2': 1049 Unknown database 'illegal_db'
mysqltest: At line 1: Illegal argument for port: 'illegal_port' mysqltest: At line 1: Illegal argument for port: 'illegal_port'
mysqltest: At line 1: Illegal option to connect: SMTP mysqltest: At line 1: Illegal option to connect: SMTP
OK OK
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted, you can have max 128 connections
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET); connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
...@@ -449,7 +477,6 @@ sleep; ...@@ -449,7 +477,6 @@ sleep;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1
; ;
ERROR 42000: Query was empty ERROR 42000: Query was empty
End of 5.0 tests
select "b" as col1, "c" as col2; select "b" as col1, "c" as col2;
col1 col2 col1 col2
b c b c
...@@ -477,4 +504,18 @@ a D ...@@ -477,4 +504,18 @@ a D
1 1 1 1
1 4 1 4
drop table t1; drop table t1;
End of 5.1 tests mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
mysqltest: At line 1: End of line junk detected: "write_file filename ";
"
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
hello
hello
hello
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
End of tests
...@@ -1132,41 +1132,15 @@ drop table t1; ...@@ -1132,41 +1132,15 @@ drop table t1;
create table t1 (a int) engine myisam create table t1 (a int) engine myisam
partition by range (a) partition by range (a)
subpartition by hash (a) subpartition by hash (a)
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx' (partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
(SUBPARTITION subpart00, SUBPARTITION subpart01)); (SUBPARTITION subpart00, SUBPARTITION subpart01));
hello/master-data/test/t1.frm Checking if file exists before alter
hello/master-data/test/t1.par
hello/master-data/test/t1#P#p0#SP#subpart00.MYD
hello/master-data/test/t1#P#p0#SP#subpart00.MYI
hello/master-data/test/t1#P#p0#SP#subpart01.MYD
hello/master-data/test/t1#P#p0#SP#subpart01.MYI
hello/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
hello/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
hello/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
hello/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx' (partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
(SUBPARTITION subpart10, SUBPARTITION subpart11), (SUBPARTITION subpart10, SUBPARTITION subpart11),
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx' partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
(SUBPARTITION subpart20, SUBPARTITION subpart21)); (SUBPARTITION subpart20, SUBPARTITION subpart21));
hello/master-data/test/t1.frm Checking if file exists after alter
hello/master-data/test/t1.par
hello/master-data/test/t1#P#p1#SP#subpart10.MYD
hello/master-data/test/t1#P#p1#SP#subpart10.MYI
hello/master-data/test/t1#P#p1#SP#subpart11.MYD
hello/master-data/test/t1#P#p1#SP#subpart11.MYI
hello/master-data/test/t1#P#p2#SP#subpart20.MYD
hello/master-data/test/t1#P#p2#SP#subpart20.MYI
hello/master-data/test/t1#P#p2#SP#subpart21.MYD
hello/master-data/test/t1#P#p2#SP#subpart21.MYI
hello/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
hello/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
hello/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
hello/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
hello/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
hello/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
hello/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
hello/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
drop table t1; drop table t1;
create table t1 (a bigint unsigned not null, primary key(a)) create table t1 (a bigint unsigned not null, primary key(a))
engine = myisam engine = myisam
......
...@@ -934,8 +934,7 @@ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzab ...@@ -934,8 +934,7 @@ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzab
zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba
flush query cache; flush query cache;
drop table t1, t2; drop table t1, t2;
set GLOBAL query_cache_size=1355776 set GLOBAL query_cache_size=1355776;
#;
flush status; flush status;
CREATE TABLE t1 ( CREATE TABLE t1 (
`date` datetime NOT NULL default '0000-00-00 00:00:00', `date` datetime NOT NULL default '0000-00-00 00:00:00',
......
...@@ -326,7 +326,7 @@ insert into t1 values(3); ...@@ -326,7 +326,7 @@ insert into t1 values(3);
set i_var = sleep(3); set i_var = sleep(3);
return 0; return 0;
end;| end;|
select f1(); select f1();
select sleep(4); select sleep(4);
sleep(4) sleep(4)
0 0
......
...@@ -43,7 +43,7 @@ Note 1051 Unknown table 't4' ...@@ -43,7 +43,7 @@ Note 1051 Unknown table 't4'
CREATE TABLE t1 (a int); CREATE TABLE t1 (a int);
CREATE TABLE t3 (a int); CREATE TABLE t3 (a int);
FLUSH TABLES WITH READ LOCK; FLUSH TABLES WITH READ LOCK;
RENAME TABLE t1 TO t2, t3 to t4; RENAME TABLE t1 TO t2, t3 to t4;
show tables; show tables;
Tables_in_test Tables_in_test
t1 t1
......
...@@ -26,7 +26,7 @@ create table t2 (a int primary key); ...@@ -26,7 +26,7 @@ create table t2 (a int primary key);
insert into t2 values(1); insert into t2 values(1);
create table t3 (id int); create table t3 (id int);
insert into t3 values(connection_id()); insert into t3 values(connection_id());
update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
select (@id := id) - id from t3; select (@id := id) - id from t3;
(@id := id) - id (@id := id) - id
0 0
......
...@@ -12,7 +12,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra ...@@ -12,7 +12,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings: Warnings:
Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)` Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)`
select master_pos_wait('master-bin.999999',0); select master_pos_wait('master-bin.999999',0);
stop slave sql_thread; stop slave sql_thread;
master_pos_wait('master-bin.999999',0) master_pos_wait('master-bin.999999',0)
NULL NULL
...@@ -44,7 +44,7 @@ create table t2(id int); ...@@ -44,7 +44,7 @@ create table t2(id int);
insert into t2 values(connection_id()); insert into t2 values(connection_id());
create temporary table t3(n int); create temporary table t3(n int);
insert into t3 select get_lock('crash_lock%20C', 1) from t2; insert into t3 select get_lock('crash_lock%20C', 1) from t2;
update t1 set n = n + get_lock('crash_lock%20C', 2); update t1 set n = n + get_lock('crash_lock%20C', 2);
select (@id := id) - id from t2; select (@id := id) - id from t2;
(@id := id) - id (@id := id) - id
0 0
......
...@@ -31,7 +31,7 @@ create procedure bug9486() ...@@ -31,7 +31,7 @@ create procedure bug9486()
update t1, t2 set val= 1 where id1=id2; update t1, t2 set val= 1 where id1=id2;
call bug9486(); call bug9486();
lock tables t2 write; lock tables t2 write;
call bug9486(); call bug9486();
show processlist; show processlist;
Id User Host db Command Time State Info Id User Host db Command Time State Info
# root localhost test Sleep # NULL # root localhost test Sleep # NULL
...@@ -77,7 +77,7 @@ select * from t1; ...@@ -77,7 +77,7 @@ select * from t1;
end| end|
use test; use test;
lock table t1 write; lock table t1 write;
call p2(); call p2();
use test; use test;
drop procedure p1; drop procedure p1;
create procedure p1() select * from t1; create procedure p1() select * from t1;
......
...@@ -74,8 +74,7 @@ flush status| ...@@ -74,8 +74,7 @@ flush status|
flush query cache| flush query cache|
delete from t1| delete from t1|
drop procedure bug3583| drop procedure bug3583|
drop table t1; drop table t1|
#|
drop procedure if exists bug6807| drop procedure if exists bug6807|
create procedure bug6807() create procedure bug6807()
begin begin
......
...@@ -2717,8 +2717,7 @@ select (1,2,3) = (select * from t1); ...@@ -2717,8 +2717,7 @@ select (1,2,3) = (select * from t1);
ERROR 21000: Operand should contain 3 column(s) ERROR 21000: Operand should contain 3 column(s)
select (select * from t1) = (1,2,3); select (select * from t1) = (1,2,3);
ERROR 21000: Operand should contain 2 column(s) ERROR 21000: Operand should contain 2 column(s)
drop table t1 drop table t1;
#;
CREATE TABLE `t1` ( CREATE TABLE `t1` (
`itemid` bigint(20) unsigned NOT NULL auto_increment, `itemid` bigint(20) unsigned NOT NULL auto_increment,
`sessionid` bigint(20) unsigned default NULL, `sessionid` bigint(20) unsigned default NULL,
......
drop table if exists t1; drop table if exists t1;
CREATE TABLE t1 (x1 int); CREATE TABLE t1 (x1 int);
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -8,7 +8,7 @@ t2 CREATE TABLE `t2` ( ...@@ -8,7 +8,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -16,7 +16,7 @@ t2 CREATE TABLE `t2` ( ...@@ -16,7 +16,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -24,7 +24,7 @@ t2 CREATE TABLE `t2` ( ...@@ -24,7 +24,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -32,7 +32,7 @@ t2 CREATE TABLE `t2` ( ...@@ -32,7 +32,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -40,7 +40,7 @@ t2 CREATE TABLE `t2` ( ...@@ -40,7 +40,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -48,7 +48,7 @@ t2 CREATE TABLE `t2` ( ...@@ -48,7 +48,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -56,7 +56,7 @@ t2 CREATE TABLE `t2` ( ...@@ -56,7 +56,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -64,7 +64,7 @@ t2 CREATE TABLE `t2` ( ...@@ -64,7 +64,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -72,7 +72,7 @@ t2 CREATE TABLE `t2` ( ...@@ -72,7 +72,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -80,7 +80,7 @@ t2 CREATE TABLE `t2` ( ...@@ -80,7 +80,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -88,7 +88,7 @@ t2 CREATE TABLE `t2` ( ...@@ -88,7 +88,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` ( ...@@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -104,7 +104,7 @@ t2 CREATE TABLE `t2` ( ...@@ -104,7 +104,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -112,7 +112,7 @@ t2 CREATE TABLE `t2` ( ...@@ -112,7 +112,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -120,7 +120,7 @@ t2 CREATE TABLE `t2` ( ...@@ -120,7 +120,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -128,7 +128,7 @@ t2 CREATE TABLE `t2` ( ...@@ -128,7 +128,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -136,7 +136,7 @@ t2 CREATE TABLE `t2` ( ...@@ -136,7 +136,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -144,7 +144,7 @@ t2 CREATE TABLE `t2` ( ...@@ -144,7 +144,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int; ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
...@@ -152,7 +152,7 @@ t2 CREATE TABLE `t2` ( ...@@ -152,7 +152,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) DEFAULT NULL `xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int; ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
......
...@@ -59,6 +59,7 @@ flush privileges; ...@@ -59,6 +59,7 @@ flush privileges;
connect (con10,localhost,test,gambling2,); connect (con10,localhost,test,gambling2,);
connect (con5,localhost,test,gambling2,mysql); connect (con5,localhost,test,gambling2,mysql);
connection con5;
set password=""; set password="";
--error 1372 --error 1372
set password='gambling3'; set password='gambling3';
......
...@@ -20,6 +20,9 @@ SET SESSION debug="d,crash_commit_before"; ...@@ -20,6 +20,9 @@ SET SESSION debug="d,crash_commit_before";
--error 2013 --error 2013
COMMIT; COMMIT;
# Turn on reconnect
--enable_reconnect
# Call script that will poll the server waiting for it to be back online again # Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc --source include/wait_until_connected_again.inc
......
...@@ -1295,7 +1295,7 @@ SELECT fld3 FROM t2; ...@@ -1295,7 +1295,7 @@ SELECT fld3 FROM t2;
# #
DROP TABLE t1; DROP TABLE t1;
ALTER TABLE t2 RENAME t1 ALTER TABLE t2 RENAME t1;
# #
# Drop and recreate # Drop and recreate
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# See mysql-test/std_data/init_file.dat and # See mysql-test/std_data/init_file.dat and
# mysql-test/t/init_file-master.opt for the actual test # mysql-test/t/init_file-master.opt for the actual test
# #
--echo ok --echo ok
--echo end of 4.1 tests --echo end of 4.1 tests
......
...@@ -317,7 +317,6 @@ select 3 from t1 ; ...@@ -317,7 +317,6 @@ select 3 from t1 ;
# #
#select 3 from t1 ; #select 3 from t1 ;
# End of 4.1 tests
--error 1 --error 1
--exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST 2>&1 --exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST 2>&1
...@@ -360,18 +359,80 @@ select 3 from t1 ; ...@@ -360,18 +359,80 @@ select 3 from t1 ;
# Missing delimiter # Missing delimiter
# The comment will be "sucked into" the sleep command since # The comment will be "sucked into" the sleep command since
# delimiter is missing until after "show status" # delimiter is missing until after "show status"
--system echo "sleep 4" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql --write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
--system echo "# A comment" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql sleep 4
--system echo "show status;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql # A comment
show status;
EOF
--error 1 --error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 --exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
# #
# Missing delimiter until eof # Missing delimiter until eof
# The comment will be "sucked into" the sleep command since # The comment will be "sucked into" the sleep command since
# delimiter is missing # delimiter is missing
--system echo "sleep 7" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql --write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
--system echo "# Another comment" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql sleep 7
# Another comment
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
#
# Missing delimiter until "disable_query_log"
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default
#
# comment
# comment 3
disable_query_log;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
#
# Missing delimiter until "disable_query_log"
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default
#
# comment
# comment 3
disable_query_log;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
#
# Missing delimiter until eof
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default
#
# comment
# comment2
# comment 3
--disable_query_log
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
#
# Missing delimiter until eof
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default # comment
# comment part2
# comment 3
--disable_query_log
EOF
--error 1 --error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 --exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
...@@ -388,6 +449,67 @@ select 3 from t1 ; ...@@ -388,6 +449,67 @@ select 3 from t1 ;
--sleep 1 # Wait for insert delayed to be executed. --sleep 1 # Wait for insert delayed to be executed.
--sleep 1 # Wait for insert delayed to be executed. --sleep 1 # Wait for insert delayed to be executed.
# ----------------------------------------------------------------------------
# Test error
# ----------------------------------------------------------------------------
# Missing argument
--error 1
--exec echo "error;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error" | $MYSQL_TEST 2>&1
# First char must be uppercase 'S' or 'E' or [0-9]
--error 1
--exec echo "--error s99999" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error e99999" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error 9eeeee" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error 1sssss" | $MYSQL_TEST 2>&1
# First char 'S' but too long
--error 1
--exec echo "--error S999999" | $MYSQL_TEST 2>&1
# First char 'S' but lowercase char found
--error 1
--exec echo "--error S99a99" | $MYSQL_TEST 2>&1
# First char 'S' but too short
--error 1
--exec echo "--error S9999" | $MYSQL_TEST 2>&1
# First char 'E' but not found in error array
--error 1
--exec echo "--error E9999" | $MYSQL_TEST 2>&1
# First char [0-9] but contains chars
--error 1
--exec echo "--error 999e9" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error 9b" | $MYSQL_TEST 2>&1
# Multiple errorcodes separated by ','
--error 1,1,1,1
#--error 9,ER_PARSE_ERROR
#--error ER_PARSE_ERROR
#--error 9,ER_PARSE_ERROR,9,ER_PARSE_ERROR
#--error 9, ER_PARSE_ERROR, 9, ER_PARSE_ERROR
#--error 9,S00000,9,ER_PARSE_ERROR
#--error 9,S00000,9,ER_PARSE_ERROR,ER_PARSE_ERROR,ER_PARSE_ERROR,9,10,11,12
--error 9,S00000,9
--error 9,S00000,9,9,10,11,12
--error 9 ,10
--error 9 , 10
--error 9 , 10
--error 9 , 10
# Too many errorcodes specified
--error 1
--exec echo "--error 1,2,3,4,5,6,7,8,9,10,11" | $MYSQL_TEST 2>&1
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Test echo command # Test echo command
...@@ -610,6 +732,7 @@ echo $var3_var3; ...@@ -610,6 +732,7 @@ echo $var3_var3;
# Fix win paths # Fix win paths
--replace_result \\ / --replace_result \\ /
# Source a nonexisting file
--error 1 --error 1
--exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1 --exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1
...@@ -627,13 +750,16 @@ echo $var3_var3; ...@@ -627,13 +750,16 @@ echo $var3_var3;
# Test execution of source in a while loop # Test execution of source in a while loop
--write_file $MYSQLTEST_VARDIR/tmp/sourced.inc
echo here is the sourced script;
EOF
--disable_query_log --disable_query_log
let $outer= 2; # Number of outer loops let $outer= 2; # Number of outer loops
while ($outer) while ($outer)
{ {
eval SELECT '$outer = outer loop variable after while' AS ""; eval SELECT '$outer = outer loop variable after while' AS "";
--source include/sourced.inc --source $MYSQLTEST_VARDIR/tmp/sourced.inc
eval SELECT '$outer = outer loop variable before dec' AS ""; eval SELECT '$outer = outer loop variable before dec' AS "";
dec $outer; dec $outer;
...@@ -661,11 +787,12 @@ let $num= 9; ...@@ -661,11 +787,12 @@ let $num= 9;
while ($num) while ($num)
{ {
SELECT 'In loop' AS ""; SELECT 'In loop' AS "";
--source include/sourced1.inc --source $MYSQLTEST_VARDIR/tmp/sourced.inc
dec $num; dec $num;
} }
--enable_abort_on_error --enable_abort_on_error
--enable_query_log --enable_query_log
--remove_file $MYSQLTEST_VARDIR/tmp/sourced.inc
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Test sleep command # Test sleep command
...@@ -817,10 +944,150 @@ while (!$i) ...@@ -817,10 +944,150 @@ while (!$i)
} }
# Exceed max nesting level # Exceed max nesting level
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
let $1 = 10;
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
echo $1;
dec $1;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
EOF
# Fix win path # Fix win path
--replace_result \\ / --replace_result \\ / $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1 --error 1
--exec echo "source include/mysqltest_while.inc;" | $MYSQL_TEST 2>&1 --exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc;" | $MYSQL_TEST 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
--error 1 --error 1
--exec echo "while \$i;" | $MYSQL_TEST 2>&1 --exec echo "while \$i;" | $MYSQL_TEST 2>&1
--error 1 --error 1
...@@ -925,12 +1192,6 @@ select "a" as col1, "c" as col2; ...@@ -925,12 +1192,6 @@ select "a" as col1, "c" as col2;
--error 1 --error 1
--exec echo "connect (con2,);" | $MYSQL_TEST 2>&1 --exec echo "connect (con2,);" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "connect (con2,localhost);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con2, localhost, root);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con2, localhost, root,);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con2,localhost,root,,illegal_db);" | $MYSQL_TEST 2>&1 --exec echo "connect (con2,localhost,root,,illegal_db);" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "connect (con1,localhost,root,,,illegal_port,);" | $MYSQL_TEST 2>&1 --exec echo "connect (con1,localhost,root,,,illegal_port,);" | $MYSQL_TEST 2>&1
...@@ -938,13 +1199,15 @@ select "a" as col1, "c" as col2; ...@@ -938,13 +1199,15 @@ select "a" as col1, "c" as col2;
--exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1 --exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1
# Repeat connect/disconnect # Repeat connect/disconnect
--system echo "let \$i=100;" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql --write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
--system echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql let $i=100;
--system echo "{" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql while ($i)
--system echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql {
--system echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql connect (test_con1,localhost,root,,);
--system echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql disconnect test_con1;
--system echo "}" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql dec $i;
}
EOF
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1 --exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1
# Repeat connect/disconnect, exceed max number of connections # Repeat connect/disconnect, exceed max number of connections
...@@ -1149,8 +1412,6 @@ query sleep; ...@@ -1149,8 +1412,6 @@ query sleep;
--error 1065 --error 1065
query ; query ;
--echo End of 5.0 tests
# test for replace_regex # test for replace_regex
--replace_regex /at/b/ --replace_regex /at/b/
select "at" as col1, "c" as col2; select "at" as col1, "c" as col2;
...@@ -1189,4 +1450,103 @@ insert into t1 values (2,4); ...@@ -1189,4 +1450,103 @@ insert into t1 values (2,4);
select * from t1; select * from t1;
drop table t1; drop table t1;
--echo End of 5.1 tests # ----------------------------------------------------------------------------
# test for remove_file
# ----------------------------------------------------------------------------
--error 1
--exec echo "remove_file ;" | $MYSQL_TEST 2>&1
--error 1
remove_file non_existing_file;
# ----------------------------------------------------------------------------
# test for write_file
# ----------------------------------------------------------------------------
--error 1
--exec echo "write_file ;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "write_file filename ;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp END_DELIMITER;
Content for test_file1 contains EOF
END_DELIMITER
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
# ----------------------------------------------------------------------------
# test for file_exist
# ----------------------------------------------------------------------------
--error 1
--exec echo "file_exists ;" | $MYSQL_TEST 2>&1
--error 0,1
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
# ----------------------------------------------------------------------------
# test for copy_file
# ----------------------------------------------------------------------------
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF
copy_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
--exec echo "copy_file ;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
# test for perl
# ----------------------------------------------------------------------------
--perl
print "hello\n";
EOF
--perl EOF
print "hello\n";
EOF
--perl DELIMITER
print "hello\n";
DELIMITER
--error 1
--exec echo "perl TOO_LONG_DELIMITER ;" | $MYSQL_TEST 2>&1
perl;
print "hello\n";
EOF
perl;
# Print "hello"
print "hello\n";
EOF
--echo End of tests
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
# Taken fromm the select test # Taken fromm the select test
# #
-- source include/have_partition.inc -- source include/have_partition.inc
-- source include/have_innodb.inc
# #
# This test is disabled on Windows due to BUG#19107 # This test is disabled on Windows due to BUG#19107
# #
...@@ -1332,37 +1333,51 @@ eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx''' ...@@ -1332,37 +1333,51 @@ eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx'''
let $inx_directory = `select @inx_dir`; let $inx_directory = `select @inx_dir`;
--enable_query_log --enable_query_log
--replace_result $MYSQLTEST_VARDIR "hello" --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create table t1 (a int) engine myisam eval create table t1 (a int) engine myisam
partition by range (a) partition by range (a)
subpartition by hash (a) subpartition by hash (a)
(partition p0 VALUES LESS THAN (1) $data_directory $inx_directory (partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart00, SUBPARTITION subpart01)); (SUBPARTITION subpart00, SUBPARTITION subpart01));
--replace_result $MYSQLTEST_VARDIR "hello" --echo Checking if file exists before alter
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory (partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart10, SUBPARTITION subpart11), (SUBPARTITION subpart10, SUBPARTITION subpart11),
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
(SUBPARTITION subpart20, SUBPARTITION subpart21)); (SUBPARTITION subpart20, SUBPARTITION subpart21));
--replace_result $MYSQLTEST_VARDIR "hello" --echo Checking if file exists after alter
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
drop table t1; drop table t1;
--exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true --exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
......
...@@ -354,14 +354,14 @@ create table t1 (a int, b int); ...@@ -354,14 +354,14 @@ create table t1 (a int, b int);
insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2); insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2);
prepare stmt from prepare stmt from
"explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?"; "explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?";
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
set @v=5; set @v=5;
execute stmt using @v;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - --replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
set @v=0;
execute stmt using @v; execute stmt using @v;
set @v=0;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - --replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
execute stmt using @v;
set @v=5; set @v=5;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
execute stmt using @v; execute stmt using @v;
drop table t1; drop table t1;
deallocate prepare stmt; deallocate prepare stmt;
......
...@@ -316,8 +316,8 @@ prepare stmt4 from ' show table status from test like ''t9%'' '; ...@@ -316,8 +316,8 @@ prepare stmt4 from ' show table status from test like ''t9%'' ';
--replace_column 8 # 12 # 13 # 14 # --replace_column 8 # 12 # 13 # 14 #
# Bug#4288 # Bug#4288
execute stmt4; execute stmt4;
--replace_column 2 #
prepare stmt4 from ' show status like ''Threads_running'' '; prepare stmt4 from ' show status like ''Threads_running'' ';
--replace_column 2 #
execute stmt4; execute stmt4;
prepare stmt4 from ' show variables like ''sql_mode'' '; prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4; execute stmt4;
......
...@@ -35,7 +35,7 @@ use mysqltest; ...@@ -35,7 +35,7 @@ use mysqltest;
--source include/ps_create.inc --source include/ps_create.inc
--source include/ps_renew.inc --source include/ps_renew.inc
--enable_query_log --enable_query_log
eval use $DB; use test;
grant usage on mysqltest.* to second_user@localhost grant usage on mysqltest.* to second_user@localhost
identified by 'looser' ; identified by 'looser' ;
grant select on mysqltest.t9 to second_user@localhost grant select on mysqltest.t9 to second_user@localhost
......
...@@ -699,7 +699,7 @@ select a from t1; ...@@ -699,7 +699,7 @@ select a from t1;
flush query cache; flush query cache;
drop table t1, t2; drop table t1, t2;
set GLOBAL query_cache_size=1355776 set GLOBAL query_cache_size=1355776;
# #
......
...@@ -39,6 +39,7 @@ SELECT * FROM t1 ORDER BY a,b; ...@@ -39,6 +39,7 @@ SELECT * FROM t1 ORDER BY a,b;
--echo **** On Master **** --echo **** On Master ****
connection master; connection master;
DROP TABLE t1; DROP TABLE t1;
let SERVER_VERSION=`select version()`;
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/ --replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
--replace_result $SERVER_VERSION SERVER_VERSION --replace_result $SERVER_VERSION SERVER_VERSION
SHOW BINLOG EVENTS; SHOW BINLOG EVENTS;
......
...@@ -319,7 +319,7 @@ begin ...@@ -319,7 +319,7 @@ begin
declare x int; declare x int;
end| end|
--error 1332 --error 1332
create procedure p() create procedure p()
begin begin
declare c condition for 1064; declare c condition for 1064;
......
...@@ -2940,11 +2940,11 @@ begin ...@@ -2940,11 +2940,11 @@ begin
end| end|
--disable_parsing --disable_parsing
--replace_regex /table_id: [0-9]+/table_id: #/ --replace_regex /table_id: [0-9]+/table_id: #/
show binlog events; show binlog events|
show storage engines; show storage engines|
show master status; show master status|
show slave hosts; show slave hosts|
show slave status; show slave status|
--enable_parsing --enable_parsing
call bug4902()| call bug4902()|
......
...@@ -19,11 +19,11 @@ begin ...@@ -19,11 +19,11 @@ begin
show grants for 'root'@'localhost'; show grants for 'root'@'localhost';
end| end|
--disable_parsing --disable_parsing
show binlog events; show binlog events|
show storage engines; show storage engines|
show master status; show master status|
show slave hosts; show slave hosts|
show slave status; show slave status|
--enable_parsing --enable_parsing
call bug4902()| call bug4902()|
...@@ -110,7 +110,7 @@ flush status| ...@@ -110,7 +110,7 @@ flush status|
flush query cache| flush query cache|
delete from t1| delete from t1|
drop procedure bug3583| drop procedure bug3583|
drop table t1; drop table t1|
# #
# BUG#6807: Stored procedure crash if CREATE PROCEDURE ... KILL QUERY # BUG#6807: Stored procedure crash if CREATE PROCEDURE ... KILL QUERY
......
...@@ -1728,7 +1728,7 @@ select (select a from t1) = (1,2); ...@@ -1728,7 +1728,7 @@ select (select a from t1) = (1,2);
select (1,2,3) = (select * from t1); select (1,2,3) = (select * from t1);
-- error 1241 -- error 1241
select (select * from t1) = (1,2,3); select (select * from t1) = (1,2,3);
drop table t1 drop table t1;
# #
# Item_int_with_ref check (BUG#10020) # Item_int_with_ref check (BUG#10020)
......
...@@ -55,7 +55,7 @@ select 2; ...@@ -55,7 +55,7 @@ select 2;
select 3; select 3;
# Disconnect so that we will not be confused by a future abort from this # Disconnect so that we will not be confused by a future abort from this
# connection. # connection.
disconnect default disconnect default;
# #
# Do the same test as above on a TCP connection # Do the same test as above on a TCP connection
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment