Fix MySQL PID searching bug

This change fixes the bug that the script would try to use the
user-given PID even when user does not provide one. The bug would lead
to an error of empty variable (invalid PID) and terminate the program.

BUG=chromium-os:33582
TEST=local test

Change-Id: Ie564d6da3fafde539225c7cc416c3293de9bc4c5
Reviewed-on: https://gerrit.chromium.org/gerrit/31854
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Commit-Ready: Yu-Ju Hong <yjhong@chromium.org>
diff --git a/site_utils/bind_mysql_to_cpuset.sh b/site_utils/bind_mysql_to_cpuset.sh
index 60d5d66..c7975d5 100755
--- a/site_utils/bind_mysql_to_cpuset.sh
+++ b/site_utils/bind_mysql_to_cpuset.sh
@@ -80,7 +80,7 @@
 function get_mysql_pid() {
   local pid=""
 
-  if [ $# -gt 0 ]; then
+  if [ $# -gt 0 ] && [ ! -z "$1" ]; then
     # Use user-provided PID.
     pid=$1
   elif [ ! -z ${MYSQL_PID_PATH} -a -f ${MYSQL_PID_PATH} ]; then