mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Merge siva.hindu.god:/usr/home/tim/m/bk/50
into siva.hindu.god:/usr/home/tim/m/bk/51
This commit is contained in:
@@ -264,7 +264,7 @@ enum enum_commands {
|
|||||||
Q_IF,
|
Q_IF,
|
||||||
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
|
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
|
||||||
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
|
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
|
||||||
Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE,
|
Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT,
|
||||||
|
|
||||||
Q_UNKNOWN, /* Unknown command. */
|
Q_UNKNOWN, /* Unknown command. */
|
||||||
Q_COMMENT, /* Comments, ignored. */
|
Q_COMMENT, /* Comments, ignored. */
|
||||||
@@ -345,6 +345,8 @@ const char *command_names[]=
|
|||||||
"copy_file",
|
"copy_file",
|
||||||
"perl",
|
"perl",
|
||||||
"die",
|
"die",
|
||||||
|
/* Don't execute any more commands, compare result */
|
||||||
|
"exit",
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5429,7 +5431,7 @@ void mark_progress(struct st_command* command __attribute__((unused)),
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct st_command *command;
|
struct st_command *command;
|
||||||
my_bool q_send_flag= 0;
|
my_bool q_send_flag= 0, abort_flag= 0;
|
||||||
uint command_executed= 0, last_command_executed= 0;
|
uint command_executed= 0, last_command_executed= 0;
|
||||||
char save_file[FN_REFLEN];
|
char save_file[FN_REFLEN];
|
||||||
MY_STAT res_info;
|
MY_STAT res_info;
|
||||||
@@ -5549,7 +5551,7 @@ int main(int argc, char **argv)
|
|||||||
open_file(opt_include);
|
open_file(opt_include);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!read_command(&command))
|
while (!read_command(&command) && !abort_flag)
|
||||||
{
|
{
|
||||||
int current_line_inc = 1, processed = 0;
|
int current_line_inc = 1, processed = 0;
|
||||||
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
|
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
|
||||||
@@ -5777,8 +5779,13 @@ int main(int argc, char **argv)
|
|||||||
die("Parsing is already enabled");
|
die("Parsing is already enabled");
|
||||||
break;
|
break;
|
||||||
case Q_DIE:
|
case Q_DIE:
|
||||||
|
/* Abort test with error code and error message */
|
||||||
die("%s", command->first_argument);
|
die("%s", command->first_argument);
|
||||||
break;
|
break;
|
||||||
|
case Q_EXIT:
|
||||||
|
/* Stop processing any more commands */
|
||||||
|
abort_flag= 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case Q_RESULT:
|
case Q_RESULT:
|
||||||
die("result, deprecated command");
|
die("result, deprecated command");
|
||||||
|
@@ -263,9 +263,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
# Skip some tests but include in list, just mark them to skip
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
my $tinfo= {};
|
my $tinfo= {};
|
||||||
$tinfo->{'name'}= $tname;
|
$tinfo->{'name'}= $tname;
|
||||||
@@ -273,6 +270,10 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
$tinfo->{'component_id'} = $component_id;
|
$tinfo->{'component_id'} = $component_id;
|
||||||
push(@$cases, $tinfo);
|
push(@$cases, $tinfo);
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Skip some tests but include in list, just mark them to skip
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
if ( $::opt_skip_test and defined mtr_match_prefix($tname,$::opt_skip_test) )
|
if ( $::opt_skip_test and defined mtr_match_prefix($tname,$::opt_skip_test) )
|
||||||
{
|
{
|
||||||
$tinfo->{'skip'}= 1;
|
$tinfo->{'skip'}= 1;
|
||||||
@@ -356,8 +357,9 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
$value= mtr_match_prefix($opt, "--default-time-zone=");
|
$value= mtr_match_prefix($opt, "--default-time-zone=");
|
||||||
if ( defined $value )
|
if ( defined $value )
|
||||||
{
|
{
|
||||||
$tinfo->{'timezone'}= "";
|
# Set timezone for this test case to something different
|
||||||
# Fallthrough, add this option
|
$tinfo->{'timezone'}= "GMT-8";
|
||||||
|
# Fallthrough, add the --default-time-zone option
|
||||||
}
|
}
|
||||||
|
|
||||||
# The --restart option forces a restart even if no special
|
# The --restart option forces a restart even if no special
|
||||||
|
@@ -14,6 +14,7 @@ sub mtr_path_exists(@);
|
|||||||
sub mtr_script_exists(@);
|
sub mtr_script_exists(@);
|
||||||
sub mtr_file_exists(@);
|
sub mtr_file_exists(@);
|
||||||
sub mtr_exe_exists(@);
|
sub mtr_exe_exists(@);
|
||||||
|
sub mtr_exe_maybe_exists(@);
|
||||||
sub mtr_copy_dir($$);
|
sub mtr_copy_dir($$);
|
||||||
sub mtr_same_opts($$);
|
sub mtr_same_opts($$);
|
||||||
sub mtr_cmp_opts($$);
|
sub mtr_cmp_opts($$);
|
||||||
@@ -110,8 +111,9 @@ sub mtr_file_exists (@) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub mtr_exe_exists (@) {
|
sub mtr_exe_maybe_exists (@) {
|
||||||
my @path= @_;
|
my @path= @_;
|
||||||
|
|
||||||
map {$_.= ".exe"} @path if $::glob_win32;
|
map {$_.= ".exe"} @path if $::glob_win32;
|
||||||
foreach my $path ( @path )
|
foreach my $path ( @path )
|
||||||
{
|
{
|
||||||
@@ -124,6 +126,16 @@ sub mtr_exe_exists (@) {
|
|||||||
return $path if -x $path;
|
return $path if -x $path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
sub mtr_exe_exists (@) {
|
||||||
|
my @path= @_;
|
||||||
|
if (my $path= mtr_exe_maybe_exists(@path))
|
||||||
|
{
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
# Could not find exe, show error
|
||||||
if ( @path == 1 )
|
if ( @path == 1 )
|
||||||
{
|
{
|
||||||
mtr_error("Could not find $path[0]");
|
mtr_error("Could not find $path[0]");
|
||||||
|
@@ -1313,9 +1313,8 @@ sub executable_setup () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Look for language files and charsetsdir, use same share
|
# Look for language files and charsetsdir, use same share
|
||||||
my $path_share= mtr_path_exists("$glob_basedir/share",
|
my $path_share= mtr_path_exists("$glob_basedir/share/mysql",
|
||||||
"$glob_basedir/sql/share",
|
"$glob_basedir/sql/share",
|
||||||
"$glob_basedir/share/mysql",
|
|
||||||
"$glob_basedir/share");
|
"$glob_basedir/share");
|
||||||
|
|
||||||
$path_language= mtr_path_exists("$path_share/english");
|
$path_language= mtr_path_exists("$path_share/english");
|
||||||
@@ -1373,32 +1372,32 @@ sub executable_setup () {
|
|||||||
{
|
{
|
||||||
# Look for ndb tols and binaries
|
# Look for ndb tols and binaries
|
||||||
my $ndb_path= mtr_path_exists("$glob_basedir/ndb",
|
my $ndb_path= mtr_path_exists("$glob_basedir/ndb",
|
||||||
"$glob_basedir/storage/ndb");
|
"$glob_basedir/storage/ndb",
|
||||||
|
"$glob_basedir/bin");
|
||||||
|
|
||||||
$path_ndb_tools_dir= mtr_path_exists("$ndb_path/tools",
|
$path_ndb_tools_dir= mtr_path_exists("$ndb_path/tools",
|
||||||
"$glob_basedir/bin");
|
"$ndb_path");
|
||||||
$exe_ndb_mgm=
|
$exe_ndb_mgm=
|
||||||
mtr_exe_exists("$ndb_path/src/mgmclient/ndb_mgm",
|
mtr_exe_exists("$ndb_path/src/mgmclient/ndb_mgm",
|
||||||
"$glob_basedir/bin/ndb_mgm");
|
"$ndb_path/ndb_mgm");
|
||||||
$exe_ndb_mgmd=
|
$exe_ndb_mgmd=
|
||||||
mtr_exe_exists("$ndb_path/src/mgmsrv/ndb_mgmd",
|
mtr_exe_exists("$ndb_path/src/mgmsrv/ndb_mgmd",
|
||||||
"$glob_basedir/bin/ndb_mgmd");
|
"$ndb_path/ndb_mgmd");
|
||||||
$exe_ndb_waiter=
|
$exe_ndb_waiter=
|
||||||
mtr_exe_exists("$ndb_path/tools/ndb_waiter",
|
mtr_exe_exists("$ndb_path/tools/ndb_waiter",
|
||||||
"$glob_basedir/bin/ndb_waiter");
|
"$ndb_path/ndb_waiter");
|
||||||
$exe_ndbd=
|
$exe_ndbd=
|
||||||
mtr_exe_exists("$ndb_path/src/kernel/ndbd",
|
mtr_exe_exists("$ndb_path/src/kernel/ndbd",
|
||||||
"$glob_basedir/bin/ndbd");
|
"$ndb_path/ndbd");
|
||||||
|
|
||||||
if ( $mysql_version_id >= 50000 )
|
# May not exist
|
||||||
{
|
|
||||||
$path_ndb_examples_dir=
|
$path_ndb_examples_dir=
|
||||||
mtr_path_exists("$ndb_path/ndbapi-examples",
|
mtr_file_exists("$ndb_path/ndbapi-examples",
|
||||||
"$ndb_path/examples");
|
"$ndb_path/examples");
|
||||||
|
# May not exist
|
||||||
$exe_ndb_example=
|
$exe_ndb_example=
|
||||||
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
|
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# Look for the udf_example library
|
# Look for the udf_example library
|
||||||
$lib_udf_example=
|
$lib_udf_example=
|
||||||
@@ -1420,27 +1419,20 @@ sub executable_setup () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $glob_win32 and $mysql_version_id < 50000 )
|
# Look for mysql_client_test executable which may _not_ exist in
|
||||||
{
|
# some versions, test using it should be skipped
|
||||||
# Skip looking for exe_mysql_client_test as its not built by default
|
|
||||||
# in 4.1 for windows.
|
|
||||||
$exe_mysql_client_test= "unavailable";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
# Look for mysql_client_test executable
|
|
||||||
if ( $glob_use_embedded_server )
|
if ( $glob_use_embedded_server )
|
||||||
{
|
{
|
||||||
$exe_mysql_client_test=
|
$exe_mysql_client_test=
|
||||||
mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
|
mtr_exe_maybe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$exe_mysql_client_test=
|
$exe_mysql_client_test=
|
||||||
mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
|
mtr_exe_maybe_exists("$glob_basedir/tests/mysql_client_test",
|
||||||
"$glob_basedir/tests/release/mysql_client_test",
|
"$glob_basedir/tests/release/mysql_client_test",
|
||||||
"$glob_basedir/tests/debug/mysql_client_test");
|
"$glob_basedir/tests/debug/mysql_client_test",
|
||||||
}
|
"$glob_basedir/bin");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2045,6 +2037,14 @@ sub check_ndbcluster_support ($) {
|
|||||||
$opt_skip_ndbcluster_slave= 1;
|
$opt_skip_ndbcluster_slave= 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
elsif ( -e "$glob_basedir/bin" && ! -f "$glob_basedir/bin/ndbd")
|
||||||
|
{
|
||||||
|
# Binary dist with a mysqld that supports ndb, but no ndbd found
|
||||||
|
mtr_report("Skipping ndbcluster, can't fint binaries");
|
||||||
|
$opt_skip_ndbcluster= 1;
|
||||||
|
$opt_skip_ndbcluster_slave= 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
$glob_ndbcluster_supported= 1;
|
$glob_ndbcluster_supported= 1;
|
||||||
mtr_report("Using ndbcluster when necessary, mysqld supports it");
|
mtr_report("Using ndbcluster when necessary, mysqld supports it");
|
||||||
|
|
||||||
|
@@ -518,4 +518,6 @@ hello
|
|||||||
mysqltest: At line 1: Max delimiter length(16) exceeded
|
mysqltest: At line 1: Max delimiter length(16) exceeded
|
||||||
hello
|
hello
|
||||||
hello
|
hello
|
||||||
|
mysqltest: At line 1: test of die
|
||||||
|
Some output
|
||||||
End of tests
|
End of tests
|
||||||
|
@@ -244,7 +244,10 @@ DROP DATABASE mysqltest_1;
|
|||||||
# Bug #17264: MySQL Server freeze
|
# Bug #17264: MySQL Server freeze
|
||||||
#
|
#
|
||||||
connection locker;
|
connection locker;
|
||||||
|
# Disable warnings to allow test to run also without InnoDB
|
||||||
|
--disable_warnings
|
||||||
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;
|
||||||
|
--enable_warnings
|
||||||
lock tables t1 write;
|
lock tables t1 write;
|
||||||
connection writer;
|
connection writer;
|
||||||
--sleep 2
|
--sleep 2
|
||||||
|
@@ -1548,5 +1548,19 @@ perl;
|
|||||||
print "hello\n";
|
print "hello\n";
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for die
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "die test of die;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for exit
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
|
||||||
--echo End of tests
|
--echo End of tests
|
||||||
|
@@ -1 +1 @@
|
|||||||
--skip-external-locking
|
--force-restart
|
||||||
|
@@ -1 +1 @@
|
|||||||
--ssl-cert=std_data/server-cert-des.pem --ssl-key=std_data/server-key-des.pem
|
--loose_ssl-cert=std_data/server-cert-des.pem --loose_ssl-key=std_data/server-key-des.pem
|
||||||
|
Reference in New Issue
Block a user