diff options
author | unknown <guilhem@gbichot4.local> | 2007-08-09 15:00:32 +0200 |
---|---|---|
committer | unknown <guilhem@gbichot4.local> | 2007-08-09 15:00:32 +0200 |
commit | 0d301ee822c45fa6b8e1ff0e31e7ec3308c9747f (patch) | |
tree | 15f575ff8d17bb0e00ecee41cc70f14f74e60fc6 /mysql-test | |
parent | 95e2558f8eed4f23179b31d0b59f03bb8af05a12 (diff) | |
download | mariadb-git-0d301ee822c45fa6b8e1ff0e31e7ec3308c9747f.tar.gz |
* tests which use MERGE or INSERT DELAYED should run only
with engines which support that
* temporarily adding option --global-subst to mysqltest so that
the full testsuite can be run using Maria tables without failing
on trivial differences (like diff in the engine clause of
SHOW CREATE TABLE)
* using recognizable tags for todos of the Maria team
client/mysqltest.c:
temporarily adding option --global-subst: its argument is X,Y.
It replaces all occurrences of X by Y into mysqltest's result
before the comparison with the expected result is done.
This serves for when a test is run with --default-storage-engine=X
where X is not MyISAM: tests using SHOW CREATE TABLE will always fail
because SHOW CREATE TABLE prints X instead of MyISAM. With
--global-subst=X,MyISAM , such trivial differences are eliminated and
test may be reported as passing.
For example, --global-subst=MARIA,MyISAM
This is not good enough for merging into main trees! just for running
many tests and finding bugs now!
mysql-test/mysql-test-run.pl:
new option --mysqltest to pass options to mysqltest (like we have
--mysqld). Used for example like this:
./mtr --mysqltest=--global-subst=MARIA,MyISAM
mysql-test/r/merge.result:
update
mysql-test/t/delayed.test:
run test only with engines which support INSERT DELAYED
mysql-test/t/merge.test:
run test only with MyISAM tables, as they are required by MERGE
sql/sql_delete.cc:
recognizable tag
sql/table.cc:
recognizable tag
storage/maria/ha_maria.cc:
recognizable tag
storage/maria/ma_check.c:
recognizable tag
storage/maria/ma_create.c:
recognizable tag
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 9 | ||||
-rw-r--r-- | mysql-test/r/merge.result | 2 | ||||
-rw-r--r-- | mysql-test/t/delayed.test | 9 | ||||
-rw-r--r-- | mysql-test/t/merge.test | 11 |
4 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 06c1906cd18..9310c8d1626 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -167,6 +167,7 @@ our $opt_small_bench= 0; our $opt_big_test= 0; our @opt_extra_mysqld_opt; +our @opt_extra_mysqltest_opt; our $opt_compress; our $opt_ssl; @@ -558,6 +559,9 @@ sub command_line_setup () { # Extra options used when starting mysqld 'mysqld=s' => \@opt_extra_mysqld_opt, + # Extra options used when starting mysqld + 'mysqltest=s' => \@opt_extra_mysqltest_opt, + # Run test on running server 'extern' => \$opt_extern, 'ndb-connectstring=s' => \$opt_ndbconnectstring, @@ -4794,6 +4798,11 @@ sub run_mysqltest ($) { mtr_add_arg($args, "--skip-ssl"); } + foreach my $arg ( @opt_extra_mysqltest_opt ) + { + mtr_add_arg($args, "%s", $arg); + } + # ---------------------------------------------------------------------- # If embedded server, we create server args to give mysqltest to pass on # ---------------------------------------------------------------------- diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index bb4fc654b38..d22b8ba5fdd 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -1,3 +1,5 @@ +set global storage_engine=myisam; +set session storage_engine=myisam; drop table if exists t1,t2,t3,t4,t5,t6; drop database if exists mysqltest; create table t1 (a int not null primary key auto_increment, message char(20)); diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test index 396c06f43e7..17c2722dda4 100644 --- a/mysql-test/t/delayed.test +++ b/mysql-test/t/delayed.test @@ -5,6 +5,15 @@ # (Can't be tested with purify :( ) # +# limit the test to engines which support INSERT DELAYED +disable_query_log; +--require r/true.require +select @@global.storage_engine in +("memory","myisam","archive","blackhole") and +@@session.storage_engine in +("memory","myisam","archive","blackhole") as `TRUE`; +enable_query_log; + --disable_warnings drop table if exists t1; --enable_warnings diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index fd479276b3b..91bf247c469 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -2,6 +2,11 @@ # test of MERGE TABLES # +# MERGE tables require MyISAM tables +let $default=`select @@global.storage_engine`; +set global storage_engine=myisam; +set session storage_engine=myisam; + --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6; drop database if exists mysqltest; @@ -512,3 +517,9 @@ CHECK TABLE tm1; DROP TABLE tm1, t1, t2; --echo End of 5.0 tests + +--disable_result_log +--disable_query_log +eval set global storage_engine=$default; +--enable_result_log +--enable_query_log |