Update to MySQL 5.5.21

This commit is contained in:
Tom Lane 2012-02-27 21:44:12 -05:00 committed by Michal Schorm
parent 7ab7b5299c
commit 2d45b49ace
6 changed files with 430 additions and 4 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/mysql-5.5.20-nodocs.tar.gz
/mysql-5.5.21-nodocs.tar.gz

246
mysql-default-cipher.patch Normal file
View File

@ -0,0 +1,246 @@
Skip a few test items that assume the default SSL cipher is
DHE-RSA-AES256-SHA, which is no longer the case as of openssl 1.0.1.
There is probably a better answer than diking out these checks entirely,
but I will leave it to upstream to figure one out.
Upstream at http://bugs.mysql.com/bug.php?id=64461
diff -Naur mysql-5.5.21.orig/mysql-test/r/openssl_1.result mysql-5.5.21/mysql-test/r/openssl_1.result
--- mysql-5.5.21.orig/mysql-test/r/openssl_1.result 2012-01-31 06:28:16.000000000 -0500
+++ mysql-5.5.21/mysql-test/r/openssl_1.result 2012-02-27 00:31:11.789705322 -0500
@@ -2,40 +2,28 @@
create table t1(f1 int);
insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
-grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
-grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
+grant select on test.* to ssl_user2@localhost require SSL;
+grant select on test.* to ssl_user3@localhost require SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user4@localhost require SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user5@localhost require SUBJECT "xxx";
flush privileges;
connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'ssl_user5'@'localhost' (using password: NO)
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
select * from t1;
f1
5
delete from t1;
ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1'
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
select * from t1;
f1
5
delete from t1;
ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 't1'
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
select * from t1;
f1
5
delete from t1;
ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1'
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
select * from t1;
f1
5
@@ -51,11 +39,6 @@
mysqltest: Could not open connection 'default': 2026 SSL connection error: Unable to get private key
SSL error: Unable to get certificate from ''
mysqltest: Could not open connection 'default': 2026 SSL connection error: Unable to get certificate
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
End of 5.0 tests
DROP TABLE IF EXISTS thread_status;
DROP EVENT IF EXISTS event_status;
@@ -204,8 +187,5 @@
is still running; no cipher request crashed the server
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
DROP USER bug42158@localhost;
End of 5.1 tests
diff -Naur mysql-5.5.21.orig/mysql-test/r/ssl.result mysql-5.5.21/mysql-test/r/ssl.result
--- mysql-5.5.21.orig/mysql-test/r/ssl.result 2012-01-31 06:28:16.000000000 -0500
+++ mysql-5.5.21/mysql-test/r/ssl.result 2012-02-27 00:32:31.503920619 -0500
@@ -1,6 +1,3 @@
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
@@ -2154,6 +2151,3 @@
Warnings:
Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
diff -Naur mysql-5.5.21.orig/mysql-test/r/ssl_compress.result mysql-5.5.21/mysql-test/r/ssl_compress.result
--- mysql-5.5.21.orig/mysql-test/r/ssl_compress.result 2012-01-31 06:28:16.000000000 -0500
+++ mysql-5.5.21/mysql-test/r/ssl_compress.result 2012-02-27 00:36:03.726113717 -0500
@@ -1,6 +1,3 @@
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Compression';
Variable_name Value
Compression ON
@@ -2157,9 +2154,6 @@
Warnings:
Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
SHOW STATUS LIKE 'Compression';
Variable_name Value
Compression ON
diff -Naur mysql-5.5.21.orig/mysql-test/t/openssl_1.test mysql-5.5.21/mysql-test/t/openssl_1.test
--- mysql-5.5.21.orig/mysql-test/t/openssl_1.test 2012-01-31 06:28:15.000000000 -0500
+++ mysql-5.5.21/mysql-test/t/openssl_1.test 2012-02-27 00:31:14.031717958 -0500
@@ -14,10 +14,10 @@
insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
-grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
-grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
-grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
+grant select on test.* to ssl_user2@localhost require SSL;
+grant select on test.* to ssl_user3@localhost require SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user4@localhost require SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
+grant select on test.* to ssl_user5@localhost require SUBJECT "xxx";
flush privileges;
connect (con1,localhost,ssl_user1,,,,,SSL);
@@ -29,29 +29,21 @@
connect (con5,localhost,ssl_user5,,,,,SSL);
connection con1;
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
connection con2;
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
connection con3;
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
connection con4;
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
@@ -104,22 +96,6 @@
--error 1
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
-#
-# Bug#21611 Slave can't connect when master-ssl-cipher specified
-# - Apparently selecting a cipher doesn't work at all
-# - Usa a cipher that both yaSSL and OpenSSL supports
-#
---exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
---exec $MYSQL_TEST --ssl-cipher=DHE-RSA-AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
-
-#
-# Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23
-#
-# Test that we can open encrypted connection to server without
-# verification of servers certificate by setting both ca certificate
-# and ca path to NULL
-#
---exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1
--echo End of 5.0 tests
#
@@ -245,7 +221,6 @@
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
connect(con1,localhost,bug42158,,,,,SSL);
-SHOW STATUS LIKE 'Ssl_cipher';
disconnect con1;
connection default;
DROP USER bug42158@localhost;
diff -Naur mysql-5.5.21.orig/mysql-test/t/ssl.test mysql-5.5.21/mysql-test/t/ssl.test
--- mysql-5.5.21.orig/mysql-test/t/ssl.test 2012-01-31 06:28:15.000000000 -0500
+++ mysql-5.5.21/mysql-test/t/ssl.test 2012-02-27 00:32:26.000889684 -0500
@@ -8,15 +8,9 @@
connect (ssl_con,localhost,root,,,,,SSL);
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
-
# Source select test case
-- source include/common-tests.inc
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
-
connection default;
disconnect ssl_con;
diff -Naur mysql-5.5.21.orig/mysql-test/t/ssl_8k_key.test mysql-5.5.21/mysql-test/t/ssl_8k_key.test
--- mysql-5.5.21.orig/mysql-test/t/ssl_8k_key.test 2012-01-31 06:28:15.000000000 -0500
+++ mysql-5.5.21/mysql-test/t/ssl_8k_key.test 2012-02-27 00:34:41.994654229 -0500
@@ -2,7 +2,7 @@
#
# Bug#29784 YaSSL assertion failure when reading 8k key.
#
---exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1
+--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem --ssl-cipher=DHE-RSA-AES256-SHA -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1
## This test file is for testing encrypted communication only, not other
## encryption routines that the SSL library happens to provide!
diff -Naur mysql-5.5.21.orig/mysql-test/t/ssl_compress.test mysql-5.5.21/mysql-test/t/ssl_compress.test
--- mysql-5.5.21.orig/mysql-test/t/ssl_compress.test 2012-01-31 06:28:15.000000000 -0500
+++ mysql-5.5.21/mysql-test/t/ssl_compress.test 2012-02-27 00:35:22.681882970 -0500
@@ -9,18 +9,12 @@
connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS);
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
-
# Check compression turned on
SHOW STATUS LIKE 'Compression';
# Source select test case
-- source include/common-tests.inc
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
-
# Check compression turned on
SHOW STATUS LIKE 'Compression';

27
mysql-file-contents.patch Normal file
View File

@ -0,0 +1,27 @@
Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
breaks at least two packaging commandments, so we put them into $libdir
instead. That means we have to hack the file_contents regression test
to know about this.
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
diff -Naur mysql-5.5.21.orig/mysql-test/t/file_contents.test mysql-5.5.21/mysql-test/t/file_contents.test
--- mysql-5.5.21.orig/mysql-test/t/file_contents.test 2012-01-31 06:28:15.000000000 -0500
+++ mysql-5.5.21/mysql-test/t/file_contents.test 2012-02-27 17:18:57.716087918 -0500
@@ -31,6 +31,15 @@
} else {
# RedHat: version number in directory name
$dir_docs = glob "$dir_docs/MySQL-server*";
+
+ # All the above is entirely wacko, because these files are not docs;
+ # they should be kept in libdir instead. mtr does not provide a nice
+ # way to find libdir though, so we have to kluge it like this:
+ if (-d "/usr/lib64/mysql") {
+ $dir_docs = "/usr/lib64/mysql";
+ } else {
+ $dir_docs = "/usr/lib/mysql";
+ }
}
} else {
# tar.gz package, Windows, or developer work (in BZR)

132
mysql-plugin-test.patch Normal file
View File

@ -0,0 +1,132 @@
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 remove the part that tries to scribble on the
read-only-to-us plugin directory. (That's not a terribly satisfactory
solution, of course, but I'll leave it to upstream to find a better one.)
rhbz #789530, upstream at http://bugs.mysql.com/bug.php?id=62907
diff -Naur mysql-5.5.21.orig/mysql-test/r/mysql_plugin.result mysql-5.5.21/mysql-test/r/mysql_plugin.result
--- mysql-5.5.21.orig/mysql-test/r/mysql_plugin.result 2012-01-31 06:28:16.000000000 -0500
+++ mysql-5.5.21/mysql-test/r/mysql_plugin.result 2012-02-26 21:45:40.940840973 -0500
@@ -29,15 +29,6 @@
name dl
daemon_example libdaemon_example.so
#
-# Ensure the plugin is replaced.
-#
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-name dl
-daemon_example liblibdaemon_example.so
-#
-# Disable the plugin...
-#
-#
# Ensure the plugin isn't loaded.
#
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
diff -Naur mysql-5.5.21.orig/mysql-test/t/mysql_plugin.test mysql-5.5.21/mysql-test/t/mysql_plugin.test
--- mysql-5.5.21.orig/mysql-test/t/mysql_plugin.test 2012-01-31 06:28:15.000000000 -0500
+++ mysql-5.5.21/mysql-test/t/mysql_plugin.test 2012-02-26 21:50:43.973450081 -0500
@@ -24,7 +24,7 @@
# Add the datadir, basedir, plugin_dir to the bootstrap command
let $MYSQLD_DATADIR= `select @@datadir`;
-let $MYSQL_BASEDIR= `select @@basedir`;
+let $MYSQLD_TMP_BASEDIR= $MYSQLTEST_VARDIR/tmp;
let $MYSQL_ERRMSG_BASEDIR=`select @@lc_messages_dir`;
let $PLUGIN_DIR=`select @@plugin_dir`;
@@ -66,10 +66,10 @@
# mysql version, so errmsg.sys will be copied to "basedir/share", we create
# and remove this structure.
---mkdir $MYSQLD_BASEDIR/share
---mkdir $MYSQLD_BASEDIR/share/mysql
---copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys
---copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/mysql/errmsg.sys
+--mkdir $MYSQLD_TMP_BASEDIR/share
+--mkdir $MYSQLD_TMP_BASEDIR/share/mysql
+--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_TMP_BASEDIR/share/errmsg.sys
+--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_TMP_BASEDIR/share/mysql/errmsg.sys
# The mysql_plugin tool now accepts --my-print-defaults which points to the
# executable my_print_defaults.exe we can get this path from the variable
@@ -100,7 +100,7 @@
# Build client command for reuse.
-let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
+let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_TMP_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
--echo #
--echo # Ensure the plugin isn't loaded.
@@ -198,52 +198,10 @@
--shutdown_server 10
--source include/wait_until_disconnected.inc
-# To test the case where the same plugin is reloaded with a different soname,
-# we must copy the example daemon to a new location renaming it.
-
-let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
---copy_file $PLUGIN_DIR/$DAEMONEXAMPLE $PLUGIN_DIR/$DAEMON_RELOAD
---copy_file include/libdaemon_example.ini $PLUGIN_DIR/libdaemon_example.ini
-
-# Now reload it and see that it is a different name.
---exec $MYSQL_PLUGIN_CMD ENABLE libdaemon_example
-
-#
-# Restart the server
-#
---append_file $expect_file
-restart
-EOF
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---echo #
---echo # Ensure the plugin is replaced.
---echo #
---replace_regex /\.dll/.so/
-SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-
---echo #
---echo # Disable the plugin...
---echo #
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
---write_file $expect_file
-wait
-EOF
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
#
# Disable the plugin
#
---exec $MYSQL_PLUGIN_CMD DISABLE libdaemon_example
-
-# Remove files for last test case.
-
---remove_file $PLUGIN_DIR/$DAEMON_RELOAD
---remove_file $DAEMONEXAMPLE_DIR/libdaemon_example.ini
+--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
#
# Restart the server
@@ -395,8 +353,10 @@
--remove_file $expect_file
# Cleanup the share folder in the binary path.
---remove_file $MYSQLD_BASEDIR/share/errmsg.sys
---rmdir $MYSQLD_BASEDIR/share/mysql
---rmdir $MYSQLD_BASEDIR/share
+--remove_file $MYSQLD_TMP_BASEDIR/share/errmsg.sys
+--remove_file $MYSQLD_TMP_BASEDIR/share/mysql/errmsg.sys
+
+--rmdir $MYSQLD_TMP_BASEDIR/share/mysql
+--rmdir $MYSQLD_TMP_BASEDIR/share
--enable_abort_on_error

View File

@ -1,6 +1,6 @@
Name: mysql
Version: 5.5.20
Release: 2%{?dist}
Version: 5.5.21
Release: 1%{?dist}
Summary: MySQL client programs and shared libraries
Group: Applications/Databases
@ -53,6 +53,9 @@ Patch13: mysqld-nowatch.patch
Patch14: mysql-va-list.patch
Patch15: mysql-netdevname.patch
Patch16: mysql-logrotate.patch
Patch17: mysql-plugin-test.patch
Patch18: mysql-default-cipher.patch
Patch19: mysql-file-contents.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl, readline-devel, openssl-devel
@ -205,6 +208,9 @@ the MySQL sources.
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
# workaround for upstream bug #56342
rm -f mysql-test/t/ssl_8k_key-master.opt
@ -354,6 +360,11 @@ sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
cp -f mysql_config.tmp ${RPM_BUILD_ROOT}%{_bindir}/mysql_config
chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/mysql_config
# install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files,
# but that's pretty wacko --- see also mysql-file-contents.patch)
install -m 644 Docs/INFO_SRC ${RPM_BUILD_ROOT}%{_libdir}/mysql/
install -m 644 Docs/INFO_BIN ${RPM_BUILD_ROOT}%{_libdir}/mysql/
mkdir -p $RPM_BUILD_ROOT/var/log
touch $RPM_BUILD_ROOT/var/log/mysqld.log
@ -590,6 +601,9 @@ fi
/usr/libexec/mysqld
%{_libdir}/mysql/INFO_SRC
%{_libdir}/mysql/INFO_BIN
%{_libdir}/mysql/mysqlbug
%{_libdir}/mysql/plugin
@ -677,6 +691,13 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
* Mon Feb 27 2012 Tom Lane <tgl@redhat.com> 5.5.21-1
- Update to MySQL 5.5.21, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-21.html
- Hack openssl regression test to still work with rawhide's openssl
- Fix assorted failures in post-install regression tests (mysql-test RPM)
Resolves: #789530
* Fri Feb 10 2012 Tom Lane <tgl@redhat.com> 5.5.20-2
- Revise our test-disabling method to make it possible to disable tests on a
platform-specific basis, and also to get rid of mysql-disable-test.patch,

View File

@ -1 +1 @@
5968913aa16e7ec207c3e3ab1d6ff0f0 mysql-5.5.20-nodocs.tar.gz
fe73067444e4cc8cdf95b0f32a92363b mysql-5.5.21-nodocs.tar.gz