From a9b438b2229a340343055f36528f10f504efb19d Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 22 Jun 2009 16:27:05 +0200 Subject: Bug #43780 mysql-test-run uses deprecated server options Updated to use general_log[_file] and slow_query_log[_file] --- mysql-test/lib/My/ConfigFactory.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test/lib/My/ConfigFactory.pm') diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 852f706c858..c1e8f7cd826 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -204,8 +204,10 @@ my @mysqld_rules= { 'port' => \&fix_port }, { 'socket' => \&fix_socket }, { '#log-error' => \&fix_log_error }, - { 'log' => \&fix_log }, - { 'log-slow-queries' => \&fix_log_slow_queries }, + { 'general_log' => 1 }, + { 'general_log_file' => \&fix_log }, + { 'slow_query_log' => 1 }, + { 'slow_query_log_file' => \&fix_log_slow_queries }, { '#user' => sub { return shift->{ARGS}->{user} || ""; } }, { '#password' => sub { return shift->{ARGS}->{password} || ""; } }, { 'server-id' => \&fix_server_id, }, -- cgit v1.2.1 From 2377eed362f9b9b3c4a360d75f112ac2ac627539 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 3 Nov 2009 01:19:37 +0100 Subject: Bug #47423 mtr connects to wrong database The reason for the bug is that mysqtest as well as other client tools running in test suite (mysqlbinlog, mysqldump) will first try to connect whatever database has created shared memory with default base name "MySQL" and use this. (Same effect could be seen on Unix if mtr would not care to calculate "port" and "socket" parameter). The fix ensures that all client tools and running in mtr use unique per-database shared memory base parameters, so there is no possibility to clash with already installed one. We use socket name for shared memory base (it's known to be unique). This shared-memory-base is written to the MTR config file to the [client] and [mysqld] sections. Fix made also made sure all client tools understand and correctly handle --shared-memory-base. Prior to this patch it was not the case for mysqltest, mysqlbinlog and mysql_client_test. All new connections done from mtr scripts via connect() will by default set shared-memory-base. And finally, there is a possibility to force shared memory or pipe connection and overwrite shared memory/pipe base name from within mtr scripts via optional PIPE or SHM modifier. This functionality was manually backported from 6.0 (original patch http://lists.mysql.com/commits/74749) --- mysql-test/lib/My/ConfigFactory.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'mysql-test/lib/My/ConfigFactory.pm') diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index c1e8f7cd826..c4d68e7127c 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -7,6 +7,7 @@ use Carp; use My::Config; use My::Find; +use My::Platform; use File::Basename; @@ -218,7 +219,13 @@ my @mysqld_rules= { 'ssl-key' => \&fix_ssl_server_key }, ); - +if (IS_WINDOWS) +{ + # For simplicity, we use the same names for shared memory and + # named pipes. + push(@mysqld_rules, {'shared-memory-base-name' => \&fix_socket}); +} + sub fix_ndb_mgmd_port { my ($self, $config, $group_name, $group)= @_; my $hostname= $group->value('HostName'); @@ -347,6 +354,16 @@ sub post_check_client_group { } $config->insert($client_group_name, $name_to, $option->value()) } + + if (IS_WINDOWS) + { + # Shared memory base may or may not be defined (e.g not defined in embedded) + my $shm = $group_to_copy_from->option("shared-memory-base-name"); + if (defined $shm) + { + $config->insert($client_group_name,"shared-memory-base-name", $shm->value()); + } + } } @@ -393,6 +410,7 @@ sub post_check_embedded_group { ( '#log-error', # Embedded server writes stderr to mysqltest's log file 'slave-net-timeout', # Embedded server are not build with replication + 'shared-memory-base-name', # No shared memory for embedded ); foreach my $option ( $mysqld->options(), $first_mysqld->options() ) { -- cgit v1.2.1 From 36970ac4bacde2349beab85a904943b7fbf66667 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Nov 2009 14:00:28 +0100 Subject: After-merge fixes following Merge of Mysql 5.1.41 into MariaDB: Fix path for SSL stuff when running testsuite from installed package. --- mysql-test/lib/My/ConfigFactory.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mysql-test/lib/My/ConfigFactory.pm') diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 349cf3c4c05..3c9ddfa3814 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -142,8 +142,7 @@ sub fix_secure_file_priv { sub fix_std_data { my ($self, $config, $group_name, $group)= @_; - my $basedir= $self->get_basedir($group); - return "$basedir/mysql-test/std_data"; + return "$::opt_vardir/std_data"; } sub ssl_supported { -- cgit v1.2.1