4379 Bjorn Munch 2012-10-05
WL 6055 review comments
modified:
scripts/mysql_install_db.pl.in
support-files/CMakeLists.txt
support-files/my-default.cnf.sh
4378 Bjorn Munch 2012-10-04
Added support for lines to remove from my-default.cnf
modified:
scripts/mysql_install_db.pl.in
support-files/my-default.cnf.sh
=== modified file 'scripts/mysql_install_db.pl.in'
--- a/scripts/mysql_install_db.pl.in 2012-10-04 13:34:32 +0000
+++ b/scripts/mysql_install_db.pl.in 2012-10-05 09:38:11 +0000
@@ -159,18 +159,6 @@ sub parse_arguments
usage() if $opt->{help};
- # To make this option acceptable for mysqld, we must prepend the name to the value -
- # but only if it is set, and have not been fixed already.
- if ( $opt->{'defaults-extra-file'} && $opt->{'defaults-extra-file'} !~ /^--/ )
- {
- $opt->{'defaults-extra-file'} = '--defaults-extra-file=' . $opt->{'defaults-extra-file'};
- }
- # This option has no value, so we just have to spell it in full.
- if ( $opt->{'no-defaults'} && $opt->{'no-defaults'} !~ /^--/ )
- {
- $opt->{'no-defaults'} = '--no-defaults=';
- }
-
if ( $opt->{'no-defaults'} && ( $opt->{'defaults-extra-file'} ||
$opt->{'defaults-file'} ) )
{
@@ -448,13 +436,13 @@ else
-e $cfg_template or cannot_find_file("my-default.cnf");
$copy_cfg_file= $config_file;
- if (-e $config_file)
+ if (-e $copy_cfg_file)
{
$copy_cfg_file =~ s/my.cnf/my-new.cnf/;
# Too early to print warning here, the user may not notice
}
open (TEMPL, $cfg_template) or error("Could not open config template");
- open (CFG, ">" . $copy_cfg_file) or error("Could not open config file");
+ open (CFG, "> $copy_cfg_file") or error("Could not open config file");
while (<TEMPL>)
{
# Remove lines beginning with # *** which are template comments
@@ -641,10 +629,13 @@ else
{
$defaults_option= "--defaults-file=$config_file";
}
+my $defaults_extra= "--defaults-extra-file=$opt->{'defaults-extra-file'}"
+ if $opt->{'defaults-extra-file'};
+
my $mysqld_bootstrap = $ENV{MYSQLD_BOOTSTRAP} || $mysqld;
my $mysqld_install_cmd_line = quote_options($mysqld_bootstrap,
$defaults_option,
- $opt->{'defaults-extra-file'},
+ $defaults_extra,
$mysqld_opt,
"--bootstrap",
"--basedir=$basedir",
@@ -817,9 +808,10 @@ if ( open(PIPE, "| $mysqld_install_cmd_l
{
warning($opt,
"Found existing config file $config_file on the system.",
- "In case this file is in use, it was not replaced,",
+ "Because this file might be in use, it was not replaced,",
"but was used in bootstrap and when you later start the server",
- "Default config file was created as $copy_cfg_file");
+ "The new default config file was created as $copy_cfg_file,",
+ "please compare it with your file and take the changes you need.");
}
}
foreach my $cfg ( "/etc/my.cnf", "etc/mysql/my.cnf" )
=== modified file 'support-files/CMakeLists.txt'
--- a/support-files/CMakeLists.txt 2012-10-03 22:53:04 +0000
+++ b/support-files/CMakeLists.txt 2012-10-05 09:38:11 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,12 +44,11 @@ ELSE()
SET(inst_location ${INSTALL_SUPPORTFILESDIR})
ENDIF()
-FOREACH(inifile my-default)
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh
- ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension}
- DESTINATION ${inst_location} COMPONENT IniFiles)
-ENDFOREACH()
+SET(inifile my-default)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh
+ ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension}
+ DESTINATION ${inst_location} COMPONENT IniFiles)
IF(UNIX)
SET(prefix ${CMAKE_INSTALL_PREFIX})
=== modified file 'support-files/my-default.cnf.sh'
--- a/support-files/my-default.cnf.sh 2012-10-04 13:34:32 +0000
+++ b/support-files/my-default.cnf.sh 2012-10-05 09:38:11 +0000
@@ -15,10 +15,10 @@
# log_bin
# These are commonly set, remove the # and set as required.
-# basedir
-# datadir
-# port
-# server_id
+# basedir = .....
+# datadir = .....
+# port = .....
+# server_id = .....
@CNF_SOCKET_LINE@
# Remove leading # to set options mainly useful for reporting servers.
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.6-wl6055 branch (bjorn.munch:4378 to 4379) | Bjorn Munch | 5 Oct |