diff options
author | Michael Widenius <monty@askmonty.org> | 2012-02-20 17:49:21 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-02-20 17:49:21 +0200 |
commit | 038b739c98009cf0b4b7b7c2c18421051abf79f2 (patch) | |
tree | c31b05bf35b15358f7b0a89cfd8b5b43e2901ad8 /mysql-test | |
parent | 3c07d04580fe5f28ff8bdabd1249b8123d7da76b (diff) | |
parent | ae07ec6cbf08e311e538f5149f93385e5bcaa7a6 (diff) | |
download | mariadb-git-038b739c98009cf0b4b7b7c2c18421051abf79f2.tar.gz |
Merge with MariaDB 5.1 and MySQL 5.1.61
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 7 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 5 | ||||
-rw-r--r-- | mysql-test/r/archive.result | 19 | ||||
-rw-r--r-- | mysql-test/r/key_cache.result | 16 | ||||
-rw-r--r-- | mysql-test/r/mysqlcheck.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/innodb.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb.test | 11 | ||||
-rw-r--r-- | mysql-test/suite/innodb_plugin/r/innodb.result | 11 | ||||
-rw-r--r-- | mysql-test/suite/innodb_plugin/t/innodb.test | 11 | ||||
-rw-r--r-- | mysql-test/t/archive.test | 14 | ||||
-rw-r--r-- | mysql-test/t/disabled.def | 1 | ||||
-rw-r--r-- | mysql-test/t/key_cache.test | 16 | ||||
-rw-r--r-- | mysql-test/t/merge.test | 10 | ||||
-rw-r--r-- | mysql-test/t/mysqlcheck.test | 1 |
14 files changed, 122 insertions, 6 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 6acbe623e22..a4c37c69d4c 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -931,6 +931,13 @@ sub collect_one_test_case { $tinfo->{'long_test'}= 1; } + if ( ! $tinfo->{'big_test'} and $::opt_big_test > 1 ) + { + $tinfo->{'skip'}= 1; + $tinfo->{'comment'}= "Small test"; + return $tinfo + } + if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries ) { $tinfo->{'skip'}= 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 9ccfe5df054..40a6282e8ef 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -987,7 +987,7 @@ sub command_line_setup { 'skip-test=s' => \&collect_option, 'do-test=s' => \&collect_option, 'start-from=s' => \&collect_option, - 'big-test' => \$opt_big_test, + 'big-test+' => \$opt_big_test, 'combination=s' => \@opt_combinations, 'skip-combinations' => \&collect_option, 'experimental=s' => \@opt_experimentals, @@ -5996,7 +5996,8 @@ Options to control what test suites or cases to run list of suite names. The default is: "$DEFAULT_SUITES" skip-rpl Skip the replication test cases. - big-test Also run tests marked as "big" + big-test Also run tests marked as "big". Repeat this option + twice to run only "big" tests. staging-run Run a limited number of tests (no slow tests). Used for running staging trees with valgrind. enable-disabled Run also tests marked as disabled diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 347635abb82..0ec84efa842 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12782,3 +12782,22 @@ a b c d e f -1 b c d e 1 DROP TABLE t1; SET sort_buffer_size=DEFAULT; +# +# BUG#11758979 - 51252: ARCHIVE TABLES CAUSE 100% CPU USAGE +# AND HANG IN SHOW TABLE STATUS +# (to be executed with valgrind) +CREATE TABLE t1(a BLOB, b VARCHAR(200)) ENGINE=ARCHIVE; +INSERT INTO t1 VALUES(NULL, ''); +FLUSH TABLE t1; +# we need this select to workaround BUG#11764364 +SELECT * FROM t1; +a b +NULL +CHECKSUM TABLE t1 EXTENDED; +Table Checksum +test.t1 286155052 +FLUSH TABLE t1; +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +DROP TABLE t1; diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index fe579431420..9888eadcb31 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -367,6 +367,22 @@ Variable_name Value key_cache_block_size 1536 SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size; DROP TABLE t1; +# +# Bug#12361113: crash when load index into cache +# +# Note that this creates an empty disabled key cache! +SET GLOBAL key_cache_none.key_cache_block_size = 1024; +CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) ) ENGINE = MYISAM; +INSERT INTO t1 VALUES (1, 1); +CACHE INDEX t1 in key_cache_none; +ERROR HY000: Unknown key cache 'key_cache_none' +# The bug crashed the server at LOAD INDEX below. Now it will succeed +# since the default cache is used due to CACHE INDEX failed for +# key_cache_none. +LOAD INDEX INTO CACHE t1; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +DROP TABLE t1; set global key_buffer_size=@save_key_buffer_size; set global key_cache_block_size=@save_key_cache_block_size; select @@key_buffer_size; diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index 8aa121f9854..c3139f4d5ca 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -140,6 +140,7 @@ CREATE TABLE `я` (a INT); SET NAMES DEFAULT; call mtr.add_suppression("@003f.frm' \\(errno: 22\\)"); mysqlcheck --default-character-set="latin1" --databases test +call mtr.add_suppression("Can't find file: '..test.@003f.frm'"); test.? Error : Table doesn't exist status : Operation failed diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index 37eaa8800be..244ad5f4435 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -2371,3 +2371,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; set storage_engine=MyISAM; +Variable_name Value +Handler_read_key 0 +f1 +Variable_name Value +Handler_read_key 0 diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index 72893f562c1..5df7347c552 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1394,6 +1394,17 @@ eval set storage_engine=$default; -- disable_query_log SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; +# +# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka +# HANDLER_READ_KEY) when it should not. +# +create table t1 (f1 integer primary key) engine=innodb; +flush status; +show status like "handler_read_key"; +select f1 from t1; +show status like "handler_read_key"; +drop table t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/suite/innodb_plugin/r/innodb.result b/mysql-test/suite/innodb_plugin/r/innodb.result index a81dd1d3a86..87dee7dc6e1 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb.result +++ b/mysql-test/suite/innodb_plugin/r/innodb.result @@ -3257,3 +3257,14 @@ Handler_update 1 Variable_name Value Handler_delete 1 DROP TABLE bug58912; +create table t1 (f1 integer primary key) engine=innodb; +flush status; +show status like "handler_read_key"; +Variable_name Value +Handler_read_key 0 +select f1 from t1; +f1 +show status like "handler_read_key"; +Variable_name Value +Handler_read_key 0 +drop table t1; diff --git a/mysql-test/suite/innodb_plugin/t/innodb.test b/mysql-test/suite/innodb_plugin/t/innodb.test index 59e0328bb8d..c0b479fee2e 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb.test +++ b/mysql-test/suite/innodb_plugin/t/innodb.test @@ -2573,6 +2573,17 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; # Clean up after the Bug#55284/Bug#58912 test case. DROP TABLE bug58912; +# +# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka +# HANDLER_READ_KEY) when it should not. +# +create table t1 (f1 integer primary key) engine=innodb; +flush status; +show status like "handler_read_key"; +select f1 from t1; +show status like "handler_read_key"; +drop table t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 9ecbee1ac9f..6f788fc3cc6 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1713,3 +1713,17 @@ INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6; SELECT * FROM t1 ORDER BY f LIMIT 1; DROP TABLE t1; SET sort_buffer_size=DEFAULT; + +--echo # +--echo # BUG#11758979 - 51252: ARCHIVE TABLES CAUSE 100% CPU USAGE +--echo # AND HANG IN SHOW TABLE STATUS +--echo # (to be executed with valgrind) +CREATE TABLE t1(a BLOB, b VARCHAR(200)) ENGINE=ARCHIVE; +INSERT INTO t1 VALUES(NULL, ''); +FLUSH TABLE t1; +--echo # we need this select to workaround BUG#11764364 +SELECT * FROM t1; +CHECKSUM TABLE t1 EXTENDED; +FLUSH TABLE t1; +OPTIMIZE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 84c981c08c1..d8ef026914d 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,4 +12,3 @@ kill : Bug#11748945 2008-12-03 HHunger need some changes to be robust enough for pushbuild. read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists main.log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists - diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index f415d670bf1..c19509ef945 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -251,6 +251,22 @@ DROP TABLE t1; # End of 4.1 tests +--echo # +--echo # Bug#12361113: crash when load index into cache +--echo # + +--echo # Note that this creates an empty disabled key cache! +SET GLOBAL key_cache_none.key_cache_block_size = 1024; +CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) ) ENGINE = MYISAM; +INSERT INTO t1 VALUES (1, 1); +--error ER_UNKNOWN_KEY_CACHE +CACHE INDEX t1 in key_cache_none; +--echo # The bug crashed the server at LOAD INDEX below. Now it will succeed +--echo # since the default cache is used due to CACHE INDEX failed for +--echo # key_cache_none. +LOAD INDEX INTO CACHE t1; +DROP TABLE t1; + # End of 5.1 tests # diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 90386a97fc6..eecf892869f 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -1848,9 +1848,13 @@ CREATE TABLE t1(a INT); --echo # Test reattach merge failure LOCK TABLES m1 READ; --echo # Replace 't1' with 't3' table using file operations. -remove_file $MYSQLD_DATADIR/test/t1.frm; -remove_file $MYSQLD_DATADIR/test/t1.MYI; -remove_file $MYSQLD_DATADIR/test/t1.MYD; +# move + remove is a work around for windows. +move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/oldt1.frm; +move_file $MYSQLD_DATADIR/test/t1.MYI $MYSQLD_DATADIR/test/oldt1.MYI; +move_file $MYSQLD_DATADIR/test/t1.MYD $MYSQLD_DATADIR/test/oldt1.MYD; +remove_file $MYSQLD_DATADIR/test/oldt1.frm; +remove_file $MYSQLD_DATADIR/test/oldt1.MYI; +remove_file $MYSQLD_DATADIR/test/oldt1.MYD; copy_file $MYSQLD_DATADIR/test/t3.frm $MYSQLD_DATADIR/test/t1.frm; copy_file $MYSQLD_DATADIR/test/t3.MYI $MYSQLD_DATADIR/test/t1.MYI; copy_file $MYSQLD_DATADIR/test/t3.MYD $MYSQLD_DATADIR/test/t1.MYD; diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test index ce6e3dc8bf7..fe4745624ce 100644 --- a/mysql-test/t/mysqlcheck.test +++ b/mysql-test/t/mysqlcheck.test @@ -139,6 +139,7 @@ SET NAMES DEFAULT; call mtr.add_suppression("@003f.frm' \\(errno: 22\\)"); --echo mysqlcheck --default-character-set="latin1" --databases test # Error returned depends on platform, replace it with "Table doesn't exist" +call mtr.add_suppression("Can't find file: '..test.@003f.frm'"); --replace_result "Can't find file: './test/@003f.frm' (errno: 22)" "Table doesn't exist" "Table 'test.?' doesn't exist" "Table doesn't exist" --exec $MYSQL_CHECK --default-character-set="latin1" --databases test --echo mysqlcheck --default-character-set="utf8" --databases test |