=== modified file 'scripts/mysql_install_db.sh'
--- scripts/mysql_install_db.sh	2012-06-18 20:57:58 +0000
+++ scripts/mysql_install_db.sh	2012-09-21 20:56:58 +0000
@@ -239,10 +239,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
@@ -257,7 +257,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 mariadb mysql_install_db client-server`
+parse_arguments `"$print_defaults" $defaults mysqld mariadb mysql_install_db client-server`
 parse_arguments PICK-ARGS-FROM-ARGV "$@"
 
 # Configure paths to support files
@@ -307,7 +307,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
@@ -329,7 +329,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
@@ -338,10 +338,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"
@@ -368,21 +368,21 @@
 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
-    if ! `mkdir -p $dir`
+    if ! `mkdir -p "$dir"`
     then
       echo "Fatal error Can't create database directory '$dir'"
       link_to_help
       exit 1
     fi
-    chmod 700 $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'"
@@ -409,15 +409,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 --loose-skip-pbxt $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 MariaDB/MySQL system tables in '$ldata' ..."
-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
@@ -452,7 +452,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

