summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jani@a193-229-222-105.elisa-laajakaista.fi>2006-05-12 11:26:42 +0300
committerunknown <jani@a193-229-222-105.elisa-laajakaista.fi>2006-05-12 11:26:42 +0300
commitf3d2b3077b8fa94e265d52d9a897889609e9d1a0 (patch)
tree878906a522d457344670fe9b350eb6e325c527b3
parente0949d6dea1243286bff1ba1c7cd321c55f45e7b (diff)
parent77dedc31e922d3bfdc4379f4be5b7a9ec02a309d (diff)
downloadmariadb-git-f3d2b3077b8fa94e265d52d9a897889609e9d1a0.tar.gz
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new-merge_060509 configure.in: Auto merged mysql-test/r/rpl_user_variables.result: Auto merged mysql-test/t/having.test: Auto merged mysql-test/t/rpl_user_variables.test: Auto merged sql/item_func.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged
-rw-r--r--CMakeLists.txt (renamed from cmakelists.txt)0
-rw-r--r--client/CMakeLists.txt (renamed from client/cmakelists.txt)0
-rw-r--r--dbug/CMakeLists.txt (renamed from dbug/cmakelists.txt)0
-rw-r--r--extra/CMakeLists.txt (renamed from extra/cmakelists.txt)0
-rw-r--r--extra/yassl/CMakeLists.txt (renamed from extra/yassl/cmakelists.txt)0
-rw-r--r--extra/yassl/taocrypt/CMakeLists.txt (renamed from extra/yassl/taocrypt/cmakelists.txt)0
-rw-r--r--libmysql/CMakeLists.txt (renamed from libmysql/cmakelists.txt)0
-rw-r--r--libmysqld/CMakeLists.txt (renamed from libmysqld/cmakelists.txt)0
-rw-r--r--libmysqld/examples/CMakeLists.txt (renamed from libmysqld/examples/cmakelists.txt)0
-rw-r--r--mysql-test/t/rpl_user_variables.test4
-rw-r--r--mysys/CMakeLists.txt (renamed from mysys/cmakelists.txt)0
-rw-r--r--regex/CMakeLists.txt (renamed from regex/cmakelists.txt)0
-rw-r--r--scripts/mysqld_safe.sh68
-rw-r--r--server-tools/instance-manager/CMakeLists.txt (renamed from server-tools/instance-manager/cmakelists.txt)0
-rw-r--r--sql/CMakeLists.txt (renamed from sql/cmakelists.txt)0
-rw-r--r--storage/archive/CMakeLists.txt (renamed from storage/archive/cmakelists.txt)0
-rw-r--r--storage/bdb/CMakeLists.txt (renamed from storage/bdb/cmakelists.txt)0
-rw-r--r--storage/blackhole/CMakeLists.txt (renamed from storage/blackhole/cmakelists.txt)0
-rw-r--r--storage/csv/CMakeLists.txt (renamed from storage/csv/cmakelists.txt)0
-rw-r--r--storage/example/CMakeLists.txt (renamed from storage/example/cmakelists.txt)0
-rw-r--r--storage/heap/CMakeLists.txt (renamed from storage/heap/cmakelists.txt)0
-rw-r--r--storage/innobase/CMakeLists.txt (renamed from storage/innobase/cmakelists.txt)0
-rw-r--r--storage/myisam/CMakeLists.txt (renamed from storage/myisam/cmakelists.txt)0
-rw-r--r--storage/myisammrg/CMakeLists.txt (renamed from storage/myisammrg/cmakelists.txt)0
-rw-r--r--strings/CMakeLists.txt (renamed from strings/cmakelists.txt)0
-rw-r--r--tests/CMakeLists.txt (renamed from tests/cmakelists.txt)0
-rw-r--r--vio/CMakeLists.txt (renamed from vio/cmakelists.txt)0
-rw-r--r--zlib/CMakeLists.txt (renamed from zlib/cmakelists.txt)0
28 files changed, 52 insertions, 20 deletions
diff --git a/cmakelists.txt b/CMakeLists.txt
index 5edc33b9f5a..5edc33b9f5a 100644
--- a/cmakelists.txt
+++ b/CMakeLists.txt
diff --git a/client/cmakelists.txt b/client/CMakeLists.txt
index 26cc36c7f6f..26cc36c7f6f 100644
--- a/client/cmakelists.txt
+++ b/client/CMakeLists.txt
diff --git a/dbug/cmakelists.txt b/dbug/CMakeLists.txt
index fe20fdd3db6..fe20fdd3db6 100644
--- a/dbug/cmakelists.txt
+++ b/dbug/CMakeLists.txt
diff --git a/extra/cmakelists.txt b/extra/CMakeLists.txt
index 50e0f04eb14..50e0f04eb14 100644
--- a/extra/cmakelists.txt
+++ b/extra/CMakeLists.txt
diff --git a/extra/yassl/cmakelists.txt b/extra/yassl/CMakeLists.txt
index cafa3011e94..cafa3011e94 100644
--- a/extra/yassl/cmakelists.txt
+++ b/extra/yassl/CMakeLists.txt
diff --git a/extra/yassl/taocrypt/cmakelists.txt b/extra/yassl/taocrypt/CMakeLists.txt
index 3ad9195b372..3ad9195b372 100644
--- a/extra/yassl/taocrypt/cmakelists.txt
+++ b/extra/yassl/taocrypt/CMakeLists.txt
diff --git a/libmysql/cmakelists.txt b/libmysql/CMakeLists.txt
index 35795102082..35795102082 100644
--- a/libmysql/cmakelists.txt
+++ b/libmysql/CMakeLists.txt
diff --git a/libmysqld/cmakelists.txt b/libmysqld/CMakeLists.txt
index 8bd0e0baa32..8bd0e0baa32 100644
--- a/libmysqld/cmakelists.txt
+++ b/libmysqld/CMakeLists.txt
diff --git a/libmysqld/examples/cmakelists.txt b/libmysqld/examples/CMakeLists.txt
index 5c58264a7e7..5c58264a7e7 100644
--- a/libmysqld/examples/cmakelists.txt
+++ b/libmysqld/examples/CMakeLists.txt
diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test
index b079c8993b6..08717fce114 100644
--- a/mysql-test/t/rpl_user_variables.test
+++ b/mysql-test/t/rpl_user_variables.test
@@ -50,10 +50,6 @@ insert into t1 values (@a),(@a),(@a*5);
SELECT * FROM t1 ORDER BY n;
sync_slave_with_master;
SELECT * FROM t1 ORDER BY n;
-#
-# BUG19136: Crashing log-bin and uninitialized user variables in a derived table
-# just to check nothing bad happens anymore
-#
connection master;
insert into t1 select * FROM (select @var1 union select @var2) AS t2;
drop table t1;
diff --git a/mysys/cmakelists.txt b/mysys/CMakeLists.txt
index 4aa99a70121..4aa99a70121 100644
--- a/mysys/cmakelists.txt
+++ b/mysys/CMakeLists.txt
diff --git a/regex/cmakelists.txt b/regex/CMakeLists.txt
index e00f339b3b9..e00f339b3b9 100644
--- a/regex/cmakelists.txt
+++ b/regex/CMakeLists.txt
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 83bc8ce8954..744a4791307 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -31,7 +31,6 @@ Usage: $0 [OPTIONS]
--defaults-file=FILE Use the specified defaults file
--defaults-extra-file=FILE Also use defaults from the specified file
--ledir=DIRECTORY Look for mysqld in the specified directory
- --log-error=FILE Log errors to the specified log file
--open-files-limit=LIMIT Limit the number of open files
--core-file-size=LIMIT Limit core files to the specified size
--timezone=TZ Set the system timezone
@@ -46,6 +45,11 @@ EOF
exit 1
}
+shell_quote_string() {
+ # This sed command makes sure that any special chars are quoted,
+ # so the arg gets passed exactly to the server.
+ echo "$1" | sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
+}
parse_arguments() {
# We only need to pass arguments through to the server if we don't
@@ -69,14 +73,14 @@ parse_arguments() {
--pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
--user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;;
- # these two might have been set in a [mysqld_safe] section of my.cnf
+ # these might have been set in a [mysqld_safe] section of my.cnf
# they are added to mysqld command line to override settings from my.cnf
+ --log-error=*) err_log=`echo "$arg" | sed -e "s;--log-error=;;"` ;;
--socket=*) mysql_unix_port=`echo "$arg" | sed -e "s;--socket=;;"` ;;
--port=*) mysql_tcp_port=`echo "$arg" | sed -e "s;--port=;;"` ;;
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
--ledir=*) ledir=`echo "$arg" | sed -e "s;--ledir=;;"` ;;
- --log-error=*) err_log=`echo "$arg" | sed -e "s;--log-error=;;"` ;;
--open-files-limit=*) open_files=`echo "$arg" | sed -e "s;--open-files-limit=;;"` ;;
--core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core-file-size=;;"` ;;
--timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;;
@@ -97,9 +101,7 @@ parse_arguments() {
*)
if test -n "$pick_args"
then
- # This sed command makes sure that any special chars are quoted,
- # so the arg gets passed exactly to the server.
- args="$args "`echo "$arg" | sed -e 's,\([^a-zA-Z0-9_.-]\),\\\\\1,g'`
+ append_arg_to_args "$arg"
fi
;;
esac
@@ -194,6 +196,10 @@ else
print_defaults="my_print_defaults"
fi
+append_arg_to_args () {
+ args="$args "`shell_quote_string "$1"`
+}
+
args=
SET_USER=2
parse_arguments `$print_defaults $defaults --loose-verbose mysqld server`
@@ -239,15 +245,39 @@ else
* ) pid_file="$DATADIR/$pid_file" ;;
esac
fi
-test -z "$err_log" && err_log=$DATADIR/`@HOSTNAME@`.err
+append_arg_to_args "--pid-file=$pid_file"
+
+if [ -n "$err_log" ]
+then
+ # mysqld adds ".err" if there is no extension on the --log-err
+ # argument; must match that here, or mysqld_safe will write to a
+ # different log file than mysqld
+
+ # mysqld does not add ".err" to "--log-error=foo."; it considers a
+ # trailing "." as an extension
+ if expr "$err_log" : '.*\.[^/]*$' > /dev/null
+ then
+ :
+ else
+ err_log="$err_log".err
+ fi
+
+ case "$err_log" in
+ /* ) ;;
+ * ) err_log="$DATADIR/$err_log" ;;
+ esac
+else
+ err_log=$DATADIR/`@HOSTNAME@`.err
+fi
+append_arg_to_args "--log-error=$err_log"
if test -n "$mysql_unix_port"
then
- args="--socket=$mysql_unix_port $args"
+ append_arg_to_args "--socket=$mysql_unix_port"
fi
if test -n "$mysql_tcp_port"
then
- args="--port=$mysql_tcp_port $args"
+ append_arg_to_args "--port=$mysql_tcp_port"
fi
if test $niceness -eq 0
@@ -314,7 +344,7 @@ then
if test -n "$open_files"
then
ulimit -n $open_files
- args="--open-files-limit=$open_files $args"
+ append_arg_to_args "--open-files-limit=$open_files"
fi
if test -n "$core_file_size"
then
@@ -372,12 +402,18 @@ echo "`date +'%y%m%d %H:%M:%S mysqld started'`" >> $err_log
while true
do
rm -f $safe_mysql_unix_port $pid_file # Some extra safety
- if test -z "$args"
- then
- $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ >> $err_log 2>&1
- else
- eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ $args >> $err_log 2>&1"
- fi
+
+ cmd="$NOHUP_NICENESS"
+
+ for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
+ "--datadir=$DATADIR" "$USER_OPTION"
+ do
+ cmd="$cmd "`shell_quote_string "$i"`
+ done
+ cmd="$cmd $args >> "`shell_quote_string "$err_log"`" 2>&1"
+ #echo "Running mysqld: [$cmd]"
+ eval "$cmd"
+
if test ! -f $pid_file # This is removed if normal shutdown
then
echo "STOPPING server from pid file $pid_file"
diff --git a/server-tools/instance-manager/cmakelists.txt b/server-tools/instance-manager/CMakeLists.txt
index c20b9c7f9df..c20b9c7f9df 100644
--- a/server-tools/instance-manager/cmakelists.txt
+++ b/server-tools/instance-manager/CMakeLists.txt
diff --git a/sql/cmakelists.txt b/sql/CMakeLists.txt
index 05b1efdbe51..05b1efdbe51 100644
--- a/sql/cmakelists.txt
+++ b/sql/CMakeLists.txt
diff --git a/storage/archive/cmakelists.txt b/storage/archive/CMakeLists.txt
index a631f194b1a..a631f194b1a 100644
--- a/storage/archive/cmakelists.txt
+++ b/storage/archive/CMakeLists.txt
diff --git a/storage/bdb/cmakelists.txt b/storage/bdb/CMakeLists.txt
index c27665d902c..c27665d902c 100644
--- a/storage/bdb/cmakelists.txt
+++ b/storage/bdb/CMakeLists.txt
diff --git a/storage/blackhole/cmakelists.txt b/storage/blackhole/CMakeLists.txt
index ea3a7eae38e..ea3a7eae38e 100644
--- a/storage/blackhole/cmakelists.txt
+++ b/storage/blackhole/CMakeLists.txt
diff --git a/storage/csv/cmakelists.txt b/storage/csv/CMakeLists.txt
index 28748527cc3..28748527cc3 100644
--- a/storage/csv/cmakelists.txt
+++ b/storage/csv/CMakeLists.txt
diff --git a/storage/example/cmakelists.txt b/storage/example/CMakeLists.txt
index f4579aa0c66..f4579aa0c66 100644
--- a/storage/example/cmakelists.txt
+++ b/storage/example/CMakeLists.txt
diff --git a/storage/heap/cmakelists.txt b/storage/heap/CMakeLists.txt
index db5fb8b2981..db5fb8b2981 100644
--- a/storage/heap/cmakelists.txt
+++ b/storage/heap/CMakeLists.txt
diff --git a/storage/innobase/cmakelists.txt b/storage/innobase/CMakeLists.txt
index def51873725..def51873725 100644
--- a/storage/innobase/cmakelists.txt
+++ b/storage/innobase/CMakeLists.txt
diff --git a/storage/myisam/cmakelists.txt b/storage/myisam/CMakeLists.txt
index 3ba7aba4555..3ba7aba4555 100644
--- a/storage/myisam/cmakelists.txt
+++ b/storage/myisam/CMakeLists.txt
diff --git a/storage/myisammrg/cmakelists.txt b/storage/myisammrg/CMakeLists.txt
index 83168f6c60c..83168f6c60c 100644
--- a/storage/myisammrg/cmakelists.txt
+++ b/storage/myisammrg/CMakeLists.txt
diff --git a/strings/cmakelists.txt b/strings/CMakeLists.txt
index ab4031f071a..ab4031f071a 100644
--- a/strings/cmakelists.txt
+++ b/strings/CMakeLists.txt
diff --git a/tests/cmakelists.txt b/tests/CMakeLists.txt
index 46c42d461f3..46c42d461f3 100644
--- a/tests/cmakelists.txt
+++ b/tests/CMakeLists.txt
diff --git a/vio/cmakelists.txt b/vio/CMakeLists.txt
index a3cbb304289..a3cbb304289 100644
--- a/vio/cmakelists.txt
+++ b/vio/CMakeLists.txt
diff --git a/zlib/cmakelists.txt b/zlib/CMakeLists.txt
index 53560adf6d1..53560adf6d1 100644
--- a/zlib/cmakelists.txt
+++ b/zlib/CMakeLists.txt