mariadb-10.0.10 - sources and patches

This commit is contained in:
Jakub Dorňák 2014-04-07 21:07:33 +02:00
parent d42fd78978
commit 6aba9be8ec
18 changed files with 114 additions and 542 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/mariadb-5.5.34.tar.gz /mariadb-5.5.34.tar.gz
/mariadb-5.5.35.tar.gz /mariadb-5.5.35.tar.gz
/mariadb-5.5.36.tar.gz /mariadb-5.5.36.tar.gz
/mariadb-10.0.10.tar.gz

View File

@ -1,9 +1,9 @@
Don't guess basedir in mysql_config; we place it under _libdir because Don't guess basedir in mysql_config; we place it under _libdir because
of multilib conflicts, so use rather configured @prefix@ path directly. of multilib conflicts, so use rather configured @prefix@ path directly.
diff -up mariadb-5.5.29/scripts/mysql_config.sh.basedir mariadb-5.5.29/scripts/mysql_config.sh diff -up mariadb-10.0.10/scripts/mysql_config.sh.p10 mariadb-10.0.10/scripts/mysql_config.sh
--- mariadb-5.5.29/scripts/mysql_config.sh.basedir 2013-02-28 09:39:26.628440114 +0100 --- mariadb-10.0.10/scripts/mysql_config.sh.p10 2014-03-30 19:56:39.000000000 +0200
+++ mariadb-5.5.29/scripts/mysql_config.sh 2013-02-28 09:39:40.613439729 +0100 +++ mariadb-10.0.10/scripts/mysql_config.sh 2014-04-07 18:54:19.601390650 +0200
@@ -76,7 +76,7 @@ get_full_path () @@ -76,7 +76,7 @@ get_full_path ()
me=`get_full_path $0` me=`get_full_path $0`

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 -up mariadb-5.5.28a/client/mysqltest.cc.p18 mariadb-5.5.28a/client/mysqltest.cc diff -up --recursive mariadb-10.0.10.p6/client/mysqltest.cc mariadb-10.0.10/client/mysqltest.cc
--- mariadb-5.5.28a/client/mysqltest.cc.p18 2012-11-28 16:49:36.000000000 +0100 --- mariadb-10.0.10.p6/client/mysqltest.cc 2014-03-30 19:56:39.000000000 +0200
+++ mariadb-5.5.28a/client/mysqltest.cc 2012-12-17 17:40:01.685079912 +0100 +++ mariadb-10.0.10/client/mysqltest.cc 2014-04-07 17:21:33.840148449 +0200
@@ -5808,6 +5808,7 @@ void do_connect(struct st_command *comma @@ -5872,6 +5872,7 @@ void do_connect(struct st_command *comma
my_bool con_pipe= 0; my_bool con_pipe= 0;
my_bool con_shm __attribute__ ((unused))= 0; my_bool con_shm __attribute__ ((unused))= 0;
struct st_connection* con_slot; struct st_connection* con_slot;
@ -15,7 +15,7 @@ diff -up mariadb-5.5.28a/client/mysqltest.cc.p18 mariadb-5.5.28a/client/mysqltes
static DYNAMIC_STRING ds_connection_name; static DYNAMIC_STRING ds_connection_name;
static DYNAMIC_STRING ds_host; static DYNAMIC_STRING ds_host;
@@ -5898,6 +5899,8 @@ void do_connect(struct st_command *comma @@ -5962,6 +5963,8 @@ void do_connect(struct st_command *comma
con_pipe= 1; con_pipe= 1;
else if (length == 3 && !strncmp(con_options, "SHM", 3)) else if (length == 3 && !strncmp(con_options, "SHM", 3))
con_shm= 1; con_shm= 1;
@ -24,7 +24,7 @@ diff -up mariadb-5.5.28a/client/mysqltest.cc.p18 mariadb-5.5.28a/client/mysqltes
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);
@@ -5945,8 +5948,11 @@ void do_connect(struct st_command *comma @@ -6011,8 +6014,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)
@ -34,12 +34,12 @@ diff -up mariadb-5.5.28a/client/mysqltest.cc.p18 mariadb-5.5.28a/client/mysqltes
mysql_ssl_set(con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, mysql_ssl_set(con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
- opt_ssl_capath, opt_ssl_cipher); - opt_ssl_capath, opt_ssl_cipher);
+ opt_ssl_capath, con_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 #if MYSQL_VERSION_ID >= 50000
/* Turn on ssl_verify_server_cert only if host is "localhost" */ diff -up --recursive mariadb-10.0.10.p6/mysql-test/t/openssl_1.test mariadb-10.0.10/mysql-test/t/openssl_1.test
opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost"); --- mariadb-10.0.10.p6/mysql-test/t/openssl_1.test 2014-03-30 19:56:53.000000000 +0200
diff -up mariadb-5.5.28a/mysql-test/t/openssl_1.test.p18 mariadb-5.5.28a/mysql-test/t/openssl_1.test +++ mariadb-10.0.10/mysql-test/t/openssl_1.test 2014-04-07 17:58:49.924934666 +0200
--- mariadb-5.5.28a/mysql-test/t/openssl_1.test.p18 2012-11-28 16:49:36.000000000 +0100
+++ mariadb-5.5.28a/mysql-test/t/openssl_1.test 2012-12-17 17:27:31.884891180 +0100
@@ -20,13 +20,13 @@ grant select on test.* to ssl_user4@loca @@ -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;
@ -77,21 +77,9 @@ diff -up mariadb-5.5.28a/mysql-test/t/openssl_1.test.p18 mariadb-5.5.28a/mysql-t
SHOW STATUS LIKE 'Ssl_cipher'; SHOW STATUS LIKE 'Ssl_cipher';
disconnect con1; disconnect con1;
connection default; connection default;
diff -up mariadb-5.5.28a/mysql-test/t/ssl_8k_key.test.p18 mariadb-5.5.28a/mysql-test/t/ssl_8k_key.test diff -up --recursive mariadb-10.0.10.p6/mysql-test/t/ssl_compress.test mariadb-10.0.10/mysql-test/t/ssl_compress.test
--- mariadb-5.5.28a/mysql-test/t/ssl_8k_key.test.p18 2012-11-28 16:49:46.000000000 +0100 --- mariadb-10.0.10.p6/mysql-test/t/ssl_compress.test 2014-03-30 19:56:35.000000000 +0200
+++ mariadb-5.5.28a/mysql-test/t/ssl_8k_key.test 2012-12-17 17:27:31.885891180 +0100 +++ mariadb-10.0.10/mysql-test/t/ssl_compress.test 2014-04-07 18:00:39.199845919 +0200
@@ -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 mariadb-5.5.28a/mysql-test/t/ssl_compress.test.p18 mariadb-5.5.28a/mysql-test/t/ssl_compress.test
--- mariadb-5.5.28a/mysql-test/t/ssl_compress.test.p18 2012-11-28 16:49:46.000000000 +0100
+++ mariadb-5.5.28a/mysql-test/t/ssl_compress.test 2012-12-17 17:27:31.885891180 +0100
@@ -8,7 +8,7 @@ @@ -8,7 +8,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
@ -101,9 +89,9 @@ diff -up mariadb-5.5.28a/mysql-test/t/ssl_compress.test.p18 mariadb-5.5.28a/mysq
# Check ssl turned on # Check ssl turned on
SHOW STATUS LIKE 'Ssl_cipher'; SHOW STATUS LIKE 'Ssl_cipher';
diff -up mariadb-5.5.28a/mysql-test/t/ssl.test.p18 mariadb-5.5.28a/mysql-test/t/ssl.test diff -up --recursive mariadb-10.0.10.p6/mysql-test/t/ssl.test mariadb-10.0.10/mysql-test/t/ssl.test
--- mariadb-5.5.28a/mysql-test/t/ssl.test.p18 2012-11-28 16:49:46.000000000 +0100 --- mariadb-10.0.10.p6/mysql-test/t/ssl.test 2014-03-30 19:56:36.000000000 +0200
+++ mariadb-5.5.28a/mysql-test/t/ssl.test 2012-12-17 17:27:31.885891180 +0100 +++ mariadb-10.0.10/mysql-test/t/ssl.test 2014-04-07 18:01:14.270854601 +0200
@@ -8,7 +8,7 @@ @@ -8,7 +8,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 -up mariadb-5.5.28a/mysql-test/t/ssl.test.p18 mariadb-5.5.28a/mysql-test/t/
# Check ssl turned on # Check ssl turned on
SHOW STATUS LIKE 'Ssl_cipher'; SHOW STATUS LIKE 'Ssl_cipher';
diff -up --recursive mariadb-10.0.10.p6/mysql-test/t/ssl_8k_key.test mariadb-10.0.10/mysql-test/t/ssl_8k_key.test
--- mariadb-10.0.10.p6/mysql-test/t/ssl_8k_key.test 2014-03-30 19:56:36.000000000 +0200
+++ mariadb-10.0.10/mysql-test/t/ssl_8k_key.test 2014-04-07 17:59:31.586757044 +0200
@@ -5,7 +5,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!

View File

@ -6,15 +6,15 @@ Settings in my.cnf are generic for all MySQL implementations because of
conflict issues. conflict issues.
RHBZ#1003115 RHBZ#1003115
diff -up mariadb-5.5.32/support-files/rpm/server.cnf.mariaconf mariadb-5.5.32/support-files/rpm/server.cnf diff -up mariadb-10.0.10/support-files/rpm/server.cnf.p13 mariadb-10.0.10/support-files/rpm/server.cnf
--- mariadb-5.5.32/support-files/rpm/server.cnf.mariaconf 2013-09-02 14:17:37.277833263 +0200 --- mariadb-10.0.10/support-files/rpm/server.cnf.p13 2014-04-07 20:12:54.260193809 +0200
+++ mariadb-5.5.32/support-files/rpm/server.cnf 2013-09-02 14:18:00.638810223 +0200 +++ mariadb-10.0.10/support-files/rpm/server.cnf 2014-04-07 20:12:24.758256491 +0200
@@ -23,6 +23,8 @@ @@ -18,6 +18,8 @@
# If you use the same .cnf file for MySQL and MariaDB, # If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here # you can put MariaDB-only options here
[mariadb] [mariadb]
+log-error=/var/log/mariadb/mariadb.log +log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid +pid-file=/var/run/mariadb/mariadb.pid
[mariadb-5.5] # This group is only read by MariaDB-10.0 servers.
# If you use the same .cnf file for MariaDB of different versions,

View File

@ -2,10 +2,10 @@ This issue has been found by Coverity - static analysis tool.
mysql-5.5.31/strings/ctype-ucs2.c:1707:sign_extension Suspicious implicit sign extension: "s[0]" with type "unsigned char" (8 bits, unsigned) is promoted in "(s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3]" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "(s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3]" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. mysql-5.5.31/strings/ctype-ucs2.c:1707:sign_extension Suspicious implicit sign extension: "s[0]" with type "unsigned char" (8 bits, unsigned) is promoted in "(s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3]" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "(s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3]" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
diff -up mysql-5.5.31/strings/ctype-ucs2.c.covscan1 mysql-5.5.31/strings/ctype-ucs2.c diff -up mariadb-10.0.10/strings/ctype-ucs2.c.p11 mariadb-10.0.10/strings/ctype-ucs2.c
--- mysql-5.5.31/strings/ctype-ucs2.c.covscan1 2013-06-14 12:12:29.663300314 +0200 --- mariadb-10.0.10/strings/ctype-ucs2.c.p11 2014-03-30 19:56:37.000000000 +0200
+++ mysql-5.5.31/strings/ctype-ucs2.c 2013-06-14 12:13:07.809299646 +0200 +++ mariadb-10.0.10/strings/ctype-ucs2.c 2014-04-07 18:56:01.145454666 +0200
@@ -1704,7 +1704,7 @@ my_utf32_uni(CHARSET_INFO *cs __attribut @@ -1930,7 +1930,7 @@ my_utf32_uni(CHARSET_INFO *cs __attribut
{ {
if (s + 4 > e) if (s + 4 > e)
return MY_CS_TOOSMALL4; return MY_CS_TOOSMALL4;

View File

@ -6,10 +6,10 @@ mysql-5.5.31/plugin/semisync/semisync_master.cc:661:parameter_as_source Note
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. 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 diff -up mariadb-10.0.10/plugin/semisync/semisync_master.cc.p12 mariadb-10.0.10/plugin/semisync/semisync_master.cc
--- mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow 2013-06-17 09:04:47.214621154 +0200 --- mariadb-10.0.10/plugin/semisync/semisync_master.cc.p12 2014-03-30 19:56:37.000000000 +0200
+++ mysql-5.5.31/plugin/semisync/semisync_master.cc 2013-06-17 09:08:32.189617218 +0200 +++ mariadb-10.0.10/plugin/semisync/semisync_master.cc 2014-04-07 20:02:49.614944992 +0200
@@ -552,7 +552,8 @@ int ReplSemiSyncMaster::reportReplyBinlo @@ -553,7 +553,8 @@ int ReplSemiSyncMaster::reportReplyBinlo
if (need_copy_send_pos) 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_pos_ = log_file_pos;
reply_file_name_inited_ = true; reply_file_name_inited_ = true;
@@ -658,7 +659,8 @@ int ReplSemiSyncMaster::commitTrx(const @@ -661,7 +662,8 @@ int ReplSemiSyncMaster::commitTrx(const
if (cmp <= 0) if (cmp <= 0)
{ {
/* This thd has a lower position, let's update the minimum info. */ /* 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; wait_file_pos_ = trx_wait_binlog_pos;
rpl_semi_sync_master_wait_pos_backtraverse++; rpl_semi_sync_master_wait_pos_backtraverse++;
@@ -669,7 +671,8 @@ int ReplSemiSyncMaster::commitTrx(const @@ -672,7 +674,8 @@ int ReplSemiSyncMaster::commitTrx(const
} }
else else
{ {
@ -42,8 +42,8 @@ diff -up mysql-5.5.31/plugin/semisync/semisync_master.cc.covscan-stroverflow mys
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: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 --- mariadb-10.0.10/sql/rpl_handler.cc.p12 2014-03-30 19:56:34.000000000 +0200
+++ mysql-5.5.31/sql/rpl_handler.cc 2013-06-17 10:51:08.959509523 +0200 +++ mariadb-10.0.10/sql/rpl_handler.cc 2014-04-07 20:07:58.851123497 +0200
@@ -303,7 +303,8 @@ int Binlog_storage_delegate::after_flush @@ -303,7 +303,8 @@ int Binlog_storage_delegate::after_flush
my_pthread_setspecific_ptr(RPL_TRANS_BINLOG_INFO, log_info); my_pthread_setspecific_ptr(RPL_TRANS_BINLOG_INFO, log_info);
} }
@ -54,20 +54,3 @@ mysql-5.5.31/sql/rpl_handler.cc:306:fixed_size_dest You might overrun the 51
log_info->log_pos = log_pos; log_info->log_pos = log_pos;
int ret= 0; 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';
- strncpy(m_message, msg, MYSQL_ERRMSG_SIZE);
+ strncpy(m_message, msg, sizeof(m_message)-1);
+ m_message[sizeof(m_message)-1] = '\0';
}
void clear()

View File

@ -5,9 +5,9 @@ mode is on, but it doesn't seem worth the trouble.)
The new parameter value was generated using "openssl dhparam -C 1024". The new parameter value was generated using "openssl dhparam -C 1024".
diff -Naur mysql-5.5.28.orig/vio/viosslfactories.c mysql-5.5.28/vio/viosslfactories.c diff -up mariadb-10.0.10/vio/viosslfactories.c.p9 mariadb-10.0.10/vio/viosslfactories.c
--- mysql-5.5.28.orig/vio/viosslfactories.c 2012-08-29 04:50:46.000000000 -0400 --- mariadb-10.0.10/vio/viosslfactories.c.p9 2014-03-30 19:56:42.000000000 +0200
+++ mysql-5.5.28/vio/viosslfactories.c 2012-11-15 11:19:38.575701435 -0500 +++ mariadb-10.0.10/vio/viosslfactories.c 2014-04-07 18:50:55.068255050 +0200
@@ -20,27 +20,32 @@ @@ -20,27 +20,32 @@
static my_bool ssl_algorithms_added = FALSE; static my_bool ssl_algorithms_added = FALSE;
static my_bool ssl_error_strings_loaded= FALSE; static my_bool ssl_error_strings_loaded= FALSE;
@ -52,7 +52,7 @@ diff -Naur mysql-5.5.28.orig/vio/viosslfactories.c mysql-5.5.28/vio/viosslfactor
if (! dh->p || ! dh->g) if (! dh->p || ! dh->g)
{ {
DH_free(dh); DH_free(dh);
@@ -255,7 +260,7 @@ @@ -282,7 +287,7 @@ new_VioSSLFd(const char *key_file, const
} }
/* DH stuff */ /* DH stuff */

View File

@ -1,11 +1,8 @@
"extern int errno" is just a really bad idea. --- mariadb-10.0.10/include/my_sys.h.p1 2014-03-30 19:56:37.000000000 +0200
+++ mariadb-10.0.10/include/my_sys.h 2014-04-07 15:30:20.627060157 +0200
diff -up mariadb-5.5.33a/include/my_sys.h.p1 mariadb-5.5.33a/include/my_sys.h @@ -209,13 +209,7 @@ extern void my_large_free(uchar *ptr);
--- mariadb-5.5.33a/include/my_sys.h.p1 2013-10-10 13:37:11.391507810 +0200 #define my_safe_afree(ptr, size, max_alloca_sz) my_afree(ptr)
+++ mariadb-5.5.33a/include/my_sys.h 2013-10-10 13:37:57.395519715 +0200 #endif /* HAVE_ALLOCA */
@@ -190,13 +190,7 @@ extern void my_large_free(uchar *ptr);
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? my_afree(ptr) : my_free(ptr))
-#ifndef errno /* did we already get it? */ -#ifndef errno /* did we already get it? */
-#ifdef HAVE_ERRNO_AS_DEFINE -#ifdef HAVE_ERRNO_AS_DEFINE

View File

@ -6,9 +6,9 @@ to know about this.
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425 Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
diff -up mariadb-5.5.34/mysql-test/t/file_contents.test.p10 mariadb-5.5.34/mysql-test/t/file_contents.test diff -up mariadb-10.0.10/mysql-test/t/file_contents.test.p7 mariadb-10.0.10/mysql-test/t/file_contents.test
--- mariadb-5.5.34/mysql-test/t/file_contents.test.p10 2013-11-20 13:28:56.000000000 +0100 --- mariadb-10.0.10/mysql-test/t/file_contents.test.p7 2014-03-30 19:56:44.000000000 +0200
+++ mariadb-5.5.34/mysql-test/t/file_contents.test 2013-11-22 08:50:30.244702013 +0100 +++ mariadb-10.0.10/mysql-test/t/file_contents.test 2014-04-07 18:14:32.776772032 +0200
@@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') { @@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') {
# RedHat/Debian: version number in directory name # RedHat/Debian: version number in directory name
$dir_docs = glob "$dir_docs/mariadb-server-*"; $dir_docs = glob "$dir_docs/mariadb-server-*";

View File

@ -1,8 +1,8 @@
Improve the documentation that will be installed in the mysql-test RPM. Improve the documentation that will be installed in the mysql-test RPM.
diff -up mariadb-5.5.32/mysql-test/README.p3 mariadb-5.5.32/mysql-test/README diff -up mariadb-10.0.10/mysql-test/README.p3 mariadb-10.0.10/mysql-test/README
--- mariadb-5.5.32/mysql-test/README.p3 2013-07-17 16:51:29.000000000 +0200 --- mariadb-10.0.10/mysql-test/README.p3 2014-04-07 16:05:51.402631548 +0200
+++ mariadb-5.5.32/mysql-test/README 2013-07-30 23:22:54.959494478 +0200 +++ mariadb-10.0.10/mysql-test/README 2014-04-07 16:06:06.137637991 +0200
@@ -1,15 +1,28 @@ @@ -1,15 +1,28 @@
-This directory contains a test suite for the MySQL daemon. To run -This directory contains a test suite for the MySQL daemon. To run
-the currently existing test cases, simply execute ./mysql-test-run in -the currently existing test cases, simply execute ./mysql-test-run in

View File

@ -14,9 +14,9 @@ Adjust the mysql-log-rotate script in several ways:
See discussions at RH bugs 799735, 547007 See discussions at RH bugs 799735, 547007
diff -up mariadb-5.5.32/support-files/mysql-log-rotate.sh.errlog mariadb-5.5.32/support-files/mysql-log-rotate.sh diff -up mariadb-10.0.10/support-files/mysql-log-rotate.sh.p5 mariadb-10.0.10/support-files/mysql-log-rotate.sh
--- mariadb-5.5.32/support-files/mysql-log-rotate.sh.errlog 2013-08-29 14:35:34.839119044 +0200 --- mariadb-10.0.10/support-files/mysql-log-rotate.sh.p5 2014-03-30 19:56:53.000000000 +0200
+++ mariadb-5.5.32/support-files/mysql-log-rotate.sh 2013-08-29 14:38:54.203996083 +0200 +++ mariadb-10.0.10/support-files/mysql-log-rotate.sh 2014-04-07 16:30:11.264618655 +0200
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
# This logname can be set in /etc/my.cnf # This logname can be set in /etc/my.cnf
-# by setting the variable "err-log" -# by setting the variable "err-log"

View File

@ -1,386 +0,0 @@
Backported from mariadb-5.5.37:
https://mariadb.atlassian.net/browse/MDEV-5724
https://bugzilla.redhat.com/show_bug.cgi?id=1065676
diff -up mariadb-5.5.36/mysql-test/r/stack-crash.result.rhbz1065676 mariadb-5.5.36/mysql-test/r/stack-crash.result
--- mariadb-5.5.36/mysql-test/r/stack-crash.result.rhbz1065676 2014-03-11 18:20:56.344327004 +0100
+++ mariadb-5.5.36/mysql-test/r/stack-crash.result 2014-03-11 18:20:56.344327004 +0100
@@ -0,0 +1,93 @@
+drop table if exists t1,t2;
+Warnings:
+Note 1051 Unknown table 't1'
+Note 1051 Unknown table 't2'
+CREATE TABLE t1 (
+`sspo_id` int(11) NOT NULL AUTO_INCREMENT,
+`sspo_uid` int(11) NOT NULL DEFAULT '0',
+`sspo_type` varchar(1) NOT NULL DEFAULT 'P',
+`sspo_text` longtext NOT NULL,
+`sspo_image` varchar(255) NOT NULL,
+`sspo_source` int(11) NOT NULL DEFAULT '0',
+`sspo_event_name` varchar(255) NOT NULL DEFAULT '',
+`sspo_event_location` varchar(255) NOT NULL DEFAULT '',
+`sspo_event_date` datetime DEFAULT NULL,
+`sspo_remote_title` varchar(255) NOT NULL,
+`sspo_remote_url` varchar(255) NOT NULL,
+`sspo_remote_desc` text NOT NULL,
+`sspo_remote_image` varchar(255) NOT NULL,
+`sspo_obj_status` varchar(1) NOT NULL DEFAULT 'A',
+`sspo_cr_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+`sspo_cr_uid` int(11) NOT NULL DEFAULT '0',
+`sspo_lu_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+`sspo_lu_uid` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`sspo_id`),
+KEY `post_uid` (`sspo_uid`,`sspo_cr_date`)
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1266 Using storage engine MyISAM for table 't1'
+INSERT INTO t1 VALUES (1,2,'P','test1','',0,'','',NULL,'','','','','A','2013-09-30 00:19:32',2,'2013-09-30 00:19:32',2),(2,2,'P','bbb','',0,'','',NULL,'','','','','A','2013-10-02 15:06:35',2,'2013-10-02 15:06:35',2);
+CREATE TABLE `t2` (
+`spoo_id` int(11) NOT NULL AUTO_INCREMENT,
+`spoo_user_type_id` int(11) NOT NULL DEFAULT '0',
+`spoo_uid` int(11) NOT NULL DEFAULT '0',
+`spoo_option_id` int(11) NOT NULL DEFAULT '0',
+`spoo_value` varchar(10000) NOT NULL,
+`spoo_obj_status` varchar(1) NOT NULL DEFAULT 'A',
+`spoo_cr_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+`spoo_cr_uid` int(11) NOT NULL DEFAULT '0',
+`spoo_lu_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+`spoo_lu_uid` int(11) NOT NULL DEFAULT '0',
+PRIMARY KEY (`spoo_id`),
+KEY `object_option_main_idx` (`spoo_user_type_id`,`spoo_uid`,`spoo_option_id`,`spoo_value`(255))
+) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8;
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1266 Using storage engine MyISAM for table 't2'
+INSERT INTO `t2` VALUES (19,1,2,6,'Dortmund','A','2013-09-26 01:36:51',2,'2013-09-26 01:36:51',2),(20,1,2,8,'49','A','2013-09-26 01:36:51',2,'2013-09-26 01:36:51',2);
+SELECT Count(*)
+FROM t1 AS tbl
+LEFT JOIN t2 a
+ON a.spoo_uid = sspo_uid
+AND a.spoo_option_id = 1
+LEFT JOIN t2 b
+ON b.spoo_uid = sspo_uid
+AND b.spoo_option_id = 2
+LEFT JOIN t2 c
+ON c.spoo_uid = sspo_uid
+AND c.spoo_option_id = 3
+LEFT JOIN t2 d
+ON d.spoo_uid = sspo_uid
+AND d.spoo_option_id = 5
+LEFT JOIN t2 e
+ON e.spoo_uid = sspo_uid
+AND e.spoo_option_id = 4
+LEFT JOIN t2 f
+ON f.spoo_uid = sspo_uid
+AND f.spoo_option_id = 11
+LEFT JOIN t2 g
+ON g.spoo_uid = sspo_uid
+AND g.spoo_option_id = 7
+LEFT JOIN t2 h
+ON h.spoo_uid = sspo_uid
+AND h.spoo_option_id = 10
+LEFT JOIN t2 i
+ON i.spoo_uid = sspo_uid
+AND i.spoo_option_id = 18
+LEFT JOIN t2 j
+ON j.spoo_uid = sspo_uid
+AND j.spoo_option_id = 6
+GROUP BY a.spoo_value,
+b.spoo_value,
+c.spoo_value,
+d.spoo_value,
+e.spoo_value,
+f.spoo_value,
+g.spoo_value,
+h.spoo_value,
+i.spoo_value,
+j.spoo_value;
+Count(*)
+2
+drop table t1,t2;
diff -up mariadb-5.5.36/mysql-test/t/stack-crash.test.rhbz1065676 mariadb-5.5.36/mysql-test/t/stack-crash.test
--- mariadb-5.5.36/mysql-test/t/stack-crash.test.rhbz1065676 2014-03-11 18:20:56.344327004 +0100
+++ mariadb-5.5.36/mysql-test/t/stack-crash.test 2014-03-11 18:20:56.344327004 +0100
@@ -0,0 +1,96 @@
+#
+# Test to ensure that we don't get stack overflows
+#
+
+drop table if exists t1,t2;
+
+#
+# MDEV-5724
+# Server crashes on SQL select containing more group by and left join
+# statements
+# This was because record_buffer was 300,000 bytes and caused stack overflow
+#
+
+CREATE TABLE t1 (
+ `sspo_id` int(11) NOT NULL AUTO_INCREMENT,
+ `sspo_uid` int(11) NOT NULL DEFAULT '0',
+ `sspo_type` varchar(1) NOT NULL DEFAULT 'P',
+ `sspo_text` longtext NOT NULL,
+ `sspo_image` varchar(255) NOT NULL,
+ `sspo_source` int(11) NOT NULL DEFAULT '0',
+ `sspo_event_name` varchar(255) NOT NULL DEFAULT '',
+ `sspo_event_location` varchar(255) NOT NULL DEFAULT '',
+ `sspo_event_date` datetime DEFAULT NULL,
+ `sspo_remote_title` varchar(255) NOT NULL,
+ `sspo_remote_url` varchar(255) NOT NULL,
+ `sspo_remote_desc` text NOT NULL,
+ `sspo_remote_image` varchar(255) NOT NULL,
+ `sspo_obj_status` varchar(1) NOT NULL DEFAULT 'A',
+ `sspo_cr_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+ `sspo_cr_uid` int(11) NOT NULL DEFAULT '0',
+ `sspo_lu_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+ `sspo_lu_uid` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`sspo_id`),
+ KEY `post_uid` (`sspo_uid`,`sspo_cr_date`)
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
+INSERT INTO t1 VALUES (1,2,'P','test1','',0,'','',NULL,'','','','','A','2013-09-30 00:19:32',2,'2013-09-30 00:19:32',2),(2,2,'P','bbb','',0,'','',NULL,'','','','','A','2013-10-02 15:06:35',2,'2013-10-02 15:06:35',2);
+
+CREATE TABLE `t2` (
+ `spoo_id` int(11) NOT NULL AUTO_INCREMENT,
+ `spoo_user_type_id` int(11) NOT NULL DEFAULT '0',
+ `spoo_uid` int(11) NOT NULL DEFAULT '0',
+ `spoo_option_id` int(11) NOT NULL DEFAULT '0',
+ `spoo_value` varchar(10000) NOT NULL,
+ `spoo_obj_status` varchar(1) NOT NULL DEFAULT 'A',
+ `spoo_cr_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+ `spoo_cr_uid` int(11) NOT NULL DEFAULT '0',
+ `spoo_lu_date` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+ `spoo_lu_uid` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`spoo_id`),
+ KEY `object_option_main_idx` (`spoo_user_type_id`,`spoo_uid`,`spoo_option_id`,`spoo_value`(255))
+) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8;
+INSERT INTO `t2` VALUES (19,1,2,6,'Dortmund','A','2013-09-26 01:36:51',2,'2013-09-26 01:36:51',2),(20,1,2,8,'49','A','2013-09-26 01:36:51',2,'2013-09-26 01:36:51',2);
+
+SELECT Count(*)
+FROM t1 AS tbl
+ LEFT JOIN t2 a
+ ON a.spoo_uid = sspo_uid
+ AND a.spoo_option_id = 1
+ LEFT JOIN t2 b
+ ON b.spoo_uid = sspo_uid
+ AND b.spoo_option_id = 2
+ LEFT JOIN t2 c
+ ON c.spoo_uid = sspo_uid
+ AND c.spoo_option_id = 3
+ LEFT JOIN t2 d
+ ON d.spoo_uid = sspo_uid
+ AND d.spoo_option_id = 5
+ LEFT JOIN t2 e
+ ON e.spoo_uid = sspo_uid
+ AND e.spoo_option_id = 4
+ LEFT JOIN t2 f
+ ON f.spoo_uid = sspo_uid
+ AND f.spoo_option_id = 11
+ LEFT JOIN t2 g
+ ON g.spoo_uid = sspo_uid
+ AND g.spoo_option_id = 7
+ LEFT JOIN t2 h
+ ON h.spoo_uid = sspo_uid
+ AND h.spoo_option_id = 10
+ LEFT JOIN t2 i
+ ON i.spoo_uid = sspo_uid
+ AND i.spoo_option_id = 18
+ LEFT JOIN t2 j
+ ON j.spoo_uid = sspo_uid
+ AND j.spoo_option_id = 6
+GROUP BY a.spoo_value,
+ b.spoo_value,
+ c.spoo_value,
+ d.spoo_value,
+ e.spoo_value,
+ f.spoo_value,
+ g.spoo_value,
+ h.spoo_value,
+ i.spoo_value,
+ j.spoo_value;
+drop table t1,t2;
diff -up mariadb-5.5.36/storage/maria/ma_blockrec.c.rhbz1065676 mariadb-5.5.36/storage/maria/ma_blockrec.c
--- mariadb-5.5.36/storage/maria/ma_blockrec.c.rhbz1065676 2014-02-24 00:50:19.000000000 +0100
+++ mariadb-5.5.36/storage/maria/ma_blockrec.c 2014-03-11 18:20:56.347327004 +0100
@@ -5144,7 +5144,12 @@ my_bool _ma_cmp_block_unique(MARIA_HA *i
int error;
DBUG_ENTER("_ma_cmp_block_unique");
- if (!(old_record= my_alloca(info->s->base.reclength)))
+ /*
+ Don't allocate more than 16K on the stack to ensure we don't get
+ stack overflow.
+ */
+ if (!(old_record= my_safe_alloca(info->s->base.reclength,
+ MARIA_MAX_RECORD_ON_STACK)))
DBUG_RETURN(1);
/* Don't let the compare destroy blobs that may be in use */
@@ -5166,7 +5171,8 @@ my_bool _ma_cmp_block_unique(MARIA_HA *i
info->rec_buff_size= org_rec_buff_size;
}
DBUG_PRINT("exit", ("result: %d", error));
- my_afree(old_record);
+ my_safe_afree(old_record, info->s->base.reclength,
+ MARIA_MAX_RECORD_ON_STACK);
DBUG_RETURN(error != 0);
}
diff -up mariadb-5.5.36/storage/maria/ma_dynrec.c.rhbz1065676 mariadb-5.5.36/storage/maria/ma_dynrec.c
--- mariadb-5.5.36/storage/maria/ma_dynrec.c.rhbz1065676 2014-02-24 00:50:16.000000000 +0100
+++ mariadb-5.5.36/storage/maria/ma_dynrec.c 2014-03-11 18:20:56.348327004 +0100
@@ -36,12 +36,6 @@ static my_bool delete_dynamic_record(MAR
static my_bool _ma_cmp_buffer(File file, const uchar *buff, my_off_t filepos,
uint length);
-/* Play it safe; We have a small stack when using threads */
-#undef my_alloca
-#undef my_afree
-#define my_alloca(A) my_malloc((A),MYF(0))
-#define my_afree(A) my_free((A))
-
/* Interface function from MARIA_HA */
#ifdef HAVE_MMAP
@@ -256,7 +250,8 @@ my_bool _ma_write_blob_record(MARIA_HA *
MARIA_DYN_DELETE_BLOCK_HEADER+1);
reclength= (info->s->base.pack_reclength +
_ma_calc_total_blob_length(info,record)+ extra);
- if (!(rec_buff=(uchar*) my_alloca(reclength)))
+ if (!(rec_buff=(uchar*) my_safe_alloca(reclength,
+ MARIA_MAX_RECORD_ON_STACK)))
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
@@ -270,7 +265,7 @@ my_bool _ma_write_blob_record(MARIA_HA *
error= write_dynamic_record(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
- my_afree(rec_buff);
+ my_safe_afree(rec_buff, reclength, MARIA_MAX_RECORD_ON_STACK);
return(error != 0);
}
@@ -294,7 +289,8 @@ my_bool _ma_update_blob_record(MARIA_HA
return 1;
}
#endif
- if (!(rec_buff=(uchar*) my_alloca(reclength)))
+ if (!(rec_buff=(uchar*) my_safe_alloca(reclength,
+ MARIA_MAX_RECORD_ON_STACK)))
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
@@ -304,7 +300,7 @@ my_bool _ma_update_blob_record(MARIA_HA
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength);
- my_afree(rec_buff);
+ my_safe_afree(rec_buff, reclength, MARIA_MAX_RECORD_ON_STACK);
return(error != 0);
}
@@ -1559,7 +1555,8 @@ my_bool _ma_cmp_dynamic_unique(MARIA_HA
my_bool error;
DBUG_ENTER("_ma_cmp_dynamic_unique");
- if (!(old_record=my_alloca(info->s->base.reclength)))
+ if (!(old_record= my_safe_alloca(info->s->base.reclength,
+ MARIA_MAX_RECORD_ON_STACK)))
DBUG_RETURN(1);
/* Don't let the compare destroy blobs that may be in use */
@@ -1580,7 +1577,8 @@ my_bool _ma_cmp_dynamic_unique(MARIA_HA
info->rec_buff= old_rec_buff;
info->rec_buff_size= old_rec_buff_size;
}
- my_afree(old_record);
+ my_safe_afree(old_record, info->s->base.reclength,
+ MARIA_MAX_RECORD_ON_STACK);
DBUG_RETURN(error);
}
@@ -1595,6 +1593,9 @@ my_bool _ma_cmp_dynamic_record(register
uchar *buffer;
MARIA_BLOCK_INFO block_info;
my_bool error= 1;
+ size_t buffer_length;
+ LINT_INIT(buffer_length);
+
DBUG_ENTER("_ma_cmp_dynamic_record");
if (info->opt_flag & WRITE_CACHE_USED)
@@ -1612,8 +1613,10 @@ my_bool _ma_cmp_dynamic_record(register
{ /* If check isn't disabled */
if (info->s->base.blobs)
{
- if (!(buffer=(uchar*) my_alloca(info->s->base.pack_reclength+
- _ma_calc_total_blob_length(info,record))))
+ buffer_length= (info->s->base.pack_reclength +
+ _ma_calc_total_blob_length(info,record));
+ if (!(buffer=(uchar*) my_safe_alloca(buffer_length,
+ MARIA_MAX_RECORD_ON_STACK)))
DBUG_RETURN(1);
}
reclength= _ma_rec_pack(info,buffer,record);
@@ -1665,7 +1668,7 @@ my_bool _ma_cmp_dynamic_record(register
error= 0;
err:
if (buffer != info->rec_buff)
- my_afree(buffer);
+ my_safe_afree(buffer, buffer_length, MARIA_MAX_RECORD_ON_STACK);
DBUG_PRINT("exit", ("result: %d", error));
DBUG_RETURN(error);
}
diff -up mariadb-5.5.36/storage/maria/maria_def.h.rhbz1065676 mariadb-5.5.36/storage/maria/maria_def.h
--- mariadb-5.5.36/storage/maria/maria_def.h.rhbz1065676 2014-02-24 00:50:21.000000000 +0100
+++ mariadb-5.5.36/storage/maria/maria_def.h 2014-03-11 18:20:56.348327004 +0100
@@ -42,6 +42,7 @@
#define MAX_NONMAPPED_INSERTS 1000
#define MARIA_MAX_TREE_LEVELS 32
+#define MARIA_MAX_RECORD_ON_STACK 16384
/* maria_open() flag, specific for maria_pack */
#define HA_OPEN_IGNORE_MOVED_STATE (1U << 30)
diff -up mariadb-5.5.36/storage/maria/maria_pack.c.rhbz1065676 mariadb-5.5.36/storage/maria/maria_pack.c
--- mariadb-5.5.36/storage/maria/maria_pack.c.rhbz1065676 2014-02-24 00:50:16.000000000 +0100
+++ mariadb-5.5.36/storage/maria/maria_pack.c 2014-03-11 18:20:56.351327005 +0100
@@ -861,7 +861,7 @@ static int get_statistic(PACK_MRG_INFO *
reclength= mrg->file[0]->s->base.reclength;
null_bytes= mrg->file[0]->s->base.null_bytes;
- record=(uchar*) my_alloca(reclength);
+ record=(uchar*) my_safe_alloca(reclength, MARIA_MAX_RECORD_ON_STACK);
end_count=huff_counts+mrg->file[0]->s->base.fields;
record_count=0; glob_crc=0;
max_blob_length=0;
@@ -1145,7 +1145,7 @@ static int get_statistic(PACK_MRG_INFO *
mrg->records=record_count;
mrg->max_blob_length=max_blob_length;
- my_afree(record);
+ my_safe_afree(record, reclength, MARIA_MAX_RECORD_ON_STACK);
DBUG_RETURN(error != HA_ERR_END_OF_FILE);
}
@@ -2415,7 +2415,8 @@ static int compress_maria_file(PACK_MRG_
DBUG_ENTER("compress_maria_file");
/* Allocate a buffer for the records (excluding blobs). */
- if (!(record=(uchar*) my_alloca(isam_file->s->base.reclength)))
+ if (!(record=(uchar*) my_safe_alloca(isam_file->s->base.reclength,
+ MARIA_MAX_RECORD_ON_STACK)))
return -1;
end_count=huff_counts+isam_file->s->base.fields;
@@ -2778,7 +2779,8 @@ static int compress_maria_file(PACK_MRG_
if (verbose >= 2)
printf("wrote %s records.\n", llstr((longlong) record_count, llbuf));
- my_afree(record);
+ my_safe_afree(record, isam_file->s->base.reclength,
+ MARIA_MAX_RECORD_ON_STACK);
mrg->ref_length=max_pack_length;
mrg->min_pack_length=max_record_length ? min_record_length : 0;
mrg->max_pack_length=max_record_length;

View File

@ -2,9 +2,9 @@ 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 -up mysql-5.5.28/include/my_rdtsc.h.p11 mysql-5.5.28/include/my_rdtsc.h diff -up mariadb-10.0.10/include/my_rdtsc.h.p4 mariadb-10.0.10/include/my_rdtsc.h
--- mysql-5.5.28/include/my_rdtsc.h.p11 2012-08-29 10:50:46.000000000 +0200 --- mariadb-10.0.10/include/my_rdtsc.h.p4 2014-03-30 19:56:36.000000000 +0200
+++ mysql-5.5.28/include/my_rdtsc.h 2012-12-06 14:22:13.651823354 +0100 +++ mariadb-10.0.10/include/my_rdtsc.h 2014-04-07 16:13:55.227792169 +0200
@@ -125,6 +125,7 @@ C_MODE_END @@ -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
@ -13,9 +13,9 @@ diff -up mysql-5.5.28/include/my_rdtsc.h.p11 mysql-5.5.28/include/my_rdtsc.h
#endif #endif
diff -up mysql-5.5.28/mysys/my_rdtsc.c.p11 mysql-5.5.28/mysys/my_rdtsc.c diff -up mariadb-10.0.10/mysys/my_rdtsc.c.p4 mariadb-10.0.10/mysys/my_rdtsc.c
--- mysql-5.5.28/mysys/my_rdtsc.c.p11 2012-08-29 10:50:46.000000000 +0200 --- mariadb-10.0.10/mysys/my_rdtsc.c.p4 2014-03-30 19:56:36.000000000 +0200
+++ mysql-5.5.28/mysys/my_rdtsc.c 2012-12-06 14:22:13.672823375 +0100 +++ mariadb-10.0.10/mysys/my_rdtsc.c 2014-04-07 16:15:48.114901576 +0200
@@ -224,6 +224,13 @@ ulonglong my_timer_cycles(void) @@ -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;

View File

@ -4,9 +4,9 @@ which now makes mariadb/mysql FTBFS because openssl_1 test fails
Related: #1044565 Related: #1044565
diff -up mariadb-5.5.34/mysql-test/r/openssl_1.result.p20 mariadb-5.5.34/mysql-test/r/openssl_1.result diff -up mariadb-10.0.10/mysql-test/r/openssl_1.result.p14 mariadb-10.0.10/mysql-test/r/openssl_1.result
--- mariadb-5.5.34/mysql-test/r/openssl_1.result.p20 2014-01-06 11:51:18.878640731 +0100 --- mariadb-10.0.10/mysql-test/r/openssl_1.result.p14 2014-03-30 19:56:35.000000000 +0200
+++ mariadb-5.5.34/mysql-test/r/openssl_1.result 2014-01-06 11:51:45.364678942 +0100 +++ mariadb-10.0.10/mysql-test/r/openssl_1.result 2014-04-07 20:14:24.702980342 +0200
@@ -196,8 +196,6 @@ Ssl_cipher DHE-RSA-AES256-SHA @@ -196,8 +196,6 @@ Ssl_cipher DHE-RSA-AES256-SHA
Variable_name Value Variable_name Value
Ssl_cipher EDH-RSA-DES-CBC3-SHA Ssl_cipher EDH-RSA-DES-CBC3-SHA
@ -16,9 +16,9 @@ diff -up mariadb-5.5.34/mysql-test/r/openssl_1.result.p20 mariadb-5.5.34/mysql-t
Ssl_cipher RC4-SHA Ssl_cipher RC4-SHA
select 'is still running; no cipher request crashed the server' as result from dual; select 'is still running; no cipher request crashed the server' as result from dual;
result result
diff -up mariadb-5.5.34/mysql-test/t/openssl_1.test.p20 mariadb-5.5.34/mysql-test/t/openssl_1.test diff -up mariadb-10.0.10/mysql-test/t/openssl_1.test.p14 mariadb-10.0.10/mysql-test/t/openssl_1.test
--- mariadb-5.5.34/mysql-test/t/openssl_1.test.p20 2014-01-06 11:51:18.830640662 +0100 --- mariadb-10.0.10/mysql-test/t/openssl_1.test.p14 2014-04-07 20:14:24.686980712 +0200
+++ mariadb-5.5.34/mysql-test/t/openssl_1.test 2014-01-06 11:51:18.879640733 +0100 +++ mariadb-10.0.10/mysql-test/t/openssl_1.test 2014-04-07 20:14:24.702980342 +0200
@@ -218,7 +218,7 @@ DROP TABLE t1; @@ -218,7 +218,7 @@ DROP TABLE t1;
# Common ciphers to openssl and yassl # Common ciphers to openssl and yassl
--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=DHE-RSA-AES256-SHA --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=DHE-RSA-AES256-SHA

View File

@ -8,36 +8,15 @@ 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 -up mariadb-5.5.28a/sql/sql_prepare.cc.p20 mariadb-5.5.28a/sql/sql_prepare.cc diff -up mariadb-10.0.10/sql/sql_prepare.cc.p8 mariadb-10.0.10/sql/sql_prepare.cc
--- mariadb-5.5.28a/sql/sql_prepare.cc.p20 2012-11-28 16:49:36.000000000 +0100 --- mariadb-10.0.10/sql/sql_prepare.cc.p8 2014-03-30 19:56:42.000000000 +0200
+++ mariadb-5.5.28a/sql/sql_prepare.cc 2012-12-17 17:45:24.232151645 +0100 +++ mariadb-10.0.10/sql/sql_prepare.cc 2014-04-07 18:43:33.901074770 +0200
@@ -2975,7 +2975,7 @@ void mysql_stmt_get_longdata(THD *thd, c @@ -3021,7 +3021,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->get_stmt_da()->sql_errno();
- strncpy(stmt->last_error, thd->stmt_da->message(), MYSQL_ERRMSG_SIZE); - strncpy(stmt->last_error, thd->get_stmt_da()->message(), MYSQL_ERRMSG_SIZE);
+ strncpy(stmt->last_error, thd->stmt_da->message(), sizeof(stmt->last_error)-1); + strncpy(stmt->last_error, thd->get_stmt_da()->message(), sizeof(stmt->last_error)-1);
} }
thd->stmt_da= save_stmt_da; thd->set_stmt_da(save_stmt_da);
thd->warning_info= save_warinig_info;
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 mariadb-5.5.28a/sql/sql_trigger.cc.p20 mariadb-5.5.28a/sql/sql_trigger.cc
diff -up mariadb-5.5.28a/storage/innobase/handler/ha_innodb.cc.p20 mariadb-5.5.28a/storage/innobase/handler/ha_innodb.cc
--- mariadb-5.5.28a/storage/innobase/handler/ha_innodb.cc.p20 2012-11-28 16:49:36.000000000 +0100
+++ mariadb-5.5.28a/storage/innobase/handler/ha_innodb.cc 2012-12-17 17:45:24.239151651 +0100
@@ -7094,7 +7094,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);

View File

@ -12,11 +12,11 @@ ability to detect this type of error is low, and I also see little evidence
of any real performance gain from optimizing these calls. So I'm keeping of any real performance gain from optimizing these calls. So I'm keeping
this patch. this patch.
diff -up mariadb-5.5.28a/include/m_string.h.p2 mariadb-5.5.28a/include/m_string.h diff -up mariadb-10.0.10/include/m_string.h.orig mariadb-10.0.10/include/m_string.h
--- mariadb-5.5.28a/include/m_string.h.p2 2012-12-17 16:14:19.140536799 +0100 --- mariadb-10.0.10/include/m_string.h.p2 2014-04-07 15:36:44.694806871 +0200
+++ mariadb-5.5.28a/include/m_string.h 2012-12-17 16:15:40.036567242 +0100 +++ mariadb-10.0.10/include/m_string.h 2014-04-07 15:37:17.044786762 +0200
@@ -79,12 +79,6 @@ extern "C" { @@ -81,12 +81,6 @@ extern void *(*my_str_malloc)(size_t);
extern void *(*my_str_malloc)(size_t); extern void *(*my_str_realloc)(void *, size_t);
extern void (*my_str_free)(void *); extern void (*my_str_free)(void *);
-#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER) -#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)

View File

@ -6,8 +6,8 @@
%bcond_with tokudb %bcond_with tokudb
Name: mariadb Name: mariadb
Version: 5.5.36 Version: 10.0.10
Release: 2%{?dist} Release: 1%{?dist}
Epoch: 1 Epoch: 1
Summary: A community developed branch of MySQL Summary: A community developed branch of MySQL
@ -58,18 +58,17 @@ Source999: filter-requires-mysql.sh
Patch1: mariadb-errno.patch Patch1: mariadb-errno.patch
Patch2: mariadb-strmov.patch Patch2: mariadb-strmov.patch
Patch3: mariadb-install-test.patch Patch3: mariadb-install-test.patch
Patch7: mariadb-s390-tsc.patch Patch4: mariadb-s390-tsc.patch
Patch8: mariadb-logrotate.patch Patch5: mariadb-logrotate.patch
Patch9: mariadb-cipherspec.patch Patch6: mariadb-cipherspec.patch
Patch10: mariadb-file-contents.patch Patch7: mariadb-file-contents.patch
Patch11: mariadb-string-overflow.patch Patch8: mariadb-string-overflow.patch
Patch12: mariadb-dh1024.patch Patch9: mariadb-dh1024.patch
Patch14: mariadb-basedir.patch Patch10: mariadb-basedir.patch
Patch17: mariadb-covscan-signexpr.patch Patch11: mariadb-covscan-signexpr.patch
Patch18: mariadb-covscan-stroverflow.patch Patch12: mariadb-covscan-stroverflow.patch
Patch19: mariadb-config.patch Patch13: mariadb-config.patch
Patch20: mariadb-ssltest.patch Patch14: mariadb-ssltest.patch
Patch21: mariadb-rhbz1065676.patch
BuildRequires: perl, readline-devel, openssl-devel BuildRequires: perl, readline-devel, openssl-devel
BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel
@ -259,18 +258,17 @@ MariaDB is a community developed branch of MySQL.
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p1 %patch12 -p1
%patch13 -p1
%patch14 -p1 %patch14 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
# workaround for upstream bug #56342 # workaround for upstream bug #56342
rm -f mysql-test/t/ssl_8k_key-master.opt rm -f mysql-test/t/ssl_8k_key-master.opt

View File

@ -1 +1 @@
05f72957bedd8b1ea134c14173be9c25 mariadb-5.5.36.tar.gz 14ce22b8197d4eae88d237776d47220f mariadb-10.0.10.tar.gz