#At file:///home/anders/work/bzrwork/worktree3/mysql-6.0-codebase-bugfixing/ based on revid:gshchepa@stripped
3653 Li-Bing.Song@stripped 2009-10-16
BUG#42984 rpl.rpl_ssl1 fails in PB2
Postfix
On PB2's HP Unix machines,
Mysqld reported an error "unknow ssl-ca option" and then aborted itself
when it was initializing options.
PB2's HP Unix machines do not support ssl, but the ssl options in private cnf(rpl_ssl1.cnf)
are still written into my.cnf, so mysqlds do not know ssl-* options.
Before this patch, Default ssl-* options are not added into my.cnf
if ssl is not supported, but the ssl-* options in private cnf(rpl_ssl1.cnf)
are still copied into my.cnf.
After this patch, Both the default ssl-* options and the private ssl-* options
are not copied into my.cnf if ssl is not supported.
@ mysql-test/lib/My/Config.pm
modified:
mysql-test/lib/My/Config.pm
mysql-test/lib/My/ConfigFactory.pm
=== modified file 'mysql-test/lib/My/Config.pm'
--- a/mysql-test/lib/My/Config.pm 2008-09-05 13:31:09 +0000
+++ b/mysql-test/lib/My/Config.pm 2009-10-16 10:40:29 +0000
@@ -305,7 +305,20 @@ sub remove {
croak "option '$option_name' does not exist";
}
+#
+# Remove options with specific prefix from all groups
+#
+sub remove_like {
+ my ($self, $prefix)= @_;
+ foreach my $group ($self->groups()) {
+ foreach my $option ($group->options()) {
+ if (grep (/^$prefix/, $option->{name})) {
+ $group->remove($option->{name});
+ }
+ }
+ }
+}
#
# Check if group with given name exists in config
=== modified file 'mysql-test/lib/My/ConfigFactory.pm'
--- a/mysql-test/lib/My/ConfigFactory.pm 2009-07-20 12:30:01 +0000
+++ b/mysql-test/lib/My/ConfigFactory.pm 2009-10-16 10:40:29 +0000
@@ -473,6 +473,16 @@ sub post_fix_mysql_cluster_section {
}
}
+# All ssl options in private cnf are removed if ssl is not supported.
+sub post_check_ssl {
+ my ($self, $config)= @_;
+
+ if (!ssl_supported($self)) {
+ $config->remove_like('ssl-');
+ $config->remove_like('loose-ssl-');
+ }
+}
+
#
# Rules to run last of all
#
@@ -482,6 +492,7 @@ my @post_rules=
\&post_fix_mysql_cluster_section,
\&post_fix_resolve_at_variables,
\&post_check_embedded_group,
+ \&post_check_ssl,
);
@@ -596,7 +607,6 @@ sub new_config {
SERVER_ID => 1,
}, $class;
-
{
# Run pre rules
foreach my $rule ( @pre_rules ) {
@@ -648,7 +658,6 @@ sub new_config {
&$rule($self, $config);
}
}
-
return $config;
}
Attachment: [text/bzr-bundle] bzr/li-bing.song@sun.com-20091016104029-krv6txjlch42kun6.bundle
| Thread |
|---|
| • bzr commit into mysql-6.0-codebase-bugfixing branch (Li-Bing.Song:3653)Bug#42984 | Li-Bing.Song | 16 Oct |