浏览代码

- mysql password quoted properly to allow passwords containing spaces
closes SER-131

Jan Janak 19 年之前
父节点
当前提交
f3d2eb657f
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      scripts/mysql/ser_mysql.sh

+ 4 - 4
scripts/mysql/ser_mysql.sh

@@ -204,9 +204,9 @@ sql_query()
     if [ $# -gt 1 ] ; then
     if [ $# -gt 1 ] ; then
 	DB=$1
 	DB=$1
 	shift
 	shift
-	$CMD $PW $MYSQL_OPTS "$DB" -e "$@"
+	$CMD "$PW" $MYSQL_OPTS "$DB" -e "$@"
     else
     else
-	$CMD $PW $MYSQL_OPTS "$@"
+	$CMD "$PW" $MYSQL_OPTS "$@"
     fi
     fi
 }
 }
 
 
@@ -367,10 +367,10 @@ case $1 in
 	shift
 	shift
 	if [ $# -eq 1 ] ; then
 	if [ $# -eq 1 ] ; then
 	    prompt_pw
 	    prompt_pw
-	    $DUMP_CMD $PW $MYSQL_OPTS ${DBNAME} > $1
+	    $DUMP_CMD "$PW" $MYSQL_OPTS ${DBNAME} > $1
 	elif [ $# -eq 0 ] ; then
 	elif [ $# -eq 0 ] ; then
 	    prompt_pw
 	    prompt_pw
-	    $DUMP_CMD $PW $MYSQL_OPTS ${DBNAME}
+	    $DUMP_CMD "$PW" $MYSQL_OPTS ${DBNAME}
 	else
 	else
 	    usage
 	    usage
 	    exit 1
 	    exit 1