Rebase patches to not leave backup files when not applied smoothly

This commit is contained in:
Honza Horák 2012-12-06 22:53:33 +01:00 committed by Michal Schorm
parent a07f891542
commit bded96964a
11 changed files with 163 additions and 160 deletions

View File

@ -4,10 +4,10 @@ This patch enhances connect command by an option to specify a cipher
and tests are adjusted to specify the expected cipher explicitly. and tests are adjusted to specify the expected cipher explicitly.
Upstream bug report: http://bugs.mysql.com/bug.php?id=64461 Upstream bug report: http://bugs.mysql.com/bug.php?id=64461
diff -Naur mysql-5.5.27.orig/client/mysqltest.cc mysql-5.5.27/client/mysqltest.cc diff -up mysql-5.5.28/client/mysqltest.cc.p18 mysql-5.5.28/client/mysqltest.cc
--- mysql-5.5.27.orig/client/mysqltest.cc 2012-07-20 13:38:02.000000000 -0400 --- mysql-5.5.28/client/mysqltest.cc.p18 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.27/client/mysqltest.cc 2012-08-05 01:01:21.502130550 -0400 +++ mysql-5.5.28/client/mysqltest.cc 2012-12-06 14:25:46.370001422 +0100
@@ -5458,6 +5458,7 @@ @@ -5458,6 +5458,7 @@ void do_connect(struct st_command *comma
my_bool con_ssl= 0, con_compress= 0; my_bool con_ssl= 0, con_compress= 0;
my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0; my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0;
struct st_connection* con_slot; struct st_connection* con_slot;
@ -15,7 +15,7 @@ diff -Naur mysql-5.5.27.orig/client/mysqltest.cc mysql-5.5.27/client/mysqltest.c
static DYNAMIC_STRING ds_connection_name; static DYNAMIC_STRING ds_connection_name;
static DYNAMIC_STRING ds_host; static DYNAMIC_STRING ds_host;
@@ -5548,6 +5549,8 @@ @@ -5548,6 +5549,8 @@ void do_connect(struct st_command *comma
con_shm= 1; con_shm= 1;
else if (!strncmp(con_options, "CLEARTEXT", 9)) else if (!strncmp(con_options, "CLEARTEXT", 9))
con_cleartext_enable= 1; con_cleartext_enable= 1;
@ -24,7 +24,7 @@ diff -Naur mysql-5.5.27.orig/client/mysqltest.cc mysql-5.5.27/client/mysqltest.c
else else
die("Illegal option to connect: %.*s", die("Illegal option to connect: %.*s",
(int) (end - con_options), con_options); (int) (end - con_options), con_options);
@@ -5595,8 +5598,11 @@ @@ -5595,8 +5598,11 @@ void do_connect(struct st_command *comma
if (con_ssl) if (con_ssl)
{ {
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
@ -37,10 +37,10 @@ diff -Naur mysql-5.5.27.orig/client/mysqltest.cc mysql-5.5.27/client/mysqltest.c
#if MYSQL_VERSION_ID >= 50000 #if MYSQL_VERSION_ID >= 50000
/* Turn on ssl_verify_server_cert only if host is "localhost" */ /* Turn on ssl_verify_server_cert only if host is "localhost" */
opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost"); opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost");
diff -Naur mysql-5.5.27.orig/mysql-test/t/openssl_1.test mysql-5.5.27/mysql-test/t/openssl_1.test 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.27.orig/mysql-test/t/openssl_1.test 2012-07-20 13:38:03.000000000 -0400 --- mysql-5.5.28/mysql-test/t/openssl_1.test.p18 2012-08-29 10:50:47.000000000 +0200
+++ mysql-5.5.27/mysql-test/t/openssl_1.test 2012-08-05 01:00:27.798822919 -0400 +++ mysql-5.5.28/mysql-test/t/openssl_1.test 2012-12-06 14:25:46.371001424 +0100
@@ -20,13 +20,13 @@ @@ -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"; grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
flush privileges; flush privileges;
@ -59,7 +59,7 @@ diff -Naur mysql-5.5.27.orig/mysql-test/t/openssl_1.test mysql-5.5.27/mysql-test
connection con1; connection con1;
# Check ssl turned on # Check ssl turned on
@@ -119,7 +119,7 @@ @@ -125,7 +125,7 @@ drop table t1;
# verification of servers certificate by setting both ca certificate # verification of servers certificate by setting both ca certificate
# and ca path to NULL # and ca path to NULL
# #
@ -68,7 +68,7 @@ diff -Naur mysql-5.5.27.orig/mysql-test/t/openssl_1.test mysql-5.5.27/mysql-test
--echo End of 5.0 tests --echo End of 5.0 tests
# #
@@ -244,7 +244,7 @@ @@ -250,7 +250,7 @@ select 'is still running; no cipher requ
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509; GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
@ -77,21 +77,9 @@ diff -Naur mysql-5.5.27.orig/mysql-test/t/openssl_1.test mysql-5.5.27/mysql-test
SHOW STATUS LIKE 'Ssl_cipher'; SHOW STATUS LIKE 'Ssl_cipher';
disconnect con1; disconnect con1;
connection default; connection default;
diff -Naur mysql-5.5.27.orig/mysql-test/t/ssl.test mysql-5.5.27/mysql-test/t/ssl.test 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.27.orig/mysql-test/t/ssl.test 2012-07-20 13:38:03.000000000 -0400 --- mysql-5.5.28/mysql-test/t/ssl_8k_key.test.p18 2012-08-29 10:50:47.000000000 +0200
+++ mysql-5.5.27/mysql-test/t/ssl.test 2012-08-05 01:00:27.800822919 -0400 +++ mysql-5.5.28/mysql-test/t/ssl_8k_key.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 -Naur mysql-5.5.27.orig/mysql-test/t/ssl_8k_key.test mysql-5.5.27/mysql-test/t/ssl_8k_key.test
--- mysql-5.5.27.orig/mysql-test/t/ssl_8k_key.test 2012-07-20 13:38:03.000000000 -0400
+++ mysql-5.5.27/mysql-test/t/ssl_8k_key.test 2012-08-05 01:00:27.799822918 -0400
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
# #
# Bug#29784 YaSSL assertion failure when reading 8k key. # Bug#29784 YaSSL assertion failure when reading 8k key.
@ -101,9 +89,9 @@ diff -Naur mysql-5.5.27.orig/mysql-test/t/ssl_8k_key.test mysql-5.5.27/mysql-tes
## This test file is for testing encrypted communication only, not other ## This test file is for testing encrypted communication only, not other
## encryption routines that the SSL library happens to provide! ## encryption routines that the SSL library happens to provide!
diff -Naur mysql-5.5.27.orig/mysql-test/t/ssl_compress.test mysql-5.5.27/mysql-test/t/ssl_compress.test 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.27.orig/mysql-test/t/ssl_compress.test 2012-07-20 13:38:03.000000000 -0400 --- mysql-5.5.28/mysql-test/t/ssl_compress.test.p18 2012-08-29 10:50:47.000000000 +0200
+++ mysql-5.5.27/mysql-test/t/ssl_compress.test 2012-08-05 01:00:27.799822918 -0400 +++ mysql-5.5.28/mysql-test/t/ssl_compress.test 2012-12-06 14:25:46.371001424 +0100
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
# Save the initial number of concurrent sessions # Save the initial number of concurrent sessions
--source include/count_sessions.inc --source include/count_sessions.inc
@ -113,3 +101,15 @@ diff -Naur mysql-5.5.27.orig/mysql-test/t/ssl_compress.test mysql-5.5.27/mysql-t
# Check ssl turned on # Check ssl turned on
SHOW STATUS LIKE 'Ssl_cipher'; 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';

View File

@ -9,10 +9,10 @@ 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. by mysql.h, but these two are relatively easy to get rid of.
diff -Naur mysql-5.5.14.orig/client/mysqladmin.cc mysql-5.5.14/client/mysqladmin.cc diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc
--- mysql-5.5.14.orig/client/mysqladmin.cc 2011-06-21 12:42:41.000000000 -0400 --- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.14/client/mysqladmin.cc 2011-07-12 12:19:59.578066771 -0400 +++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100
@@ -20,6 +20,7 @@ @@ -21,6 +21,7 @@
#include <my_pthread.h> /* because of signal() */ #include <my_pthread.h> /* because of signal() */
#include <sys/stat.h> #include <sys/stat.h>
#include <mysql.h> #include <mysql.h>
@ -20,7 +20,7 @@ diff -Naur mysql-5.5.14.orig/client/mysqladmin.cc mysql-5.5.14/client/mysqladmin
#include <sql_common.h> #include <sql_common.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
@@ -975,9 +976,9 @@ @@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql
} }
} }
if (old) if (old)
@ -32,10 +32,10 @@ diff -Naur mysql-5.5.14.orig/client/mysqladmin.cc mysql-5.5.14/client/mysqladmin
} }
else else
crypted_pw[0]=0; /* No password */ crypted_pw[0]=0; /* No password */
diff -Naur mysql-5.5.14.orig/include/errmsg.h mysql-5.5.14/include/errmsg.h diff -up mysql-5.5.28/include/errmsg.h.p8 mysql-5.5.28/include/errmsg.h
--- mysql-5.5.14.orig/include/errmsg.h 2011-06-21 12:42:39.000000000 -0400 --- mysql-5.5.28/include/errmsg.h.p8 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.14/include/errmsg.h 2011-07-12 11:55:29.194204015 -0400 +++ mysql-5.5.28/include/errmsg.h 2012-12-06 14:16:14.598520859 +0100
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@ extern "C" {
#endif #endif
void init_client_errs(void); void init_client_errs(void);
void finish_client_errs(void); void finish_client_errs(void);
@ -43,31 +43,36 @@ diff -Naur mysql-5.5.14.orig/include/errmsg.h mysql-5.5.14/include/errmsg.h
extern const char *client_errors[]; /* Error messages */ extern const char *client_errors[]; /* Error messages */
#ifdef __cplusplus #ifdef __cplusplus
} }
diff -Naur mysql-5.5.14.orig/include/my_sys.h mysql-5.5.14/include/my_sys.h diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h
--- mysql-5.5.14.orig/include/my_sys.h 2011-06-21 12:42:39.000000000 -0400 --- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.14/include/my_sys.h 2011-07-12 11:55:29.195231427 -0400 +++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100
@@ -223,6 +223,7 @@ @@ -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);
/* charsets */ void hash_password(unsigned long *to, const char *password, unsigned int password_len);
#define MY_ALL_CHARSETS_SIZE 2048 -void make_scrambled_password_323(char *to, const char *password);
+#define default_charset_info mysql_default_charset_info /* namespace sanity */ void scramble_323(char *to, const char *message, const char *password);
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; my_bool check_scramble_323(const unsigned char *reply, const char *message,
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; unsigned long *salt);
extern CHARSET_INFO compiled_charsets[]; void get_salt_from_password_323(unsigned long *res, const char *password);
@@ -900,6 +901,9 @@ void make_password_from_salt_323(char *to, const unsigned long *salt);
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 */ -void make_scrambled_password(char *to, const char *password);
+#define get_charset_by_csname mysql_get_charset_by_csname void scramble(char *to, const char *message, const char *password);
+ my_bool check_scramble(const unsigned char *reply, const char *message,
extern CHARSET_INFO *get_charset(uint cs_number, myf flags); const unsigned char *hash_stage2);
extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, --- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200
diff -Naur mysql-5.5.14.orig/include/mysql.h.pp mysql-5.5.14/include/mysql.h.pp +++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100
--- mysql-5.5.14.orig/include/mysql.h.pp 2011-06-21 12:42:39.000000000 -0400 @@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio);
+++ mysql-5.5.14/include/mysql.h.pp 2011-07-12 11:58:43.662068564 -0400
@@ -86,7 +86,7 @@
void my_net_local_init(NET *net); void my_net_local_init(NET *net);
void net_end(NET *net); void net_end(NET *net);
void net_clear(NET *net, my_bool clear_buffer); void net_clear(NET *net, my_bool clear_buffer);
@ -76,7 +81,7 @@ diff -Naur mysql-5.5.14.orig/include/mysql.h.pp mysql-5.5.14/include/mysql.h.pp
my_bool net_flush(NET *net); my_bool net_flush(NET *net);
my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
my_bool net_write_command(NET *net,unsigned char command, my_bool net_write_command(NET *net,unsigned char command,
@@ -128,13 +128,11 @@ @@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un
double my_rnd(struct rand_struct *); double my_rnd(struct rand_struct *);
void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); 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 hash_password(unsigned long *to, const char *password, unsigned int password_len);
@ -90,36 +95,31 @@ diff -Naur mysql-5.5.14.orig/include/mysql.h.pp mysql-5.5.14/include/mysql.h.pp
void scramble(char *to, const char *message, const char *password); void scramble(char *to, const char *message, const char *password);
my_bool check_scramble(const unsigned char *reply, const char *message, my_bool check_scramble(const unsigned char *reply, const char *message,
const unsigned char *hash_stage2); const unsigned char *hash_stage2);
diff -Naur mysql-5.5.14.orig/include/mysql_com.h mysql-5.5.14/include/mysql_com.h diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h
--- mysql-5.5.14.orig/include/mysql_com.h 2011-06-21 12:42:39.000000000 -0400 --- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100
+++ mysql-5.5.14/include/mysql_com.h 2011-07-12 11:58:52.166065391 -0400 +++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100
@@ -452,6 +452,7 @@ @@ -218,6 +218,7 @@ extern uint my_large_page_size;
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 @@
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); /* charsets */
-void make_scrambled_password_323(char *to, const char *password); #define MY_ALL_CHARSETS_SIZE 2048
void scramble_323(char *to, const char *message, const char *password); +#define default_charset_info mysql_default_charset_info /* namespace sanity */
my_bool check_scramble_323(const unsigned char *reply, const char *message, extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
unsigned long *salt); extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
void get_salt_from_password_323(unsigned long *res, const char *password); extern CHARSET_INFO compiled_charsets[];
void make_password_from_salt_323(char *to, const unsigned long *salt); @@ -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);
-void make_scrambled_password(char *to, const char *password); +#define get_charset mysql_get_charset /* namespace sanity */
void scramble(char *to, const char *message, const char *password); +#define get_charset_by_csname mysql_get_charset_by_csname
my_bool check_scramble(const unsigned char *reply, const char *message, +
const unsigned char *hash_stage2); extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
diff -Naur mysql-5.5.14.orig/sql/password.c mysql-5.5.14/sql/password.c extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
--- mysql-5.5.14.orig/sql/password.c 2011-06-21 12:42:40.000000000 -0400 extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
+++ mysql-5.5.14/sql/password.c 2011-07-12 11:59:29.194068612 -0400 diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c
@@ -154,23 +154,6 @@ --- 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
/* /*
@ -143,7 +143,7 @@ diff -Naur mysql-5.5.14.orig/sql/password.c mysql-5.5.14/sql/password.c
Scramble string with password. Scramble string with password.
Used in pre 4.1 authentication phase. Used in pre 4.1 authentication phase.
SYNOPSIS SYNOPSIS
@@ -433,23 +416,6 @@ @@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to
/* /*

View File

@ -1,10 +1,10 @@
"extern int errno" is just a really bad idea. "extern int errno" is just a really bad idea.
diff -Naur mysql-5.5.8.orig/include/my_sys.h mysql-5.5.8/include/my_sys.h diff -up mysql-5.5.28/include/my_sys.h.p1 mysql-5.5.28/include/my_sys.h
--- mysql-5.5.8.orig/include/my_sys.h 2010-12-03 12:58:24.000000000 -0500 --- mysql-5.5.28/include/my_sys.h.p1 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.8/include/my_sys.h 2010-12-20 21:20:12.622190325 -0500 +++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:09:15.218170154 +0100
@@ -201,13 +201,8 @@ @@ -197,13 +197,8 @@ extern void my_large_free(uchar *ptr);
#define my_afree(PTR) my_free(PTR) #define my_afree(PTR) my_free(PTR)
#endif /* HAVE_ALLOCA */ #endif /* HAVE_ALLOCA */

View File

@ -4,22 +4,10 @@ machines where char is unsigned print "255" instead. Filed upstream at
http://bugs.mysql.com/bug.php?id=59905 http://bugs.mysql.com/bug.php?id=59905
diff -Naur mysql-5.5.8.orig/sql/sql_plugin.cc mysql-5.5.8/sql/sql_plugin.cc 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.8.orig/sql/sql_plugin.cc 2010-12-03 12:58:26.000000000 -0500 --- 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.8/sql/sql_plugin.cc 2011-02-01 20:34:10.218305349 -0500 +++ 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
@@ -2024,7 +2024,7 @@ @@ -45,7 +45,7 @@ set session rpl_semi_sync_master_enabled
goto err;
result= (int) tmp;
}
- *(my_bool *) save= -result;
+ *(my_bool *) save= result ? true : false;
return 0;
err:
return 1;
diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result
--- mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2010-12-03 12:58:25.000000000 -0500
+++ mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_enabled_basic.result 2011-02-01 21:53:20.006302245 -0500
@@ -45,7 +45,7 @@
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable and should be set with SET GLOBAL 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; select @@global.rpl_semi_sync_master_enabled;
@@global.rpl_semi_sync_master_enabled @@global.rpl_semi_sync_master_enabled
@ -28,10 +16,10 @@ diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_master_ena
select @@session.rpl_semi_sync_master_enabled; select @@session.rpl_semi_sync_master_enabled;
ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable ERROR HY000: Variable 'rpl_semi_sync_master_enabled' is a GLOBAL variable
show global variables like 'rpl_semi_sync_master_enabled'; show global variables like 'rpl_semi_sync_master_enabled';
diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result mysql-5.5.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 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.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2010-12-03 12:58:26.000000000 -0500 --- 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.8/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enabled_basic.result 2011-02-01 21:53:59.689249491 -0500 +++ 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 @@ @@ -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 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; select @@global.rpl_semi_sync_slave_enabled;
@@global.rpl_semi_sync_slave_enabled @@global.rpl_semi_sync_slave_enabled
@ -40,3 +28,15 @@ diff -Naur mysql-5.5.8.orig/mysql-test/suite/sys_vars/r/rpl_semi_sync_slave_enab
select @@session.rpl_semi_sync_slave_enabled; select @@session.rpl_semi_sync_slave_enabled;
ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable ERROR HY000: Variable 'rpl_semi_sync_slave_enabled' is a GLOBAL variable
show global variables like 'rpl_semi_sync_slave_enabled'; 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;

View File

@ -2,10 +2,10 @@ Support s390/s390x in performance schema's cycle-counting functions.
Filed upstream at http://bugs.mysql.com/bug.php?id=59953 Filed upstream at http://bugs.mysql.com/bug.php?id=59953
diff -Naur mysql-5.5.8.orig/include/my_rdtsc.h mysql-5.5.8/include/my_rdtsc.h diff -up mysql-5.5.28/include/my_rdtsc.h.p11 mysql-5.5.28/include/my_rdtsc.h
--- mysql-5.5.8.orig/include/my_rdtsc.h 2010-12-03 12:58:24.000000000 -0500 --- mysql-5.5.28/include/my_rdtsc.h.p11 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.8/include/my_rdtsc.h 2011-02-04 11:16:45.431459913 -0500 +++ mysql-5.5.28/include/my_rdtsc.h 2012-12-06 14:22:13.651823354 +0100
@@ -124,6 +124,7 @@ @@ -125,6 +125,7 @@ C_MODE_END
#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25 #define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26 #define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27 #define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
@ -13,10 +13,10 @@ diff -Naur mysql-5.5.8.orig/include/my_rdtsc.h mysql-5.5.8/include/my_rdtsc.h
#endif #endif
diff -Naur mysql-5.5.8.orig/mysys/my_rdtsc.c mysql-5.5.8/mysys/my_rdtsc.c diff -up mysql-5.5.28/mysys/my_rdtsc.c.p11 mysql-5.5.28/mysys/my_rdtsc.c
--- mysql-5.5.8.orig/mysys/my_rdtsc.c 2010-12-03 12:58:26.000000000 -0500 --- mysql-5.5.28/mysys/my_rdtsc.c.p11 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.8/mysys/my_rdtsc.c 2011-02-04 11:16:45.432465577 -0500 +++ mysql-5.5.28/mysys/my_rdtsc.c 2012-12-06 14:22:13.672823375 +0100
@@ -224,6 +224,13 @@ @@ -224,6 +224,13 @@ ulonglong my_timer_cycles(void)
clock_gettime(CLOCK_SGI_CYCLE, &tp); clock_gettime(CLOCK_SGI_CYCLE, &tp);
return (ulonglong) tp.tv_sec * 1000000000 + (ulonglong) tp.tv_nsec; return (ulonglong) tp.tv_sec * 1000000000 + (ulonglong) tp.tv_nsec;
} }
@ -30,7 +30,7 @@ diff -Naur mysql-5.5.8.orig/mysys/my_rdtsc.c mysql-5.5.8/mysys/my_rdtsc.c
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME) #elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
/* gethrtime may appear as either cycle or nanosecond counter */ /* gethrtime may appear as either cycle or nanosecond counter */
return (ulonglong) gethrtime(); return (ulonglong) gethrtime();
@@ -533,6 +540,8 @@ @@ -533,6 +540,8 @@ void my_timer_init(MY_TIMER_INFO *mti)
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC32; mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
#elif defined(__sgi) && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE) #elif defined(__sgi) && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE)
mti->cycles.routine= MY_TIMER_ROUTINE_SGI_CYCLE; mti->cycles.routine= MY_TIMER_ROUTINE_SGI_CYCLE;

View File

@ -8,10 +8,10 @@ mysqld.cc; is it important to fix any of the others?
Filed upstream at http://bugs.mysql.com/bug.php?id=35019 Filed upstream at http://bugs.mysql.com/bug.php?id=35019
diff -Naur mysql-5.5.8.orig/sql/mysqld.cc mysql-5.5.8/sql/mysqld.cc diff -up mysql-5.5.28/sql/mysqld.cc.p5 mysql-5.5.28/sql/mysqld.cc
--- mysql-5.5.8.orig/sql/mysqld.cc 2010-12-03 12:58:26.000000000 -0500 --- mysql-5.5.28/sql/mysqld.cc.p5 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.8/sql/mysqld.cc 2010-12-20 22:01:08.939186906 -0500 +++ mysql-5.5.28/sql/mysqld.cc 2012-12-06 14:13:59.765407494 +0100
@@ -2602,6 +2602,70 @@ @@ -2599,6 +2599,70 @@ static void init_signals(void)
} }
@ -82,7 +82,7 @@ diff -Naur mysql-5.5.8.orig/sql/mysqld.cc mysql-5.5.8/sql/mysqld.cc
static void start_signal_handler(void) static void start_signal_handler(void)
{ {
int error; int error;
@@ -2612,15 +2676,7 @@ @@ -2609,15 +2673,7 @@ static void start_signal_handler(void)
#if !defined(HAVE_DEC_3_2_THREADS) #if !defined(HAVE_DEC_3_2_THREADS)
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM); pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
(void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED); (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
@ -99,7 +99,7 @@ diff -Naur mysql-5.5.8.orig/sql/mysqld.cc mysql-5.5.8/sql/mysqld.cc
#endif #endif
mysql_mutex_lock(&LOCK_thread_count); mysql_mutex_lock(&LOCK_thread_count);
@@ -4361,36 +4417,8 @@ @@ -4398,36 +4454,8 @@ int mysqld_main(int argc, char **argv)
unireg_abort(1); // Will do exit unireg_abort(1); // Will do exit
init_signals(); init_signals();

View File

@ -7,10 +7,10 @@ Filed upstream at http://bugs.mysql.com/bug.php?id=64631
Error: BUFFER_SIZE_WARNING: 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. /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 -Naur mysql-5.5.23.orig/sql/sql_prepare.cc mysql-5.5.23/sql/sql_prepare.cc diff -up mysql-5.5.28/sql/sql_prepare.cc.p20 mysql-5.5.28/sql/sql_prepare.cc
--- mysql-5.5.23.orig/sql/sql_prepare.cc 2012-03-29 15:07:12.000000000 -0400 --- mysql-5.5.28/sql/sql_prepare.cc.p20 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.23/sql/sql_prepare.cc 2012-04-27 22:19:09.196076848 -0400 +++ mysql-5.5.28/sql/sql_prepare.cc 2012-12-06 14:27:28.647087401 +0100
@@ -2871,7 +2871,7 @@ @@ -2879,7 +2879,7 @@ void mysql_stmt_get_longdata(THD *thd, c
{ {
stmt->state= Query_arena::STMT_ERROR; stmt->state= Query_arena::STMT_ERROR;
stmt->last_errno= thd->stmt_da->sql_errno(); stmt->last_errno= thd->stmt_da->sql_errno();
@ -25,10 +25,10 @@ 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: 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. /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 -Naur mysql-5.5.23.orig/sql/sql_trigger.cc mysql-5.5.23/sql/sql_trigger.cc diff -up mysql-5.5.28/sql/sql_trigger.cc.p20 mysql-5.5.28/sql/sql_trigger.cc
--- mysql-5.5.23.orig/sql/sql_trigger.cc 2012-03-29 15:07:12.000000000 -0400 --- mysql-5.5.28/sql/sql_trigger.cc.p20 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.23/sql/sql_trigger.cc 2012-04-27 22:19:09.198076947 -0400 +++ mysql-5.5.28/sql/sql_trigger.cc 2012-12-06 14:27:28.648087398 +0100
@@ -2260,7 +2260,7 @@ @@ -2260,7 +2260,7 @@ void Table_triggers_list::mark_fields_us
void Table_triggers_list::set_parse_error_message(char *error_message) void Table_triggers_list::set_parse_error_message(char *error_message)
{ {
m_has_unparseable_trigger= true; m_has_unparseable_trigger= true;
@ -43,10 +43,10 @@ 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: 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. /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 -Naur mysql-5.5.23.orig/storage/innobase/handler/ha_innodb.cc mysql-5.5.23/storage/innobase/handler/ha_innodb.cc 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.23.orig/storage/innobase/handler/ha_innodb.cc 2012-03-29 15:07:11.000000000 -0400 --- mysql-5.5.28/storage/innobase/handler/ha_innodb.cc.p20 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.23/storage/innobase/handler/ha_innodb.cc 2012-04-27 22:19:09.201077088 -0400 +++ mysql-5.5.28/storage/innobase/handler/ha_innodb.cc 2012-12-06 14:27:28.653087416 +0100
@@ -7023,7 +7023,7 @@ @@ -7054,7 +7054,7 @@ ha_innobase::create(
ut_a(strlen(name) < sizeof(name2)); ut_a(strlen(name) < sizeof(name2));

View File

@ -13,10 +13,10 @@ of any real performance gain from optimizing these calls. So I'm keeping
this patch. this patch.
diff -Naur mysql-5.5.8.orig/include/m_string.h mysql-5.5.8/include/m_string.h diff -up mysql-5.5.28/include/m_string.h.p2 mysql-5.5.28/include/m_string.h
--- mysql-5.5.8.orig/include/m_string.h 2010-12-03 12:58:24.000000000 -0500 --- mysql-5.5.28/include/m_string.h.p2 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.8/include/m_string.h 2010-12-20 21:39:13.905186372 -0500 +++ mysql-5.5.28/include/m_string.h 2012-12-06 14:12:31.225333542 +0100
@@ -74,15 +74,6 @@ @@ -77,15 +77,6 @@ extern "C" {
extern void *(*my_str_malloc)(size_t); extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *); extern void (*my_str_free)(void *);

View File

@ -4,10 +4,10 @@ which is not required by the C spec, and is not true on ARM for instance.
Per bug #744707. Per bug #744707.
diff -Naur mysql-5.5.16.orig/sql-common/client_plugin.c mysql-5.5.16/sql-common/client_plugin.c diff -up mysql-5.5.28/sql-common/client_plugin.c.p12 mysql-5.5.28/sql-common/client_plugin.c
--- mysql-5.5.16.orig/sql-common/client_plugin.c 2011-09-09 11:56:39.000000000 -0400 --- mysql-5.5.28/sql-common/client_plugin.c.p12 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.16/sql-common/client_plugin.c 2011-10-16 23:00:00.708799138 -0400 +++ mysql-5.5.28/sql-common/client_plugin.c 2012-12-06 14:22:54.494857607 +0100
@@ -228,11 +228,13 @@ @@ -233,11 +233,13 @@ int mysql_client_plugin_init()
{ {
MYSQL mysql; MYSQL mysql;
struct st_mysql_client_plugin **builtin; struct st_mysql_client_plugin **builtin;
@ -21,7 +21,7 @@ diff -Naur mysql-5.5.16.orig/sql-common/client_plugin.c mysql-5.5.16/sql-common/
pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW); pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
init_alloc_root(&mem_root, 128, 128); init_alloc_root(&mem_root, 128, 128);
@@ -244,7 +246,7 @@ @@ -249,7 +251,7 @@ int mysql_client_plugin_init()
pthread_mutex_lock(&LOCK_load_client_plugin); pthread_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++) for (builtin= mysql_client_builtins; *builtin; builtin++)
@ -30,7 +30,7 @@ diff -Naur mysql-5.5.16.orig/sql-common/client_plugin.c mysql-5.5.16/sql-common/
pthread_mutex_unlock(&LOCK_load_client_plugin); pthread_mutex_unlock(&LOCK_load_client_plugin);
@@ -288,9 +290,13 @@ @@ -293,9 +295,13 @@ struct st_mysql_client_plugin *
mysql_client_register_plugin(MYSQL *mysql, mysql_client_register_plugin(MYSQL *mysql,
struct st_mysql_client_plugin *plugin) struct st_mysql_client_plugin *plugin)
{ {
@ -44,7 +44,7 @@ diff -Naur mysql-5.5.16.orig/sql-common/client_plugin.c mysql-5.5.16/sql-common/
pthread_mutex_lock(&LOCK_load_client_plugin); pthread_mutex_lock(&LOCK_load_client_plugin);
/* make sure the plugin wasn't loaded meanwhile */ /* make sure the plugin wasn't loaded meanwhile */
@@ -302,7 +308,7 @@ @@ -307,7 +313,7 @@ mysql_client_register_plugin(MYSQL *mysq
plugin= NULL; plugin= NULL;
} }
else else

View File

@ -4,10 +4,10 @@ forgotten the issue entirely. So we now maintain our own list of exported
symbols and jam it into the build with this hack. symbols and jam it into the build with this hack.
diff -Naur mysql-5.5.8.orig/libmysql/CMakeLists.txt mysql-5.5.8/libmysql/CMakeLists.txt diff -up mysql-5.5.28/libmysql/CMakeLists.txt.p7 mysql-5.5.28/libmysql/CMakeLists.txt
--- mysql-5.5.8.orig/libmysql/CMakeLists.txt 2010-12-03 12:58:26.000000000 -0500 --- mysql-5.5.28/libmysql/CMakeLists.txt.p7 2012-08-29 10:50:46.000000000 +0200
+++ mysql-5.5.8/libmysql/CMakeLists.txt 2010-12-21 21:00:07.135311386 -0500 +++ mysql-5.5.28/libmysql/CMakeLists.txt 2012-12-06 14:15:03.905461517 +0100
@@ -197,7 +197,7 @@ @@ -209,7 +209,7 @@ IF(NOT DISABLE_SHARED)
SET(libmysql_link_flags) SET(libmysql_link_flags)
ENDIF() ENDIF()
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS

View File

@ -1,6 +1,6 @@
Name: mysql Name: mysql
Version: 5.5.28 Version: 5.5.28
Release: 2%{?dist} Release: 3%{?dist}
Summary: MySQL client programs and shared libraries Summary: MySQL client programs and shared libraries
Group: Applications/Databases Group: Applications/Databases
@ -705,6 +705,9 @@ fi
%{_mandir}/man1/mysql_client_test.1* %{_mandir}/man1/mysql_client_test.1*
%changelog %changelog
* Thu Dec 6 2012 Honza Horak <hhorak@redhat.com> 5.5.28-3
- Rebase patches to not leave backup files when not applied smoothly
* Wed Dec 5 2012 Tom Lane <tgl@redhat.com> 5.5.28-2 * Wed Dec 5 2012 Tom Lane <tgl@redhat.com> 5.5.28-2
- Add patch for CVE-2012-5611 - Add patch for CVE-2012-5611
Resolves: #883642 Resolves: #883642