diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-11-08 15:37:04 +0100 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-11-08 15:37:04 +0100 |
commit | ea3bb00d6a8690a8684f6bce696fefcbc65c5288 (patch) | |
tree | dde72d0109d3374c766eeea9cdecb5458d9c35fa /mysql-test | |
parent | 0de0d997f0ec877c17fe55bd59d6f2098c021a7f (diff) | |
parent | 42e133e74e6f7e6adcf15afaa7bae1449c42ebbb (diff) | |
download | mariadb-git-ea3bb00d6a8690a8684f6bce696fefcbc65c5288.tar.gz |
Merge from mysql-5.5-bugteam to mysql-5.5-runtime
No conflicts
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/collections/default.experimental | 1 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 11 | ||||
-rw-r--r-- | mysql-test/r/log_tables.result | 10 | ||||
-rw-r--r-- | mysql-test/std_data/bug57108.cnf | 95 | ||||
-rw-r--r-- | mysql-test/suite/bugs/r/bug57108.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/bugs/t/bug57108-master.opt | 2 | ||||
-rw-r--r-- | mysql-test/suite/bugs/t/bug57108.test | 12 | ||||
-rw-r--r-- | mysql-test/t/log_tables.test | 19 |
8 files changed, 153 insertions, 2 deletions
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index ce3f50f5f94..2ddf87485ad 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -24,7 +24,6 @@ main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeou rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically rpl.rpl_innodb_bug28430* # Bug#46029 -rpl.rpl_killed_ddl @windows # Bug#47638 2010-01-20 alik The rpl_killed_ddl test fails on Windows sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10 diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6b8d73b3f69..f741e62e71f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4463,7 +4463,13 @@ sub mysqld_arguments ($$$) { my $mysqld= shift; my $extra_opts= shift; - mtr_add_arg($args, "--defaults-file=%s", $path_config_file); + my @defaults = grep(/^--defaults-file=/, @$extra_opts); + if (@defaults > 0) { + mtr_add_arg($args, pop(@defaults)) + } + else { + mtr_add_arg($args, "--defaults-file=%s", $path_config_file); + } # When mysqld is run by a root user(euid is 0), it will fail # to start unless we specify what user to run as, see BUG#30630 @@ -4499,6 +4505,9 @@ sub mysqld_arguments ($$$) { my $found_skip_core= 0; foreach my $arg ( @$extra_opts ) { + # Skip --defaults-file option since it's handled above. + next if $arg =~ /^--defaults-file/; + # Allow --skip-core-file to be set in <testname>-[master|slave].opt file if ($arg eq "--skip-core-file") { diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 1666d5e0297..f64894c9f10 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -896,6 +896,16 @@ TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2 DROP TABLE t1; TRUNCATE TABLE mysql.slow_log; +use mysql; +drop table if exists renamed_general_log; +drop table if exists renamed_slow_log; +RENAME TABLE general_log TO renamed_general_log; +ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log' +RENAME TABLE slow_log TO renamed_slow_log; +ERROR HY000: Cannot rename 'slow_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'slow_log' +use test; +flush tables with read lock; +unlock tables; SET @@session.long_query_time= @old_long_query_time; SET @@global.log_output= @old_log_output; SET @@global.slow_query_log= @old_slow_query_log; diff --git a/mysql-test/std_data/bug57108.cnf b/mysql-test/std_data/bug57108.cnf new file mode 100644 index 00000000000..5fd8c485cf0 --- /dev/null +++ b/mysql-test/std_data/bug57108.cnf @@ -0,0 +1,95 @@ +[mysqld] +open-files-limit=1024 +character-set-server=latin1 +connect-timeout=4711 +log-bin-trust-function-creators=1 +key_buffer_size=1M +sort_buffer=256K +max_heap_table_size=1M +loose-innodb_data_file_path=ibdata1:10M:autoextend +loose-innodb_buffer_pool_size=8M +loose-innodb_write_io_threads=2 +loose-innodb_read_io_threads=2 +loose-innodb_log_buffer_size=1M +loose-innodb_log_file_size=5M +loose-innodb_additional_mem_pool_size=1M +loose-innodb_log_files_in_group=2 +slave-net-timeout=120 +log-bin=mysqld-bin +loose-enable-performance-schema +loose-performance-schema-max-mutex-instances=10000 +loose-performance-schema-max-rwlock-instances=10000 +loose-performance-schema-max-table-instances=500 +loose-performance-schema-max-table-handles=1000 +binlog-direct-non-transactional-updates + +[mysql] +default-character-set=latin1 + +[mysqlshow] +default-character-set=latin1 + +[mysqlimport] +default-character-set=latin1 + +[mysqlcheck] +default-character-set=latin1 + +[mysql_upgrade] +default-character-set=latin1 +tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp + +[mysqld.1] +#!run-master-sh +log-bin=master-bin +loose-enable-performance-schema +basedir=/home/bzr/bugs/b57108-5.5-bugteam +tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1 +character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets +lc-messages-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/ +datadir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/data +pid-file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/run/mysqld.1.pid +#host=localhost +port=13000 +socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock +#log-error=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/log/mysqld.1.err +general_log=1 +general_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld.log +slow_query_log=1 +slow_query_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld-slow.log +#user=root +#password= +server-id=1 +secure-file-priv=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var +ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem +ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-cert.pem +ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-key.pem + +[mysqlbinlog] +disable-force-if-open +character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets + +[ENV] +MASTER_MYPORT=13000 +MASTER_MYSOCK=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock + +[client] +password= +user=root +port=13000 +host=localhost +socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock + +[mysqltest] +ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem +ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-cert.pem +ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-key.pem +skip-ssl=1 + +[client.1] +password= +user=root +port=13000 +host=localhost +socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock + diff --git a/mysql-test/suite/bugs/r/bug57108.result b/mysql-test/suite/bugs/r/bug57108.result new file mode 100644 index 00000000000..ad60b07a1e3 --- /dev/null +++ b/mysql-test/suite/bugs/r/bug57108.result @@ -0,0 +1,5 @@ +INSTALL PLUGIN example SONAME 'ha_example.so'; +SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile; +connect_timeout 4711 +local_infile 1 +UNINSTALL PLUGIN example; diff --git a/mysql-test/suite/bugs/t/bug57108-master.opt b/mysql-test/suite/bugs/t/bug57108-master.opt new file mode 100644 index 00000000000..c2ab1c2ead6 --- /dev/null +++ b/mysql-test/suite/bugs/t/bug57108-master.opt @@ -0,0 +1,2 @@ +--defaults-file=std_data/bug57108.cnf +$EXAMPLE_PLUGIN_OPT diff --git a/mysql-test/suite/bugs/t/bug57108.test b/mysql-test/suite/bugs/t/bug57108.test new file mode 100644 index 00000000000..1006a7b30f1 --- /dev/null +++ b/mysql-test/suite/bugs/t/bug57108.test @@ -0,0 +1,12 @@ +--source include/not_windows_embedded.inc +--source include/have_example_plugin.inc + +# Test that we can install a plugin despite the fact that we have +# switched directory after starting the server and am using a relative +# --defaults-file. +--replace_regex /\.dll/.so/ +eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; + +--query_vertical SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile + +UNINSTALL PLUGIN example; diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 5275b8e7db3..5b6be217d9d 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -1034,6 +1034,25 @@ DROP TABLE t1; TRUNCATE TABLE mysql.slow_log; +# +# Bug #47924 main.log_tables times out sporadically +# + +use mysql; +# Should result in error +--disable_warnings +drop table if exists renamed_general_log; +drop table if exists renamed_slow_log; +--enable_warnings +--error ER_CANT_RENAME_LOG_TABLE +RENAME TABLE general_log TO renamed_general_log; +--error ER_CANT_RENAME_LOG_TABLE +RENAME TABLE slow_log TO renamed_slow_log; + +use test; +flush tables with read lock; +unlock tables; + SET @@session.long_query_time= @old_long_query_time; SET @@global.log_output= @old_log_output; |