summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-03-26 14:27:24 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-03-26 14:27:24 -0400
commit90e4f7f9d3f2669ac99f2817f884315bfc86b0a7 (patch)
tree60a10a515a9f5656e797d8142f97b94f89f4e797 /support-files
parent586fab72f01e1c7f0f8bf363fa6b06a2f10965b4 (diff)
parent5b7cab82195268f7657504d0b53995654748cefa (diff)
downloadmariadb-git-90e4f7f9d3f2669ac99f2817f884315bfc86b0a7.tar.gz
* bzr merge -rtag:mariadb-10.0.9 maria/10.0
* Fix for post-merge build failures.
Diffstat (limited to 'support-files')
-rw-r--r--support-files/MySQL-shared-compat.spec.sh2
-rw-r--r--support-files/compiler_warnings.supp15
-rw-r--r--support-files/mysql.server.sh137
-rw-r--r--support-files/mysql.spec.sh5
-rw-r--r--support-files/rpm/server-postun.sh5
5 files changed, 96 insertions, 68 deletions
diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh
index a8d5dd7c8c9..46935d83d17 100644
--- a/support-files/MySQL-shared-compat.spec.sh
+++ b/support-files/MySQL-shared-compat.spec.sh
@@ -1,4 +1,4 @@
-# Copyright 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc.
+# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
#
# MySQL-shared-compat.spec
#
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index ef8d68a09d2..de390839704 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -52,6 +52,12 @@ log/log0log\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer t
log/log0online\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type
#
+# Xtradb engine
+#
+storage/xtradb/handler/ha_innodb\.cc: ignoring return value of
+storage/xtradb/row/row0log\.cc: ignoring return value of
+
+#
# bdb is not critical to keep up to date
#
.*/bdb/.* : .*discards qualifiers from pointer target type.*
@@ -172,6 +178,15 @@ vio/viosslfactories\.c: discards ~const~ qualifier from pointer target type
# jemalloc
#
jemalloc/src/jemalloc\.c: always_inline function might not be inlinable
+jemalloc/src/jemalloc\.c: set but not used
+
+#
+# Connect engine
+#
+storage/connect/connect\.cc: might be clobbered by ~longjmp~
+storage/connect/filamvct\.cpp: ignoring return value of
+storage/connect/filamvct\.cpp: might be clobbered by ~longjmp~
+storage/connect/xindex\.cpp: ignoring return value of
#
# Unexplanable (?) stuff
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 8da75c92a6c..b763117188f 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -148,74 +148,12 @@ parse_server_arguments() {
datadir_set=1
;;
--pid-file=*) mysqld_pid_file_path=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --socket=*) socket=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
esac
done
}
-wait_for_pid () {
- verb="$1" # created | removed
- pid="$2" # process ID of the program operating on the pid-file
- pid_file_path="$3" # path to the PID file.
-
- sst_progress_file=$datadir/sst_in_progress
- i=0
- avoid_race_condition="by checking again"
-
- while test $i -ne $service_startup_timeout ; do
-
- case "$verb" in
- 'created')
- # wait for a PID-file to pop into existence.
- test -s "$pid_file_path" && i='' && break
- ;;
- 'removed')
- # wait for this PID-file to disappear
- test ! -s "$pid_file_path" && i='' && break
- ;;
- *)
- echo "wait_for_pid () usage: wait_for_pid created|removed pid pid_file_path"
- exit 1
- ;;
- esac
-
- # if server isn't running, then pid-file will never be updated
- if test -n "$pid"; then
- if kill -0 "$pid" 2>/dev/null; then
- : # the server still runs
- else
- # The server may have exited between the last pid-file check and now.
- if test -n "$avoid_race_condition"; then
- avoid_race_condition=""
- continue # Check again.
- fi
-
- # there's nothing that will affect the file.
- log_failure_msg "The server quit without updating PID file ($pid_file_path)."
- return 1 # not waiting any more.
- fi
- fi
-
- if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then
- echo $echo_n "SST in progress, setting sleep higher"
- startup_sleep=10
- fi
-
- echo $echo_n ".$echo_c"
- i=`expr $i + 1`
- sleep $startup_sleep
-
- done
-
- if test -z "$i" ; then
- log_success_msg
- return 0
- else
- log_failure_msg
- return 1
- fi
-}
-
# Get arguments from the my.cnf file,
# the only group, which is read from now on is [mysqld]
if test -x ./bin/my_print_defaults
@@ -273,6 +211,75 @@ fi
parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server`
+# wait for the pid file to disappear
+wait_for_gone () {
+ pid="$1" # process ID of the program operating on the pid-file
+ pid_file_path="$2" # path to the PID file.
+
+ i=0
+ crash_protection="by checking again"
+
+ while test $i -ne $service_startup_timeout ; do
+
+ if kill -0 "$pid" 2>/dev/null; then
+ : # the server still runs
+ else
+ if test ! -s "$pid_file_path"; then
+ # no server process and no pid-file? great, we're done!
+ log_success_msg
+ return 0
+ fi
+
+ # pid-file exists, the server process doesn't.
+ # it must've crashed, and mysqld_safe will restart it
+ if test -n "$crash_protection"; then
+ crash_protection=""
+ sleep 5
+ continue # Check again.
+ fi
+
+ # Cannot help it
+ log_failure_msg "The server quit without updating PID file ($pid_file_path)."
+ return 1 # not waiting any more.
+ fi
+
+ echo $echo_n ".$echo_c"
+ i=`expr $i + 1`
+ sleep 1
+
+ done
+
+ log_failure_msg
+ return 1
+}
+
+wait_for_ready () {
+
+ test -n "$socket" && sockopt="--socket=$socket"
+
+ sst_progress_file=$datadir/sst_in_progress
+ i=0
+ while test $i -ne $service_startup_timeout ; do
+
+ if $bindir/mysqladmin $sockopt ping >/dev/null 2>&1; then
+ log_success_msg
+ return 0
+ fi
+
+ if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then
+ echo $echo_n "SST in progress, setting sleep higher"
+ startup_sleep=10
+ fi
+
+ echo $echo_n ".$echo_c"
+ i=`expr $i + 1`
+ sleep $startup_sleep
+
+ done
+
+ log_failure_msg
+ return 1
+}
#
# Set pid file if not given
#
@@ -299,7 +306,7 @@ case "$mode" in
# Give extra arguments to mysqld with the my.cnf file. This script
# may be overwritten at next upgrade.
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
- wait_for_pid created "$!" "$mysqld_pid_file_path"; return_value=$?
+ wait_for_ready; return_value=$?
# Make lock for RedHat / SuSE
if test -w "$lockdir"
@@ -326,7 +333,7 @@ case "$mode" in
echo $echo_n "Shutting down MySQL"
kill $mysqld_pid
# mysqld should remove the pid file when it exits, so wait for it.
- wait_for_pid removed "$mysqld_pid" "$mysqld_pid_file_path"; return_value=$?
+ wait_for_gone $mysqld_pid "$mysqld_pid_file_path"; return_value=$?
else
log_failure_msg "MySQL server process #$mysqld_pid is not running!"
rm "$mysqld_pid_file_path"
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index c36937c9514..254c1ea197c 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -1105,7 +1105,9 @@ echo "=====" >> $STATUS_HISTORY
%doc release/support-files/wsrep_notify
%endif
+%if 0%{?commercial}
%doc %attr(644, root, root) %{_infodir}/mysql.info*
+%endif
%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1*
%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1*
@@ -1276,6 +1278,9 @@ echo "=====" >> $STATUS_HISTORY
# merging BK trees)
##############################################################################
%changelog
+* Wed Oct 30 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
+- Removed non gpl file docs/mysql.info from community packages
+
* Mon Sep 09 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
- Updated logic to get the correct count of PID files
diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh
index 652d59154ae..dcf67173a02 100644
--- a/support-files/rpm/server-postun.sh
+++ b/support-files/rpm/server-postun.sh
@@ -1,7 +1,8 @@
if [ $1 -ge 1 ]; then
if [ -x %{_sysconfdir}/init.d/mysql ] ; then
# only restart the server if it was alredy running
- %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1 && \
- %{_sysconfdir}/init.d/mysql restart
+ if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then
+ %{_sysconfdir}/init.d/mysql restart
+ fi
fi
fi