From 9d8b44262de89f8d84228366c566d0188b32f528 Mon Sep 17 00:00:00 2001 From: Honza Horák Date: Oct 09 2013 15:55:08 +0000 Subject: Update to 5.6.14 --- diff --git a/.gitignore b/.gitignore index e6e27bc..bd19720 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /mysql-man-gpl.tar.gz /mysql-5.5.32-nodocs.tar.xz /mysql-5.5.33-nodocs.tar.xz +/mysql-5.6.14-nodocs.tar.xz diff --git a/MySQL.tmpfiles.d b/MySQL.tmpfiles.d deleted file mode 100644 index 74cd5f8..0000000 --- a/MySQL.tmpfiles.d +++ /dev/null @@ -1 +0,0 @@ -d /var/run/mysqld 0755 mysql mysql - diff --git a/community-mysql-5.6.10-libmysql-version.patch b/community-mysql-5.6.10-libmysql-version.patch new file mode 100644 index 0000000..66994e7 --- /dev/null +++ b/community-mysql-5.6.10-libmysql-version.patch @@ -0,0 +1,150 @@ +--- mysql-5.6.10/libmysql/libmysql.ver.in 2013-01-22 17:54:50.000000000 +0100 ++++ mysql-5.6.10/libmysql/libmysql.ver.in.fedora 2013-02-21 12:59:40.108881131 +0100 +@@ -1,1 +1,146 @@ +-libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; ++# symbols exported from mysql 5.1 ++libmysqlclient_16 { ++ global: ++ _fini; ++ _init; ++ my_init; ++ myodbc_remove_escape; ++ mysql_affected_rows; ++ mysql_autocommit; ++ mysql_change_user; ++ mysql_character_set_name; ++ mysql_close; ++ mysql_commit; ++ mysql_data_seek; ++ mysql_debug; ++ mysql_dump_debug_info; ++ mysql_embedded; ++ mysql_eof; ++ mysql_errno; ++ mysql_error; ++ mysql_escape_string; ++ mysql_fetch_field; ++ mysql_fetch_field_direct; ++ mysql_fetch_fields; ++ mysql_fetch_lengths; ++ mysql_fetch_row; ++ mysql_field_count; ++ mysql_field_seek; ++ mysql_field_tell; ++ mysql_free_result; ++ mysql_get_character_set_info; ++ mysql_get_client_info; ++ mysql_get_client_version; ++ mysql_get_host_info; ++ mysql_get_parameters; ++ mysql_get_proto_info; ++ mysql_get_server_info; ++ mysql_get_server_version; ++ mysql_get_ssl_cipher; ++ mysql_hex_string; ++ mysql_info; ++ mysql_init; ++ mysql_insert_id; ++ mysql_kill; ++ mysql_list_dbs; ++ mysql_list_fields; ++ mysql_list_processes; ++ mysql_list_tables; ++ mysql_more_results; ++ mysql_next_result; ++ mysql_num_fields; ++ mysql_num_rows; ++ mysql_options; ++ mysql_ping; ++ mysql_query; ++ mysql_read_query_result; ++ mysql_real_connect; ++ mysql_real_escape_string; ++ mysql_real_query; ++ mysql_refresh; ++ mysql_rollback; ++ mysql_row_seek; ++ mysql_row_tell; ++ mysql_select_db; ++ mysql_send_query; ++ mysql_server_end; ++ mysql_server_init; ++ mysql_set_character_set; ++ mysql_set_local_infile_default; ++ mysql_set_local_infile_handler; ++ mysql_set_server_option; ++ mysql_shutdown; ++ mysql_sqlstate; ++ mysql_ssl_set; ++ mysql_stat; ++ mysql_stmt_affected_rows; ++ mysql_stmt_attr_get; ++ mysql_stmt_attr_set; ++ mysql_stmt_bind_param; ++ mysql_stmt_bind_result; ++ mysql_stmt_close; ++ mysql_stmt_data_seek; ++ mysql_stmt_errno; ++ mysql_stmt_error; ++ mysql_stmt_execute; ++ mysql_stmt_fetch; ++ mysql_stmt_fetch_column; ++ mysql_stmt_field_count; ++ mysql_stmt_free_result; ++ mysql_stmt_init; ++ mysql_stmt_insert_id; ++ mysql_stmt_num_rows; ++ mysql_stmt_param_count; ++ mysql_stmt_param_metadata; ++ mysql_stmt_prepare; ++ mysql_stmt_reset; ++ mysql_stmt_result_metadata; ++ mysql_stmt_row_seek; ++ mysql_stmt_row_tell; ++ mysql_stmt_send_long_data; ++ mysql_stmt_sqlstate; ++ mysql_stmt_store_result; ++ mysql_store_result; ++ mysql_thread_end; ++ mysql_thread_id; ++ mysql_thread_init; ++ mysql_thread_safe; ++ mysql_use_result; ++ mysql_warning_count; ++# These are documented in Paul DuBois' MySQL book, so we treat them as part ++# of the de-facto API. ++ free_defaults; ++ handle_options; ++ load_defaults; ++ my_print_help; ++# This isn't really documented anywhere, but it seems to be part of the ++# de-facto API as well. We're not going to export the deprecated version ++# make_scrambled_password, however. ++ my_make_scrambled_password; ++# This really shouldn't be exported, but some applications use it as a ++# workaround for inadequate threading support; see bug #846602 ++ THR_KEY_mysys; ++ local: ++ *; ++}; ++# symbols added in mysql 5.5 ++libmysqlclient_18 { ++ global: ++ mysql_client_find_plugin; ++ mysql_client_register_plugin; ++ mysql_load_plugin; ++ mysql_load_plugin_v; ++ mysql_plugin_options; ++ mysql_stmt_next_result; ++# ++# Ideally the following symbols wouldn't be exported, but various applications ++# require them. ++# ++# mysql-connector-odbc requires these ++ default_charset_info; ++ get_charset; ++ get_charset_by_csname; ++ net_realloc; ++# PHP's mysqli.so requires this (via the ER() macro) ++ client_errors; ++}; diff --git a/community-mysql-5.6.11-cipherspec.patch b/community-mysql-5.6.11-cipherspec.patch new file mode 100644 index 0000000..a79e5b3 --- /dev/null +++ b/community-mysql-5.6.11-cipherspec.patch @@ -0,0 +1,120 @@ +Some test items assume the default SSL cipher is DHE-RSA-AES256-SHA, +which is no longer the case as of openssl 1.0.1. +This patch enhances connect command by an option to specify a cipher +and tests are adjusted to specify the expected cipher explicitly. +Upstream bug report: http://bugs.mysql.com/bug.php?id=64461 + +diff --git a/client/mysqltest.cc b/client/mysqltest.cc +index b6c8643..0e40b0d 100644 +--- a/client/mysqltest.cc ++++ b/client/mysqltest.cc +@@ -5496,6 +5496,7 @@ void do_connect(struct st_command *command) + my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0; + my_bool con_secure_auth= 1; + struct st_connection* con_slot; ++ char *con_cipher=NULL; + + static DYNAMIC_STRING ds_connection_name; + static DYNAMIC_STRING ds_host; +@@ -5588,6 +5589,8 @@ void do_connect(struct st_command *command) + con_cleartext_enable= 1; + else if (!strncmp(con_options, "SKIPSECUREAUTH",14)) + con_secure_auth= 0; ++ else if (!strncmp(con_options, "CIPHER:", 7)) ++ con_cipher = con_options + 7; + else + die("Illegal option to connect: %.*s", + (int) (end - con_options), con_options); +@@ -5635,8 +5638,11 @@ void do_connect(struct st_command *command) + if (con_ssl) + { + #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) ++ /* default cipher */ ++ if (con_cipher == NULL && opt_ssl_cipher != NULL) ++ con_cipher = opt_ssl_cipher; + mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, +- opt_ssl_capath, opt_ssl_cipher); ++ opt_ssl_capath, con_cipher); + mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl); + mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath); + #if MYSQL_VERSION_ID >= 50000 +diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test +index 3e907f1..02b89ad 100644 +--- a/mysql-test/t/openssl_1.test ++++ b/mysql-test/t/openssl_1.test +@@ -20,13 +20,13 @@ grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA + grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; + flush privileges; + +-connect (con1,localhost,ssl_user1,,,,,SSL); +-connect (con2,localhost,ssl_user2,,,,,SSL); +-connect (con3,localhost,ssl_user3,,,,,SSL); +-connect (con4,localhost,ssl_user4,,,,,SSL); ++connect (con1,localhost,ssl_user1,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); ++connect (con2,localhost,ssl_user2,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); ++connect (con3,localhost,ssl_user3,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); ++connect (con4,localhost,ssl_user4,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); + --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT + --error ER_ACCESS_DENIED_ERROR +-connect (con5,localhost,ssl_user5,,,,,SSL); ++connect (con5,localhost,ssl_user5,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); + + connection con1; + # Check ssl turned on +@@ -125,7 +125,7 @@ drop table t1; + # 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 ++--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 + --echo End of 5.0 tests + + # +@@ -250,7 +250,7 @@ select 'is still running; no cipher request crashed the server' as result from d + + GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509; + FLUSH PRIVILEGES; +-connect(con1,localhost,bug42158,,,,,SSL); ++connect(con1,localhost,bug42158,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); + SHOW STATUS LIKE 'Ssl_cipher'; + disconnect con1; + connection default; +diff --git a/mysql-test/t/ssl.test b/mysql-test/t/ssl.test +index ea8be39..c61ca8b 100644 +--- a/mysql-test/t/ssl.test ++++ b/mysql-test/t/ssl.test +@@ -8,7 +8,7 @@ + # Save the initial number of concurrent sessions + --source include/count_sessions.inc + +-connect (ssl_con,localhost,root,,,,,SSL); ++connect (ssl_con,localhost,root,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); + + # Check ssl turned on + SHOW STATUS LIKE 'Ssl_cipher'; +diff --git a/mysql-test/t/ssl_8k_key.test b/mysql-test/t/ssl_8k_key.test +index d94c2fc..c27ca58 100644 +--- a/mysql-test/t/ssl_8k_key.test ++++ b/mysql-test/t/ssl_8k_key.test +@@ -4,7 +4,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 --git a/mysql-test/t/ssl_compress.test b/mysql-test/t/ssl_compress.test +index 2cb4c0d..feaa0e7 100644 +--- a/mysql-test/t/ssl_compress.test ++++ b/mysql-test/t/ssl_compress.test +@@ -9,7 +9,7 @@ + # Save the initial number of concurrent sessions + --source include/count_sessions.inc + +-connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS); ++connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS CIPHER:DHE-RSA-AES256-SHA); + + # Check ssl turned on + SHOW STATUS LIKE 'Ssl_cipher'; diff --git a/community-mysql-5.6.13-major.patch b/community-mysql-5.6.13-major.patch new file mode 100644 index 0000000..8d65acf --- /dev/null +++ b/community-mysql-5.6.13-major.patch @@ -0,0 +1,11 @@ +--- mysql-5.6.13/cmake/mysql_version.cmake.orig 2013-08-15 13:48:26.177017731 +0200 ++++ mysql-5.6.13/cmake/mysql_version.cmake 2013-08-15 13:49:35.478949928 +0200 +@@ -17,7 +17,7 @@ + # Global constants, only to be changed between major releases. + # + +-SET(SHARED_LIB_MAJOR_VERSION "18") ++SET(SHARED_LIB_MAJOR_VERSION "1018") + SET(SHARED_LIB_MINOR_VERSION "1") + SET(PROTOCOL_VERSION "10") + SET(DOT_FRM_VERSION "6") diff --git a/community-mysql-5.6.13-mtr-secure-file.patch b/community-mysql-5.6.13-mtr-secure-file.patch new file mode 100644 index 0000000..fa3cf8e --- /dev/null +++ b/community-mysql-5.6.13-mtr-secure-file.patch @@ -0,0 +1,115 @@ +------------------------------------------------------------ +revno: 5459 +committer: horst.hunger@oracle.com +branch nick: mysql-trunk +timestamp: Tue 2013-04-02 11:24:05 +0200 +message: + Changes concerning secure-file-prev. +diff: +=== added file 'mysql-test/suite/parts/t/partition_max_parts_hash_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_hash_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_hash_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_hash_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_hash_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_hash_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_inv_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_inv_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_inv_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_inv_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_inv_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_inv_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_key_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_key_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_key_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_key_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_key_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_key_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_list_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_list_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_list_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_list_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_list_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_list_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_range_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_range_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_range_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_parts_range_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_parts_range_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_parts_range_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_key_list_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_key_list_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_key_list_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_key_list_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_key_list_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_key_list_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_key_range_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_key_range_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_key_range_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_key_range_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_key_range_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_key_range_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_list_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_list_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_list_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_list_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_list_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_list_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_range_innodb-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_range_innodb-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_range_innodb-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR + +=== added file 'mysql-test/suite/parts/t/partition_max_sub_parts_range_myisam-master.opt' +--- mysql-test/suite/parts/t/partition_max_sub_parts_range_myisam-master.opt 1970-01-01 00:00:00 +0000 ++++ mysql-test/suite/parts/t/partition_max_sub_parts_range_myisam-master.opt revid:horst.hunger@oracle.com-20130402092405-rqh6m9smqjwozxh4 +@@ -0,0 +1,1 @@ ++--secure-file-priv=$MYSQL_TMP_DIR diff --git a/community-mysql-5.6.13-truncate-file.patch b/community-mysql-5.6.13-truncate-file.patch new file mode 100644 index 0000000..4bbeece --- /dev/null +++ b/community-mysql-5.6.13-truncate-file.patch @@ -0,0 +1,21 @@ +Unneccesary use of Env module in Perl code in a test + +Code used Env just to get the value of a single environment variable, +causing the test to fail on systems which does not have this +installed. This use is overkill, can easily be replaced by standard +access via the ENV hash. + +diff -up mysql-test/include/truncate_file.inc.orig mysql-test/include/truncate_file.inc +--- mysql-test/include/truncate_file.inc.orig 2013-08-23 12:25:33.216534033 +0200 ++++ mysql-test/include/truncate_file.inc 2013-08-23 12:15:34.583327832 +0200 +@@ -9,8 +9,7 @@ if (!$file) + let TRUNCATE_FILE= $file; + + perl; +-use Env; +-Env::import('TRUNCATE_FILE'); +-open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file"; ++my $file= $ENV{'TRUNCATE_FILE'}; ++open FILE, '>', $file || die "Can not open file $file"; + close FILE; + EOF diff --git a/community-mysql-5.6.14-mysql-install.patch b/community-mysql-5.6.14-mysql-install.patch new file mode 100644 index 0000000..b8201f8 --- /dev/null +++ b/community-mysql-5.6.14-mysql-install.patch @@ -0,0 +1,239 @@ +diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in +index c142d4f..f1f2891 100644 +--- a/scripts/mysql_install_db.pl.in ++++ b/scripts/mysql_install_db.pl.in +@@ -34,13 +34,35 @@ + # + ############################################################################## + +-use Fcntl; +-use File::Basename; +-use File::Copy; +-use Getopt::Long; +-use Sys::Hostname; +-use Data::Dumper; + use strict; ++use warnings; ++ ++############################################################################## ++# Check if all needed modules are available, exit if something is missing. ++############################################################################## ++ ++BEGIN { ++ my @req_mods = ('Fcntl', 'File::Basename', 'File::Copy', 'Getopt::Long', ++ 'Sys::Hostname', 'Data::Dumper'); ++ my @missing_mods; ++ my $req; ++ foreach $req (@req_mods) { ++ eval 'require ' . $req; ++ if ($@) { ++ push(@missing_mods, $req); ++ } else { ++ $req->import(); ++ } ++ } ++ # this avoids the confusing "BEGIN failed--compilation aborted" message ++ local $SIG{__DIE__} = sub {warn @_; exit 1}; ++ ++ if (@missing_mods) { ++ my $msg = "FATAL ERROR: please install the following Perl modules " . ++ "before executing $0:\n" . join("\n",@missing_mods)."\n"; ++ die $msg; ++ } ++} + + Getopt::Long::Configure("pass_through"); + +@@ -75,6 +97,8 @@ Usage: $0 [OPTIONS] + --help Display this help and exit. + --ldata=path The path to the MySQL data directory. Same as --datadir. + --no-defaults Don't read default options from any option file. ++ --keep-my-cnf Don't try to create my.cnf based on template. ++ Useful for systems with working, updated my.cnf. + EOF1 + if ( $^O !~ m/^(MSWin32|cygwin)$/ ) { + print <{srcdir} and $opt->{basedir} ) + { + error($opt,"Specify either --basedir or --srcdir, not both"); + } ++if ( $opt->{rpm} || $opt->{'keep-my-cnf'} ) ++{ ++ $keep_my_cnf = 1; ++} + if ( $opt->{srcdir} ) + { + $opt->{builddir} = $opt->{srcdir} unless $opt->{builddir}; +@@ -425,13 +462,18 @@ my $config_file; + my $copy_cfg_file; + + # ---------------------------------------------------------------------- +-# This will be the default config file ++# This will be the default config file (unless creation is unwanted) + # ---------------------------------------------------------------------- + + $config_file= "$basedir/my.cnf"; + + my $cfg_template= find_in_basedir($opt,"file","my-default.cnf", + "share","share/mysql","support-files"); ++# Distros might move files ++if ((! -r $cfg_template) && (-r "@pkgdatadir@/my-default.cnf")) { ++ $cfg_template = "@pkgdatadir@/my-default.cnf"; ++} ++ + -e $cfg_template or cannot_find_file("my-default.cnf"); + + $copy_cfg_file= $config_file; +@@ -441,22 +483,21 @@ if (-e $copy_cfg_file) + $copy_cfg_file =~ s/my.cnf/my-new.cnf/; + # Too early to print warning here, the user may not notice + } +-open (TEMPL, $cfg_template) or error($opt, "Could not open config template $cfg_template"); +-if (open (CFG, "> $copy_cfg_file")) +-{ +- while () +- { +- # Remove lines beginning with # *** which are template comments +- print CFG $_ unless /^# \*\*\*/; ++ ++if ( ! $keep_my_cnf ) { ++ open (TEMPL, $cfg_template) or error($opt, "Could not open config template $cfg_template"); ++ if (open (CFG, "> $copy_cfg_file")) { ++ while () { ++ # Remove lines beginning with # *** which are template comments ++ print CFG $_ unless /^# \*\*\*/; ++ } ++ close CFG; ++ } else { ++ warning($opt,"Could not write to config file $copy_cfg_file: $!"); ++ $failed_write_cfg= 1; + } +- close CFG; ++ close TEMPL; + } +-else +-{ +- warning($opt,"Could not write to config file $copy_cfg_file: $!"); +- $failed_write_cfg= 1; +-} +-close TEMPL; + + # ---------------------------------------------------------------------- + # Now we can get arguments from the groups [mysqld] and [mysql_install_db] +@@ -619,7 +660,7 @@ if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ ) + } + + # ---------------------------------------------------------------------- +-# Create database directories mysql & test ++# Create database directory mysql + # ---------------------------------------------------------------------- + + # FIXME The shell variant uses "mkdir -p": +@@ -652,7 +693,7 @@ if ($opt_user) + } + } + +-foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" ) ++foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql") + { + mkdir($dir, 0700) unless -d $dir; + if ($opt_user and -w "/") +@@ -838,15 +879,26 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") ) + " cd mysql-test ; perl mysql-test-run.pl"); + } + report($opt, +- "Please report any problems with the " . '@scriptdir@' . "/mysqlbug script!", +- "", + "The latest information about MySQL is available on the web at", + "", + " http://www.mysql.com", + "", +- "Support MySQL by buying support/licenses at http://shop.mysql.com"); ++ "Please visit", ++ "", ++ " http://bugs.mysql.com/", ++ "", ++ "to report bugs. This database is public and can be browsed", ++ "and searched by anyone. If you log in to the system", ++ "you can enter new reports."); ++ + +- if ($copy_cfg_file eq $config_file and !$failed_write_cfg) ++ if ($keep_my_cnf) ++ { ++ report($opt, ++ "Note: new default config file not created.", ++ "Please make sure your config file is current"); ++ } ++ elsif ($copy_cfg_file eq $config_file and !$failed_write_cfg) + { + report($opt, + "New default config file was created as $config_file and", +@@ -900,9 +952,15 @@ else + "http://www.mysql.com", + "Please consult the MySQL manual section: 'Problems running mysql_install_db',", + "and the manual section that describes problems on your OS.", +- "Another information source is the MySQL email archive.", +- "Please check all of the above before mailing us!", +- "And if you do mail us, you MUST use the " . '@scriptdir@' . "/mysqlbug script!") ++ "Another information source is our bug database.", ++ "Please visit", ++ "", ++ " http://bugs.mysql.com/", ++ "", ++ "to report bugs. This database is public and can be browsed", ++ "and searched by anyone. If you log in to the system you can", ++ "enter new reports."); ++ + } + + ############################################################################## diff --git a/community-mysql-cipherspec.patch b/community-mysql-cipherspec.patch deleted file mode 100644 index 5210055..0000000 --- a/community-mysql-cipherspec.patch +++ /dev/null @@ -1,115 +0,0 @@ -Some test items assume the default SSL cipher is DHE-RSA-AES256-SHA, -which is no longer the case as of openssl 1.0.1. -This patch enhances connect command by an option to specify a cipher -and tests are adjusted to specify the expected cipher explicitly. -Upstream bug report: http://bugs.mysql.com/bug.php?id=64461 - -diff -up mysql-5.5.28/client/mysqltest.cc.p18 mysql-5.5.28/client/mysqltest.cc ---- mysql-5.5.28/client/mysqltest.cc.p18 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/client/mysqltest.cc 2012-12-06 14:25:46.370001422 +0100 -@@ -5458,6 +5458,7 @@ void do_connect(struct st_command *comma - my_bool con_ssl= 0, con_compress= 0; - my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0; - struct st_connection* con_slot; -+ char *con_cipher=NULL; - - static DYNAMIC_STRING ds_connection_name; - static DYNAMIC_STRING ds_host; -@@ -5548,6 +5549,8 @@ void do_connect(struct st_command *comma - con_shm= 1; - else if (!strncmp(con_options, "CLEARTEXT", 9)) - con_cleartext_enable= 1; -+ else if (!strncmp(con_options, "CIPHER:", 7)) -+ con_cipher = con_options + 7; - else - die("Illegal option to connect: %.*s", - (int) (end - con_options), con_options); -@@ -5595,8 +5598,11 @@ void do_connect(struct st_command *comma - if (con_ssl) - { - #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) -+ /* default cipher */ -+ if (con_cipher == NULL && opt_ssl_cipher != NULL) -+ con_cipher = opt_ssl_cipher; - mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, -- opt_ssl_capath, opt_ssl_cipher); -+ opt_ssl_capath, con_cipher); - #if MYSQL_VERSION_ID >= 50000 - /* Turn on ssl_verify_server_cert only if host is "localhost" */ - opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost"); -diff -up mysql-5.5.28/mysql-test/t/openssl_1.test.p18 mysql-5.5.28/mysql-test/t/openssl_1.test ---- mysql-5.5.28/mysql-test/t/openssl_1.test.p18 2012-08-29 10:50:47.000000000 +0200 -+++ mysql-5.5.28/mysql-test/t/openssl_1.test 2012-12-06 14:25:46.371001424 +0100 -@@ -20,13 +20,13 @@ grant select on test.* to ssl_user4@loca - grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; - flush privileges; - --connect (con1,localhost,ssl_user1,,,,,SSL); --connect (con2,localhost,ssl_user2,,,,,SSL); --connect (con3,localhost,ssl_user3,,,,,SSL); --connect (con4,localhost,ssl_user4,,,,,SSL); -+connect (con1,localhost,ssl_user1,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); -+connect (con2,localhost,ssl_user2,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); -+connect (con3,localhost,ssl_user3,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); -+connect (con4,localhost,ssl_user4,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); - --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT - --error ER_ACCESS_DENIED_ERROR --connect (con5,localhost,ssl_user5,,,,,SSL); -+connect (con5,localhost,ssl_user5,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); - - connection con1; - # Check ssl turned on -@@ -125,7 +125,7 @@ drop table t1; - # 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 -+--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 - --echo End of 5.0 tests - - # -@@ -250,7 +250,7 @@ select 'is still running; no cipher requ - - GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509; - FLUSH PRIVILEGES; --connect(con1,localhost,bug42158,,,,,SSL); -+connect(con1,localhost,bug42158,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); - SHOW STATUS LIKE 'Ssl_cipher'; - disconnect con1; - connection default; -diff -up mysql-5.5.28/mysql-test/t/ssl_8k_key.test.p18 mysql-5.5.28/mysql-test/t/ssl_8k_key.test ---- mysql-5.5.28/mysql-test/t/ssl_8k_key.test.p18 2012-08-29 10:50:47.000000000 +0200 -+++ mysql-5.5.28/mysql-test/t/ssl_8k_key.test 2012-12-06 14:25:46.371001424 +0100 -@@ -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 -up mysql-5.5.28/mysql-test/t/ssl_compress.test.p18 mysql-5.5.28/mysql-test/t/ssl_compress.test ---- mysql-5.5.28/mysql-test/t/ssl_compress.test.p18 2012-08-29 10:50:47.000000000 +0200 -+++ mysql-5.5.28/mysql-test/t/ssl_compress.test 2012-12-06 14:25:46.371001424 +0100 -@@ -7,7 +7,7 @@ - # Save the initial number of concurrent sessions - --source include/count_sessions.inc - --connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS); -+connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS CIPHER:DHE-RSA-AES256-SHA); - - # Check ssl turned on - SHOW STATUS LIKE 'Ssl_cipher'; -diff -up mysql-5.5.28/mysql-test/t/ssl.test.p18 mysql-5.5.28/mysql-test/t/ssl.test ---- mysql-5.5.28/mysql-test/t/ssl.test.p18 2012-08-29 10:50:47.000000000 +0200 -+++ mysql-5.5.28/mysql-test/t/ssl.test 2012-12-06 14:25:46.371001424 +0100 -@@ -6,7 +6,7 @@ - # Save the initial number of concurrent sessions - --source include/count_sessions.inc - --connect (ssl_con,localhost,root,,,,,SSL); -+connect (ssl_con,localhost,root,,,,,SSL CIPHER:DHE-RSA-AES256-SHA); - - # Check ssl turned on - SHOW STATUS LIKE 'Ssl_cipher'; diff --git a/community-mysql-covscan-stroverflow.patch b/community-mysql-covscan-stroverflow.patch index d671b45..1cfd490 100644 --- a/community-mysql-covscan-stroverflow.patch +++ b/community-mysql-covscan-stroverflow.patch @@ -1,15 +1,15 @@ The following problems have been found by Coverity - static analysis tool. -mysql-5.5.31/plugin/semisync/semisync_master.cc:672:parameter_as_source – Note: This defect has an elevated risk because the source argument is a parameter of the current function. +mysql-5.5.31/plugin/semisync/semisync_master.cc:672:parameter_as_source – Note: This defect has an elevated risk because the source argument is a parameter of the current function. -mysql-5.5.31/plugin/semisync/semisync_master.cc:661:parameter_as_source – Note: This defect has an elevated risk because the source argument is a parameter of the current function. +mysql-5.5.31/plugin/semisync/semisync_master.cc:661:parameter_as_source – Note: This defect has an elevated risk because the source argument is a parameter of the current function. mysql-5.5.31/plugin/semisync/semisync_master.cc:555:parameter_as_source – Note: This defect has an elevated risk because the source argument is a parameter of the current function. -diff -up mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow mysql-5.5.31/plugin/semisync/semisync_master.cc ---- mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow 2013-06-17 09:04:47.214621154 +0200 -+++ mysql-5.5.31/plugin/semisync/semisync_master.cc 2013-06-17 09:08:32.189617218 +0200 -@@ -552,7 +552,8 @@ int ReplSemiSyncMaster::reportReplyBinlo +diff -up mysql-5.6.14/plugin/semisync/semisync_master.cc.p33 mysql-5.6.14/plugin/semisync/semisync_master.cc +--- mysql-5.6.14/plugin/semisync/semisync_master.cc.p33 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/plugin/semisync/semisync_master.cc 2013-10-09 15:29:03.550379533 +0200 +@@ -553,7 +553,8 @@ int ReplSemiSyncMaster::reportReplyBinlo if (need_copy_send_pos) { @@ -19,7 +19,7 @@ diff -up mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow mys reply_file_pos_ = log_file_pos; reply_file_name_inited_ = true; -@@ -658,7 +659,8 @@ int ReplSemiSyncMaster::commitTrx(const +@@ -681,7 +682,8 @@ int ReplSemiSyncMaster::commitTrx(const if (cmp <= 0) { /* This thd has a lower position, let's update the minimum info. */ @@ -29,7 +29,7 @@ diff -up mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow mys wait_file_pos_ = trx_wait_binlog_pos; rpl_semi_sync_master_wait_pos_backtraverse++; -@@ -669,7 +671,8 @@ int ReplSemiSyncMaster::commitTrx(const +@@ -692,7 +694,8 @@ int ReplSemiSyncMaster::commitTrx(const } else { @@ -39,35 +39,19 @@ diff -up mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow mys wait_file_pos_ = trx_wait_binlog_pos; wait_file_name_inited_ = true; - -mysql-5.5.31/sql/rpl_handler.cc:306:fixed_size_dest – You might overrun the 512 byte fixed-size string "log_info->log_file" by copying "log_file + dirname_length(log_file)" without checking the length. diff -up mysql-5.5.31/sql/rpl_handler.cc.covscan-stroverflow mysql-5.5.31/sql/rpl_handler.cc - ---- mysql-5.5.31/sql/rpl_handler.cc.covscan-stroverflow 2013-06-17 10:51:04.940509594 +0200 -+++ mysql-5.5.31/sql/rpl_handler.cc 2013-06-17 10:51:08.959509523 +0200 -@@ -303,7 +303,8 @@ int Binlog_storage_delegate::after_flush - my_pthread_setspecific_ptr(RPL_TRANS_BINLOG_INFO, log_info); - } - -- strcpy(log_info->log_file, log_file+dirname_length(log_file)); -+ strncpy(log_info->log_file, log_file+dirname_length(log_file), sizeof(log_info->log_file)-1); -+ log_info->log_file[sizeof(log_info->log_file)-1] = '\0'; - log_info->log_pos = log_pos; - - int ret= 0; - - -mysql-5.5.31/sql/sp_rcontext.h:87:buffer_size_warning – Calling strncpy with a maximum size argument of 512 bytes on destination array "this->m_message" of size 512 bytes might leave the destination string unterminated. - -diff -up mysql-5.5.31/sql/sp_rcontext.h.covscan-stroverflow mysql-5.5.31/sql/sp_rcontext.h ---- mysql-5.5.31/sql/sp_rcontext.h.covscan-stroverflow 2013-06-17 13:28:32.540344334 +0200 -+++ mysql-5.5.31/sql/sp_rcontext.h 2013-06-17 13:29:23.673343443 +0200 -@@ -84,7 +84,8 @@ public: - memcpy(m_sql_state, sqlstate, SQLSTATE_LENGTH); - m_sql_state[SQLSTATE_LENGTH]= '\0'; +mysql-5.5.31/sql/sp_rcontext.h:87:buffer_size_warning – Calling strncpy with a maximum size argument of 512 bytes on destination array "this->m_message" of size 512 bytes might leave the destination string unterminated. + +diff -up mysql-5.6.14/sql/rpl_handler.cc.p33 mysql-5.6.14/sql/rpl_handler.cc +diff -up mysql-5.6.14/sql/sp_rcontext.h.p33 mysql-5.6.14/sql/sp_rcontext.h +--- mysql-5.6.14/sql/sp_rcontext.h.p33 2013-10-09 15:29:03.552379535 +0200 ++++ mysql-5.6.14/sql/sp_rcontext.h 2013-10-09 15:29:53.367412814 +0200 +@@ -144,7 +144,8 @@ public: + memcpy(sql_state, _sql_state, SQLSTATE_LENGTH); + sql_state[SQLSTATE_LENGTH]= '\0'; -- strncpy(m_message, msg, MYSQL_ERRMSG_SIZE); -+ strncpy(m_message, msg, sizeof(m_message)-1); -+ m_message[sizeof(m_message)-1] = '\0'; - } +- strncpy(message, _message, MYSQL_ERRMSG_SIZE); ++ strncpy(message, _message, sizeof(message)-1); ++ message[sizeof(message)-1] = '\0'; + } + }; - void clear() diff --git a/community-mysql-cve-2013-1861.patch b/community-mysql-cve-2013-1861.patch index 75e35c3..cc4b74d 100644 --- a/community-mysql-cve-2013-1861.patch +++ b/community-mysql-cve-2013-1861.patch @@ -2,11 +2,11 @@ It seems CVE-2013-1861 has been fixed in MySQL upstream, but they don't ship a test case for that. This patch only includes the test case ported from MariaDB fix: https://mariadb.atlassian.net/browse/MDEV-4252 - -diff -up mysql-5.5.31/mysql-test/r/gis.result.cve mysql-5.5.31/mysql-test/r/gis.result ---- mysql-5.5.31/mysql-test/r/gis.result.cve 2013-06-03 16:32:33.732025515 +0200 -+++ mysql-5.5.31/mysql-test/r/gis.result 2013-06-03 16:34:04.519691044 +0200 -@@ -1113,4 +1113,19 @@ SELECT 1 FROM g1 WHERE a >= ANY + +diff -up mysql-5.6.14/mysql-test/r/gis.result.cve mysql-5.6.14/mysql-test/r/gis.result +--- mysql-5.6.14/mysql-test/r/gis.result.cve 2013-09-10 09:38:27.000000000 +0200 ++++ mysql-5.6.14/mysql-test/r/gis.result 2013-10-09 15:08:59.886598028 +0200 +@@ -1115,6 +1115,21 @@ SELECT 1 FROM g1 WHERE a >= ANY (SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ; 1 DROP TABLE g1; @@ -26,10 +26,12 @@ diff -up mysql-5.5.31/mysql-test/r/gis.result.cve mysql-5.5.31/mysql-test/r/gis. +astext(centroid(0x0100000000030000000100000000000010)) +NULL End of 5.5 tests -diff -up mysql-5.5.31/mysql-test/t/gis.test.cve mysql-5.5.31/mysql-test/t/gis.test ---- mysql-5.5.31/mysql-test/t/gis.test.cve 2013-06-03 16:32:33.733025512 +0200 -+++ mysql-5.5.31/mysql-test/t/gis.test 2013-06-03 16:34:38.942560749 +0200 -@@ -868,4 +868,11 @@ SELECT 1 FROM g1 WHERE a >= ANY + DROP DATABASE IF EXISTS gis_ogs; + CREATE DATABASE gis_ogs; +diff -up mysql-5.6.14/mysql-test/t/gis.test.cve mysql-5.6.14/mysql-test/t/gis.test +--- mysql-5.6.14/mysql-test/t/gis.test.cve 2013-09-10 09:38:27.000000000 +0200 ++++ mysql-5.6.14/mysql-test/t/gis.test 2013-10-09 15:08:59.886598028 +0200 +@@ -868,6 +868,13 @@ SELECT 1 FROM g1 WHERE a >= ANY DROP TABLE g1; @@ -41,3 +43,5 @@ diff -up mysql-5.5.31/mysql-test/t/gis.test.cve mysql-5.5.31/mysql-test/t/gis.te +select astext(exteriorring(0x0100000000030000000100000000000010)); +select astext(centroid(0x0100000000030000000100000000000010)); --echo End of 5.5 tests + + diff --git a/community-mysql-dubious-exports.patch b/community-mysql-dubious-exports.patch deleted file mode 100644 index 4a88d1d..0000000 --- a/community-mysql-dubious-exports.patch +++ /dev/null @@ -1,169 +0,0 @@ -Prefix mysql_ to the real names of several symbols that have to be exported -from libmysqlclient because mysql-connector-odbc and/or PHP depend on them. -This limits the intrusion on application namespace. - -Also, remove all traces of make_scrambled_password and -make_scrambled_password_323, so that references to these functions draw -compile-time warnings, per a suggestion from Paul Howarth in bug #690346. -It doesn't seem worth trying to get rid of all the internal symbols exposed -by mysql.h, but these two are relatively easy to get rid of. - - -diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc ---- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100 -@@ -21,6 +21,7 @@ - #include /* because of signal() */ - #include - #include -+#include /* my_make_scrambled_password_323, my_make_scrambled_password */ - #include - #include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ - -@@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql - } - } - if (old) -- make_scrambled_password_323(crypted_pw, typed_password); -+ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password)); - else -- make_scrambled_password(crypted_pw, typed_password); -+ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password)); - } - else - crypted_pw[0]=0; /* No password */ -diff -up mysql-5.5.28/include/errmsg.h.p8 mysql-5.5.28/include/errmsg.h ---- mysql-5.5.28/include/errmsg.h.p8 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/include/errmsg.h 2012-12-06 14:16:14.598520859 +0100 -@@ -24,6 +24,7 @@ extern "C" { - #endif - void init_client_errs(void); - void finish_client_errs(void); -+#define client_errors mysql_client_errors /* namespace sanity */ - extern const char *client_errors[]; /* Error messages */ - #ifdef __cplusplus - } -diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h ---- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100 -@@ -452,6 +452,7 @@ my_bool my_net_init(NET *net, Vio* vio); - void my_net_local_init(NET *net); - void net_end(NET *net); - void net_clear(NET *net, my_bool clear_buffer); -+#define net_realloc mysql_net_realloc /* namespace sanity */ - my_bool net_realloc(NET *net, size_t length); - my_bool net_flush(NET *net); - my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); -@@ -533,14 +534,12 @@ double my_rnd(struct rand_struct *); - void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); - - void hash_password(unsigned long *to, const char *password, unsigned int password_len); --void make_scrambled_password_323(char *to, const char *password); - void scramble_323(char *to, const char *message, const char *password); - my_bool check_scramble_323(const unsigned char *reply, const char *message, - unsigned long *salt); - void get_salt_from_password_323(unsigned long *res, const char *password); - void make_password_from_salt_323(char *to, const unsigned long *salt); - --void make_scrambled_password(char *to, const char *password); - void scramble(char *to, const char *message, const char *password); - my_bool check_scramble(const unsigned char *reply, const char *message, - const unsigned char *hash_stage2); -diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp ---- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100 -@@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio); - void my_net_local_init(NET *net); - void net_end(NET *net); - void net_clear(NET *net, my_bool clear_buffer); --my_bool net_realloc(NET *net, size_t length); -+my_bool mysql_net_realloc(NET *net, size_t length); - my_bool net_flush(NET *net); - my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); - my_bool net_write_command(NET *net,unsigned char command, -@@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un - double my_rnd(struct rand_struct *); - void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); - void hash_password(unsigned long *to, const char *password, unsigned int password_len); --void make_scrambled_password_323(char *to, const char *password); - void scramble_323(char *to, const char *message, const char *password); - my_bool check_scramble_323(const unsigned char *reply, const char *message, - unsigned long *salt); - void get_salt_from_password_323(unsigned long *res, const char *password); - void make_password_from_salt_323(char *to, const unsigned long *salt); --void make_scrambled_password(char *to, const char *password); - void scramble(char *to, const char *message, const char *password); - my_bool check_scramble(const unsigned char *reply, const char *message, - const unsigned char *hash_stage2); -diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h ---- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100 -+++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100 -@@ -218,6 +218,7 @@ extern uint my_large_page_size; - - /* charsets */ - #define MY_ALL_CHARSETS_SIZE 2048 -+#define default_charset_info mysql_default_charset_info /* namespace sanity */ - extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; - extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; - extern CHARSET_INFO compiled_charsets[]; -@@ -895,6 +896,9 @@ extern uint get_charset_number(const cha - extern uint get_collation_number(const char *name); - extern const char *get_charset_name(uint cs_number); - -+#define get_charset mysql_get_charset /* namespace sanity */ -+#define get_charset_by_csname mysql_get_charset_by_csname -+ - extern CHARSET_INFO *get_charset(uint cs_number, myf flags); - extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); - extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, -diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c ---- mysql-5.5.28/sql/password.c.p8 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/sql/password.c 2012-12-06 14:16:14.599520860 +0100 -@@ -155,23 +155,6 @@ void my_make_scrambled_password_323(char - - - /* -- Wrapper around my_make_scrambled_password_323() to maintain client lib ABI -- compatibility. -- In server code usage of my_make_scrambled_password_323() is preferred to -- avoid strlen(). -- SYNOPSIS -- make_scrambled_password_323() -- to OUT store scrambled password here -- password IN NULL-terminated string with user-supplied password --*/ -- --void make_scrambled_password_323(char *to, const char *password) --{ -- my_make_scrambled_password_323(to, password, strlen(password)); --} -- -- --/* - Scramble string with password. - Used in pre 4.1 authentication phase. - SYNOPSIS -@@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to - - - /* -- Wrapper around my_make_scrambled_password() to maintain client lib ABI -- compatibility. -- In server code usage of my_make_scrambled_password() is preferred to -- avoid strlen(). -- SYNOPSIS -- make_scrambled_password() -- buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string -- password IN NULL-terminated password string --*/ -- --void make_scrambled_password(char *to, const char *password) --{ -- my_make_scrambled_password(to, password, strlen(password)); --} -- -- --/* - Produce an obscure octet sequence from password and random - string, recieved from the server. This sequence corresponds to the - password, but password can not be easily restored from it. The sequence diff --git a/community-mysql-errno.patch b/community-mysql-errno.patch deleted file mode 100644 index ce9d7a1..0000000 --- a/community-mysql-errno.patch +++ /dev/null @@ -1,21 +0,0 @@ -"extern int errno" is just a really bad idea. - - -diff -up mysql-5.5.28/include/my_sys.h.p1 mysql-5.5.28/include/my_sys.h ---- mysql-5.5.28/include/my_sys.h.p1 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:09:15.218170154 +0100 -@@ -197,13 +197,8 @@ extern void my_large_free(uchar *ptr); - #define my_afree(PTR) my_free(PTR) - #endif /* HAVE_ALLOCA */ - --#ifndef errno /* did we already get it? */ --#ifdef HAVE_ERRNO_AS_DEFINE - #include /* errno is a define */ --#else --extern int errno; /* declare errno */ --#endif --#endif /* #ifndef errno */ -+ - extern char *home_dir; /* Home directory for user */ - extern const char *my_progname; /* program-name (printed in errors) */ - extern char curr_dir[]; /* Current directory for user */ diff --git a/community-mysql-expired-certs.patch b/community-mysql-expired-certs.patch index acd3a78..2418bea 100644 --- a/community-mysql-expired-certs.patch +++ b/community-mysql-expired-certs.patch @@ -553,3 +553,19 @@ diff -Naur mysql-5.1.50.orig/mysql-test/std_data/server8k-key.pem mysql-5.1.50/m +nlUJasA2psbqSBJ5OJ5zAkEA2UxoMju54hASjT54Z92IzraVw4Vo8CYwOcw5fr7z ++m5xg1mmWdLBclmZ+WjARzDuTHIW6u/WCxNGg42AykWzfw== -----END RSA PRIVATE KEY----- +diff -u mysql-5.6.10/mysql-test/r/ssl.result.orig mysql-5.6.10/mysql-test/r/ssl.result +--- mysql-5.6.10/mysql-test/r/ssl.result.orig 2013-03-04 09:50:24.227923768 +0100 ++++ mysql-5.6.10/mysql-test/r/ssl.result 2013-03-04 09:53:28.449873521 +0100 +@@ -3,10 +3,10 @@ + Ssl_cipher DHE-RSA-AES256-SHA + SHOW STATUS LIKE 'Ssl_server_not_before'; + Variable_name Value +-Ssl_server_not_before Jan 29 11:56:49 2010 GMT ++Ssl_server_not_before Feb 20 02:55:06 2010 GMT + SHOW STATUS LIKE 'Ssl_server_not_after'; + Variable_name Value +-Ssl_server_not_after Jan 28 11:56:49 2015 GMT ++Ssl_server_not_after Sep 3 02:55:06 2030 GMT + drop table if exists t1,t2,t3,t4; + CREATE TABLE t1 ( + Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, diff --git a/community-mysql-logrotate.patch b/community-mysql-logrotate.patch index f76237d..b5f5220 100644 --- a/community-mysql-logrotate.patch +++ b/community-mysql-logrotate.patch @@ -14,27 +14,27 @@ Adjust the mysql-log-rotate script in several ways: 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: +diff -up mysql-5.6.10/support-files/mysql-log-rotate.sh.orig mysql-5.6.10/support-files/mysql-log-rotate.sh +--- mysql-5.6.10/support-files/mysql-log-rotate.sh.orig 2013-01-22 17:54:50.000000000 +0100 ++++ mysql-5.6.10/support-files/mysql-log-rotate.sh 2013-02-19 15:27:28.448443077 +0100 +@@ -4,7 +4,7 @@ + # follows: # - # [safe_mysqld] --# err-log=@localstatedir@/mysqld.log -+# err-log=/var/log/mysqld.log + # [mysqld] +-# log-error=@localstatedir@/mysqld.log ++# log-error=/var/log/mysqld.log # - # If the root user has a password you have to create a - # /root/.my.cnf configuration file with the following -@@ -18,19 +18,21 @@ - # ATTENTION: This /root/.my.cnf should be readable ONLY - # for root ! + # In case the root user has a password, then you + # have to create a /root/.my.cnf configuration file +@@ -19,19 +19,21 @@ + # ATTENTION: The /root/.my.cnf file should be readable + # _ONLY_ by root ! -@localstatedir@/mysqld.log { - # create 600 mysql mysql - notifempty -- daily -- rotate 3 +- daily +- rotate 5 - missingok - compress - postrotate @@ -51,7 +51,7 @@ diff -Naur mysql-5.5.22.orig/support-files/mysql-log-rotate.sh mysql-5.5.22/supp +#/var/log/mysqld.log { +# create 640 mysql mysql +# notifempty -+# daily ++# daily +# rotate 3 +# missingok +# compress diff --git a/community-mysql-major.patch b/community-mysql-major.patch deleted file mode 100644 index 1b1071e..0000000 --- a/community-mysql-major.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mysql-5.5.30/cmake/mysql_version.cmake.major mysql-5.5.30/cmake/mysql_version.cmake ---- mysql-5.5.30/cmake/mysql_version.cmake.major 2013-03-11 18:32:45.326473598 +0100 -+++ mysql-5.5.30/cmake/mysql_version.cmake 2013-03-11 18:33:10.634472902 +0100 -@@ -17,7 +17,7 @@ - # Global constants, only to be changed between major releases. - # - --SET(SHARED_LIB_MAJOR_VERSION "18") -+SET(SHARED_LIB_MAJOR_VERSION "1018") - SET(PROTOCOL_VERSION "10") - SET(DOT_FRM_VERSION "6") - diff --git a/community-mysql-netdevname.patch b/community-mysql-netdevname.patch index af17f13..1cdd9f7 100644 --- a/community-mysql-netdevname.patch +++ b/community-mysql-netdevname.patch @@ -1,7 +1,7 @@ -diff -up mysql-5.5.15/mysys/my_gethwaddr.c.netdevname mysql-5.5.15/mysys/my_gethwaddr.c ---- mysql-5.5.15/mysys/my_gethwaddr.c.netdevname 2011-07-13 21:09:02.000000000 +0200 -+++ mysql-5.5.15/mysys/my_gethwaddr.c 2011-11-01 12:32:35.356119715 +0100 -@@ -68,28 +68,47 @@ err: +diff -up mysql-5.6.10/mysys/my_gethwaddr.c.orig mysql-5.6.10/mysys/my_gethwaddr.c +--- mysql-5.6.10/mysys/my_gethwaddr.c.orig 2013-01-22 17:54:49.000000000 +0100 ++++ mysql-5.6.10/mysys/my_gethwaddr.c 2013-02-19 15:19:48.632960900 +0100 +@@ -68,27 +68,47 @@ err: #include #include @@ -12,14 +12,14 @@ diff -up mysql-5.5.15/mysys/my_gethwaddr.c.netdevname mysql-5.5.15/mysys/my_geth int fd, res= 1; struct ifreq ifr; char zero_array[ETHER_ADDR_LEN] = {0}; -+ struct ifconf ifc; ++ struct ifconf ifc; + struct ifreq ifs[MAX_IFS], *ifri, *ifend; fd = socket(AF_INET, SOCK_DGRAM, 0); if (fd < 0) goto err; -- bzero(&ifr, sizeof(ifr)); +- memset(&ifr, 0, sizeof(ifr)); - strnmov(ifr.ifr_name, "eth0", sizeof(ifr.ifr_name) - 1); + ifc.ifc_len = sizeof(ifs); + ifc.ifc_req = ifs; @@ -28,10 +28,10 @@ diff -up mysql-5.5.15/mysys/my_gethwaddr.c.netdevname mysql-5.5.15/mysys/my_geth + close(fd); + goto err; + } -+ -+ memcpy(to, zero_array, ETHER_ADDR_LEN); - do ++ memcpy(to, zero_array, ETHER_ADDR_LEN); ++ + ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq)); + for (ifri = ifc.ifc_req; ifri < ifend; ifri++) { @@ -40,9 +40,9 @@ diff -up mysql-5.5.15/mysys/my_gethwaddr.c.netdevname mysql-5.5.15/mysys/my_geth { - memcpy(to, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); - res= memcmp(to, zero_array, ETHER_ADDR_LEN) ? 0 : 1; -+ bzero(&ifr, sizeof(ifr)); ++ memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, ifri->ifr_name, sizeof(ifr.ifr_name)); -+ ++ + /* Get HW address */ + if (ioctl(fd, SIOCGIFHWADDR, &ifr) >= 0) + { @@ -52,8 +52,7 @@ diff -up mysql-5.5.15/mysys/my_gethwaddr.c.netdevname mysql-5.5.15/mysys/my_geth + } } - } while (res && (errno == 0 || errno == ENODEV) && ifr.ifr_name[3]++ < '6'); -- + } + close(fd); err: - return res; diff --git a/community-mysql-plugin-bool.patch b/community-mysql-plugin-bool.patch deleted file mode 100644 index abea580..0000000 --- a/community-mysql-plugin-bool.patch +++ /dev/null @@ -1,42 +0,0 @@ -Fix plugin boolean variables to receive the value "1", not "-1", when they -are set to 1. Aside from being bizarre, the existing behavior is unportable: -machines where char is unsigned print "255" instead. Filed upstream at -http://bugs.mysql.com/bug.php?id=59905 - - -diff -up mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result.p10 mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result ---- mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result.p10 2012-08-29 10:50:47.000000000 +0200 -+++ mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2012-12-06 14:20:53.078755855 +0100 -@@ -45,7 +45,7 @@ set session rpl_semi_sync_master_enabled - ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL - select @@global.rpl_semi_sync_master_enabled; - @@global.rpl_semi_sync_master_enabled ---1 -+1 - select @@session.rpl_semi_sync_master_enabled; - ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable - show global variables like 'rpl_semi_sync_master_enabled'; -diff -up mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result.p10 mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result ---- mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result.p10 2012-08-29 10:50:47.000000000 +0200 -+++ mysql-5.5.28/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2012-12-06 14:20:53.078755855 +0100 -@@ -45,7 +45,7 @@ set session rpl_semi_sync_slave_enabled= - ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable and should be set with SET GLOBAL - select @@global.rpl_semi_sync_slave_enabled; - @@global.rpl_semi_sync_slave_enabled ---1 -+1 - select @@session.rpl_semi_sync_slave_enabled; - ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable - show global variables like 'rpl_semi_sync_slave_enabled'; -diff -up mysql-5.5.28/sql/sql_plugin.cc.p10 mysql-5.5.28/sql/sql_plugin.cc ---- mysql-5.5.28/sql/sql_plugin.cc.p10 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/sql/sql_plugin.cc 2012-12-06 14:20:53.078755855 +0100 -@@ -2094,7 +2094,7 @@ static int check_func_bool(THD *thd, str - goto err; - result= (int) tmp; - } -- *(my_bool *) save= -result; -+ *(my_bool *) save= result ? true : false; - return 0; - err: - return 1; diff --git a/community-mysql-plugin-test.patch b/community-mysql-plugin-test.patch deleted file mode 100644 index 6d6093d..0000000 --- a/community-mysql-plugin-test.patch +++ /dev/null @@ -1,96 +0,0 @@ -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.31/mysql-test/t/mysql_plugin-master.opt.p17 mysql-5.5.31/mysql-test/t/mysql_plugin-master.opt ---- mysql-5.5.31/mysql-test/t/mysql_plugin-master.opt.p17 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/mysql-test/t/mysql_plugin-master.opt 2013-04-19 13:38:23.761741532 +0200 -@@ -1 +1 @@ ----plugin-dir=$DAEMONEXAMPLE_DIR -+--plugin-dir=$MYSQLTEST_VARDIR/plugin -diff -up mysql-5.5.31/mysql-test/t/mysql_plugin.test.p17 mysql-5.5.31/mysql-test/t/mysql_plugin.test ---- mysql-5.5.31/mysql-test/t/mysql_plugin.test.p17 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/mysql-test/t/mysql_plugin.test 2013-04-19 13:38:25.606742145 +0200 -@@ -25,8 +25,10 @@ - # 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`; -+let $PLUGIN_BASEDIR=$DAEMONEXAMPLE_DIR; - - --disable_abort_on_error - -@@ -51,10 +53,11 @@ use File::Basename; - { - print FILE "let \$DAEMONEXAMPLE_DIR= $not_found;\n"; - } -- if ((!-e $plugindir_ini) || (!-r $plugindir_ini)) -- { -- print FILE "let \$PLUGIN_DIR= $not_found;\n"; -- } -+# This test doesn't work because $ENV{PLUGIN_DIR} is empty -+# if ((!-e $plugindir_ini) || (!-r $plugindir_ini)) -+# { -+# print FILE "let \$PLUGIN_DIR= $not_found;\n"; -+# } - close FILE; - EOF - -@@ -66,10 +69,14 @@ remove_file $MYSQL_TMP_DIR/mysqld.inc; - # 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/community-mysql -+--mkdir $PLUGIN_DIR -+--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/community-mysql/errmsg.sys -+--copy_file $PLUGIN_BASEDIR/libdaemon_example.so $PLUGIN_DIR/libdaemon_example.so -+--copy_file $PLUGIN_BASEDIR/daemon_example.ini $PLUGIN_DIR/daemon_example.ini -+ - - # 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 +107,7 @@ if ($PLUGIN_DIR == '') - - # 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. -@@ -184,7 +191,7 @@ SELECT * FROM mysql.plugin WHERE dl like - # 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 $PLUGIN_BASEDIR/$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. -@@ -361,8 +368,11 @@ replace_result $MYSQL_PLUGIN mysql_plugi - --remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - - # 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 $PLUGIN_DIR/daemon_example.ini -+--remove_file $PLUGIN_DIR/libdaemon_example.so -+--rmdir $PLUGIN_DIR -+--remove_file $MYSQLD_TMP_BASEDIR/share/errmsg.sys -+--rmdir $MYSQLD_TMP_BASEDIR/share/community-mysql -+--rmdir $MYSQLD_TMP_BASEDIR/share - - --enable_abort_on_error diff --git a/community-mysql-pluginerrmsg.patch b/community-mysql-pluginerrmsg.patch index 9e4461d..ae8c231 100644 --- a/community-mysql-pluginerrmsg.patch +++ b/community-mysql-pluginerrmsg.patch @@ -12,9 +12,9 @@ MySQL bug report: http://bugs.mysql.com/bug.php?id=51771 MariaDB bug report: https://mariadb.atlassian.net/browse/MDEV-4573 MariaDB fix: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3802 -diff -up mysql-5.5.33/include/mysql.h.p30 mysql-5.5.33/include/mysql.h ---- mysql-5.5.33/include/mysql.h.p30 2013-07-15 14:01:50.000000000 +0200 -+++ mysql-5.5.33/include/mysql.h 2013-08-20 17:26:56.745334059 +0200 +diff -up mysql-5.6.14/include/mysql.h.p34 mysql-5.6.14/include/mysql.h +--- mysql-5.6.14/include/mysql.h.p34 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/include/mysql.h 2013-10-09 15:33:04.523541478 +0200 @@ -134,6 +134,7 @@ typedef unsigned long long my_ulonglong; /* backward compatibility define - to be removed eventually */ @@ -23,19 +23,19 @@ diff -up mysql-5.5.33/include/mysql.h.p30 mysql-5.5.33/include/mysql.h typedef struct st_mysql_rows { struct st_mysql_rows *next; /* list of rows */ -diff -up mysql-5.5.33/mysql-test/r/plugin.result.p30 mysql-5.5.33/mysql-test/r/plugin.result ---- mysql-5.5.33/mysql-test/r/plugin.result.p30 2013-07-15 14:01:49.000000000 +0200 -+++ mysql-5.5.33/mysql-test/r/plugin.result 2013-08-20 17:26:56.746334059 +0200 -@@ -143,3 +143,5 @@ SELECT @@SESSION.example_double_thdvar; +diff -up mysql-5.6.14/mysql-test/r/plugin.result.p34 mysql-5.6.14/mysql-test/r/plugin.result +--- mysql-5.6.14/mysql-test/r/plugin.result.p34 2013-09-10 09:38:27.000000000 +0200 ++++ mysql-5.6.14/mysql-test/r/plugin.result 2013-10-09 15:33:04.523541478 +0200 +@@ -162,3 +162,5 @@ SELECT @@SESSION.example_double_thdvar; @@SESSION.example_double_thdvar 1000.500000 UNINSTALL PLUGIN example; +UNINSTALL PLUGIN MyISAM; +ERROR HY000: Built-in plugins cannot be deleted -diff -up mysql-5.5.33/mysql-test/t/plugin.test.p30 mysql-5.5.33/mysql-test/t/plugin.test ---- mysql-5.5.33/mysql-test/t/plugin.test.p30 2013-07-15 14:01:49.000000000 +0200 -+++ mysql-5.5.33/mysql-test/t/plugin.test 2013-08-20 17:26:56.746334059 +0200 -@@ -137,3 +137,10 @@ SET SESSION example_double_thdvar = 1000 +diff -up mysql-5.6.14/mysql-test/t/plugin.test.p34 mysql-5.6.14/mysql-test/t/plugin.test +--- mysql-5.6.14/mysql-test/t/plugin.test.p34 2013-09-10 09:38:27.000000000 +0200 ++++ mysql-5.6.14/mysql-test/t/plugin.test 2013-10-09 15:33:04.524541479 +0200 +@@ -160,3 +160,10 @@ SET SESSION example_double_thdvar = 1000 SELECT @@SESSION.example_double_thdvar; UNINSTALL PLUGIN example; @@ -46,10 +46,10 @@ diff -up mysql-5.5.33/mysql-test/t/plugin.test.p30 mysql-5.5.33/mysql-test/t/plu +--error ER_PLUGIN_DELETE_BUILTIN +UNINSTALL PLUGIN MyISAM; + -diff -up mysql-5.5.33/sql/share/errmsg-utf8.txt.p30 mysql-5.5.33/sql/share/errmsg-utf8.txt ---- mysql-5.5.33/sql/share/errmsg-utf8.txt.p30 2013-07-15 14:01:50.000000000 +0200 -+++ mysql-5.5.33/sql/share/errmsg-utf8.txt 2013-08-20 17:26:56.750334057 +0200 -@@ -6161,7 +6161,7 @@ WARN_NO_MASTER_INFO +diff -up mysql-5.6.14/sql/share/errmsg-utf8.txt.p34 mysql-5.6.14/sql/share/errmsg-utf8.txt +--- mysql-5.6.14/sql/share/errmsg-utf8.txt.p34 2013-09-10 09:38:26.000000000 +0200 ++++ mysql-5.6.14/sql/share/errmsg-utf8.txt 2013-10-09 15:33:04.525541480 +0200 +@@ -6235,7 +6235,7 @@ WARN_NO_MASTER_INFO WARN_OPTION_IGNORED eng "<%-.64s> option ignored" ger "Option <%-.64s> ignoriert" @@ -58,14 +58,14 @@ diff -up mysql-5.5.33/sql/share/errmsg-utf8.txt.p30 mysql-5.5.33/sql/share/errms eng "Built-in plugins cannot be deleted" ger "Eingebaute Plugins können nicht gelöscht werden" WARN_PLUGIN_BUSY -diff -up mysql-5.5.33/sql/sql_plugin.cc.p30 mysql-5.5.33/sql/sql_plugin.cc ---- mysql-5.5.33/sql/sql_plugin.cc.p30 2013-08-20 17:26:56.640334104 +0200 -+++ mysql-5.5.33/sql/sql_plugin.cc 2013-08-20 17:26:56.752334057 +0200 -@@ -1909,9 +1909,7 @@ bool mysql_uninstall_plugin(THD *thd, co +diff -up mysql-5.6.14/sql/sql_plugin.cc.p34 mysql-5.6.14/sql/sql_plugin.cc +--- mysql-5.6.14/sql/sql_plugin.cc.p34 2013-10-09 15:33:04.527541481 +0200 ++++ mysql-5.6.14/sql/sql_plugin.cc 2013-10-09 15:34:30.760598323 +0200 +@@ -1979,9 +1979,7 @@ bool mysql_uninstall_plugin(THD *thd, co } if (!plugin->plugin_dl) { -- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, +- push_warning(thd, Sql_condition::WARN_LEVEL_WARN, - WARN_PLUGIN_DELETE_BUILTIN, ER(WARN_PLUGIN_DELETE_BUILTIN)); - my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str); + my_error(ER_PLUGIN_DELETE_BUILTIN, MYF(0)); diff --git a/community-mysql-stack-guard.patch b/community-mysql-stack-guard.patch deleted file mode 100644 index c01c1a7..0000000 --- a/community-mysql-stack-guard.patch +++ /dev/null @@ -1,139 +0,0 @@ -mysql is not accounting for the "guard page" when setting thread stack size -requests. This is fatal on PPC systems, which may use guard pages as large -as 64K. This patch also documents the IA64 situation a bit better. - -Note: there are quite a few other setstacksize calls besides the two in -mysqld.cc; is it important to fix any of the others? - -Filed upstream at http://bugs.mysql.com/bug.php?id=35019 - - -diff -up mysql-5.5.28/sql/mysqld.cc.p5 mysql-5.5.28/sql/mysqld.cc ---- mysql-5.5.28/sql/mysqld.cc.p5 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/sql/mysqld.cc 2012-12-06 14:13:59.765407494 +0100 -@@ -2599,6 +2599,70 @@ static void init_signals(void) - } - - -+/* pthread_attr_setstacksize without so much platform-dependency */ -+/* returns the actual stack size if possible */ -+static size_t my_setstacksize(pthread_attr_t *attr, size_t stacksize) -+{ -+ size_t guard_size = 0; -+ -+#if defined(__ia64__) || defined(__ia64) -+ /* -+ On IA64, half of the requested stack size is used for "normal stack" -+ and half for "register stack". The space measured by check_stack_overrun -+ is the "normal stack", so double the request to make sure we have the -+ caller-expected amount of normal stack. -+ -+ NOTE: there is no guarantee that the register stack can't grow faster -+ than normal stack, so it's very unclear that we won't dump core due to -+ stack overrun despite check_stack_overrun's efforts. Experimentation -+ shows that in the execution_constants test, the register stack grows -+ less than half as fast as normal stack, but perhaps other scenarios are -+ less forgiving. If it turns out that more space is needed for the -+ register stack, that could be forced (rather inefficiently) by using a -+ multiplier higher than 2 here. -+ */ -+ stacksize *= 2; -+#endif -+ -+ /* -+ On many machines, the "guard space" is subtracted from the requested -+ stack size, and that space is quite large on some platforms. So add -+ it to our request, if we can find out what it is. -+ -+ FIXME: autoconfiscate use of pthread_attr_getguardsize -+ */ -+ if (pthread_attr_getguardsize(attr, &guard_size)) -+ guard_size = 0; /* if can't find it out, treat as 0 */ -+ -+ pthread_attr_setstacksize(attr, stacksize + guard_size); -+ -+ /* Retrieve actual stack size if possible */ -+#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE -+ { -+ size_t real_stack_size= 0; -+ /* We must ignore real_stack_size = 0 as Solaris 2.9 can return 0 here */ -+ if (pthread_attr_getstacksize(attr, &real_stack_size) == 0 && -+ real_stack_size > guard_size) -+ { -+ real_stack_size -= guard_size; -+ if (real_stack_size < stacksize) -+ { -+ if (global_system_variables.log_warnings) -+ sql_print_warning("Asked for %ld thread stack, but got %ld", -+ (long) stacksize, (long) real_stack_size); -+ stacksize= real_stack_size; -+ } -+ } -+ } -+#endif -+ -+#if defined(__ia64__) || defined(__ia64) -+ stacksize /= 2; -+#endif -+ return stacksize; -+} -+ -+ - static void start_signal_handler(void) - { - int error; -@@ -2609,15 +2673,7 @@ static void start_signal_handler(void) - #if !defined(HAVE_DEC_3_2_THREADS) - pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM); - (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); --#if defined(__ia64__) || defined(__ia64) -- /* -- Peculiar things with ia64 platforms - it seems we only have half the -- stack size in reality, so we have to double it here -- */ -- pthread_attr_setstacksize(&thr_attr,my_thread_stack_size*2); --#else -- pthread_attr_setstacksize(&thr_attr,my_thread_stack_size); --#endif -+ (void) my_setstacksize(&thr_attr,my_thread_stack_size); - #endif - - mysql_mutex_lock(&LOCK_thread_count); -@@ -4398,36 +4454,8 @@ int mysqld_main(int argc, char **argv) - unireg_abort(1); // Will do exit - - init_signals(); --#if defined(__ia64__) || defined(__ia64) -- /* -- Peculiar things with ia64 platforms - it seems we only have half the -- stack size in reality, so we have to double it here -- */ -- pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size*2); --#else -- pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size); --#endif - #ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE -- { -- /* Retrieve used stack size; Needed for checking stack overflows */ -- size_t stack_size= 0; -- pthread_attr_getstacksize(&connection_attrib, &stack_size); --#if defined(__ia64__) || defined(__ia64) -- stack_size/= 2; --#endif -- /* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */ -- if (stack_size && stack_size < my_thread_stack_size) -- { -- if (global_system_variables.log_warnings) -- sql_print_warning("Asked for %lu thread stack, but got %ld", -- my_thread_stack_size, (long) stack_size); --#if defined(__ia64__) || defined(__ia64) -- my_thread_stack_size= stack_size*2; --#else -- my_thread_stack_size= stack_size; --#endif -- } -- } -+ my_thread_stack_size = my_setstacksize(&connection_attrib,my_thread_stack_size); - #endif - - (void) thr_setconcurrency(concurrency); // 10 by default diff --git a/community-mysql-string-overflow.patch b/community-mysql-string-overflow.patch index eaa40f6..46e5db3 100644 --- a/community-mysql-string-overflow.patch +++ b/community-mysql-string-overflow.patch @@ -7,28 +7,27 @@ 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 -up mysql-5.5.28/sql/sql_prepare.cc.p20 mysql-5.5.28/sql/sql_prepare.cc ---- mysql-5.5.28/sql/sql_prepare.cc.p20 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/sql/sql_prepare.cc 2012-12-06 14:27:28.647087401 +0100 -@@ -2879,7 +2879,7 @@ void mysql_stmt_get_longdata(THD *thd, c +diff -up mysql-5.6.10/sql/sql_prepare.cc.orig mysql-5.6.10/sql/sql_prepare.cc +--- mysql-5.6.10/sql/sql_prepare.cc.orig 2013-01-22 17:54:50.000000000 +0100 ++++ mysql-5.6.10/sql/sql_prepare.cc 2013-02-19 15:50:53.257150632 +0100 +@@ -2956,7 +2956,7 @@ void mysql_stmt_get_longdata(THD *thd, c { stmt->state= Query_arena::STMT_ERROR; - stmt->last_errno= thd->stmt_da->sql_errno(); -- strncpy(stmt->last_error, thd->stmt_da->message(), MYSQL_ERRMSG_SIZE); -+ strncpy(stmt->last_error, thd->stmt_da->message(), sizeof(stmt->last_error)-1); + stmt->last_errno= thd->get_stmt_da()->sql_errno(); +- strncpy(stmt->last_error, thd->get_stmt_da()->message(), MYSQL_ERRMSG_SIZE); ++ strncpy(stmt->last_error, thd->get_stmt_da()->message(), sizeof(stmt->last_error)-1); } - thd->stmt_da= save_stmt_da; - thd->warning_info= save_warinig_info; + thd->set_stmt_da(save_stmt_da); Error: STRING_OVERFLOW: /builddir/build/BUILD/mysql-5.1.61/sql/sql_trigger.cc:2194: fixed_size_dest: You might overrun the 512 byte fixed-size string "this->m_parse_error_message" by copying "error_message" without checking the length. /builddir/build/BUILD/mysql-5.1.61/sql/sql_trigger.cc:2194: parameter_as_source: Note: This defect has an elevated risk because the source argument is a parameter of the current function. -diff -up mysql-5.5.28/sql/sql_trigger.cc.p20 mysql-5.5.28/sql/sql_trigger.cc ---- mysql-5.5.28/sql/sql_trigger.cc.p20 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/sql/sql_trigger.cc 2012-12-06 14:27:28.648087398 +0100 -@@ -2260,7 +2260,7 @@ void Table_triggers_list::mark_fields_us +diff -up mysql-5.6.10/sql/sql_trigger.cc.orig mysql-5.6.10/sql/sql_trigger.cc +--- mysql-5.6.10/sql/sql_trigger.cc.orig 2013-01-22 17:54:50.000000000 +0100 ++++ mysql-5.6.10/sql/sql_trigger.cc 2013-02-19 16:01:10.605885117 +0100 +@@ -2303,7 +2303,7 @@ void Table_triggers_list::mark_fields_us void Table_triggers_list::set_parse_error_message(char *error_message) { m_has_unparseable_trigger= true; @@ -37,21 +36,3 @@ diff -up mysql-5.5.28/sql/sql_trigger.cc.p20 mysql-5.5.28/sql/sql_trigger.cc } - - -Error: STRING_OVERFLOW: -/builddir/build/BUILD/mysql-5.1.61/storage/innodb_plugin/handler/ha_innodb.cc:6544: fixed_size_dest: You might overrun the 512 byte fixed-size string "name2" by copying "name" without checking the length. -/builddir/build/BUILD/mysql-5.1.61/storage/innodb_plugin/handler/ha_innodb.cc:6544: parameter_as_source: Note: This defect has an elevated risk because the source argument is a parameter of the current function. - -diff -up mysql-5.5.28/storage/innobase/handler/ha_innodb.cc.p20 mysql-5.5.28/storage/innobase/handler/ha_innodb.cc ---- mysql-5.5.28/storage/innobase/handler/ha_innodb.cc.p20 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/storage/innobase/handler/ha_innodb.cc 2012-12-06 14:27:28.653087416 +0100 -@@ -7054,7 +7054,7 @@ ha_innobase::create( - - ut_a(strlen(name) < sizeof(name2)); - -- strcpy(name2, name); -+ strncpy(name2, name, sizeof(name2)-1); - - normalize_table_name(norm_name, name2); - diff --git a/community-mysql-strmov.patch b/community-mysql-strmov.patch index 2a78619..1c44f55 100644 --- a/community-mysql-strmov.patch +++ b/community-mysql-strmov.patch @@ -13,11 +13,11 @@ of any real performance gain from optimizing these calls. So I'm keeping this patch. -diff -up mysql-5.5.28/include/m_string.h.p2 mysql-5.5.28/include/m_string.h ---- mysql-5.5.28/include/m_string.h.p2 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/include/m_string.h 2012-12-06 14:12:31.225333542 +0100 -@@ -77,15 +77,6 @@ extern "C" { - extern void *(*my_str_malloc)(size_t); +diff -up mysql-5.6.10/include/m_string.h.orig mysql-5.6.10/include/m_string.h +--- mysql-5.6.10/include/m_string.h.orig 2013-01-22 17:54:49.000000000 +0100 ++++ mysql-5.6.10/include/m_string.h 2013-02-19 14:12:58.866241727 +0100 +@@ -65,15 +65,6 @@ extern void *(*my_str_malloc)(size_t); + extern void *(*my_str_realloc)(void *, size_t); extern void (*my_str_free)(void *); -#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER) diff --git a/community-mysql-tmpdir.patch b/community-mysql-tmpdir.patch index 2dc7293..c6842c4 100644 --- a/community-mysql-tmpdir.patch +++ b/community-mysql-tmpdir.patch @@ -10,10 +10,10 @@ RHBZ#962087 Upstream bug report: https://mariadb.atlassian.net/browse/MDEV-4165 MySQL bug report: http://bugs.mysql.com/bug.php?id=68338 -diff -up mysql-5.5.31/CMakeLists.txt.tmpdir mysql-5.5.31/CMakeLists.txt ---- mysql-5.5.31/CMakeLists.txt.tmpdir 2013-06-03 15:14:51.149345233 +0200 -+++ mysql-5.5.31/CMakeLists.txt 2013-06-03 15:29:23.263489056 +0200 -@@ -253,6 +253,10 @@ IF(SYSCONFDIR) +diff -up mysql-5.6.14/CMakeLists.txt.tmpdir mysql-5.6.14/CMakeLists.txt +--- mysql-5.6.14/CMakeLists.txt.tmpdir 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/CMakeLists.txt 2013-10-09 14:49:14.115887439 +0200 +@@ -309,6 +309,10 @@ IF(SYSCONFDIR) SET(DEFAULT_SYSCONFDIR "${SYSCONFDIR}") ENDIF() @@ -24,10 +24,10 @@ diff -up mysql-5.5.31/CMakeLists.txt.tmpdir mysql-5.5.31/CMakeLists.txt # Run platform tests INCLUDE(configure.cmake) -diff -up mysql-5.5.31/config.h.cmake.tmpdir mysql-5.5.31/config.h.cmake ---- mysql-5.5.31/config.h.cmake.tmpdir 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/config.h.cmake 2013-06-03 15:14:51.149345233 +0200 -@@ -600,6 +600,7 @@ +diff -up mysql-5.6.14/config.h.cmake.tmpdir mysql-5.6.14/config.h.cmake +--- mysql-5.6.14/config.h.cmake.tmpdir 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/config.h.cmake 2013-10-09 14:49:14.115887439 +0200 +@@ -636,6 +636,7 @@ #cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@" #cmakedefine PLUGINDIR "@PLUGINDIR@" #cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@" @@ -35,13 +35,13 @@ diff -up mysql-5.5.31/config.h.cmake.tmpdir mysql-5.5.31/config.h.cmake #cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@" -diff -up mysql-5.5.31/include/my_global.h.tmpdir mysql-5.5.31/include/my_global.h ---- mysql-5.5.31/include/my_global.h.tmpdir 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/include/my_global.h 2013-06-03 15:14:51.150345232 +0200 -@@ -1501,4 +1501,11 @@ static inline double rint(double x) - - #endif /* EMBEDDED_LIBRARY */ +diff -up mysql-5.6.14/include/my_global.h.tmpdir mysql-5.6.14/include/my_global.h +--- mysql-5.6.14/include/my_global.h.tmpdir 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/include/my_global.h 2013-10-09 14:49:14.116887439 +0200 +@@ -1219,3 +1219,10 @@ typedef struct + #endif + #endif // MY_GLOBAL_INCLUDED +/* + Define default tmpdir if not already set. +*/ @@ -49,11 +49,10 @@ diff -up mysql-5.5.31/include/my_global.h.tmpdir mysql-5.5.31/include/my_global. +#define DEFAULT_TMPDIR P_tmpdir +#endif + - #endif /* my_global_h */ -diff -up mysql-5.5.31/libmysqld/lib_sql.cc.tmpdir mysql-5.5.31/libmysqld/lib_sql.cc ---- mysql-5.5.31/libmysqld/lib_sql.cc.tmpdir 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/libmysqld/lib_sql.cc 2013-06-03 15:14:51.150345232 +0200 -@@ -558,7 +558,7 @@ int init_embedded_server(int argc, char +diff -up mysql-5.6.14/libmysqld/lib_sql.cc.tmpdir mysql-5.6.14/libmysqld/lib_sql.cc +--- mysql-5.6.14/libmysqld/lib_sql.cc.tmpdir 2013-09-10 09:38:26.000000000 +0200 ++++ mysql-5.6.14/libmysqld/lib_sql.cc 2013-10-09 14:49:14.116887439 +0200 +@@ -587,7 +587,7 @@ int init_embedded_server(int argc, char opt_mysql_tmpdir=getenv("TMP"); #endif if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0]) @@ -62,9 +61,9 @@ diff -up mysql-5.5.31/libmysqld/lib_sql.cc.tmpdir mysql-5.5.31/libmysqld/lib_sql init_ssl(); umask(((~my_umask) & 0666)); -diff -up mysql-5.5.31/mysys/mf_tempdir.c.tmpdir mysql-5.5.31/mysys/mf_tempdir.c ---- mysql-5.5.31/mysys/mf_tempdir.c.tmpdir 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/mysys/mf_tempdir.c 2013-06-03 15:14:51.150345232 +0200 +diff -up mysql-5.6.14/mysys/mf_tempdir.c.tmpdir mysql-5.6.14/mysys/mf_tempdir.c +--- mysql-5.6.14/mysys/mf_tempdir.c.tmpdir 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/mysys/mf_tempdir.c 2013-10-09 14:49:14.116887439 +0200 @@ -43,7 +43,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, c pathlist=getenv("TMP"); #endif @@ -74,9 +73,9 @@ diff -up mysql-5.5.31/mysys/mf_tempdir.c.tmpdir mysql-5.5.31/mysys/mf_tempdir.c } do { -diff -up mysql-5.5.31/mysys/mf_tempfile.c.tmpdir mysql-5.5.31/mysys/mf_tempfile.c ---- mysql-5.5.31/mysys/mf_tempfile.c.tmpdir 2013-03-25 14:14:58.000000000 +0100 -+++ mysql-5.5.31/mysys/mf_tempfile.c 2013-06-03 15:14:51.150345232 +0200 +diff -up mysql-5.6.14/mysys/mf_tempfile.c.tmpdir mysql-5.6.14/mysys/mf_tempfile.c +--- mysql-5.6.14/mysys/mf_tempfile.c.tmpdir 2013-09-10 09:38:25.000000000 +0200 ++++ mysql-5.6.14/mysys/mf_tempfile.c 2013-10-09 14:49:14.117887440 +0200 @@ -111,7 +111,7 @@ File create_temp_file(char *to, const ch sizeof(prefix_buff)-7),"XXXXXX") - prefix_buff); diff --git a/community-mysql-va-list.patch b/community-mysql-va-list.patch deleted file mode 100644 index 552457c..0000000 --- a/community-mysql-va-list.patch +++ /dev/null @@ -1,55 +0,0 @@ -Fix unportable usage associated with va_list arguments. Passing "0" to -a va_list argument only works if va_list is an integer or pointer type, -which is not required by the C spec, and is not true on ARM for instance. -Per bug #744707. - - -diff -up mysql-5.5.28/sql-common/client_plugin.c.p12 mysql-5.5.28/sql-common/client_plugin.c ---- mysql-5.5.28/sql-common/client_plugin.c.p12 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/sql-common/client_plugin.c 2012-12-06 14:22:54.494857607 +0100 -@@ -233,11 +233,13 @@ int mysql_client_plugin_init() - { - MYSQL mysql; - struct st_mysql_client_plugin **builtin; -+ va_list unused; - - if (initialized) - return 0; - - bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ -+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ - - pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW); - init_alloc_root(&mem_root, 128, 128); -@@ -249,7 +251,7 @@ int mysql_client_plugin_init() - pthread_mutex_lock(&LOCK_load_client_plugin); - - for (builtin= mysql_client_builtins; *builtin; builtin++) -- add_plugin(&mysql, *builtin, 0, 0, 0); -+ add_plugin(&mysql, *builtin, 0, 0, unused); - - pthread_mutex_unlock(&LOCK_load_client_plugin); - -@@ -293,9 +295,13 @@ struct st_mysql_client_plugin * - mysql_client_register_plugin(MYSQL *mysql, - struct st_mysql_client_plugin *plugin) - { -+ va_list unused; -+ - if (is_not_initialized(mysql, plugin->name)) - return NULL; - -+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ -+ - pthread_mutex_lock(&LOCK_load_client_plugin); - - /* make sure the plugin wasn't loaded meanwhile */ -@@ -307,7 +313,7 @@ mysql_client_register_plugin(MYSQL *mysq - plugin= NULL; - } - else -- plugin= add_plugin(mysql, plugin, 0, 0, 0); -+ plugin= add_plugin(mysql, plugin, 0, 0, unused); - - pthread_mutex_unlock(&LOCK_load_client_plugin); - return plugin; diff --git a/community-mysql-versioning.patch b/community-mysql-versioning.patch deleted file mode 100644 index 6374b6c..0000000 --- a/community-mysql-versioning.patch +++ /dev/null @@ -1,18 +0,0 @@ -The symbol versioning solution for libmysqlclient in mysql 5.1 was pretty -awful (export everything) and as of 5.5.8 the cmake build scripts have -forgotten the issue entirely. So we now maintain our own list of exported -symbols and jam it into the build with this hack. - - -diff -up mysql-5.5.28/libmysql/CMakeLists.txt.p7 mysql-5.5.28/libmysql/CMakeLists.txt ---- mysql-5.5.28/libmysql/CMakeLists.txt.p7 2012-08-29 10:50:46.000000000 +0200 -+++ mysql-5.5.28/libmysql/CMakeLists.txt 2012-12-06 14:15:03.905461517 +0100 -@@ -209,7 +209,7 @@ IF(NOT DISABLE_SHARED) - SET(libmysql_link_flags) - ENDIF() - SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS -- "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}") -+ "${libmysql_link_flags} -Wl,--version-script=libmysql.version ${LINK_FLAG_NO_UNDEFINED}") - ENDIF() - # clean direct output needs to be set several targets have the same name - #(mysqlclient in this case) diff --git a/community-mysql.spec b/community-mysql.spec index 1e45798..dd0dc2e 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -1,247 +1,256 @@ -Name: community-mysql -Version: 5.5.33 -Release: 2%{?dist} - -Summary: MySQL client programs and shared libraries -Group: Applications/Databases -URL: http://www.mysql.com -# exceptions allow client libraries to be linked with most open source SW, -# not only GPL code. See README.mysql-license -# Some innobase code from Percona and Google is under BSD license -# Some code related to test-suite is under LGPLv2 -License: GPLv2 with exceptions and LGPLv2 and BSD - -# Regression tests take a long time, you can skip 'em with this -%{!?runselftest:%global runselftest 1} - -# Upstream has a mirror redirector for downloads, so the URL is hard to -# represent statically. You can get the tarball by following a link from -# http://dev.mysql.com/downloads/mysql/ -Source0: mysql-%{version}-nodocs.tar.xz -# The upstream tarball includes non-free documentation that we cannot ship. -# To remove the non-free documentation, run this script after downloading -# the tarball into the current directory: -# ./generate-tarball.sh $VERSION -Source2: generate-tarball.sh -Source3: my.cnf -Source5: my_config.h -Source6: README.mysql-docs -Source7: README.mysql-license -Source8: libmysql.version -Source9: mysql-embedded-check.c -Source10: MySQL.tmpfiles.d -Source11: mysqld.service -Source12: mysqld-prepare-db-dir -Source13: mysqld-wait-ready -Source14: rh-skipped-tests-base.list -Source15: rh-skipped-tests-arm.list -# Working around perl dependency checking bug in rpm FTTB. Remove later. -Source999: filter-requires-mysql.sh - -# Comments for these patches are in the patch files. -Patch1: community-mysql-errno.patch -Patch2: community-mysql-strmov.patch -Patch3: community-mysql-install-test.patch -Patch4: community-mysql-expired-certs.patch -Patch5: community-mysql-stack-guard.patch -Patch6: community-mysql-chain-certs.patch -Patch7: community-mysql-versioning.patch -Patch8: community-mysql-dubious-exports.patch -Patch10: community-mysql-plugin-bool.patch -Patch11: community-mysql-s390-tsc.patch -Patch14: community-mysql-va-list.patch -Patch15: community-mysql-netdevname.patch -Patch16: community-mysql-logrotate.patch -Patch17: community-mysql-plugin-test.patch -Patch18: community-mysql-cipherspec.patch -Patch19: community-mysql-file-contents.patch -Patch20: community-mysql-string-overflow.patch -Patch21: community-mysql-dh1024.patch -Patch22: community-mysql-major.patch -Patch23: community-mysql-sharedir.patch -Patch24: community-mysql-man-pages.patch -Patch25: community-mysql-tmpdir.patch -Patch26: community-mysql-cve-2013-1861.patch -Patch27: community-mysql-innodbwarn.patch -Patch28: community-mysql-covscan-signexpr.patch -Patch29: community-mysql-covscan-stroverflow.patch -Patch30: community-mysql-pluginerrmsg.patch - -BuildRequires: perl, readline-devel, openssl-devel -BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel -BuildRequires: systemd, systemtap-sdt-devel -# make test requires time and ps -BuildRequires: time procps -# perl modules needed to run regression tests -BuildRequires: perl(Socket), perl(Time::HiRes) -BuildRequires: perl(Data::Dumper), perl(Test::More), perl(Env) - -Requires: grep, fileutils, bash -Requires: %{name}-common%{?_isa} = %{version}-%{release} -%{?systemd_requires: %systemd_requires} - -# mariadb is MySQL replacement that is used in Fedora as a default -# MySQL implementation -Conflicts: mariadb -Provides: mysql = %{version}-%{release} -Provides: mysql%{?_isa} = %{version}-%{release} - -# When rpm 4.9 is universal, this could be cleaned up: -%global __perl_requires %{SOURCE999} -%global __perllib_requires %{SOURCE999} +# Regression tests may take a long time (many cores recommended), skip them by +# passing --nocheck to rpmbuild or by setting runselftest to 0 if defining +# --nocheck is not possible (e.g. in koji build) +%{!?runselftest:%global runselftest 0} + +# set to 1 to enable +%global with_shared_lib_major_hack 1 + +%global _hardened_build 1 # By default, patch(1) creates backup files when chunks apply with offsets. # Turn that off to ensure such files don't get included in RPMs (cf bz#884755). %global _default_patch_flags --no-backup-if-mismatch +Name: community-mysql +Version: 5.6.14 +Release: 1%{?dist} +Summary: MySQL client programs and shared libraries +Group: Applications/Databases +URL: http://www.mysql.com + +# Exceptions allow client libraries to be linked with most open source SW, +# not only GPL code. See README.mysql-license +License: GPLv2 with exceptions and LGPLv2 and BSD + +# mysql.info from upstream tarball must be removed, create tarball by: +# wget https://cdn.mysql.com/Downloads/MySQL-5.6/mysql-%{version}.tar.gz +# tar xvf mysql-%{version}.tar.gz +# rm mysql-%{version}/Docs/mysql.info +# tar cJvf mysql-%{version}-nodocs.tar.xz mysql-%{version} +Source0: mysql-%{version}-nodocs.tar.xz +Source2: generate-tarball.sh +Source3: my.cnf +Source4: mysql_config.sh +Source5: my_config.h +Source6: README.mysql-docs +Source7: README.mysql-license +Source9: mysql-embedded-check.c +Source10: mysql.tmpfiles.d +Source11: mysqld.service +Source12: mysqld-prepare-db-dir +Source13: mysqld-wait-ready +Source14: rh-skipped-tests-base.list +Source15: rh-skipped-tests-arm.list +# To track rpmlint warnings +Source17: mysql-5.6.10-rpmlintrc + +# Comments for these patches are in the patch files +Patch2: community-mysql-strmov.patch +Patch3: community-mysql-install-test.patch +Patch4: community-mysql-expired-certs.patch +Patch6: community-mysql-chain-certs.patch +Patch11: community-mysql-s390-tsc.patch +Patch15: community-mysql-netdevname.patch +Patch16: community-mysql-logrotate.patch +Patch18: community-mysql-5.6.11-cipherspec.patch +Patch19: community-mysql-file-contents.patch +Patch20: community-mysql-string-overflow.patch +Patch21: community-mysql-dh1024.patch +Patch22: community-mysql-sharedir.patch +Patch23: community-mysql-5.6.10-libmysql-version.patch +Patch24: community-mysql-man-pages.patch +Patch25: community-mysql-5.6.14-mysql-install.patch +Patch26: community-mysql-5.6.13-major.patch +Patch27: community-mysql-5.6.13-mtr-secure-file.patch +Patch28: community-mysql-5.6.13-truncate-file.patch +Patch29: community-mysql-tmpdir.patch +Patch30: community-mysql-cve-2013-1861.patch +Patch31: community-mysql-innodbwarn.patch +Patch32: community-mysql-covscan-signexpr.patch +Patch33: community-mysql-covscan-stroverflow.patch +Patch34: community-mysql-pluginerrmsg.patch + +BuildRequires: cmake +BuildRequires: dos2unix +BuildRequires: libaio-devel +BuildRequires: libedit-devel +BuildRequires: libevent-devel +BuildRequires: openssl-devel +BuildRequires: perl +BuildRequires: systemtap-sdt-devel +BuildRequires: zlib-devel +# Tests requires time and ps and some perl modules +BuildRequires: procps +BuildRequires: time +BuildRequires: perl(Env) +BuildRequires: perl(Exporter) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(Socket) +BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Time::HiRes) +BuildRequires: systemd + +Requires: bash +Requires: grep +Requires: fileutils +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Provides: mysql = %{version}-%{release} +Provides: mysql%{?_isa} = %{version}-%{release} +Conflicts: mariadb +# mysql-cluster used to be built from this SRPM, but no more +Obsoletes: mysql-cluster < 5.1.44 + +# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering +%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) +%global __provides_exclude_from ^(/usr/share/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$ + %description MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld) and many different client programs and libraries. The base package contains the standard MySQL client programs and generic MySQL files. -%package libs -Summary: The shared libraries required for MySQL clients -Group: Applications/Databases -Requires: %{name}-common%{?_isa} = %{version}-%{release} -Provides: mysql-libs = %{version}-%{release} -Provides: mysql-libs%{?_isa} = %{version}-%{release} +%package libs +Summary: The shared libraries required for MySQL clients +Group: Applications/Databases +Requires: /sbin/ldconfig +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Provides: mysql-libs = %{version}-%{release} +Provides: mysql-libs%{?_isa} = %{version}-%{release} -%description libs +%description libs The mysql-libs package provides the essential shared libraries for any MySQL client program or interface. You will need to install this package to use any other MySQL package or any clients that need to connect to a MySQL server. -%package common -Summary: The shared files required for MySQL server and client -Group: Applications/Databases +%package common +Summary: The shared files required for MySQL server and client +Group: Applications/Databases -%description common -The mysql-common package provides the essential shared files for any +%description common +The mysql-common package provides the essential shared files for any MySQL program. You will need to install this package to use any other MySQL package. -%package server -Summary: The MySQL server and related files -Group: Applications/Databases -Requires: mysql%{?_isa} -Requires: %{name}-common%{?_isa} = %{version}-%{release} -Requires: sh-utils -Requires(pre): /usr/sbin/useradd +%package server +Summary: The MySQL server and related files +Group: Applications/Databases + +# note: no version here = %{version}-%{release} +Requires: mysql%{?_isa} +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Requires: sh-utils +Requires(pre): /usr/sbin/useradd # We require this to be present for %%{_prefix}/lib/tmpfiles.d -Requires: systemd +Requires: systemd # Make sure it's there when scriptlets run, too -Requires(post): systemd -Requires(preun): systemd +Requires(post): systemd +Requires(preun): systemd Requires(postun): systemd # This is actually needed for the %%triggerun script but Requires(triggerun) # is not valid. We can use %%post because this particular %%triggerun script # should fire just after this package is installed. -Requires(post): systemd-sysv +Requires(post): systemd-sysv # mysqlhotcopy needs DBI/DBD support -Requires: perl-DBI, perl-DBD-MySQL -Conflicts: mariadb-server -Provides: mysql-server = %{version}-%{release} -Provides: mysql-server%{?_isa} = %{version}-%{release} +Requires: perl(DBI) +Requires: perl(DBD::mysql) +Provides: mysql-server = %{version}-%{release} +Provides: mysql-server%{?_isa} = %{version}-%{release} +Conflicts: mariadb-server -%description server +%description server MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld) and many different client programs and libraries. This package contains the MySQL server and some accompanying files and directories. -%package devel -Summary: Files for development of MySQL applications -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: openssl-devel%{?_isa} -Conflicts: mariadb-devel +%package devel +Summary: Files for development of MySQL applications +Group: Applications/Databases +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: openssl-devel%{?_isa} +Conflicts: mariadb-devel -%description devel +%description devel MySQL is a multi-user, multi-threaded SQL database server. This package contains the libraries and header files that are needed for developing MySQL client applications. -%package embedded -Summary: MySQL as an embeddable library -Group: Applications/Databases -Provides: mysql-embedded = %{version}-%{release} -Provides: mysql-embedded%{?_isa} = %{version}-%{release} +%package embedded +Summary: MySQL as an embeddable library +Group: Applications/Databases +Provides: mysql-embedded = %{version}-%{release} +Provides: mysql-embedded%{?_isa} = %{version}-%{release} -%description embedded +%description embedded MySQL is a multi-user, multi-threaded SQL database server. This package contains a version of the MySQL server that can be embedded into a client application instead of running as a separate process. -%package embedded-devel -Summary: Development files for MySQL as an embeddable library -Group: Applications/Databases -Requires: %{name}-embedded%{?_isa} = %{version}-%{release} -Requires: %{name}-devel%{?_isa} = %{version}-%{release} -Conflicts: mariadb-embedded-devel +%package embedded-devel +Summary: Development files for MySQL as an embeddable library +Group: Applications/Databases +Requires: %{name}-embedded%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Conflicts: mariadb-embedded-devel -%description embedded-devel +%description embedded-devel MySQL is a multi-user, multi-threaded SQL database server. This package contains files needed for developing and testing with the embedded version of the MySQL server. -%package bench -Summary: MySQL benchmark scripts and data -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{version}-%{release} -Conflicts: mariadb-bench -Provides: mysql-bench = %{version}-%{release} -Provides: mysql-bench%{?_isa} = %{version}-%{release} +%package bench +Summary: MySQL benchmark scripts and data +Group: Applications/Databases +Requires: %{name}%{?_isa} = %{version}-%{release} +Conflicts: mariadb-bench +Provides: mysql-bench = %{version}-%{release} +Provides: mysql-bench%{?_isa} = %{version}-%{release} -%description bench +%description bench MySQL is a multi-user, multi-threaded SQL database server. This package contains benchmark scripts and data for use when benchmarking MySQL. -%package test -Summary: The test suite distributed with MySQL -Group: Applications/Databases -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-common%{?_isa} = %{version}-%{release} -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Conflicts: mariadb-test -Provides: mysql-test = %{version}-%{release} -Provides: mysql-test%{?_isa} = %{version}-%{release} -Requires: perl(Socket), perl(Time::HiRes) -Requires: perl(Data::Dumper), perl(Test::More), perl(Env) +%package test +Summary: The test suite distributed with MySQL +Group: Applications/Databases +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Conflicts: mariadb-test +Provides: mysql-test = %{version}-%{release} +Provides: mysql-test%{?_isa} = %{version}-%{release} %description test MySQL is a multi-user, multi-threaded SQL database server. This package contains the regression test suite distributed with the MySQL sources. + %prep %setup -q -n mysql-%{version} - -%patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch10 -p1 %patch11 -p1 -%patch14 -p1 %patch15 -p1 %patch16 -p1 -%patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 @@ -250,35 +259,37 @@ the MySQL sources. %patch23 -p1 %patch24 -p1 %patch25 -p1 +%if %{with_shared_lib_major_hack} %patch26 -p1 -%patch27 -p1 -%patch28 -p1 +%endif +%patch27 -p0 +%patch28 -p0 %patch29 -p1 %patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 -# workaround for upstream bug #56342 +# Workaround for upstream bug #http://bugs.mysql.com/56342 rm -f mysql-test/t/ssl_8k_key-master.opt -# upstream has fallen down badly on symbol versioning, do it ourselves -cp %{SOURCE8} libmysql/libmysql.version - -# generate a list of tests that fail, but are not disabled by upstream +# Generate a list of tests that fail, but are not disabled by upstream cat %{SOURCE14} > mysql-test/rh-skipped-tests.list -# disable some tests failing on ARM architectures +# Disable some tests failing on ARM architectures %ifarch %{arm} cat %{SOURCE15} >> mysql-test/rh-skipped-tests.list %endif %build - # fail quickly and obviously if user tries to build as root %if %runselftest - if [ x"`id -u`" = x0 ]; then - echo "mysql's regression tests fail if run as root." - echo "If you really need to build the RPM as root, use" - echo "--define='runselftest 0' to skip the regression tests." - exit 1 - fi + if [ x"$(id -u)" = "x0" ]; then + echo "mysql's regression tests fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--nocheck to skip the regression tests." + exit 1 + fi %endif CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" @@ -290,170 +301,135 @@ CFLAGS="$CFLAGS -fPIC" # gcc seems to have some bugs on sparc as of 4.4.1, back off optimization # submitted as bz #529298 %ifarch sparc sparcv9 sparc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` +CFLAGS=$(echo $CFLAGS| sed -e "s|-O2|-O1|g" ) %endif CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS -# building with PIE +%if %{_hardened_build} LDFLAGS="$LDFLAGS -pie" export LDFLAGS +%endif + +# build out of source +mkdir build +pushd build # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX # so we can't use %%{_datadir} and so forth here. - -cmake . -DBUILD_CONFIG=mysql_release \ - -DFEATURE_SET="community" \ - -DINSTALL_LAYOUT=RPM \ - -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ - -DINSTALL_INCLUDEDIR=include/mysql \ - -DINSTALL_INFODIR=share/info \ - -DINSTALL_LIBDIR="%{_lib}/mysql" \ - -DINSTALL_MANDIR=share/man \ - -DINSTALL_MYSQLSHAREDIR=share/%{name} \ - -DINSTALL_MYSQLTESTDIR=share/mysql-test \ - -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ - -DINSTALL_SBINDIR=libexec \ - -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=share \ - -DINSTALL_SUPPORTFILESDIR=share/mysql \ - -DMYSQL_DATADIR="/var/lib/mysql" \ - -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ - -DENABLED_LOCAL_INFILE=ON \ - -DENABLE_DTRACE=ON \ - -DWITH_EMBEDDED_SERVER=ON \ - -DWITH_READLINE=ON \ - -DWITH_SSL=system \ - -DWITH_ZLIB=system \ - -DTMPDIR=/var/tmp \ - -DWITH_MYSQLD_LDFLAGS="-Wl,-z,relro,-z,now" +cmake .. -DBUILD_CONFIG=mysql_release \ + -DFEATURE_SET="community" \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ +%if 0%{?fedora} >= 20 + -DINSTALL_DOCDIR="share/doc/%{name}" \ + -DINSTALL_DOCREADMEDIR="share/doc/%{name}" \ +%endif + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/info \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLSHAREDIR=share/%{name} \ + -DINSTALL_MYSQLTESTDIR=share/mysql-test \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DINSTALL_SBINDIR=libexec \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SQLBENCHDIR=share \ + -DINSTALL_SUPPORTFILESDIR=share/%{name} \ + -DMYSQL_DATADIR="/var/lib/mysql" \ + -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ + -DENABLED_LOCAL_INFILE=ON \ + -DENABLE_DTRACE=ON \ + -DWITH_EMBEDDED_SERVER=ON \ + -DWITH_EDITLINE=system \ + -DWITH_LIBEVENT=system \ + -DWITH_SSL=system \ + -DWITH_ZLIB=system \ +%if %{_hardened_build} + -DWITH_MYSQLD_LDFLAGS="-Wl,-z,relro,-z,now" +%endif make %{?_smp_mflags} VERBOSE=1 -# regular build will make libmysqld.a but not libmysqld.so :-( +# Regular build will make libmysqld.a but not libmysqld.so :-( +# Upstream bug: http://bugs.mysql.com/68559 mkdir libmysqld/work -cd libmysqld/work +pushd libmysqld/work ar -x ../libmysqld.a -# these result in missing dependencies: (filed upstream as bug 59104) -rm -f sql_binlog.cc.o rpl_utility.cc.o -gcc $CFLAGS $LDFLAGS -shared -Wl,-soname,libmysqld.so.0 -o libmysqld.so.0.0.1 \ - *.o ../../probes_mysql.o \ - -lpthread -laio -lcrypt -lssl -lcrypto -lz -lrt -lstdc++ -ldl -lm -lc -# this is to check that we built a complete library -cp %{SOURCE9} . -ln -s libmysqld.so.0.0.1 libmysqld.so.0 -gcc -I../../include $CFLAGS mysql-embedded-check.c libmysqld.so.0 +%{__cc} $CFLAGS $LDFLAGS -DEMBEDDED_LIBRARY -shared -Wl,-soname,libmysqld.so.18 -o libmysqld.so.18.1.0 \ + *.o \ + -lpthread -laio -lcrypt -lssl -lcrypto -lz -lrt -lstdc++ -ldl -lm -lc +# This is to check that we built a complete library +cp -p %{SOURCE9} . +ln -s libmysqld.so.18.1.0 libmysqld.so.18 +%{__cc} -I../../../include -I../../include $CFLAGS mysql-embedded-check.c libmysqld.so.18 LD_LIBRARY_PATH=. ldd ./a.out -cd ../.. -# debuginfo extraction scripts fail to find source files in their real -# location -- satisfy them by copying these files into location, which -# is expected by scripts -for f in pars0grm.c pars0grm.y pars0lex.l lexyy.c ; do - cp -p "storage/innobase/pars/$f" "storage/innobase/$f" -done - -%check -%if %runselftest - # hack to let 32- and 64-bit tests run concurrently on same build machine - case `uname -m` in - ppc64 | ppc64p7 | s390x | x86_64 | sparc64 ) - MTR_BUILD_THREAD=7 - ;; - *) - MTR_BUILD_THREAD=11 - ;; - esac - export MTR_BUILD_THREAD - - make test VERBOSE=1 - - # The cmake build scripts don't provide any simple way to control the - # options for mysql-test-run, so ignore the make target and just call it - # manually. Nonstandard options chosen are: - # --force to continue tests after a failure - # no retries please - # test SSL with --ssl - # skip tests that are listed in rh-skipped-tests.list - # avoid redundant test runs with --binlog-format=mixed - # increase timeouts to prevent unwanted failures during mass rebuilds - ( - cd mysql-test - perl ./mysql-test-run.pl --force --retry=0 --ssl \ - --skip-test-list=rh-skipped-tests.list \ - --mysqld=--binlog-format=mixed \ - --suite-timeout=720 --testcase-timeout=30 - # cmake build scripts will install the var cruft if left alone :-( - rm -rf var - ) -%endif %install -make DESTDIR=$RPM_BUILD_ROOT install +pushd build +make DESTDIR=%{buildroot} install # List the installed tree for RPM package maintenance purposes. -find $RPM_BUILD_ROOT -print | sed "s|^$RPM_BUILD_ROOT||" | sort > ROOTFILES +find %{buildroot} -print | sed "s|^%{buildroot}||" | sort > ROOTFILES -# multilib header hacks -# we only apply this to known Red Hat multilib arches, per bug #181335 -case `uname -i` in + +# cmake generates some completely wacko references to -lprobes_mysql when +# building with dtrace support. Haven't found where to shut that off, +# so resort to this blunt instrument. While at it, let's not reference +# libmysqlclient_r anymore either. +sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ + %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp +cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config +chmod 0755 %{buildroot}%{_bindir}/mysql_config + +# Multilib header hacks +# We only apply this to known Red Hat multilib arches, per bug #181335 +case $(uname -i) in i386 | x86_64 | ppc | ppc64 | ppc64p7 | s390 | s390x | sparc | sparc64 | aarch64 ) - mv $RPM_BUILD_ROOT%{_includedir}/mysql/my_config.h $RPM_BUILD_ROOT%{_includedir}/mysql/my_config_`uname -i`.h - install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_includedir}/mysql/ + mv %{buildroot}%{_includedir}/mysql/my_config.h %{buildroot}%{_includedir}/mysql/my_config_$(uname -i).h + install -p -m 644 %{SOURCE5} %{buildroot}%{_includedir}/mysql/ + mv %{buildroot}%{_bindir}/mysql_config %{buildroot}%{_bindir}/mysql_config-%{__isa_bits} + install -p -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/mysql_config ;; arm* ) - mv $RPM_BUILD_ROOT%{_includedir}/mysql/my_config.h $RPM_BUILD_ROOT%{_includedir}/mysql/my_config_arm.h - install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_includedir}/mysql/ + mv %{buildroot}%{_includedir}/mysql/my_config.h %{buildroot}%{_includedir}/mysql/my_config_arm.h + install -p -m 644 %{SOURCE5} %{buildroot}%{_includedir}/mysql/ + mv %{buildroot}%{_bindir}/mysql_config %{buildroot}%{_bindir}/mysql_config-%{__isa_bits} + install -p -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/mysql_config ;; *) ;; esac -# cmake generates some completely wacko references to -lprobes_mysql when -# building with dtrace support. Haven't found where to shut that off, -# so resort to this blunt instrument. While at it, let's not reference -# libmysqlclient_r anymore either. -sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ - ${RPM_BUILD_ROOT}%{_bindir}/mysql_config >mysql_config.tmp -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 +install -p -m 0644 Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/ +install -p -m 0644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/ -mkdir -p $RPM_BUILD_ROOT/var/run/mysqld -install -m 0755 -d $RPM_BUILD_ROOT/var/lib/mysql -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} -install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/my.cnf +mkdir -p %{buildroot}/var/log +touch %{buildroot}/var/log/mysqld.log -# install systemd unit files and scripts for handling server startup -mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} -install -m 644 %{SOURCE11} ${RPM_BUILD_ROOT}%{_unitdir}/ -install -m 755 %{SOURCE12} ${RPM_BUILD_ROOT}%{_libexecdir}/ -install -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}%{_libexecdir}/ +mkdir -p %{buildroot}/var/run/mysqld +install -p -m 0755 -d %{buildroot}/var/lib/mysql -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d -install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf +mkdir -p %{buildroot}/etc +install -p -m 0644 %{SOURCE3} %{buildroot}/etc/my.cnf -# Fix funny permissions that cmake build scripts apply to config files -chmod 644 ${RPM_BUILD_ROOT}%{_datadir}/mysql/config.*.ini +# install systemd unit files and scripts for handling server startup +mkdir -p %{buildroot}%{_unitdir} +install -p -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/ +install -p -m 755 %{SOURCE12} %{buildroot}%{_libexecdir}/ +install -p -m 755 %{SOURCE13} %{buildroot}%{_libexecdir}/ -# Fix scripts for multilib safety -mv ${RPM_BUILD_ROOT}%{_bindir}/mysql_config ${RPM_BUILD_ROOT}%{_libdir}/mysql/mysql_config -ln -sf %{_libdir}/mysql/mysql_config ${RPM_BUILD_ROOT}%{_bindir}/mysql_config -mv ${RPM_BUILD_ROOT}%{_bindir}/mysqlbug ${RPM_BUILD_ROOT}%{_libdir}/mysql/mysqlbug -ln -sf %{_libdir}/mysql/mysqlbug ${RPM_BUILD_ROOT}%{_bindir}/mysqlbug +mkdir -p %{buildroot}%{_prefix}/lib/tmpfiles.d +install -p -m 0644 %{SOURCE10} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf # Remove libmysqld.a, install libmysqld.so -rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.a -install -m 0755 libmysqld/work/libmysqld.so.0.0.1 ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.so.0.0.1 -ln -s libmysqld.so.0.0.1 ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.so.0 -ln -s libmysqld.so.0 ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.so +rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a +install -m 0755 libmysqld/work/libmysqld.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqld.so.18.1.0 +ln -s libmysqld.so.18.1.0 %{buildroot}%{_libdir}/mysql/libmysqld.so.18 +ln -s libmysqld.so.18 %{buildroot}%{_libdir}/mysql/libmysqld.so # libmysqlclient_r is no more. Upstream tries to replace it with symlinks # but that really doesn't work (wrong soname in particular). We'll keep @@ -464,69 +440,122 @@ ln -s libmysqlclient.so ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqlclient_r.so # mysql-test includes one executable that doesn't belong under /usr/share, # so move it and provide a symlink -mv ${RPM_BUILD_ROOT}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process ${RPM_BUILD_ROOT}%{_bindir} -ln -s ../../../../../bin/my_safe_process ${RPM_BUILD_ROOT}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process - -# We specified a different share dir, but the test suite expects some -# data files under /usr/share/mysql, so we create symlinks to compatibility -for f in errmsg-utf8.txt fill_help_tables.sql mysql_system_tables.sql mysql_system_tables_data.sql mysql_test_data_timezone.sql - do - ln -sf "../MySQL/$f" "${RPM_BUILD_ROOT}/usr/share/mysql/$f" - done - -# Remove files that %%doc will install in preferred location -rm -f ${RPM_BUILD_ROOT}/usr/COPYING -rm -f ${RPM_BUILD_ROOT}/usr/README - -# Remove files we don't want installed at all -rm -f ${RPM_BUILD_ROOT}/usr/INSTALL-BINARY -rm -f ${RPM_BUILD_ROOT}/usr/docs/ChangeLog -rm -f ${RPM_BUILD_ROOT}/usr/data/mysql/.empty -rm -f ${RPM_BUILD_ROOT}/usr/data/test/.empty -# should move this to /etc/ ? -rm -f ${RPM_BUILD_ROOT}%{_bindir}/mysqlaccess.conf -rm -f ${RPM_BUILD_ROOT}%{_bindir}/mysql_embedded -rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/*.a -rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/binary-configure -rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/magic -rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/ndb-config-2-node.ini -rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql.server -rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysqld_multi.server -rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/comp_err.1* -rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-stress-test.pl.1* -rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-test-run.pl.1* +mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} +ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process + +# not needed in rpm package +rm -f %{buildroot}%{_bindir}/mysqlaccess.conf +rm -f %{buildroot}%{_bindir}/mysql_embedded +rm -f %{buildroot}%{_libdir}/mysql/*.a +rm -f %{buildroot}%{_datadir}/%{name}/binary-configure +rm -f %{buildroot}%{_datadir}/%{name}/magic +rm -f %{buildroot}%{_datadir}/%{name}/mysql.server +rm -f %{buildroot}%{_datadir}/%{name}/mysqld_multi.server +rm -rf %{buildroot}%{_datadir}/%{name}/solaris +rm -f %{buildroot}%{_mandir}/man1/comp_err.1* +rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* +rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* # put logrotate script where it needs to be -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d -mv ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql-log-rotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mysqld -chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mysqld +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d +mv %{buildroot}%{_datadir}/%{name}/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysqld +chmod 644 %{buildroot}%{_sysconfdir}/logrotate.d/mysqld + +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d -echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf +# Back to src dir +popd # copy additional docs into build tree so %%doc will find them -cp %{SOURCE6} README.mysql-docs -cp %{SOURCE7} README.mysql-license +cp -p %{SOURCE6} README.mysql-docs +cp -p %{SOURCE7} README.mysql-license + +# Install the list of skipped tests to be available for user runs +install -p -m 0644 mysql-test/rh-skipped-tests.list %{buildroot}%{_datadir}/mysql-test + +# Upstream bugs: http://bugs.mysql.com/68517 http://bugs.mysql.com/68521 +chmod 0644 %{buildroot}%{_datadir}/%{name}/innodb_memcached_config.sql +find %{buildroot}%{_datadir}/mysql-test/{r,suite,t} -type f -print0 | xargs --null chmod 0644 +chmod 0644 %{buildroot}%{_datadir}/mysql-test/include/{start_mysqld,shutdown_mysqld,check_ipv4_mapped}.inc +for f in std_data/checkDBI_DBD-mysql.pl suite/engines/rr_trx/run_stress_tx_rr.pl \ + suite/funcs_1/lib/DataGen_local.pl suite/funcs_1/lib/DataGen_modify.pl \ + suite/funcs_2/lib/gen_charset_utf8.pl suite/opt_trace/validate_json.py \ + suite/rpl/extension/bhs.pl suite/rpl/extension/checksum.pl ; do + chmod 0755 %{buildroot}%{_datadir}/mysql-test/$f +done +chmod 0644 %{buildroot}%{_datadir}/sql-bench/graph-compare-results +dos2unix -k %{buildroot}%{_datadir}/sql-bench/innotest* -# install the list of skipped tests to be available for user runs -install -m 0644 mysql-test/rh-skipped-tests.list ${RPM_BUILD_ROOT}%{_datadir}/mysql-test +# These are in fact identical +rm %{buildroot}%{_mandir}/man1/{mysqltest,mysql_client_test}_embedded.1 +cp -p %{buildroot}%{_mandir}/man1/mysqltest.1 %{buildroot}%{_mandir}/man1/mysqltest_embedded.1 +cp -p %{buildroot}%{_mandir}/man1/mysql_client_test.1 %{buildroot}%{_mandir}/man1/mysql_client_test_embedded.1 -# we don't care about scripts for solaris -rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris +mkdir %{buildroot}%{_sysconfdir}/my.cnf.d + +%check +%if %runselftest + pushd build + # Hack to let 32- and 64-bit tests run concurrently on same build machine + case $(uname -m) in + aarch64 | ppc64 | ppc64p7 | s390x | sparc64 | x86_64 ) + MTR_BUILD_THREAD=7 + ;; + *) + MTR_BUILD_THREAD=11 + ;; + esac + + export MTR_BUILD_THREAD + + make test VERBOSE=1 + + # The cmake build scripts don't provide any simple way to control the + # options for mysql-test-run, so ignore the make target and just call it + # manually. Nonstandard options chosen are: + # --force to continue tests after a failure + # no retries please + # skip tests that are listed in rh-skipped-tests.list + # avoid redundant test runs with --binlog-format=mixed + # increase timeouts to prevent unwanted failures during mass rebuilds + # todo: enable --ssl + pushd mysql-test + cp ../../mysql-test/rh-skipped-tests.list . + ./mtr \ + --mem --parallel=auto --force --retry=0 \ + --skip-test-list=rh-skipped-tests.list \ + --mysqld=--binlog-format=mixed \ + --suite-timeout=720 --testcase-timeout=30 + rm -rf var/* + popd +%endif %pre server /usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : /usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \ - -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : + -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : %post libs -p /sbin/ldconfig %post server %systemd_post mysqld.service -/bin/chmod 0755 /var/lib/mysql /bin/touch /var/log/mysqld.log -%post embedded -p /sbin/ldconfig +# Handle upgrading from SysV initscript to native systemd unit. +# We can tell if a SysV version of mysql was previously installed by +# checking to see if the initscript is present. +%triggerun server -- mysql-server +if [ -f /etc/rc.d/init.d/mysqld ]; then + # Save the current service runlevel info + # User must manually run systemd-sysv-convert --apply mysqld + # to migrate them to systemd targets + /usr/bin/systemd-sysv-convert --save mysqld >/dev/null 2>&1 || : + + # Run these because the SysV package being removed won't do them + /sbin/chkconfig --del mysqld >/dev/null 2>&1 || : + /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || : +fi %preun server %systemd_preun mysqld.service @@ -536,16 +565,15 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %postun server %systemd_postun_with_restart mysqld.service -%postun embedded -p /sbin/ldconfig - %files %doc README COPYING README.mysql-license -%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google %doc README.mysql-docs %{_bindir}/msql2mysql %{_bindir}/mysql %{_bindir}/mysql_config +%{_bindir}/mysql_config-%{__isa_bits} +%{_bindir}/mysql_config_editor %{_bindir}/mysql_find_rows %{_bindir}/mysql_waitpid %{_bindir}/mysqlaccess @@ -558,32 +586,36 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_bindir}/mysqlslap %{_bindir}/my_print_defaults +%{_mandir}/man1/msql2mysql.1* %{_mandir}/man1/mysql.1* %{_mandir}/man1/mysql_config.1* +%{_mandir}/man1/mysql_config_editor.1* %{_mandir}/man1/mysql_find_rows.1* %{_mandir}/man1/mysql_waitpid.1* %{_mandir}/man1/mysqlaccess.1* %{_mandir}/man1/mysqladmin.1* +%{_mandir}/man1/mysqlbinlog.1* +%{_mandir}/man1/mysqlcheck.1* %{_mandir}/man1/mysqldump.1* +%{_mandir}/man1/mysqlimport.1* %{_mandir}/man1/mysqlshow.1* %{_mandir}/man1/mysqlslap.1* %{_mandir}/man1/my_print_defaults.1* -%{_libdir}/mysql/mysql_config - %files libs %doc README COPYING README.mysql-license -%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google # although the default my.cnf contains only server settings, we put it in the # libs package because it can be used for client settings too. %config(noreplace) /etc/my.cnf %dir %{_libdir}/mysql %{_libdir}/mysql/libmysqlclient.so.* -/etc/ld.so.conf.d/* +%config(noreplace) /etc/ld.so.conf.d/* %files common +%dir %{_sysconfdir}/my.cnf.d %dir %{_datadir}/%{name} %{_datadir}/%{name}/english +%lang(bg) %{_datadir}/%{name}/bulgarian %lang(cs) %{_datadir}/%{name}/czech %lang(da) %{_datadir}/%{name}/danish %lang(nl) %{_datadir}/%{name}/dutch @@ -609,9 +641,8 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_datadir}/%{name}/charsets %files server -%doc support-files/*.cnf - -%{_bindir}/myisamchk +%doc README COPYING README.mysql-license +%{_bindir}/myisamchk %{_bindir}/myisam_ftdump %{_bindir}/myisamlog %{_bindir}/myisampack @@ -640,12 +671,8 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_libdir}/mysql/INFO_SRC %{_libdir}/mysql/INFO_BIN - -%{_libdir}/mysql/mysqlbug - %{_libdir}/mysql/plugin -%{_mandir}/man1/msql2mysql.1* %{_mandir}/man1/myisamchk.1* %{_mandir}/man1/myisamlog.1* %{_mandir}/man1/myisampack.1* @@ -660,12 +687,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_mandir}/man1/mysql_zap.1* %{_mandir}/man1/mysqlbug.1* %{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqlbinlog.1* -%{_mandir}/man1/mysqlcheck.1* %{_mandir}/man1/mysqld_multi.1* %{_mandir}/man1/mysqld_safe.1* %{_mandir}/man1/mysqlhotcopy.1* -%{_mandir}/man1/mysqlimport.1* %{_mandir}/man1/mysqlman.1* %{_mandir}/man1/mysql_setpermission.1* %{_mandir}/man1/mysqltest.1* @@ -677,19 +701,15 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_mandir}/man1/mysql_tzinfo_to_sql.1* %{_mandir}/man8/mysqld.8* +%{_datadir}/%{name}/dictionary.txt %{_datadir}/%{name}/errmsg-utf8.txt %{_datadir}/%{name}/fill_help_tables.sql +%{_datadir}/%{name}/innodb_memcached_config.sql +%{_datadir}/%{name}/mysql_security_commands.sql %{_datadir}/%{name}/mysql_system_tables.sql %{_datadir}/%{name}/mysql_system_tables_data.sql %{_datadir}/%{name}/mysql_test_data_timezone.sql -%{_datadir}/mysql/errmsg-utf8.txt -%{_datadir}/mysql/fill_help_tables.sql -%{_datadir}/mysql/mysql_system_tables.sql -%{_datadir}/mysql/mysql_system_tables_data.sql -%{_datadir}/mysql/mysql_test_data_timezone.sql -%{_datadir}/mysql/my-*.cnf -%{_datadir}/mysql/config.*.ini - +%{_datadir}/%{name}/my-*.cnf %{_unitdir}/mysqld.service %{_libexecdir}/mysqld-prepare-db-dir %{_libexecdir}/mysqld-wait-ready @@ -701,6 +721,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %config(noreplace) %{_sysconfdir}/logrotate.d/mysqld %files devel +%doc README COPYING README.mysql-license +%{_bindir}/mysql_config +%{_bindir}/mysql_config-%{__isa_bits} %{_includedir}/mysql %{_datadir}/aclocal/mysql.m4 %{_libdir}/mysql/libmysqlclient.so @@ -708,10 +731,10 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %files embedded %doc README COPYING README.mysql-license -%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google %{_libdir}/mysql/libmysqld.so.* %files embedded-devel +%doc README COPYING README.mysql-license %{_libdir}/mysql/libmysqld.so %{_bindir}/mysql_client_test_embedded %{_bindir}/mysqltest_embedded @@ -719,16 +742,22 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris %{_mandir}/man1/mysqltest_embedded.1* %files bench +%doc README COPYING README.mysql-license %{_datadir}/sql-bench %files test +%doc README COPYING README.mysql-license %{_bindir}/mysql_client_test %{_bindir}/my_safe_process %attr(-,mysql,mysql) %{_datadir}/mysql-test - %{_mandir}/man1/mysql_client_test.1* %changelog +* Wed Oct 9 2013 Honza Horak 5.6.14-1 +- Update to MySQL 5.6.14, for various fixes described at + https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-14.html +- Incorporate changes done by Bjorn Munch + * Mon Sep 2 2013 Honza Horak 5.5.33-2 - Enhanced my.cnf to be the same as in mariadb Resolves: #1003115 @@ -820,10 +849,6 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris - Adjusting major soname number of libmysqlclient to avoid library name conflicts with mariadb -* Mon Mar 4 2013 Honza Horak 5.5.30-2 -- Renaming package mysql to MySQL to handle conflicting issues - with mariadb, which became default - * Tue Feb 12 2013 Honza Horak 5.5.30-1 - Update to MySQL 5.5.30, for various fixes described at http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-30.html diff --git a/filter-requires-mysql.sh b/filter-requires-mysql.sh deleted file mode 100755 index bce04c6..0000000 --- a/filter-requires-mysql.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -/usr/lib/rpm/perl.req $* | \ - grep -v -e "perl(th" \ - -e "perl(lib::mtr" -e "perl(lib::v1/mtr" -e "perl(mtr" diff --git a/generate-tarball.sh b/generate-tarball.sh old mode 100755 new mode 100744 diff --git a/libmysql.version b/libmysql.version deleted file mode 100644 index d547b5d..0000000 --- a/libmysql.version +++ /dev/null @@ -1,148 +0,0 @@ -# symbols exported from mysql 5.1 -libmysqlclient_16 { - global: - _fini; - _init; - my_init; - myodbc_remove_escape; - mysql_affected_rows; - mysql_autocommit; - mysql_change_user; - mysql_character_set_name; - mysql_close; - mysql_commit; - mysql_data_seek; - mysql_debug; - mysql_dump_debug_info; - mysql_embedded; - mysql_eof; - mysql_errno; - mysql_error; - mysql_escape_string; - mysql_fetch_field; - mysql_fetch_field_direct; - mysql_fetch_fields; - mysql_fetch_lengths; - mysql_fetch_row; - mysql_field_count; - mysql_field_seek; - mysql_field_tell; - mysql_free_result; - mysql_get_character_set_info; - mysql_get_client_info; - mysql_get_client_version; - mysql_get_host_info; - mysql_get_parameters; - mysql_get_proto_info; - mysql_get_server_info; - mysql_get_server_version; - mysql_get_ssl_cipher; - mysql_hex_string; - mysql_info; - mysql_init; - mysql_insert_id; - mysql_kill; - mysql_list_dbs; - mysql_list_fields; - mysql_list_processes; - mysql_list_tables; - mysql_more_results; - mysql_next_result; - mysql_num_fields; - mysql_num_rows; - mysql_options; - mysql_ping; - mysql_query; - mysql_read_query_result; - mysql_real_connect; - mysql_real_escape_string; - mysql_real_query; - mysql_refresh; - mysql_rollback; - mysql_row_seek; - mysql_row_tell; - mysql_select_db; - mysql_send_query; - mysql_server_end; - mysql_server_init; - mysql_set_character_set; - mysql_set_local_infile_default; - mysql_set_local_infile_handler; - mysql_set_server_option; - mysql_shutdown; - mysql_sqlstate; - mysql_ssl_set; - mysql_stat; - mysql_stmt_affected_rows; - mysql_stmt_attr_get; - mysql_stmt_attr_set; - mysql_stmt_bind_param; - mysql_stmt_bind_result; - mysql_stmt_close; - mysql_stmt_data_seek; - mysql_stmt_errno; - mysql_stmt_error; - mysql_stmt_execute; - mysql_stmt_fetch; - mysql_stmt_fetch_column; - mysql_stmt_field_count; - mysql_stmt_free_result; - mysql_stmt_init; - mysql_stmt_insert_id; - mysql_stmt_num_rows; - mysql_stmt_param_count; - mysql_stmt_param_metadata; - mysql_stmt_prepare; - mysql_stmt_reset; - mysql_stmt_result_metadata; - mysql_stmt_row_seek; - mysql_stmt_row_tell; - mysql_stmt_send_long_data; - mysql_stmt_sqlstate; - mysql_stmt_store_result; - mysql_store_result; - mysql_thread_end; - mysql_thread_id; - mysql_thread_init; - mysql_thread_safe; - mysql_use_result; - mysql_warning_count; -# These are documented in Paul DuBois' MySQL book, so we treat them as part -# of the de-facto API. - free_defaults; - handle_options; - load_defaults; - my_print_help; -# This isn't really documented anywhere, but it seems to be part of the -# de-facto API as well. We're not going to export the deprecated version -# make_scrambled_password, however. - my_make_scrambled_password; -# This really shouldn't be exported, but some applications use it as a -# workaround for inadequate threading support; see bug #846602 - THR_KEY_mysys; - local: - *; -}; -# symbols added in mysql 5.5 -libmysqlclient_18 { - global: - mysql_client_find_plugin; - mysql_client_register_plugin; - mysql_load_plugin; - mysql_load_plugin_v; - mysql_plugin_options; - mysql_stmt_next_result; -# -# Ideally the following symbols wouldn't be exported, but various applications -# require them. We limit the namespace damage by prefixing mysql_ -# (see mysql-dubious-exports.patch), which means the symbols are not present -# in libmysqlclient_16. -# -# mysql-connector-odbc requires these - mysql_default_charset_info; - mysql_get_charset; - mysql_get_charset_by_csname; - mysql_net_realloc; -# PHP's mysqli.so requires this (via the ER() macro) - mysql_client_errors; -}; diff --git a/my.cnf b/my.cnf index ac882ac..1df1f70 100644 --- a/my.cnf +++ b/my.cnf @@ -5,23 +5,13 @@ socket=/var/lib/mysql/mysql.sock symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the +# customize your systemd unit file for mysqld according to the # instructions in http://fedoraproject.org/wiki/Systemd -# Currently, there are mariadb and community-mysql packages in Fedora. -# This particular config file is included in respective RPMs of both of them, -# so the following settings are general and will be also used by both of them. -# Otherwise the RPMs would be in conflict. -# Settings for particular implementations like MariaDB are then -# defined in appropriate sections; for MariaDB server in [mariadb] section in -# /etc/my.cnf.d/server.cnf (part of mariadb-server). -# It doesn't matter that we set these settings only for [mysqld] here, -# because they will be read and used in mysqld_safe as well. +[mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid -[mysqld_safe] - # # include all files from the config directory # diff --git a/my_config.h b/my_config.h index 02baa3d..0672f49 100644 --- a/my_config.h +++ b/my_config.h @@ -31,3 +31,4 @@ #elif defined(__aarch64__) #include "my_config_aarch64.h" #endif + diff --git a/mysql-5.6.10-rpmlintrc b/mysql-5.6.10-rpmlintrc new file mode 100644 index 0000000..dfcdf39 --- /dev/null +++ b/mysql-5.6.10-rpmlintrc @@ -0,0 +1,48 @@ +# Filtered out until upstream fixes them +# Upstream bug: http://bugs.mysql.com/68518 +addFilter("incorrect-fsf-address") + +# Done to avoid _prefix/lib64/tmpfiles.d +addFilter("E: hardcoded-library-path in %\{_prefix\}/lib/tmpfiles.d") + +# Keeping the old summary for now +addFilter("W: name-repeated-in-summary C MySQL") + +# Spellchecked +addFilter("W: spelling-error %description -l en_US multi -> mulch, mufti") +addFilter("W: spelling-error %description -l en_US benchmarking -> bench marking, bench-marking, benchmark") +addFilter("W: spelling-error Summary(en_US) embeddable -> embedded") +addFilter("W: spelling-error.*embeddable -> embedded") + +# As long as the manual is part of the original tarball, we have do to +# this +addFilter("mysql.src: W: invalid-url Source0: mysql-5.6.[0-9]+-nodocs.tar.gz") + +# Leave the logfile where it is for now +addFilter("E: non-root-user-log-file /var/log/mysqld.log mysql") +addFilter("E: non-root-group-log-file /var/log/mysqld.log mysql") +addFilter("E: non-ghost-file /var/log/mysqld.log") +addFilter("E: zero-length /var/log/mysqld.log") + +addFilter("E: incoherent-logrotate-file /etc/logrotate.d/mysqld") + +# Hidden files and zero lenght files is normal for some tests +addFilter("W: hidden-file-or-dir /usr/share/mysql-test/std_data/.mylogin.cnf") +addFilter("E: zero-length /usr/share/mysql-test/suite/parts/t/disabled.def") +addFilter("E: zero-length /usr/share/mysql-test/std_data/bug37631.MYD") +addFilter("E: zero-length /usr/share/mysql-test/std_data/cluster_7022_table.MYD") +addFilter("E: zero-length /usr/share/mysql-test/collections/disabled-weekly.list") +addFilter("E: zero-length /usr/share/mysql-test/collections/disabled-daily.list") + +# debuginfo bug? +addFilter("E: non-standard-dir-perm /usr/src/debug/tmp 01777") + +# mysql-config *script* in lib +addFilter("W: only-non-binary-in-usr-lib") + +# missing +addFilter("W: no-manual-page-for-binary my_safe_process") + +# cluster is gone +addFilter("W: obsolete-not-provided mysql-cluster") + diff --git a/mysql.tmpfiles.d b/mysql.tmpfiles.d new file mode 100644 index 0000000..74cd5f8 --- /dev/null +++ b/mysql.tmpfiles.d @@ -0,0 +1 @@ +d /var/run/mysqld 0755 mysql mysql - diff --git a/mysql_config.sh b/mysql_config.sh new file mode 100644 index 0000000..4849e95 --- /dev/null +++ b/mysql_config.sh @@ -0,0 +1,26 @@ +#! /bin/bash +# +# Wrapper script for mysql_config to support multilib +# +# This command respects setarch + +bits=$(rpm --eval %__isa_bits) + +case $bits in + 32|64) status=known ;; + *) status=unknown ;; +esac + +if [ "$status" = "unknown" ] ; then + echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits" + exit 1 +fi + + +if [ -x /usr/bin/mysql_config-$bits ] ; then + /usr/bin/mysql_config-$bits "$@" +else + echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing" + exit 1 +fi + diff --git a/rh-skipped-tests-arm.list b/rh-skipped-tests-arm.list index a6ae9bf..6fb816c 100644 --- a/rh-skipped-tests-arm.list +++ b/rh-skipped-tests-arm.list @@ -6,3 +6,9 @@ perfschema.func_file_io : rhbz#773116 cycle counter does not work on arm perfschema.func_mutex : rhbz#773116 cycle counter does not work on arm + +# These tests fail in Fedora rawhide scratch build + +innodb.innodb_ctype_ldml : Unknown collation: 'utf8_5624_1' +main.ctype_ldml : Unknown collation: 'utf8_5624_1' +perfschema.setup_objects : diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index 32f477c..8d92952 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -11,4 +11,3 @@ outfile_loaddata : bug#46895 code wrong, expected results wrong too # as of 5.5.9. Upstream at http://bugs.mysql.com/bug.php?id=60155 innodb.innodb : bug#60155 has platform-dependent results - diff --git a/sources b/sources index 7c848fa..1a61e68 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eca726ea3457ac885f31aeeee65f9ba3 mysql-5.5.33-nodocs.tar.xz +7da75f4e0a3e1fdc62bfe7f12b85a6d0 mysql-5.6.14-nodocs.tar.xz