[mysql] Update to MySQL 5.5.22

Tom Lane tgl at fedoraproject.org
Sat Mar 24 05:06:46 UTC 2012


commit d3bdaa4a21d81a2b231ae212758e8f547eef6129
Author: Tom Lane <tgl at redhat.com>
Date:   Sat Mar 24 01:06:31 2012 -0400

    Update to MySQL 5.5.22

 .gitignore                  |    2 +-
 mysql-logrotate.patch       |   60 +++++++++++++++++++++++++++++++++++-------
 mysql-plugin-test.patch     |    8 +++++
 mysql-string-overflow.patch |    3 ++
 mysql.spec                  |   20 ++++++++++---
 mysqld.service              |    6 ++++
 sources                     |    2 +-
 7 files changed, 84 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6039a2e..c15416c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/mysql-5.5.21-nodocs.tar.gz
+/mysql-5.5.22-nodocs.tar.gz
diff --git a/mysql-logrotate.patch b/mysql-logrotate.patch
index dd8742a..8ad9d2c 100644
--- a/mysql-logrotate.patch
+++ b/mysql-logrotate.patch
@@ -1,10 +1,21 @@
-Adjust the mysql-log-rotate script to contain the correct log file
-name for Red Hat installations.
+Adjust the mysql-log-rotate script in several ways:
 
+* Use the correct log file pathname for Red Hat installations.
+* Enable creation of the log file by logrotate (needed since
+  /var/log/ isn't writable by mysql user).
+* Comment out the actual rotation commands, so that user must edit
+  the file to enable rotation.  This is unfortunate, but the fact
+  that the script will probably fail without manual configuration
+  (to set a root password) means that we can't really have it turned
+  on by default.  Fortunately, in most configurations the log file
+  is low-volume and so rotation is not critical functionality.
 
-diff -Naur mysql-5.5.20.orig/support-files/mysql-log-rotate.sh mysql-5.5.20/support-files/mysql-log-rotate.sh
---- mysql-5.5.20.orig/support-files/mysql-log-rotate.sh	2011-12-16 14:52:06.000000000 -0500
-+++ mysql-5.5.20/support-files/mysql-log-rotate.sh	2012-01-26 23:24:54.402676177 -0500
+See discussions at RH bugs 799735, 547007
+
+
+diff -Naur mysql-5.5.22.orig/support-files/mysql-log-rotate.sh mysql-5.5.22/support-files/mysql-log-rotate.sh
+--- mysql-5.5.22.orig/support-files/mysql-log-rotate.sh	2012-03-02 14:44:46.000000000 -0500
++++ mysql-5.5.22/support-files/mysql-log-rotate.sh	2012-03-23 22:33:29.092043705 -0400
 @@ -3,7 +3,7 @@
  # in the [safe_mysqld] section as follows:
  #
@@ -14,12 +25,41 @@ diff -Naur mysql-5.5.20.orig/support-files/mysql-log-rotate.sh mysql-5.5.20/supp
  #
  # If the root user has a password you have to create a
  # /root/.my.cnf configuration file with the following
-@@ -18,7 +18,7 @@
+@@ -18,19 +18,21 @@
  # ATTENTION: This /root/.my.cnf should be readable ONLY
  # for root !
  
 - at localstatedir@/mysqld.log {
-+/var/log/mysqld.log {
-         # create 600 mysql mysql
-         notifempty
- 	daily
+-        # create 600 mysql mysql
+-        notifempty
+-	daily
+-        rotate 3
+-        missingok
+-        compress
+-    postrotate
+-	# just if mysqld is really running
+-	if test -x @bindir@/mysqladmin && \
+-	   @bindir@/mysqladmin ping &>/dev/null
+-	then
+-	   @bindir@/mysqladmin flush-logs
+-	fi
+-    endscript
+-}
++# Then, un-comment the following lines to enable rotation of mysql's log file:
++
++#/var/log/mysqld.log {
++#        create 600 mysql mysql
++#        notifempty
++#	daily
++#        rotate 3
++#        missingok
++#        compress
++#    postrotate
++#	# just if mysqld is really running
++#	if test -x @bindir@/mysqladmin && \
++#	   @bindir@/mysqladmin ping &>/dev/null
++#	then
++#	   @bindir@/mysqladmin flush-logs
++#	fi
++#    endscript
++#}
diff --git a/mysql-plugin-test.patch b/mysql-plugin-test.patch
index 51c8328..5d08c32 100644
--- a/mysql-plugin-test.patch
+++ b/mysql-plugin-test.patch
@@ -1,3 +1,11 @@
+mysql_plugin.test fails when run in mysql-test RPM, though the build-time
+regression test is OK.  This patch is from the pre-existing upstream bug
+report, except we also fix the part that tries to scribble on the
+read-only-to-us plugin directory.
+
+rhbz #789530, upstream at http://bugs.mysql.com/bug.php?id=62907
+
+
 diff -up mysql-5.5.21/mysql-test/t/mysql_plugin-master.opt.plugin mysql-5.5.21/mysql-test/t/mysql_plugin-master.opt
 --- mysql-5.5.21/mysql-test/t/mysql_plugin-master.opt.plugin	2012-01-31 12:28:15.000000000 +0100
 +++ mysql-5.5.21/mysql-test/t/mysql_plugin-master.opt	2012-03-14 16:54:19.060951822 +0100
diff --git a/mysql-string-overflow.patch b/mysql-string-overflow.patch
index 80cf5bc..f86d3b9 100644
--- a/mysql-string-overflow.patch
+++ b/mysql-string-overflow.patch
@@ -1,6 +1,9 @@
 These issues were found by Coverity static analysis tool, for more info 
 see messages by particular fixes (messages belong to 5.1.61).
 
+Filed upstream at http://bugs.mysql.com/bug.php?id=64631
+
+
 Error: BUFFER_SIZE_WARNING:
 /builddir/build/BUILD/mysql-5.1.61/sql/sql_prepare.cc:2749: buffer_size_warning: Calling strncpy with a maximum size argument of 512 bytes on destination array "this->stmt->last_error" of size 512 bytes might leave the destination string unterminated.
 
diff --git a/mysql.spec b/mysql.spec
index 8f4af2a..bc831dd 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -1,6 +1,6 @@
 Name: mysql
-Version: 5.5.21
-Release: 3%{?dist}
+Version: 5.5.22
+Release: 1%{?dist}
 
 Summary: MySQL client programs and shared libraries
 Group: Applications/Databases
@@ -693,10 +693,20 @@ fi
 %{_mandir}/man1/mysql_client_test.1*
 
 %changelog
+* Sat Mar 24 2012 Tom Lane <tgl at redhat.com> 5.5.22-1
+- Update to MySQL 5.5.22, for various fixes described at
+  http://dev.mysql.com/doc/refman/5.5/en/news-5-5-22.html
+- Turn on PrivateTmp in service file
+Resolves: #782513
+- Comment out the contents of /etc/logrotate.d/mysqld, so that manual
+  action is needed to enable log rotation.  Given the multiple ways in
+  which the rotation script can fail, it seems imprudent to try to make
+  it run by default.
+Resolves: #799735
+
 * Tue Mar 20 2012 Honza Horak <hhorak at redhat.com> 5.5.21-3
-- Revise mysql_plugin test patch which moves plugin files to 
-  a temporary directory now
-Resolves: #789530
+- Revise mysql_plugin test patch so it moves plugin files to
+  a temporary directory (better solution to #789530)
 
 * Tue Mar 13 2012 Honza Horak <hhorak at redhat.com> 5.5.21-2
 - Fix ssl-related tests to specify expected cipher explicitly
diff --git a/mysqld.service b/mysqld.service
index b7fa095..7289f9d 100644
--- a/mysqld.service
+++ b/mysqld.service
@@ -14,6 +14,9 @@
 #	[Service]
 #	LimitNOFILE=10000
 
+# Note: in F-17 and beyond, /usr/lib/... is recommended in the .include line
+# though /lib/... will still work.
+
 [Unit]
 Description=MySQL database server
 After=syslog.target
@@ -36,5 +39,8 @@ TimeoutSec=300
 # We rely on systemd, not mysqld_safe, to restart mysqld if it dies
 Restart=always
 
+# Place temp files in a secure directory, not /tmp
+PrivateTmp=true
+
 [Install]
 WantedBy=multi-user.target
diff --git a/sources b/sources
index 2250902..7be9ec4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fe73067444e4cc8cdf95b0f32a92363b  mysql-5.5.21-nodocs.tar.gz
+897d8ac3e1880de4ad9c27c4a20f887f  mysql-5.5.22-nodocs.tar.gz


More information about the scm-commits mailing list