mirror of
https://git.centos.org/rpms/mariadb.git
synced 2025-02-23 08:12:59 +00:00
import mariadb-5.5.65-1.el7
This commit is contained in:
commit
2a283453a0
29 changed files with 2218 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
SOURCES/mariadb-5.5.65.tar.gz
|
1
.mariadb.metadata
Normal file
1
.mariadb.metadata
Normal file
|
@ -0,0 +1 @@
|
||||||
|
886f157260e696e793bf0b270ca1393aaa219617 SOURCES/mariadb-5.5.65.tar.gz
|
13
SOURCES/README.mysql-cnf
Normal file
13
SOURCES/README.mysql-cnf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
This directory contains prepared configuration files with .cnf extension,
|
||||||
|
which provide a configuration for some common MariaDB deployment scenarios.
|
||||||
|
These configuration files do not include the default configuration of datadir,
|
||||||
|
log-file and pid-file locations, as specified in the default my.cnf file,
|
||||||
|
provided in this distribution.
|
||||||
|
|
||||||
|
Thus, it is recommended to use these configuration files as an addition to the
|
||||||
|
default my.cnf configuration file.
|
||||||
|
|
||||||
|
Since default my.cnf contains `!includedir /etc/my.cnf.d` directive, it is
|
||||||
|
recommended to copy required configuration under /etc/my.cnf.d/ directory,
|
||||||
|
so the default my.cnf specifications will be extended.
|
||||||
|
|
4
SOURCES/README.mysql-docs
Normal file
4
SOURCES/README.mysql-docs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
The official MySQL documentation is not freely redistributable, so we cannot
|
||||||
|
include it in RHEL or Fedora. You can find it on-line at
|
||||||
|
|
||||||
|
http://dev.mysql.com/doc/
|
6
SOURCES/README.mysql-license
Normal file
6
SOURCES/README.mysql-license
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
MySQL is distributed under GPL v2, but there are some licensing exceptions
|
||||||
|
that allow the client libraries to be linked with a non-GPL application,
|
||||||
|
so long as the application is under a license approved by Oracle.
|
||||||
|
For details see
|
||||||
|
|
||||||
|
http://www.mysql.com/about/legal/licensing/foss-exception/
|
5
SOURCES/filter-requires-mysql.sh
Executable file
5
SOURCES/filter-requires-mysql.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/usr/lib/rpm/perl.req $* | \
|
||||||
|
grep -v -e "perl(th" \
|
||||||
|
-e "perl(lib::mtr" -e "perl(lib::v1/mtr" -e "perl(mtr"
|
243
SOURCES/libmysql.version
Normal file
243
SOURCES/libmysql.version
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
# 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
# symbols specific for mariadb
|
||||||
|
libmysqlclient_18_mariadb {
|
||||||
|
global:
|
||||||
|
# symbols related to non-blocking operations
|
||||||
|
# documented here: https://kb.askmonty.org/en/non-blocking-api-reference/
|
||||||
|
mysql_get_socket;
|
||||||
|
mysql_get_timeout_value;
|
||||||
|
mysql_get_timeout_value_ms;
|
||||||
|
mysql_real_connect_start;
|
||||||
|
mysql_real_connect_cont;
|
||||||
|
mysql_real_query_start;
|
||||||
|
mysql_real_query_cont;
|
||||||
|
mysql_fetch_row_start;
|
||||||
|
mysql_fetch_row_cont;
|
||||||
|
mysql_set_character_set_start;
|
||||||
|
mysql_set_character_set_cont;
|
||||||
|
mysql_select_db_start;
|
||||||
|
mysql_select_db_cont;
|
||||||
|
mysql_send_query_start;
|
||||||
|
mysql_send_query_cont;
|
||||||
|
mysql_store_result_start;
|
||||||
|
mysql_store_result_cont;
|
||||||
|
mysql_free_result_start;
|
||||||
|
mysql_free_result_cont;
|
||||||
|
mysql_close_start;
|
||||||
|
mysql_close_cont;
|
||||||
|
mysql_change_user_start;
|
||||||
|
mysql_change_user_cont;
|
||||||
|
mysql_query_start;
|
||||||
|
mysql_query_cont;
|
||||||
|
mysql_shutdown_start;
|
||||||
|
mysql_shutdown_cont;
|
||||||
|
mysql_dump_debug_info_start;
|
||||||
|
mysql_dump_debug_info_cont;
|
||||||
|
mysql_refresh_start;
|
||||||
|
mysql_refresh_cont;
|
||||||
|
mysql_kill_start;
|
||||||
|
mysql_kill_cont;
|
||||||
|
mysql_set_server_option_start;
|
||||||
|
mysql_set_server_option_cont;
|
||||||
|
mysql_ping_start;
|
||||||
|
mysql_ping_cont;
|
||||||
|
mysql_stat_start;
|
||||||
|
mysql_stat_cont;
|
||||||
|
mysql_list_dbs_start;
|
||||||
|
mysql_list_dbs_cont;
|
||||||
|
mysql_list_tables_start;
|
||||||
|
mysql_list_tables_cont;
|
||||||
|
mysql_list_processes_start;
|
||||||
|
mysql_list_processes_cont;
|
||||||
|
mysql_list_fields_start;
|
||||||
|
mysql_list_fields_cont;
|
||||||
|
mysql_read_query_result_start;
|
||||||
|
mysql_read_query_result_cont;
|
||||||
|
mysql_stmt_prepare_start;
|
||||||
|
mysql_stmt_prepare_cont;
|
||||||
|
mysql_stmt_execute_start;
|
||||||
|
mysql_stmt_execute_cont;
|
||||||
|
mysql_stmt_fetch_start;
|
||||||
|
mysql_stmt_fetch_cont;
|
||||||
|
mysql_stmt_store_result_start;
|
||||||
|
mysql_stmt_store_result_cont;
|
||||||
|
mysql_stmt_close_start;
|
||||||
|
mysql_stmt_close_cont;
|
||||||
|
mysql_stmt_reset_start;
|
||||||
|
mysql_stmt_reset_cont;
|
||||||
|
mysql_stmt_free_result_start;
|
||||||
|
mysql_stmt_free_result_cont;
|
||||||
|
mysql_stmt_send_long_data_start;
|
||||||
|
mysql_stmt_send_long_data_cont;
|
||||||
|
mysql_commit_start;
|
||||||
|
mysql_commit_cont;
|
||||||
|
mysql_rollback_start;
|
||||||
|
mysql_rollback_cont;
|
||||||
|
mysql_autocommit_start;
|
||||||
|
mysql_autocommit_cont;
|
||||||
|
mysql_next_result_start;
|
||||||
|
mysql_next_result_cont;
|
||||||
|
mysql_stmt_next_result_start;
|
||||||
|
mysql_stmt_next_result_cont;
|
||||||
|
# dynamic columns API
|
||||||
|
# documented here: https://kb.askmonty.org/en/dynamic-columns-api/
|
||||||
|
# currently only documentation for mariadb-10.0.x available, but
|
||||||
|
# upstream promissed adding 5.5.x version as well
|
||||||
|
dynamic_column_create;
|
||||||
|
dynamic_column_create_many;
|
||||||
|
dynamic_column_update;
|
||||||
|
dynamic_column_update_many;
|
||||||
|
dynamic_column_delete;
|
||||||
|
dynamic_column_exists;
|
||||||
|
dynamic_column_list;
|
||||||
|
dynamic_column_get;
|
||||||
|
dynamic_column_prepare_decimal;
|
||||||
|
};
|
11
SOURCES/mariadb-basedir.patch
Normal file
11
SOURCES/mariadb-basedir.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- mariadb-5.5.40/scripts/mysql_config.sh.basedir 2014-10-08 15:19:53.000000000 +0200
|
||||||
|
+++ mariadb-5.5.40/scripts/mysql_config.sh 2014-11-06 13:36:54.025734370 +0100
|
||||||
|
@@ -77,7 +77,7 @@
|
||||||
|
me=`get_full_path $0`
|
||||||
|
|
||||||
|
# Script might have been renamed but assume mysql_<something>config<something>
|
||||||
|
-basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'`
|
||||||
|
+basedir='@prefix@'
|
||||||
|
|
||||||
|
ldata='@localstatedir@'
|
||||||
|
execdir='@libexecdir@'
|
11
SOURCES/mariadb-cipherreplace.patch
Normal file
11
SOURCES/mariadb-cipherreplace.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
diff -up mariadb-5.5.41/mysql-test/t/ssl_8k_key.test.cipherreplace mariadb-5.5.41/mysql-test/t/ssl_8k_key.test
|
||||||
|
--- mariadb-5.5.41/mysql-test/t/ssl_8k_key.test.cipherreplace 2015-01-09 17:06:09.904431758 +0100
|
||||||
|
+++ mariadb-5.5.41/mysql-test/t/ssl_8k_key.test 2015-01-09 17:04:42.560377123 +0100
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
#
|
||||||
|
# Bug#29784 YaSSL assertion failure when reading 8k key.
|
||||||
|
#
|
||||||
|
+--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
|
||||||
|
--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
|
||||||
|
|
||||||
|
## This test file is for testing encrypted communication only, not other
|
16
SOURCES/mariadb-covscan-signexpr.patch
Normal file
16
SOURCES/mariadb-covscan-signexpr.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
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.
|
||||||
|
|
||||||
|
diff -up mysql-5.5.31/strings/ctype-ucs2.c.covscan1 mysql-5.5.31/strings/ctype-ucs2.c
|
||||||
|
--- mysql-5.5.31/strings/ctype-ucs2.c.covscan1 2013-06-14 12:12:29.663300314 +0200
|
||||||
|
+++ mysql-5.5.31/strings/ctype-ucs2.c 2013-06-14 12:13:07.809299646 +0200
|
||||||
|
@@ -1704,7 +1704,7 @@ my_utf32_uni(CHARSET_INFO *cs __attribut
|
||||||
|
{
|
||||||
|
if (s + 4 > e)
|
||||||
|
return MY_CS_TOOSMALL4;
|
||||||
|
- *pwc= (s[0] << 24) + (s[1] << 16) + (s[2] << 8) + (s[3]);
|
||||||
|
+ *pwc= (((my_wc_t)s[0]) << 24) + (s[1] << 16) + (s[2] << 8) + (s[3]);
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
17
SOURCES/mariadb-covscan-stroverflow.patch
Normal file
17
SOURCES/mariadb-covscan-stroverflow.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
The following problems have been found by Coverity - static analysis tool.
|
||||||
|
|
||||||
|
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 -rup mariadb-5.5.47.covscan-stroverflow/sql/sp_rcontext.h mariadb-5.5.47/sql/sp_rcontext.h
|
||||||
|
--- mariadb-5.5.47.covscan-stroverflow/sql/sp_rcontext.h 2015-12-09 18:22:47.000000000 +0100
|
||||||
|
+++ mariadb-5.5.47/sql/sp_rcontext.h 2016-02-04 07:55:50.073558349 +0100
|
||||||
|
@@ -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()
|
20
SOURCES/mariadb-errno.patch
Normal file
20
SOURCES/mariadb-errno.patch
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
"extern int errno" is just a really bad idea.
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.33a/include/my_sys.h.p1 mariadb-5.5.33a/include/my_sys.h
|
||||||
|
--- mariadb-5.5.33a/include/my_sys.h.p1 2013-09-20 00:34:26.000000000 +0200
|
||||||
|
+++ mariadb-5.5.33a/include/my_sys.h 2013-10-21 14:46:46.866624871 +0200
|
||||||
|
@@ -190,13 +190,8 @@ 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? */
|
||||||
|
-#ifdef HAVE_ERRNO_AS_DEFINE
|
||||||
|
#include <errno.h> /* errno is a define */
|
||||||
|
-#else
|
||||||
|
-extern int errno; /* declare errno */
|
||||||
|
-#endif
|
||||||
|
-#endif /* #ifndef errno */
|
||||||
|
+
|
||||||
|
extern char *home_dir; /* Home directory for user */
|
||||||
|
extern MYSQL_PLUGIN_IMPORT char *mysql_data_home;
|
||||||
|
extern const char *my_progname; /* program-name (printed in errors) */
|
27
SOURCES/mariadb-file-contents.patch
Normal file
27
SOURCES/mariadb-file-contents.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
|
||||||
|
breaks at least two packaging commandments, so we put them into $libdir
|
||||||
|
instead. That means we have to hack the file_contents regression test
|
||||||
|
to know about this.
|
||||||
|
|
||||||
|
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
|
||||||
|
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.34/mysql-test/t/file_contents.test.p10 mariadb-5.5.34/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-5.5.34/mysql-test/t/file_contents.test 2013-11-22 08:50:30.244702013 +0100
|
||||||
|
@@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') {
|
||||||
|
# RedHat/Debian: version number in directory name
|
||||||
|
$dir_docs = glob "$dir_docs/mariadb-server-*";
|
||||||
|
$dir_docs = glob "$dir_docs/MySQL-server*" unless -d $dir_docs;
|
||||||
|
+
|
||||||
|
+ # All the above is entirely wacko, because these files are not docs;
|
||||||
|
+ # they should be kept in libdir instead. mtr does not provide a nice
|
||||||
|
+ # way to find libdir though, so we have to kluge it like this:
|
||||||
|
+ if (-d "/usr/lib64/mysql") {
|
||||||
|
+ $dir_docs = "/usr/lib64/mysql";
|
||||||
|
+ } else {
|
||||||
|
+ $dir_docs = "/usr/lib/mysql";
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
# Slackware
|
||||||
|
$dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs;
|
56
SOURCES/mariadb-install-test.patch
Normal file
56
SOURCES/mariadb-install-test.patch
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
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
|
||||||
|
--- mariadb-5.5.32/mysql-test/README.p3 2013-07-17 16:51:29.000000000 +0200
|
||||||
|
+++ mariadb-5.5.32/mysql-test/README 2013-07-30 23:22:54.959494478 +0200
|
||||||
|
@@ -1,15 +1,28 @@
|
||||||
|
-This directory contains a test suite for the MySQL daemon. To run
|
||||||
|
-the currently existing test cases, simply execute ./mysql-test-run in
|
||||||
|
-this directory. It will fire up the newly built mysqld and test it.
|
||||||
|
-
|
||||||
|
-Note that you do not have to have to do "make install", and you could
|
||||||
|
-actually have a co-existing MySQL installation. The tests will not
|
||||||
|
-conflict with it. To run the test suite in a source directory, you
|
||||||
|
-must do make first.
|
||||||
|
-
|
||||||
|
-All tests must pass. If one or more of them fail on your system, please
|
||||||
|
-read the following manual section for instructions on how to report the
|
||||||
|
-problem:
|
||||||
|
+This directory contains a test suite for the MariaDB daemon. To run
|
||||||
|
+the currently existing test cases, execute ./mysql-test-run in
|
||||||
|
+this directory.
|
||||||
|
+
|
||||||
|
+For use in Red Hat distributions, you should run the script as user mysql,
|
||||||
|
+who is created with nologin shell however, so the best bet is something like
|
||||||
|
+ $ su -
|
||||||
|
+ # cd /usr/share/mysql-test
|
||||||
|
+ # su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=rh-skipped-tests.list"
|
||||||
|
+
|
||||||
|
+This will use the installed mysql executables, but will run a private copy
|
||||||
|
+of the server process (using data files within /usr/share/mysql-test),
|
||||||
|
+so you need not start the mysqld service beforehand.
|
||||||
|
+
|
||||||
|
+The "--skip-test-list=rh-skipped-tests.list" option excludes tests that are
|
||||||
|
+known to fail on one or more Red-Hat-supported platforms. You can omit it
|
||||||
|
+if you want to check whether such failures occur for you. Documentation
|
||||||
|
+about the reasons for omitting such tests can be found in the file
|
||||||
|
+rh-skipped-tests.list.
|
||||||
|
+
|
||||||
|
+To clean up afterwards, remove the created "var" subdirectory, eg
|
||||||
|
+ # su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var"
|
||||||
|
+
|
||||||
|
+If one or more tests fail on your system, please read the following manual
|
||||||
|
+section for instructions on how to report the problem:
|
||||||
|
|
||||||
|
http://kb.askmonty.org/v/reporting-bugs
|
||||||
|
|
||||||
|
@@ -26,7 +39,8 @@ other relevant options.
|
||||||
|
|
||||||
|
With no test cases named on the command line, mysql-test-run falls back
|
||||||
|
to the normal "non-extern" behavior. The reason for this is that some
|
||||||
|
-tests cannot run with an external server.
|
||||||
|
+tests cannot run with an external server (because they need to control the
|
||||||
|
+options with which the server is started).
|
||||||
|
|
||||||
|
You can create your own test cases. To create a test case, create a new
|
||||||
|
file in the t subdirectory using a text editor. The file should have a .test
|
71
SOURCES/mariadb-logrotate.patch
Normal file
71
SOURCES/mariadb-logrotate.patch
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
Adjust the mysql-log-rotate script in several ways:
|
||||||
|
|
||||||
|
* Use the correct log file pathname for Red Hat installations.
|
||||||
|
* Enable creation of the log file by logrotate (needed since
|
||||||
|
/var/log/ isn't writable by mysql user); and set the same 640
|
||||||
|
permissions we normally use.
|
||||||
|
* Comment out the actual rotation commands, so that user must edit
|
||||||
|
the file to enable rotation. This is unfortunate, but the fact
|
||||||
|
that the script will probably fail without manual configuration
|
||||||
|
(to set a root password) means that we can't really have it turned
|
||||||
|
on by default. Fortunately, in most configurations the log file
|
||||||
|
is low-volume and so rotation is not critical functionality.
|
||||||
|
|
||||||
|
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
|
||||||
|
--- mariadb-5.5.32/support-files/mysql-log-rotate.sh.errlog 2013-08-29 14:35:34.839119044 +0200
|
||||||
|
+++ mariadb-5.5.32/support-files/mysql-log-rotate.sh 2013-08-29 14:38:54.203996083 +0200
|
||||||
|
@@ -1,9 +1,9 @@
|
||||||
|
# This logname can be set in /etc/my.cnf
|
||||||
|
-# by setting the variable "err-log"
|
||||||
|
-# in the [safe_mysqld] section as follows:
|
||||||
|
+# by setting the variable "log-error"
|
||||||
|
+# in the [mysqld_safe] section as follows:
|
||||||
|
#
|
||||||
|
-# [safe_mysqld]
|
||||||
|
-# err-log=@localstatedir@/mysqld.log
|
||||||
|
+# [mysqld_safe]
|
||||||
|
+# log-error=/var/log/mariadb/mariadb.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 !
|
||||||
|
|
||||||
|
-@localstatedir@/mysqld.log {
|
||||||
|
- # create 600 mysql mysql
|
||||||
|
- notifempty
|
||||||
|
- daily
|
||||||
|
- rotate 3
|
||||||
|
- missingok
|
||||||
|
- compress
|
||||||
|
- postrotate
|
||||||
|
- # just if mysqld is really running
|
||||||
|
- if test -x @bindir@/mysqladmin && \
|
||||||
|
- @bindir@/mysqladmin ping &>/dev/null
|
||||||
|
- then
|
||||||
|
- @bindir@/mysqladmin flush-logs
|
||||||
|
- fi
|
||||||
|
- endscript
|
||||||
|
-}
|
||||||
|
+# Then, un-comment the following lines to enable rotation of mysql's log file:
|
||||||
|
+
|
||||||
|
+#/var/log/mariadb/mariadb.log {
|
||||||
|
+# create 640 mysql mysql
|
||||||
|
+# notifempty
|
||||||
|
+# daily
|
||||||
|
+# rotate 3
|
||||||
|
+# missingok
|
||||||
|
+# compress
|
||||||
|
+# postrotate
|
||||||
|
+# # just if mysqld is really running
|
||||||
|
+# if test -x @bindir@/mysqladmin && \
|
||||||
|
+# @bindir@/mysqladmin ping &>/dev/null
|
||||||
|
+# then
|
||||||
|
+# @bindir@/mysqladmin flush-logs
|
||||||
|
+# fi
|
||||||
|
+# endscript
|
||||||
|
+#}
|
45
SOURCES/mariadb-mysql_secure_installation.patch
Normal file
45
SOURCES/mariadb-mysql_secure_installation.patch
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
From a0a93d99939de297863f7060e78e6a0ce7a271a7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergei Golubchik <sergii@pisem.net>
|
||||||
|
Date: Tue, 18 Nov 2014 22:26:04 +0100
|
||||||
|
Subject: [PATCH] MDEV-4399 mysql_secure_installation reports error in
|
||||||
|
find_mysql_client
|
||||||
|
|
||||||
|
1. remove find_mysql_client (from a bad merge)
|
||||||
|
2. use $mysql_command
|
||||||
|
---
|
||||||
|
scripts/mysql_secure_installation.sh | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
|
||||||
|
index 9e9bce9..8eca327 100644
|
||||||
|
--- a/scripts/mysql_secure_installation.sh
|
||||||
|
+++ b/scripts/mysql_secure_installation.sh
|
||||||
|
@@ -182,7 +182,7 @@ else
|
||||||
|
fi
|
||||||
|
|
||||||
|
mysql_command=`find_in_basedir mysql $bindir`
|
||||||
|
-if test -z "$print_defaults"
|
||||||
|
+if test -z "$mysql_command"
|
||||||
|
then
|
||||||
|
cannot_find_file mysql $bindir
|
||||||
|
exit 1
|
||||||
|
@@ -204,7 +204,7 @@ prepare() {
|
||||||
|
do_query() {
|
||||||
|
echo "$1" >$command
|
||||||
|
#sed 's,^,> ,' < $command # Debugging
|
||||||
|
- $bindir/mysql --defaults-file=$config <$command
|
||||||
|
+ $mysql_command --defaults-file=$config <$command
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -376,7 +376,6 @@ clean_and_exit() {
|
||||||
|
# The actual script starts here
|
||||||
|
|
||||||
|
prepare
|
||||||
|
-find_mysql_client
|
||||||
|
set_echo_compat
|
||||||
|
|
||||||
|
echo
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
78
SOURCES/mariadb-norelocatable.patch
Normal file
78
SOURCES/mariadb-norelocatable.patch
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
Revert upstream changes to make the mysql_install_dbrelocatable
|
||||||
|
|
||||||
|
Resolves: #1731062
|
||||||
|
|
||||||
|
Upstream intended to make the mysql_install_db script to be relocatable, which
|
||||||
|
is not a supported use case in RHEL. Because of different layout (mysqld in
|
||||||
|
/usr/libexec while all other binaries in /usr/bin) these changes broke
|
||||||
|
mysql_install_db if run without arguments (we use --rpm in the systemd so we
|
||||||
|
didn't meet this issue there). Reverting changes upstream did fixes the
|
||||||
|
standalone run of mysql_install_db again.
|
||||||
|
|
||||||
|
Original upstream issue: https://jira.mariadb.org/browse/MDEV-14580
|
||||||
|
Related fixes that broke the RHEL build:
|
||||||
|
https://github.com/MariaDB/server/commit/9c5be7d131f7eb7f27df722463faa2cd8135fd1b
|
||||||
|
https://github.com/MariaDB/server/commit/50e593386fcbaa1ca7bd2ed9fdfc51fd5102cdab
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.65/scripts/mysql_install_db.sh.norellocatable mariadb-5.5.65/scripts/mysql_install_db.sh
|
||||||
|
--- mariadb-5.5.65/scripts/mysql_install_db.sh.norellocatable 2019-08-17 07:06:14.135318451 +0200
|
||||||
|
+++ mariadb-5.5.65/scripts/mysql_install_db.sh 2019-08-17 07:10:58.702473136 +0200
|
||||||
|
@@ -36,9 +36,6 @@ in_rpm=0
|
||||||
|
ip_only=0
|
||||||
|
cross_bootstrap=0
|
||||||
|
|
||||||
|
-dirname0=`dirname $0 2>/dev/null`
|
||||||
|
-dirname0=`dirname $dirname0 2>/dev/null`
|
||||||
|
-
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
@@ -243,16 +238,9 @@ then
|
||||||
|
fi
|
||||||
|
if test -n "$srcdir"
|
||||||
|
then
|
||||||
|
- # In an out-of-source build, builddir is not srcdir. Try to guess where
|
||||||
|
- # builddir is by looking for my_print_defaults.
|
||||||
|
if test -z "$builddir"
|
||||||
|
then
|
||||||
|
- if test -x "$dirname0/extra/my_print_defaults"
|
||||||
|
- then
|
||||||
|
- builddir="$dirname0"
|
||||||
|
- else
|
||||||
|
- builddir="$srcdir"
|
||||||
|
- fi
|
||||||
|
+ builddir="$srcdir"
|
||||||
|
fi
|
||||||
|
print_defaults="$builddir/extra/my_print_defaults"
|
||||||
|
elif test -n "$basedir"
|
||||||
|
@@ -263,9 +251,6 @@ then
|
||||||
|
cannot_find_file my_print_defaults $basedir/bin $basedir/extra
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
-elif test -n "$dirname0" -a -x "$dirname0/@bindir@/my_print_defaults"
|
||||||
|
-then
|
||||||
|
- print_defaults="$dirname0/@bindir@/my_print_defaults"
|
||||||
|
else
|
||||||
|
print_defaults="@bindir@/my_print_defaults"
|
||||||
|
fi
|
||||||
|
@@ -317,19 +302,11 @@ then
|
||||||
|
cannot_find_file fill_help_tables.sql @pkgdata_locations@
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
-# relative from where the script was run for a relocatable install
|
||||||
|
-elif test -n "$dirname0" -a -x "$dirname0/@INSTALL_SBINDIR@/mysqld"
|
||||||
|
-then
|
||||||
|
- basedir="$dirname0"
|
||||||
|
- bindir="$basedir/@INSTALL_SBINDIR@"
|
||||||
|
- resolveip="$bindir/resolveip"
|
||||||
|
- mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
|
||||||
|
- pkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
|
||||||
|
else
|
||||||
|
basedir="@prefix@"
|
||||||
|
bindir="@bindir@"
|
||||||
|
resolveip="$bindir/resolveip"
|
||||||
|
- mysqld="@sbindir@/mysqld"
|
||||||
|
+ mysqld="@libexecdir@/mysqld"
|
||||||
|
pkgdatadir="@pkgdatadir@"
|
||||||
|
fi
|
||||||
|
|
171
SOURCES/mariadb-prepare-db-dir
Normal file
171
SOURCES/mariadb-prepare-db-dir
Normal file
|
@ -0,0 +1,171 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script creates the mysql data directory during first service start.
|
||||||
|
# In subsequent starts, it does nothing much.
|
||||||
|
|
||||||
|
# extract value of a MySQL option from config files
|
||||||
|
# Usage: get_mysql_option SECTION VARNAME DEFAULT
|
||||||
|
# result is returned in $result
|
||||||
|
# We use my_print_defaults which prints all options from multiple files,
|
||||||
|
# with the more specific ones later; hence take the last match.
|
||||||
|
get_mysql_option(){
|
||||||
|
if [ $# -ne 3 ] ; then
|
||||||
|
echo "get_mysql_option requires 3 arguments: section option default_value"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1`
|
||||||
|
if [ -z "$result" ]; then
|
||||||
|
# if not found, use the default value
|
||||||
|
result="$3"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Defaults here had better match what mysqld_safe will default to
|
||||||
|
get_mysql_option mysqld datadir "/var/lib/mysql"
|
||||||
|
datadir="$result"
|
||||||
|
get_mysql_option mysqld_safe log-error "/var/log/mariadb/mariadb.log"
|
||||||
|
errlogfile="$result"
|
||||||
|
get_mysql_option mysqld socket "$datadir/mysql.sock"
|
||||||
|
socketfile="$result"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Absorb configuration settings from the specified systemd service file,
|
||||||
|
# or the default "mysqld" service if not specified
|
||||||
|
SERVICE_NAME="$1"
|
||||||
|
if [ x"$SERVICE_NAME" = x ]
|
||||||
|
then
|
||||||
|
SERVICE_NAME=mysqld.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
myuser=`systemctl show -p User "${SERVICE_NAME}" |
|
||||||
|
sed 's/^User=//'`
|
||||||
|
if [ x"$myuser" = x ]
|
||||||
|
then
|
||||||
|
myuser=mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
mygroup=`systemctl show -p Group "${SERVICE_NAME}" |
|
||||||
|
sed 's/^Group=//'`
|
||||||
|
if [ x"$mygroup" = x ]
|
||||||
|
then
|
||||||
|
mygroup=mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set up the errlogfile with appropriate permissions
|
||||||
|
if [ ! -e "$errlogfile" -a ! -h "$errlogfile" -a x$(dirname "$errlogfile") = "x/var/log" ]; then
|
||||||
|
case $(basename "$errlogfile") in
|
||||||
|
mysql*.log|mariadb*.log) install /dev/null -m0640 -o$myuser -g$mygroup "$errlogfile" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# Provide some advice if the log file cannot be created by this script
|
||||||
|
errlogdir=$(dirname "$errlogfile")
|
||||||
|
if ! [ -d "$errlogdir" ] ; then
|
||||||
|
echo "The directory $errlogdir does not exist."
|
||||||
|
exit 1
|
||||||
|
elif [ -e "$errlogfile" -a ! -w "$errlogfile" ] ; then
|
||||||
|
echo "The log file $errlogfile cannot be written, please, fix its permissions."
|
||||||
|
echo "The daemon will be run under $myuser:$mygroup"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# We check if there is already a process using the socket file,
|
||||||
|
# since otherwise this systemd service file could report false
|
||||||
|
# positive result when starting and mysqld_safe could remove
|
||||||
|
# a socket file, which actually uses a different daemon.
|
||||||
|
response=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1`
|
||||||
|
if [ $? -eq 0 ] || echo "$response" | grep -q "Access denied for user" ; then
|
||||||
|
echo "Socket file $socketfile exists." >&2
|
||||||
|
echo "Is another MySQL daemon already running with the same unix socket?" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
# Returns content of the specified directory
|
||||||
|
# If listing files fails, fake-file is returned so which means
|
||||||
|
# we'll behave like there was some data initialized
|
||||||
|
# Some files or directories are fine to be there, so those are
|
||||||
|
# explicitly removed from the listing
|
||||||
|
# @param <dir> datadir
|
||||||
|
list_datadir ()
|
||||||
|
{
|
||||||
|
( ls -1A "$1" 2>/dev/null || echo "fake-file" ) | grep -v \
|
||||||
|
-e '^lost+found$' \
|
||||||
|
-e '\.err$' \
|
||||||
|
-e '^.bash_history$'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checks whether datadir should be initialized
|
||||||
|
# @param <dir> datadir
|
||||||
|
should_initialize ()
|
||||||
|
{
|
||||||
|
test -z "$(list_datadir "$1")"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make the data directory if doesn't exist or empty
|
||||||
|
if should_initialize "$datadir" ; then
|
||||||
|
# First, make sure $datadir is there with correct permissions
|
||||||
|
# (note: if it's not, and we're not root, this'll fail ...)
|
||||||
|
if [ ! -e "$datadir" -a ! -h "$datadir" ]
|
||||||
|
then
|
||||||
|
mkdir -p "$datadir" || exit 1
|
||||||
|
fi
|
||||||
|
chown "$myuser:$mygroup" "$datadir"
|
||||||
|
chmod 0755 "$datadir"
|
||||||
|
[ -x /sbin/restorecon ] && /sbin/restorecon "$datadir"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Now create the database
|
||||||
|
echo "Initializing MariaDB database"
|
||||||
|
# Avoiding deletion of files not created by mysql_install_db is
|
||||||
|
# guarded by time check and sleep should help work-arounded
|
||||||
|
# potential issues on systems with 1 second resolution timestamps
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1335849#c19
|
||||||
|
INITDB_TIMESTAMP=`LANG=C date -u`
|
||||||
|
sleep 1
|
||||||
|
/usr/bin/mysql_install_db --rpm --datadir="$datadir" --user="$myuser"
|
||||||
|
ret=$?
|
||||||
|
if [ $ret -ne 0 ] ; then
|
||||||
|
echo "Initialization of MariaDB database failed." >&2
|
||||||
|
echo "Perhaps @sysconfdir@/my.cnf is misconfigured or there is some problem with permissions of $datadir." >&2
|
||||||
|
# Clean up any partially-created database files
|
||||||
|
if [ ! -e "$datadir/mysql/user.frm" ] && [ -d "$datadir" ] ; then
|
||||||
|
echo "Initialization of MariaDB database was not finished successfully." >&2
|
||||||
|
echo "Files created so far will be removed." >&2
|
||||||
|
find "$datadir" -mindepth 1 -maxdepth 1 -newermt "$INITDB_TIMESTAMP" \
|
||||||
|
-not -name "lost+found" -exec rm -rf {} +
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "Removing of created files was not successfull." >&2
|
||||||
|
echo "Please, clean directory $datadir manually." >&2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "However, part of data has been initialized and those will not be removed." >&2
|
||||||
|
echo "Please, clean directory $datadir manually." >&2
|
||||||
|
fi
|
||||||
|
exit $ret
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -d "$datadir/mysql/" ] ; then
|
||||||
|
# mysql dir exists, it seems data are initialized properly
|
||||||
|
echo "Database MariaDB is probably initialized in $datadir already, nothing is done."
|
||||||
|
echo "If this is not the case, make sure the $datadir is empty before running `basename $0`."
|
||||||
|
else
|
||||||
|
# if the directory is not empty but mysql/ directory is missing, then
|
||||||
|
# print error and let user to initialize manually or empty the directory
|
||||||
|
echo "Database MariaDB is not initialized, but the directory $datadir is not empty, so initialization cannot be done."
|
||||||
|
echo "Make sure the $datadir is empty before running `basename $0`."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
41
SOURCES/mariadb-s390-tsc.patch
Normal file
41
SOURCES/mariadb-s390-tsc.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
Support s390/s390x in performance schema's cycle-counting functions.
|
||||||
|
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
|
||||||
|
--- mysql-5.5.28/include/my_rdtsc.h.p11 2012-08-29 10:50:46.000000000 +0200
|
||||||
|
+++ mysql-5.5.28/include/my_rdtsc.h 2012-12-06 14:22:13.651823354 +0100
|
||||||
|
@@ -125,6 +125,7 @@ C_MODE_END
|
||||||
|
#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25
|
||||||
|
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
|
||||||
|
#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
|
||||||
|
+#define MY_TIMER_ROUTINE_ASM_S390 28
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff -up mysql-5.5.28/mysys/my_rdtsc.c.p11 mysql-5.5.28/mysys/my_rdtsc.c
|
||||||
|
--- mysql-5.5.28/mysys/my_rdtsc.c.p11 2012-08-29 10:50:46.000000000 +0200
|
||||||
|
+++ mysql-5.5.28/mysys/my_rdtsc.c 2012-12-06 14:22:13.672823375 +0100
|
||||||
|
@@ -224,6 +224,13 @@ ulonglong my_timer_cycles(void)
|
||||||
|
clock_gettime(CLOCK_SGI_CYCLE, &tp);
|
||||||
|
return (ulonglong) tp.tv_sec * 1000000000 + (ulonglong) tp.tv_nsec;
|
||||||
|
}
|
||||||
|
+#elif defined(__GNUC__) && defined(__s390__)
|
||||||
|
+ /* covers both s390 and s390x */
|
||||||
|
+ {
|
||||||
|
+ ulonglong result;
|
||||||
|
+ __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
|
||||||
|
+ return result;
|
||||||
|
+ }
|
||||||
|
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
|
||||||
|
/* gethrtime may appear as either cycle or nanosecond counter */
|
||||||
|
return (ulonglong) gethrtime();
|
||||||
|
@@ -533,6 +540,8 @@ void my_timer_init(MY_TIMER_INFO *mti)
|
||||||
|
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
|
||||||
|
#elif defined(__sgi) && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE)
|
||||||
|
mti->cycles.routine= MY_TIMER_ROUTINE_SGI_CYCLE;
|
||||||
|
+#elif defined(__GNUC__) && defined(__s390__)
|
||||||
|
+ mti->cycles.routine= MY_TIMER_ROUTINE_ASM_S390;
|
||||||
|
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
|
||||||
|
mti->cycles.routine= MY_TIMER_ROUTINE_GETHRTIME;
|
||||||
|
#else
|
43
SOURCES/mariadb-string-overflow.patch
Normal file
43
SOURCES/mariadb-string-overflow.patch
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
These issues were found by Coverity static analysis tool, for more info
|
||||||
|
see messages by particular fixes (messages belong to 5.1.61).
|
||||||
|
|
||||||
|
Filed upstream at http://bugs.mysql.com/bug.php?id=64631
|
||||||
|
|
||||||
|
|
||||||
|
Error: BUFFER_SIZE_WARNING:
|
||||||
|
/builddir/build/BUILD/mysql-5.1.61/sql/sql_prepare.cc:2749: buffer_size_warning: Calling strncpy with a maximum size argument of 512 bytes on destination array "this->stmt->last_error" of size 512 bytes might leave the destination string unterminated.
|
||||||
|
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.28a/sql/sql_prepare.cc.p20 mariadb-5.5.28a/sql/sql_prepare.cc
|
||||||
|
--- mariadb-5.5.28a/sql/sql_prepare.cc.p20 2012-11-28 16:49:36.000000000 +0100
|
||||||
|
+++ mariadb-5.5.28a/sql/sql_prepare.cc 2012-12-17 17:45:24.232151645 +0100
|
||||||
|
@@ -2975,7 +2975,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);
|
||||||
|
}
|
||||||
|
thd->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);
|
||||||
|
|
30
SOURCES/mariadb-strmov.patch
Normal file
30
SOURCES/mariadb-strmov.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
Remove overly optimistic definition of strmov() as stpcpy().
|
||||||
|
|
||||||
|
mysql uses this macro with overlapping source and destination strings,
|
||||||
|
which is verboten per spec, and fails on some Red Hat platforms.
|
||||||
|
Deleting the definition is sufficient to make it fall back to a
|
||||||
|
byte-at-a-time copy loop, which should consistently give the
|
||||||
|
expected behavior.
|
||||||
|
|
||||||
|
Note: the particular case that prompted this patch is reported and fixed
|
||||||
|
at http://bugs.mysql.com/bug.php?id=48864. However, my faith in upstream's
|
||||||
|
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
|
||||||
|
this patch.
|
||||||
|
|
||||||
|
diff -up mariadb-5.5.28a/include/m_string.h.p2 mariadb-5.5.28a/include/m_string.h
|
||||||
|
--- mariadb-5.5.28a/include/m_string.h.p2 2012-12-17 16:14:19.140536799 +0100
|
||||||
|
+++ mariadb-5.5.28a/include/m_string.h 2012-12-17 16:15:40.036567242 +0100
|
||||||
|
@@ -79,12 +79,6 @@ extern "C" {
|
||||||
|
extern void *(*my_str_malloc)(size_t);
|
||||||
|
extern void (*my_str_free)(void *);
|
||||||
|
|
||||||
|
-#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
||||||
|
-#define strmov(A,B) __builtin_stpcpy((A),(B))
|
||||||
|
-#elif defined(HAVE_STPCPY)
|
||||||
|
-#define strmov(A,B) stpcpy((A),(B))
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
/* Declared in int2str() */
|
||||||
|
extern const char _dig_vec_upper[];
|
||||||
|
extern const char _dig_vec_lower[];
|
55
SOURCES/mariadb-wait-ready
Normal file
55
SOURCES/mariadb-wait-ready
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script waits for mysqld to be ready to accept connections
|
||||||
|
# (which can be many seconds or even minutes after launch, if there's
|
||||||
|
# a lot of crash-recovery work to do).
|
||||||
|
# Running this as ExecStartPost is useful so that services declared as
|
||||||
|
# "After mysqld" won't be started until the database is really ready.
|
||||||
|
|
||||||
|
# Service file passes us the daemon's PID (actually, mysqld_safe's PID)
|
||||||
|
daemon_pid="$1"
|
||||||
|
|
||||||
|
# extract value of a MySQL option from config files
|
||||||
|
# Usage: get_mysql_option SECTION VARNAME DEFAULT
|
||||||
|
# result is returned in $result
|
||||||
|
# We use my_print_defaults which prints all options from multiple files,
|
||||||
|
# with the more specific ones later; hence take the last match.
|
||||||
|
get_mysql_option(){
|
||||||
|
result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1`
|
||||||
|
if [ -z "$result" ]; then
|
||||||
|
# not found, use default
|
||||||
|
result="$3"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Defaults here had better match what mysqld_safe will default to
|
||||||
|
get_mysql_option mysqld datadir "/var/lib/mysql"
|
||||||
|
datadir="$result"
|
||||||
|
get_mysql_option mysqld socket "/var/lib/mysql/mysql.sock"
|
||||||
|
socketfile="$result"
|
||||||
|
|
||||||
|
# Wait for the server to come up or for the mysqld process to disappear
|
||||||
|
ret=0
|
||||||
|
while /bin/true; do
|
||||||
|
if ! [ -d "/proc/$daemon_pid" ] ; then
|
||||||
|
ret=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
RESPONSE=`/usr/bin/mysqladmin --no-defaults --connect-timeout=2 --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
|
||||||
|
mret=$?
|
||||||
|
if [ $mret -eq 0 ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected,
|
||||||
|
# anything else suggests a configuration error
|
||||||
|
if [ $mret -ne 1 -a $mret -ne 11 ]; then
|
||||||
|
ret=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# "Access denied" also means the server is alive
|
||||||
|
echo "$RESPONSE" | grep -q "Access denied for user" && break
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $ret
|
48
SOURCES/mariadb.service
Normal file
48
SOURCES/mariadb.service
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# It's not recommended to modify this file in-place, because it will be
|
||||||
|
# overwritten during package upgrades. If you want to customize, the
|
||||||
|
# best way is to create a file "/etc/systemd/system/mariadb.service",
|
||||||
|
# containing
|
||||||
|
# .include /lib/systemd/system/mariadb.service
|
||||||
|
# ...make your changes here...
|
||||||
|
# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
|
||||||
|
# which doesn't need to include ".include" call and which will be parsed
|
||||||
|
# after the file mariadb.service itself is parsed.
|
||||||
|
#
|
||||||
|
# For more info about custom unit files, see systemd.unit(5) or
|
||||||
|
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
||||||
|
|
||||||
|
# For example, if you want to increase mariadb's open-files-limit to 10000,
|
||||||
|
# you need to increase systemd's LimitNOFILE setting, so create a file named
|
||||||
|
# "/etc/systemd/system/mariadb.service.d/limits.conf" containing:
|
||||||
|
# [Service]
|
||||||
|
# LimitNOFILE=10000
|
||||||
|
|
||||||
|
# Note: /usr/lib/... is recommended in the .include line though /lib/...
|
||||||
|
# still works.
|
||||||
|
# Don't forget to reload systemd daemon after you change unit configuration:
|
||||||
|
# root> systemctl --system daemon-reload
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=MariaDB database server
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=mysql
|
||||||
|
Group=mysql
|
||||||
|
|
||||||
|
ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n
|
||||||
|
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||||
|
# per bug #547485
|
||||||
|
ExecStart=/usr/bin/mysqld_safe --basedir=/usr
|
||||||
|
ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID
|
||||||
|
|
||||||
|
# Give a reasonable amount of time for the server to start up/shut down
|
||||||
|
TimeoutSec=300
|
||||||
|
|
||||||
|
# Place temp files in a secure directory, not /tmp
|
||||||
|
PrivateTmp=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
5
SOURCES/mariadb.tmpfiles.d
Normal file
5
SOURCES/mariadb.tmpfiles.d
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Do not edit this file; it will be overwritten on upgrades.
|
||||||
|
# If you want to override the settings here, you can copy this file
|
||||||
|
# to /etc/tmpfiles.d/mariadb.conf and make your changes there.
|
||||||
|
|
||||||
|
d /var/run/mariadb 0755 mysql mysql -
|
19
SOURCES/my.cnf
Normal file
19
SOURCES/my.cnf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[mysqld]
|
||||||
|
datadir=/var/lib/mysql
|
||||||
|
socket=/var/lib/mysql/mysql.sock
|
||||||
|
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||||
|
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 mariadb according to the
|
||||||
|
# instructions in http://fedoraproject.org/wiki/Systemd
|
||||||
|
|
||||||
|
[mysqld_safe]
|
||||||
|
log-error=/var/log/mariadb/mariadb.log
|
||||||
|
pid-file=/var/run/mariadb/mariadb.pid
|
||||||
|
|
||||||
|
#
|
||||||
|
# include all files from the config directory
|
||||||
|
#
|
||||||
|
!includedir /etc/my.cnf.d
|
||||||
|
|
33
SOURCES/my_config.h
Normal file
33
SOURCES/my_config.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* Kluge to support multilib installation of both 32- and 64-bit RPMS:
|
||||||
|
* we need to arrange that header files that appear in both RPMs are
|
||||||
|
* identical. Hence, this file is architecture-independent and calls
|
||||||
|
* in an arch-dependent file that will appear in just one RPM.
|
||||||
|
*
|
||||||
|
* To avoid breaking arches not explicitly supported by Red Hat, we
|
||||||
|
* use this indirection file *only* on known multilib arches.
|
||||||
|
*
|
||||||
|
* Note: this may well fail if user tries to use gcc's -I- option.
|
||||||
|
* But that option is deprecated anyway.
|
||||||
|
*/
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
#include "my_config_x86_64.h"
|
||||||
|
#elif defined(__i386__)
|
||||||
|
#include "my_config_i386.h"
|
||||||
|
#elif defined(__ppc64__) || defined(__powerpc64__)
|
||||||
|
#include "my_config_ppc64.h"
|
||||||
|
#elif defined(__ppc__) || defined(__powerpc__)
|
||||||
|
#include "my_config_ppc.h"
|
||||||
|
#elif defined(__s390x__)
|
||||||
|
#include "my_config_s390x.h"
|
||||||
|
#elif defined(__s390__)
|
||||||
|
#include "my_config_s390.h"
|
||||||
|
#elif defined(__sparc__) && defined(__arch64__)
|
||||||
|
#include "my_config_sparc64.h"
|
||||||
|
#elif defined(__sparc__)
|
||||||
|
#include "my_config_sparc.h"
|
||||||
|
#elif defined(__arm__)
|
||||||
|
#include "my_config_arm.h"
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
#include "my_config_aarch64.h"
|
||||||
|
#endif
|
26
SOURCES/mysql-embedded-check.c
Normal file
26
SOURCES/mysql-embedded-check.c
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/* simple test program to see if we can link the embedded server library */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "mysql.h"
|
||||||
|
|
||||||
|
MYSQL *mysql;
|
||||||
|
|
||||||
|
static char *server_options[] = \
|
||||||
|
{ "mysql_test", "--defaults-file=my.cnf", NULL };
|
||||||
|
int num_elements = (sizeof(server_options) / sizeof(char *)) - 1;
|
||||||
|
|
||||||
|
static char *server_groups[] = { "libmysqld_server",
|
||||||
|
"libmysqld_client", NULL };
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
mysql_library_init(num_elements, server_options, server_groups);
|
||||||
|
mysql = mysql_init(NULL);
|
||||||
|
mysql_close(mysql);
|
||||||
|
mysql_library_end();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
11
SOURCES/rh-skipped-tests-base.list
Normal file
11
SOURCES/rh-skipped-tests-base.list
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Tests and a bug where we track the failure in the following format:
|
||||||
|
# suite.test : rhbz#1234567
|
||||||
|
|
||||||
|
# Failing from 5.5.63 on all arches
|
||||||
|
main.mysql :
|
||||||
|
|
||||||
|
# i686, ppc64le
|
||||||
|
main.mysql_client_test_nonblock : rhbz#1544452 rhbz#1021450
|
||||||
|
|
||||||
|
# ppc, ppc64le, aarch64
|
||||||
|
innodb.innodb_simulate_comp_failures :
|
1111
SPECS/mariadb.spec
Normal file
1111
SPECS/mariadb.spec
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue