1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint

into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_dbug.h:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/csv.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/t/func_time.test:
  Manual merge, test already there
mysql-test/t/innodb_mysql.test:
  Manual merge
This commit is contained in:
unknown
2006-10-14 19:55:06 +02:00
9 changed files with 126 additions and 45 deletions

View File

@ -575,8 +575,6 @@ sub mtr_options_from_test_file($$) {
while ( my $line= <$F> )
{
next if ( $line !~ /^--/ );
# Match this line against tag in "tags" array
foreach my $tag (@tags)
{
@ -588,14 +586,21 @@ sub mtr_options_from_test_file($$) {
}
# If test sources another file, open it as well
if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ )
if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ or
$line =~ /^([[:space:]]*)source(.*);$/ )
{
my $value= $2;
$value =~ s/^\s+//; # Remove leading space
$value =~ s/[[:space:]]+$//; # Remove ending space
my $sourced_file= "$::glob_mysql_test_dir/$value";
mtr_options_from_test_file($tinfo, $sourced_file);
if ( -f $sourced_file )
{
# Only source the file if it exists, we may get
# false positives in the regexes above if someone
# writes "source nnnn;" in a test case(such as mysqltest.test)
mtr_options_from_test_file($tinfo, $sourced_file);
}
}
}

View File

@ -133,6 +133,7 @@ sub mtr_report_test_failed ($) {
if ( $tinfo->{'timeout'} )
{
print "[ fail ] timeout\n";
return;
}
elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
{

View File

@ -468,11 +468,11 @@ sub initial_setup () {
#
# Look for the path where to find the client binaries
$path_client_bindir= mtr_path_exists("$glob_basedir/client/release",
$path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
"$glob_basedir/client_debug",
"$glob_basedir/client/release",
"$glob_basedir/client/debug",
"$glob_basedir/client",
"$glob_basedir/client_release",
"$glob_basedir/client_debug",
"$glob_basedir/bin");
# Look for the mysqld executable
@ -484,6 +484,7 @@ sub initial_setup () {
"$path_client_bindir/mysqld-debug",
"$path_client_bindir/mysqld-max",
"$glob_basedir/libexec/mysqld",
"$glob_basedir/bin/mysqld",
"$glob_basedir/sql/release/mysqld",
"$glob_basedir/sql/debug/mysqld");
@ -1386,11 +1387,14 @@ sub executable_setup () {
mtr_exe_exists("$ndb_path/src/kernel/ndbd",
"$glob_basedir/bin/ndbd");
$path_ndb_examples_dir=
mtr_path_exists("$ndb_path/ndbapi-examples",
"$ndb_path/examples");
$exe_ndb_example=
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
if ( $mysql_version_id >= 50000 )
{
$path_ndb_examples_dir=
mtr_path_exists("$ndb_path/ndbapi-examples",
"$ndb_path/examples");
$exe_ndb_example=
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
}
}
# Look for the udf_example library
@ -1413,18 +1417,27 @@ sub executable_setup () {
}
# Look for mysql_client_test executable
if ( $glob_use_embedded_server )
if ( $glob_win32 and $mysql_version_id < 50000 )
{
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
# Skip looking for exe_mysql_client_test as its not built by default
# in 4.1 for windows.
$exe_mysql_client_test= "unavailable";
}
else
{
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
"$glob_basedir/tests/release/mysql_client_test",
"$glob_basedir/tests/debug/mysql_client_test");
# 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");
}
else
{
$exe_mysql_client_test=
mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
"$glob_basedir/tests/release/mysql_client_test",
"$glob_basedir/tests/debug/mysql_client_test");
}
}
}
@ -1548,8 +1561,11 @@ sub environment_setup () {
$ENV{'NDB_TOOLS_OUTPUT'}= $path_ndb_testrun_log;
$ENV{'NDB_CONNECTSTRING'}= $opt_ndbconnectstring;
$ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
$ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
if ( $mysql_version_id >= 50000 )
{
$ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
$ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
}
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
}
@ -2809,6 +2825,33 @@ sub do_after_run_mysqltest($)
}
sub find_testcase_skipped_reason($)
{
my ($tinfo)= @_;
# Open mysqltest.log
my $F= IO::File->new($path_timefile) or
mtr_error("can't open file \"$path_timefile\": $!");
my $reason;
while ( my $line= <$F> )
{
# Look for "reason: <reason fo skiping test>"
if ( $line =~ /reason: (.*)/ )
{
$reason= $1;
}
}
if ( ! $reason )
{
mtr_warning("Could not find reason for skipping test in $path_timefile");
$reason= "Detected by testcase(reason unknown) ";
}
$tinfo->{'comment'}= $reason;
}
##############################################################################
#
# Run a single test case
@ -2881,10 +2924,7 @@ sub run_testcase ($) {
# Testcase itself tell us to skip this one
# Try to get reason from mysqltest.log
my $last_line= mtr_lastlinefromfile($path_timefile) if -f $path_timefile;
my $reason= mtr_match_prefix($last_line, "reason: ");
$tinfo->{'comment'}=
defined $reason ? $reason : "Detected by testcase(reason unknown) ";
find_testcase_skipped_reason($tinfo);
mtr_report_test_skipped($tinfo);
}
elsif ( $res == 63 )

View File

@ -104,6 +104,16 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
id1
2
DROP TABLE t1, t2;
flush status;
create table t1 (c1 int) engine=innodb;
handler t1 open;
handler t1 read first;
c1
show /*!50002 GLOBAL */ status like 'Handler_rollback';
Variable_name Value
Handler_rollback 0
drop table t1;
End of 4.1 tests
create table t1m (a int) engine=myisam;
create table t1i (a int) engine=innodb;
create table t2m (a int) engine=myisam;

View File

@ -488,8 +488,6 @@ DROP TABLE t1;
#
# check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
#
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
# mysql-connector-j driver.
#

View File

@ -117,6 +117,22 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2);
DROP TABLE t1, t2;
# Bug #22728 - Handler_rollback value is growing
#
flush status;
create table t1 (c1 int) engine=innodb;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con2;
handler t1 open;
handler t1 read first;
disconnect con2;
connection con1;
show /*!50002 GLOBAL */ status like 'Handler_rollback';
connection default;
drop table t1;
disconnect con1;
--echo End of 4.1 tests
#
# Bug #12882 min/max inconsistent on empty table
#

View File

@ -1 +1 @@
--loose-to-force-a-restart
--force-restart

View File

@ -0,0 +1 @@
--force-restart