Below is the list of changes that have just been committed into a local
4.1 repository of greenman. When greenman does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-08-04 04:15:37-07:00, igreenhoe@stripped +1 -0
Fix for bug #18579 (mysql_install_db only creates database for first
instance in my.cnf)
Fix for bug #17979 (my_print_defaults/mysql_install_db ignore
[mysqld-X.Y] sections in option files)
Problem: Short of editing the my.cnf file or providing all of the
relevant options on the command line, there was no way of creating a
database for anything other than what was listed in the
"[mysqld]" group.
Solution: Added command argument to mysql_install_db to direct it to
use "[mysqld2]", etc., groups ( --defaults-group-suffix=# ). This is
the same argument used in the server to select such behavior.
In addition, support was added for the [mysql-VERSION] group.
Please note that the script does not attempt to create multiple
databases at once. If necessary, a wrapper script can be written to
do this.
scripts/mysql_install_db.sh@stripped, 2006-08-04 04:15:34-07:00, igreenhoe@stripped +25 -5
Added support for the --defaults-group-suffix option.
Added mysqld-@MYSQL_BASE_VERSION@ group.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: igreenhoe
# Host: anubis.greendragongames.com
# Root: /home/greenman/workspace-mysql/mysql/bug-4.1-18579
--- 1.74/scripts/mysql_install_db.sh 2006-08-04 04:15:42 -07:00
+++ 1.75/scripts/mysql_install_db.sh 2006-08-04 04:15:42 -07:00
@@ -11,12 +11,30 @@
windows=0
defaults=""
user=""
+defaults_group_suffix=""
+arg_defaults_group_suffix=""
-case "$1" in
+# find the special arguments and strip them off.
+# the special arguments *must be first* on the command line.
+
+is_done=""
+
+while test :$is_done = :
+do
+ case "$1" in
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
defaults="$1"; shift
;;
-esac
+ --defaults-group-suffix=*)
+ arg_defaults_group_suffix="$1"
+ defaults_group_suffix=`echo $1 | sed -e 's/[^=]*=//'`
+ shift
+ ;;
+ *)
+ is_done=1
+ ;;
+ esac
+done
parse_arguments() {
# We only need to pass arguments through to the server if we don't
@@ -56,7 +74,8 @@
}
# Get first arguments from the my.cfg file, groups [mysqld] and
-# [mysql_install_db], and then merge with the command line arguments
+# [mysql_install_db], and then merge with the command line arguments.
+# $defaults_group_suffix is appended to mysqld if provided.
if test -x ./bin/my_print_defaults
then
print_defaults="./bin/my_print_defaults"
@@ -81,8 +100,9 @@
force=0
verbose=0
fill_help_tables=""
+base_version=@MYSQL_BASE_VERSION@
-parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
+parse_arguments `$print_defaults $defaults mysqld$defaults_group_suffix mysqld-$base_version mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
test -z "$ldata" && ldata=@localstatedir@
@@ -210,7 +230,7 @@
then
echo "Installing all prepared tables"
fi
-mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
+mysqld_install_cmd_line="$mysqld $defaults $arg_defaults_group_suffix $mysqld_opt --bootstrap \
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
--skip-bdb --skip-ndbcluster $args --max_allowed_packet=8M --net_buffer_length=16K"
if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
| Thread |
|---|
| • bk commit into 4.1 tree (igreenhoe:1.2537) BUG#17979 | Ian Greenhoe | 4 Aug |