diff options
author | unknown <tsmith@sita.local> | 2007-09-24 11:37:26 +0200 |
---|---|---|
committer | unknown <tsmith@sita.local> | 2007-09-24 11:37:26 +0200 |
commit | 07f1b717e0e8a7a549464a4b70d3e9977db62d37 (patch) | |
tree | e3bfb5319aa2d04b05a1665481fbf5b3b7181296 /mysql-test | |
parent | bd8e7fee1f260b6f5b9b39c67bb6e701eace3cae (diff) | |
parent | 37d6773a302e9babafc2aba38148daf750e06091 (diff) | |
download | mariadb-git-07f1b717e0e8a7a549464a4b70d3e9977db62d37.tar.gz |
Merge sita.local:/Users/tsmith/m/bk/51
into sita.local:/Users/tsmith/m/bk/maint/51
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/Makefile.am | 1 | ||||
-rw-r--r-- | mysql-test/lib/mtr_cases.pl | 23 | ||||
-rw-r--r-- | mysql-test/mysql-test-run-shell.sh | 11 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 5 | ||||
-rw-r--r-- | mysql-test/r/archive.result | 9 | ||||
-rw-r--r-- | mysql-test/t/archive.test | 14 |
6 files changed, 42 insertions, 21 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 86da057a13c..dc244d479e7 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -155,6 +155,7 @@ SUFFIXES = .sh -e 's!@''PERL''@!@PERL@!' \ -e 's!@''VERSION''@!@VERSION@!' \ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ + -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index ba7fcb8ce10..9ba7d737b9e 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -151,20 +151,17 @@ sub collect_one_suite($$) mtr_verbose("Collecting: $suite"); - my $testdir; - my $resdir; - - if ( $suite eq "main" ) + my $suitedir= "$::glob_mysql_test_dir"; # Default + if ( $suite ne "main" ) { - $testdir= "$::glob_mysql_test_dir/t"; - $resdir= "$::glob_mysql_test_dir/r"; - } - else - { - $testdir= "$::glob_mysql_test_dir/suite/$suite/t"; - $resdir= "$::glob_mysql_test_dir/suite/$suite/r"; + $suitedir= mtr_path_exists("$suitedir/suite/$suite", + "$suitedir/$suite"); + mtr_verbose("suitedir: $suitedir"); } + my $testdir= "$suitedir/t"; + my $resdir= "$suitedir/r"; + # ---------------------------------------------------------------------- # Build a hash of disabled testcases for this suite # ---------------------------------------------------------------------- @@ -205,7 +202,7 @@ sub collect_one_suite($$) $tname = basename($tname); # Get rid of suite part - $tname =~ s/^$suite\.//; + $tname =~ s/^(.*)\.//; # Check if the extenstion has been specified. @@ -333,7 +330,7 @@ sub collect_one_test_case($$$$$$$$$) { my $tinfo= {}; - $tinfo->{'name'}= "$suite.$tname"; + $tinfo->{'name'}= basename($suite) . ".$tname"; $tinfo->{'result_file'}= "$resdir/$tname.result"; $tinfo->{'component_id'} = $component_id; push(@$cases, $tinfo); diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh index 54323c878a9..ab511a932e6 100644 --- a/mysql-test/mysql-test-run-shell.sh +++ b/mysql-test/mysql-test-run-shell.sh @@ -23,7 +23,16 @@ USE_MANAGER=0 MY_TZ=GMT-3 TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work LOCAL_SOCKET=@MYSQL_UNIX_ADDR@ -MYSQL_TCP_PORT=@MYSQL_TCP_PORT@ + +if [ -z "$MYSQL_TCP_PORT" ]; then + MYSQL_TCP_PORT=@MYSQL_TCP_PORT@ + if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then + ESP=`getent services mysql/tcp` + if [ $? -eq 0 ]; then + MYSQL_TCP_PORT=`echo "$ESP"|sed -e's-^[a-z]*[ ]*\([0-9]*\)/[a-z]*$-\1-g'` + fi + fi +fi umask 022 diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f84da1ed132..7ad83087a5c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3742,6 +3742,11 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--language=%s", $prefix, $path_language); mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix); + # Increase default connect_timeout to avoid intermittent + # disconnects when test servers are put under load + # see BUG#28359 + mtr_add_arg($args, "%s--connect-timeout=60", $prefix); + if ( $opt_valgrind_mysqld ) { mtr_add_arg($args, "%s--skip-safemalloc", $prefix); diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 36b013703d8..0a473a16771 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -11124,10 +11124,11 @@ auto fld1 companynr fld3 fld4 fld5 fld6 SELECT COUNT(auto) FROM t2; COUNT(auto) 1213 -INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); +INSERT DELAYED INTO t2 VALUES (99999,011403,37,'the','delayed','insert',''); +INSERT INTO t2 VALUES (100000,000001,00,'after','delayed','insert',''); SELECT COUNT(auto) FROM t2; COUNT(auto) -1214 +1215 ALTER TABLE t2 DROP COLUMN fld6; SHOW CREATE TABLE t2; Table Create Table @@ -11139,7 +11140,7 @@ t2 CREATE TABLE `t2` ( `fld4` char(35) NOT NULL DEFAULT '', `fld5` char(35) NOT NULL DEFAULT '' ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 -SELECT * FROM t2; +SELECT * FROM t2 WHERE auto != 100000; auto fld1 companynr fld3 fld4 fld5 1 000001 00 Omaha teethe neat 2 011401 37 breaking dreaded Steinberg @@ -12354,7 +12355,7 @@ auto fld1 companynr fld3 fld4 fld5 2 011401 37 breaking dreaded Steinberg 3 011402 37 Romans scholastics jarring 4 011403 37 intercepted audiology tinily -4 011403 37 intercepted audiology tinily +99999 011403 37 the delayed insert CREATE TABLE `t5` ( `a` int(11) NOT NULL auto_increment, b char(12), diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 23c591856a7..e0a2e877af5 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1351,8 +1351,16 @@ SELECT * FROM t2; # Test INSERT DELAYED and wait until the table has one more record SELECT COUNT(auto) FROM t2; -INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); -while (`SELECT COUNT(auto)!=1214 FROM t2`) +INSERT DELAYED INTO t2 VALUES (99999,011403,37,'the','delayed','insert',''); + +# Insert another record since in Archive delayed values are only +# guaranteed to materialize based on either: +# 1) A new row showing up from a normal insert +# 2) A flush table has occurred. +INSERT INTO t2 VALUES (100000,000001,00,'after','delayed','insert',''); + +# Wait for the delayed insert to appear +while (`SELECT COUNT(auto)!=1215 FROM t2`) { sleep 0.1; } @@ -1361,7 +1369,7 @@ SELECT COUNT(auto) FROM t2; # Adding test for ALTER TABLE ALTER TABLE t2 DROP COLUMN fld6; SHOW CREATE TABLE t2; -SELECT * FROM t2; +SELECT * FROM t2 WHERE auto != 100000; # Adding tests for autoincrement |