--- mysql-5.5.27/scripts/mysql_install_db.sh 2012-07-20 19:38:03.000000000 +0200 +++ mysql-5.5.27-blanks/scripts/mysql_install_db.sh 2012-09-21 22:36:22.834358500 +0200 @@ -228,10 +228,10 @@ print_defaults="$builddir/extra/my_print_defaults" elif test -n "$basedir" then - print_defaults=`find_in_basedir my_print_defaults bin extra` + print_defaults="`find_in_basedir my_print_defaults bin extra`" if test -z "$print_defaults" then - cannot_find_file my_print_defaults $basedir/bin $basedir/extra + cannot_find_file my_print_defaults "$basedir/bin" "$basedir/extra" exit 1 fi else @@ -246,7 +246,7 @@ # Now we can get arguments from the groups [mysqld] and [mysql_install_db] # in the my.cfg file, then re-run to merge with command line arguments. -parse_arguments `$print_defaults $defaults mysqld mysql_install_db` +parse_arguments `"$print_defaults" $defaults mysqld mysql_install_db` parse_arguments PICK-ARGS-FROM-ARGV "$@" # Configure paths to support files @@ -296,7 +296,7 @@ create_system_tables="$pkgdatadir/mysql_system_tables.sql" fill_system_tables="$pkgdatadir/mysql_system_tables_data.sql" -for f in $fill_help_tables $create_system_tables $fill_system_tables +for f in "$fill_help_tables" "$create_system_tables" "$fill_system_tables" do if test ! -f "$f" then @@ -318,7 +318,7 @@ cannot_find_file "$langdir/errmsg.sys" exit 1 fi - mysqld_opt="--lc-messages-dir=$langdir/.." + mysqld_opt="--lc-messages-dir='$langdir/..'" fi # Try to determine the hostname @@ -327,10 +327,10 @@ # Check if hostname is valid if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0 then - resolved=`$extra_bindir/resolveip $hostname 2>&1` + resolved=`"$extra_bindir/resolveip" $hostname 2>&1` if test $? -ne 0 then - resolved=`$extra_bindir/resolveip localhost 2>&1` + resolved=`"$extra_bindir/resolveip" localhost 2>&1` if test $? -ne 0 then echo "Neither host '$hostname' nor 'localhost' could be looked up with" @@ -356,16 +356,16 @@ fi # Create database directories -for dir in $ldata $ldata/mysql $ldata/test +for dir in "$ldata" "$ldata/mysql" "$ldata/test" do - if test ! -d $dir + if test ! -d "$dir" then - mkdir -p $dir - chmod 700 $dir + mkdir -p "$dir" + chmod 700 "$dir" fi if test -n "$user" then - chown $user $dir + chown "$user" "$dir" if test $? -ne 0 then echo "Cannot change ownership of the database directories to the '$user'" @@ -392,15 +392,15 @@ # Configure mysqld command line mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}" -mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ - --basedir=$basedir --datadir=$ldata --log-warnings=0 --loose-skip-innodb \ +mysqld_install_cmd_line="'$mysqld_bootstrap' $defaults $mysqld_opt --bootstrap \ + --basedir='$basedir' --datadir='$ldata' --log-warnings=0 --loose-skip-innodb \ --loose-skip-ndbcluster $args --max_allowed_packet=8M \ --default-storage-engine=myisam \ --net_buffer_length=16K" # Create the system and help tables by passing them to "mysqld --bootstrap" s_echo "Installing MySQL system tables..." -if { echo "use mysql;"; cat $create_system_tables $fill_system_tables; } | eval "$filter_cmd_line" | $mysqld_install_cmd_line > /dev/null +if { echo "use mysql;"; cat "$create_system_tables" "$fill_system_tables"; } | eval "$filter_cmd_line" | eval "$mysqld_install_cmd_line" > /dev/null then s_echo "OK" else @@ -433,7 +433,7 @@ fi s_echo "Filling help tables..." -if { echo "use mysql;"; cat $fill_help_tables; } | $mysqld_install_cmd_line > /dev/null +if { echo "use mysql;"; cat "$fill_help_tables"; } | eval "$mysqld_install_cmd_line" > /dev/null then s_echo "OK" else