diff options
author | Nikolai Lifanov <lifanov@FreeBSD.org> | 2017-02-22 17:31:39 +0000 |
---|---|---|
committer | Nikolai Lifanov <lifanov@FreeBSD.org> | 2017-02-22 17:31:39 +0000 |
commit | 1f9f34c36522ec193ea3f48264397a3e54198d23 (patch) | |
tree | eab403c021fb1f3997304e4534ee1f8ffd565860 /databases/mysqlwsrep56-server/files | |
parent | b9db44685476e6a101274773887c7b4d1eb1a3f3 (diff) | |
download | ports-1f9f34c36522ec193ea3f48264397a3e54198d23.tar.gz ports-1f9f34c36522ec193ea3f48264397a3e54198d23.zip |
Notes
Diffstat (limited to 'databases/mysqlwsrep56-server/files')
23 files changed, 726 insertions, 0 deletions
diff --git a/databases/mysqlwsrep56-server/files/extra-patch-config.h.cmake b/databases/mysqlwsrep56-server/files/extra-patch-config.h.cmake new file mode 100644 index 000000000000..3ac1add1b9ce --- /dev/null +++ b/databases/mysqlwsrep56-server/files/extra-patch-config.h.cmake @@ -0,0 +1,12 @@ +--- config.h.cmake.orig 2014-12-05 16:24:02 UTC ++++ config.h.cmake +@@ -151,7 +151,8 @@ + #cmakedefine HAVE_FESETROUND 1 + #cmakedefine HAVE_FINITE 1 + #cmakedefine HAVE_FP_EXCEPT 1 +-#cmakedefine HAVE_FPSETMASK 1 ++#cmakedefine HAVE_FPSETMASK 0 ++#cmakedefine HAVE_FEDISABLEEXCEPT 1 + #cmakedefine HAVE_FSEEKO 1 + #cmakedefine HAVE_FSYNC 1 + #cmakedefine HAVE_FTIME 1 diff --git a/databases/mysqlwsrep56-server/files/my.cnf.sample.in b/databases/mysqlwsrep56-server/files/my.cnf.sample.in new file mode 100644 index 000000000000..a7b7a804bc34 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/my.cnf.sample.in @@ -0,0 +1,63 @@ +# $FreeBSD$ + +[client] +port = 3306 +socket = /tmp/mysql.sock + +[mysql] +prompt = \u@\h [\d]>\_ +no_auto_rehash + +[mysqld] +user = mysql +port = 3306 +socket = /tmp/mysql.sock +bind-address = 127.0.0.1 +basedir = %%PREFIX%% +datadir = %%MY_DBDIR%% +tmpdir = %%MY_TMPDIR%% +slave-load-tmpdir = %%MY_TMPDIR%% +secure-file-priv = %%MY_SECDIR%% +log-bin = mysql-bin +log-output = TABLE +master-info-repository = TABLE +relay-log-info-repository = TABLE +relay-log-recovery = 1 +slow-query-log = 1 +server-id = 1 +sync_binlog = 1 +sync_relay_log = 1 +binlog_cache_size = 16M +expire_logs_days = 30 +log-slave-updates = 1 +enforce-gtid-consistency = 1 +gtid-mode = ON +safe-user-create = 1 +lower_case_table_names = 1 +explicit-defaults-for-timestamp = 1 +myisam-recover-options = BACKUP,FORCE +open_files_limit = 32768 +table_open_cache = 16384 +table_definition_cache = 8192 +net_retry_count = 16384 +key_buffer_size = 256M +max_allowed_packet = 64M +query_cache_type = 0 +query_cache_size = 0 +long_query_time = 0.5 +innodb_buffer_pool_size = 1G +innodb_data_home_dir = %%MY_DBDIR%% +innodb_log_group_home_dir = %%MY_DBDIR%% +innodb_data_file_path = ibdata1:128M:autoextend +innodb_flush_method = O_DIRECT +innodb_log_file_size = 256M +innodb_log_buffer_size = 16M +innodb_write_io_threads = 8 +innodb_read_io_threads = 8 +innodb_autoinc_lock_mode = 2 +skip-symbolic-links + +[mysqldump] +max_allowed_packet = 256M +quote_names +quick diff --git a/databases/mysqlwsrep56-server/files/mysql-server.in b/databases/mysqlwsrep56-server/files/mysql-server.in new file mode 100644 index 000000000000..64304dd85eee --- /dev/null +++ b/databases/mysqlwsrep56-server/files/mysql-server.in @@ -0,0 +1,97 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: mysql +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable mysql: +# mysql_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_optfile (str): Server-specific option file. +# Default to "${mysql_dbdir}/my.cnf". +# mysql_pidfile (str): Custum PID file path and name. +# Default to "${mysql_dbdir}/${hostname}.pid". +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. /etc/rc.subr + +name="mysql" +rcvar=mysql_enable + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_optfile="${mysql_dbdir}/my.cnf"} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +: ${hostname:=`/bin/hostname`} +pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"} +command="/usr/sbin/daemon" +command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--basedir=%%PREFIX%% --defaults-extra-file=${mysql_optfile} --datadir=${mysql_dbdir} --force" +service_startup_timeout=900 +startup_sleep=1 +sst_progress_file=${mysql_dbdir}/sst_in_progress +extra_commands="bootstrap" +bootstrap_cmd="mysql_bootstrap" + +mysql_bootstrap() +{ + # Bootstrap the cluster, start the first node that initiate the cluster + check_startmsgs && echo "Bootstrapping cluster" + shift + command_args="$command_args --wsrep-new-cluster" + run_rc_command ${_rc_prefix}start +} + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null 2>/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +mysql_poststart() +{ + local timeout=${service_startup_timeout} + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + if test -e $sst_progress_file && [ $startup_sleep -ne 100 ]; then + check_startmsgs && echo "SST in progress, setting sleep higher" + startup_sleep=100 + fi + timeout=$(( timeout - 1 )) + sleep $startup_sleep + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mysqlwsrep56-server/files/patch-CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..b788ad12a41c --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-CMakeLists.txt @@ -0,0 +1,42 @@ +--- CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ CMakeLists.txt +@@ -499,12 +499,10 @@ IF(UNIX) + ENDIF() + + IF(NOT WITHOUT_SERVER) +- ADD_SUBDIRECTORY(tests) + ADD_SUBDIRECTORY(sql) + OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF) + IF(WITH_EMBEDDED_SERVER) + ADD_SUBDIRECTORY(libmysqld) +- ADD_SUBDIRECTORY(libmysqld/examples) + ENDIF(WITH_EMBEDDED_SERVER) + ENDIF() + +@@ -513,10 +511,7 @@ ENDIF() + ADD_SUBDIRECTORY(scripts) + + IF(NOT WITHOUT_SERVER) +- ADD_SUBDIRECTORY(mysql-test) +- ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess) + ADD_SUBDIRECTORY(support-files) +- ADD_SUBDIRECTORY(sql-bench) + IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt) + ADD_SUBDIRECTORY(internal) + ENDIF() +@@ -574,6 +569,7 @@ ENDIF() + # + # RPM installs documentation directly from the source tree + # ++IF(FALSE) + IF(NOT INSTALL_LAYOUT MATCHES "RPM") + INSTALL(FILES COPYING LICENSE.mysql + DESTINATION ${INSTALL_DOCREADMEDIR} +@@ -597,6 +593,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") + PATTERN "sp-imp-spec.txt" EXCLUDE + ) + ENDIF() ++ENDIF() + + INCLUDE(CPack) + diff --git a/databases/mysqlwsrep56-server/files/patch-client_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-client_CMakeLists.txt new file mode 100644 index 000000000000..70f9a00b2723 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-client_CMakeLists.txt @@ -0,0 +1,65 @@ +--- client/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ client/CMakeLists.txt +@@ -31,17 +31,20 @@ INCLUDE_DIRECTORIES( + COPY_OPENSSL_DLLS(copy_openssl_client) + + ADD_DEFINITIONS(${SSL_DEFINES}) ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc) + TARGET_LINK_LIBRARIES(mysql mysqlclient) + IF(UNIX) + TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY}) + ENDIF(UNIX) ++ENDIF() + + MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) + SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") + TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex) + + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) + TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient) + +@@ -51,17 +54,21 @@ TARGET_LINK_LIBRARIES(mysqldump mysqlcli + MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c) + SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS") + TARGET_LINK_LIBRARIES(mysqlimport mysqlclient) ++ENDIF() + + MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c) + TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient) + ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs) + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c) + TARGET_LINK_LIBRARIES(mysqlshow mysqlclient) ++ENDIF() + + MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) + TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient) + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) + TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient) + +@@ -74,6 +81,7 @@ TARGET_LINK_LIBRARIES(mysqlslap mysqlcli + + MYSQL_ADD_EXECUTABLE(mysql_config_editor mysql_config_editor.cc) + TARGET_LINK_LIBRARIES(mysql_config_editor mysqlclient) ++ENDIF() + + # "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/". + IF(WIN32) +@@ -83,11 +91,6 @@ ENDIF(WIN32) + SET_TARGET_PROPERTIES ( + mysql_plugin + mysql_upgrade +- mysqlcheck +- mysqldump +- mysqlimport +- mysqlshow +- mysqlslap + PROPERTIES HAS_CXX TRUE) + + ADD_DEFINITIONS(-DHAVE_DLOPEN) diff --git a/databases/mysqlwsrep56-server/files/patch-cmake_plugin.cmake b/databases/mysqlwsrep56-server/files/patch-cmake_plugin.cmake new file mode 100644 index 000000000000..b808e1dde2c7 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-cmake_plugin.cmake @@ -0,0 +1,10 @@ +--- cmake/plugin.cmake.orig 2017-01-25 07:58:07 UTC ++++ cmake/plugin.cmake +@@ -205,7 +205,6 @@ MACRO(MYSQL_ADD_PLUGIN) + OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}") + # Install dynamic library + MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT Server) +- INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug) + # Add installed files to list for RPMs + FILE(APPEND ${CMAKE_BINARY_DIR}/support-files/plugins.files + "%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/${ARG_MODULE_OUTPUT_NAME}.so\n" diff --git a/databases/mysqlwsrep56-server/files/patch-cmake_ssl.cmake b/databases/mysqlwsrep56-server/files/patch-cmake_ssl.cmake new file mode 100644 index 000000000000..6e3afb13ba70 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-cmake_ssl.cmake @@ -0,0 +1,11 @@ +--- cmake/ssl.cmake.orig 2017-01-25 07:58:07 UTC ++++ cmake/ssl.cmake +@@ -176,7 +176,7 @@ MACRO (MYSQL_CHECK_SSL) + IF(OPENSSL_INCLUDE_DIR AND + OPENSSL_LIBRARY AND + CRYPTO_LIBRARY AND +- OPENSSL_MAJOR_VERSION STREQUAL "1" ++ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1" + ) + SET(OPENSSL_FOUND TRUE) + ELSE() diff --git a/databases/mysqlwsrep56-server/files/patch-extra_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-extra_CMakeLists.txt new file mode 100644 index 000000000000..15e6c6b2b4e6 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-extra_CMakeLists.txt @@ -0,0 +1,13 @@ +--- extra/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ extra/CMakeLists.txt +@@ -101,8 +101,10 @@ IF(UNIX) + MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.cc) + TARGET_LINK_LIBRARIES(resolve_stack_dump mysys mysys_ssl) + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c) + TARGET_LINK_LIBRARIES(mysql_waitpid mysys mysys_ssl) + SET_TARGET_PROPERTIES(mysql_waitpid PROPERTIES LINKER_LANGUAGE CXX) + ENDIF() ++ENDIF() + diff --git a/databases/mysqlwsrep56-server/files/patch-include_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-include_CMakeLists.txt new file mode 100644 index 000000000000..bdadad20f55b --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-include_CMakeLists.txt @@ -0,0 +1,15 @@ +--- include/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ include/CMakeLists.txt +@@ -65,10 +65,12 @@ SET(HEADERS + ${HEADERS_GEN_CONFIGURE} + ) + ++IF(FALSE) + INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) + INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development + PATTERN "*.h" + PATTERN "psi_abi*" EXCLUDE + ) ++ENDIF() + + diff --git a/databases/mysqlwsrep56-server/files/patch-include_my__compare.h b/databases/mysqlwsrep56-server/files/patch-include_my__compare.h new file mode 100644 index 000000000000..093c8ae37789 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-include_my__compare.h @@ -0,0 +1,11 @@ +--- include/my_compare.h.orig 2011-05-10 09:46:46.000000000 +0200 ++++ include/my_compare.h 2011-05-10 09:47:01.000000000 +0200 +@@ -39,7 +39,7 @@ + But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH. + */ + +-#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */ ++#define HA_MAX_KEY_LENGTH 4000 /* Max length in bytes */ + #define HA_MAX_KEY_SEG 16 /* Max segments for key */ + + #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6) diff --git a/databases/mysqlwsrep56-server/files/patch-include_myisam.h b/databases/mysqlwsrep56-server/files/patch-include_myisam.h new file mode 100644 index 000000000000..4c47ca569408 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-include_myisam.h @@ -0,0 +1,11 @@ +--- include/myisam.h.orig 2017-01-25 07:58:07 UTC ++++ include/myisam.h +@@ -49,7 +49,7 @@ extern "C" { + The following defines can be increased if necessary. + But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH. + */ +-#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */ ++#define MI_MAX_KEY_LENGTH 4000 /* Max length in bytes */ + #define MI_MAX_KEY_SEG 16 /* Max segments for key */ + + #define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8) diff --git a/databases/mysqlwsrep56-server/files/patch-libmysql_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-libmysql_CMakeLists.txt new file mode 100644 index 000000000000..7e4e2e99af49 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-libmysql_CMakeLists.txt @@ -0,0 +1,41 @@ +--- libmysql/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ libmysql/CMakeLists.txt +@@ -180,7 +180,7 @@ IF(WIN32) + ENDIF() + + # Merge several convenience libraries into one big mysqlclient +-MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development) ++MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development NOINSTALL) + + # Visual Studio users need debug static library for debug projects + IF(MSVC) +@@ -208,19 +208,22 @@ IF(UNIX) + ENDMACRO() + ENDIF() + ++IF(FALSE) + IF(UNIX) + GET_TARGET_NAME(mysqlclient lib_name) + INSTALL_SYMLINK(mysqlclient + ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a + ${INSTALL_LIBDIR} Development) + ENDIF() ++ENDIF() + + IF(NOT DISABLE_SHARED) + # Merge several convenience libraries into one big mysqlclient + # and link them together into shared library. + MERGE_LIBRARIES(libmysql SHARED ${LIBS} + EXPORTS ${CLIENT_API_FUNCTIONS} +- COMPONENT SharedLibraries) ++ COMPONENT SharedLibraries NOINSTALL) ++ IF(FALSE) + IF(UNIX) + # libtool compatability + IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) +@@ -289,4 +292,5 @@ IF(NOT DISABLE_SHARED) + ${INSTALL_LIBDIR} SharedLibraries) + ENDFOREACH() + ENDIF() ++ ENDIF() + ENDIF() diff --git a/databases/mysqlwsrep56-server/files/patch-libservices_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-libservices_CMakeLists.txt new file mode 100644 index 000000000000..4baae0f8e5d6 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-libservices_CMakeLists.txt @@ -0,0 +1,9 @@ +--- libservices/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ libservices/CMakeLists.txt +@@ -24,4 +24,6 @@ SET(MYSQLSERVICES_SOURCES + mysql_string_service.c) + + ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) ++IF(FALSE) + INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) ++ENDIF() diff --git a/databases/mysqlwsrep56-server/files/patch-man_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-man_CMakeLists.txt new file mode 100644 index 000000000000..6bcd735f6282 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-man_CMakeLists.txt @@ -0,0 +1,13 @@ +--- man/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ man/CMakeLists.txt +@@ -14,9 +14,7 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + # Copy man pages +-FILE(GLOB MAN1_FILES *.1) +-FILE(GLOB MAN1_EXCLUDE make_win_bin_dist.1) +-FILE(GLOB MAN1_NDB ndb*.1) ++FILE(GLOB MAN1_FILES my_print_defaults.1 myisam_ftdump.1 myisamchk.1 myisamlog.1 myisampack.1 mysql.server.1 mysql_convert_table_format.1 mysql_fix_extensions.1 mysql_install_db.1 mysql_plugin.1 mysql_secure_installation.1 mysql_setpermission.1 mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql_zap.1 mysqlbug.1 mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1 mysqlman.1 mysqltest.1 perror.1 replace.1 resolve_stack_dump.1 resolveip.1) + FILE(GLOB MAN8_FILES *.8) + FILE(GLOB MAN8_NDB ndb*.8) + IF(MAN1_FILES) diff --git a/databases/mysqlwsrep56-server/files/patch-mysys__ssl_my__default.cc b/databases/mysqlwsrep56-server/files/patch-mysys__ssl_my__default.cc new file mode 100644 index 000000000000..fa06468ce959 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-mysys__ssl_my__default.cc @@ -0,0 +1,61 @@ +--- mysys_ssl/my_default.cc.orig 2016-11-28 13:36:22 UTC ++++ mysys_ssl/my_default.cc +@@ -110,7 +110,7 @@ static my_bool defaults_already_read= FA + + /* Which directories are searched for options (and in which order) */ + +-#define MAX_DEFAULT_DIRS 6 ++#define MAX_DEFAULT_DIRS 7 + #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ + static const char **default_directories = NULL; + +@@ -903,6 +903,14 @@ static int search_default_file_with_ext( + return 1; /* Ignore wrong files */ + } + ++ if (strstr(name, "/etc") == name) ++ { ++ fprintf(stderr, ++ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n", ++ name,name); ++ goto err; ++ } ++ + while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) + { + line++; +@@ -1241,7 +1249,8 @@ void my_print_default_files(const char * + end[(strlen(end)-1)] = ' '; + else + strxmov(end, conf_file, *ext , " ", NullS); +- fputs(name, stdout); ++ if (strstr(name, "/etc") != name) ++ fputs(name, stdout); + } + } + } +@@ -1400,13 +1409,8 @@ static const char **init_default_directo + + #else + +- errors += add_directory(alloc, "/etc/", dirs); +- errors += add_directory(alloc, "/etc/mysql/", dirs); +- +-#if defined(DEFAULT_SYSCONFDIR) +- if (DEFAULT_SYSCONFDIR[0]) +- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); +-#endif /* DEFAULT_SYSCONFDIR */ ++ errors += add_directory(alloc, "/usr/local/etc/", dirs); ++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs); + + #endif + +@@ -1477,7 +1481,7 @@ int check_file_permissions(const char *f + MY_STAT stat_info; + + if (!my_stat(file_name,&stat_info,MYF(0))) +- return 1; ++ return 0; + /* + Ignore .mylogin.cnf file if not exclusively readable/writable + by current user. diff --git a/databases/mysqlwsrep56-server/files/patch-plugin_password__validation_validate__password.cc b/databases/mysqlwsrep56-server/files/patch-plugin_password__validation_validate__password.cc new file mode 100644 index 000000000000..653f03095030 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-plugin_password__validation_validate__password.cc @@ -0,0 +1,11 @@ +--- plugin/password_validation/validate_password.cc.orig 2013-09-10 07:38:25.000000000 +0000 ++++ plugin/password_validation/validate_password.cc 2013-10-05 15:40:20.790380179 +0000 +@@ -16,6 +16,8 @@ + #include <my_sys.h> + #include <string> + #include <mysql/plugin_validate_password.h> ++/* solve clash between libc++ bitset::test() and test macro from my_global.h */ ++#undef test + #include <set> + #include <iostream> + #include <fstream> diff --git a/databases/mysqlwsrep56-server/files/patch-scripts_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-scripts_CMakeLists.txt new file mode 100644 index 000000000000..df5d05a15ebe --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-scripts_CMakeLists.txt @@ -0,0 +1,36 @@ +--- scripts/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ scripts/CMakeLists.txt +@@ -298,6 +298,8 @@ MACRO(EXTRACT_LINK_LIBRARIES target var) + GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE) + STRING(REGEX REPLACE "^lib" "" lib "${lib}") + SET(${var} "${${var}}-l${lib} " ) ++ ELSEIF(lib STREQUAL "-pthread") ++ SET(${var} "${${var}}-pthread " ) + ELSE() + SET(${var} "${${var}}-l${lib} " ) + ENDIF() +@@ -360,15 +362,10 @@ ELSE() + # On Unix, most of the files end up in the bin directory + SET(mysql_config_COMPONENT COMPONENT Development) + SET(BIN_SCRIPTS +- msql2mysql +- mysql_config + mysql_fix_extensions + mysql_setpermission + mysql_zap +- mysqlaccess +- mysqlaccess.conf + mysql_convert_table_format +- mysql_find_rows + mysqlhotcopy + mysqldumpslow + mysqld_multi +@@ -378,7 +375,7 @@ ELSE() + FOREACH(file ${BIN_SCRIPTS}) + IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh +- ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) ++ ${CMAKE_CURRENT_BINARY_DIR}/${file} @ONLY) + ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${CMAKE_CURRENT_BINARY_DIR}/${file} COPYONLY) diff --git a/databases/mysqlwsrep56-server/files/patch-scripts_mysqld__safe.sh b/databases/mysqlwsrep56-server/files/patch-scripts_mysqld__safe.sh new file mode 100644 index 000000000000..2a30469922f0 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-scripts_mysqld__safe.sh @@ -0,0 +1,24 @@ +--- scripts/mysqld_safe.sh.orig 2007-10-08 10:39:23.000000000 +0200 ++++ scripts/mysqld_safe.sh 2007-10-08 10:40:52.000000000 +0200 +@@ -242,10 +242,10 @@ + + if test -z "$MYSQL_HOME" + then +- if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf" ++ if test -r "$MY_BASEDIR_VERSION/etc/my.cnf" && test -r "$DATADIR/my.cnf" + then + log_error "WARNING: Found two instances of my.cnf - +-$MY_BASEDIR_VERSION/my.cnf and ++$MY_BASEDIR_VERSION/etc/my.cnf and + $DATADIR/my.cnf + IGNORING $DATADIR/my.cnf" + +@@ -254,7 +254,7 @@ + then + log_error "WARNING: Found $DATADIR/my.cnf + The data directory is a deprecated location for my.cnf, please move it to +-$MY_BASEDIR_VERSION/my.cnf" ++$MY_BASEDIR_VERSION/etc/my.cnf" + MYSQL_HOME=$DATADIR + else + MYSQL_HOME=$MY_BASEDIR_VERSION diff --git a/databases/mysqlwsrep56-server/files/patch-sql_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-sql_CMakeLists.txt new file mode 100644 index 000000000000..2c279dcbf9b9 --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-sql_CMakeLists.txt @@ -0,0 +1,18 @@ +--- sql/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ sql/CMakeLists.txt +@@ -472,6 +472,7 @@ ADD_CUSTOM_TARGET(distclean + + IF(INSTALL_LAYOUT STREQUAL "STANDALONE") + ++IF(FALSE) + # Copy db.opt into data/test/ + SET(DBOPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/db.opt ) + INSTALL(FILES ${DBOPT_FILE} DESTINATION data/test COMPONENT DataFiles) +@@ -516,6 +517,7 @@ ELSE() + INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql COMPONENT DataFiles) + ENDIF() + ENDIF() ++ENDIF() + + ADD_CUSTOM_TARGET(show-dist-name + COMMAND ${CMAKE_COMMAND} -E echo "${CPACK_PACKAGE_FILE_NAME}" diff --git a/databases/mysqlwsrep56-server/files/patch-sql_sql__trigger.cc b/databases/mysqlwsrep56-server/files/patch-sql_sql__trigger.cc new file mode 100644 index 000000000000..7e308976b3ec --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-sql_sql__trigger.cc @@ -0,0 +1,50 @@ +--- sql/sql_trigger.cc.orig 2012-08-02 00:01:13.000000000 +0200 ++++ sql/sql_trigger.cc 2012-09-11 17:01:13.000000000 +0200 +@@ -192,32 +192,32 @@ static File_option triggers_file_parameters[]= + { + { + { C_STRING_WITH_LEN("triggers") }, +- my_offsetof(class Table_triggers_list, definitions_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definitions_list)), + FILE_OPTIONS_STRLIST + }, + { + { C_STRING_WITH_LEN("sql_modes") }, +- my_offsetof(class Table_triggers_list, definition_modes_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definition_modes_list)), + FILE_OPTIONS_ULLLIST + }, + { + { C_STRING_WITH_LEN("definers") }, +- my_offsetof(class Table_triggers_list, definers_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definers_list)), + FILE_OPTIONS_STRLIST + }, + { + { C_STRING_WITH_LEN("client_cs_names") }, +- my_offsetof(class Table_triggers_list, client_cs_names), ++ static_cast<int>(my_offsetof(class Table_triggers_list, client_cs_names)), + FILE_OPTIONS_STRLIST + }, + { + { C_STRING_WITH_LEN("connection_cl_names") }, +- my_offsetof(class Table_triggers_list, connection_cl_names), ++ static_cast<int>(my_offsetof(class Table_triggers_list, connection_cl_names)), + FILE_OPTIONS_STRLIST + }, + { + { C_STRING_WITH_LEN("db_cl_names") }, +- my_offsetof(class Table_triggers_list, db_cl_names), ++ static_cast<int>(my_offsetof(class Table_triggers_list, db_cl_names)), + FILE_OPTIONS_STRLIST + }, + { { 0, 0 }, 0, FILE_OPTIONS_STRING } +@@ -226,7 +226,7 @@ static File_option triggers_file_parameters[]= + File_option sql_modes_parameters= + { + { C_STRING_WITH_LEN("sql_modes") }, +- my_offsetof(class Table_triggers_list, definition_modes_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definition_modes_list)), + FILE_OPTIONS_ULLLIST + }; + diff --git a/databases/mysqlwsrep56-server/files/patch-sql_sql__view.cc b/databases/mysqlwsrep56-server/files/patch-sql_sql__view.cc new file mode 100644 index 000000000000..5f4d92d7eebf --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-sql_sql__view.cc @@ -0,0 +1,63 @@ +--- sql/sql_view.cc.orig 2012-08-02 00:01:13.000000000 +0200 ++++ sql/sql_view.cc 2012-09-11 17:01:13.000000000 +0200 +@@ -730,46 +730,46 @@ static const int required_view_parameters= 14; + */ + static File_option view_parameters[]= + {{{ C_STRING_WITH_LEN("query")}, +- my_offsetof(TABLE_LIST, select_stmt), ++ static_cast<int>(my_offsetof(TABLE_LIST, select_stmt)), + FILE_OPTIONS_ESTRING}, + {{ C_STRING_WITH_LEN("md5")}, +- my_offsetof(TABLE_LIST, md5), ++ static_cast<int>(my_offsetof(TABLE_LIST, md5)), + FILE_OPTIONS_STRING}, + {{ C_STRING_WITH_LEN("updatable")}, +- my_offsetof(TABLE_LIST, updatable_view), ++ static_cast<int>(my_offsetof(TABLE_LIST, updatable_view)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("algorithm")}, +- my_offsetof(TABLE_LIST, algorithm), ++ static_cast<int>(my_offsetof(TABLE_LIST, algorithm)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("definer_user")}, +- my_offsetof(TABLE_LIST, definer.user), ++ static_cast<int>(my_offsetof(TABLE_LIST, definer.user)), + FILE_OPTIONS_STRING}, + {{ C_STRING_WITH_LEN("definer_host")}, +- my_offsetof(TABLE_LIST, definer.host), ++ static_cast<int>(my_offsetof(TABLE_LIST, definer.host)), + FILE_OPTIONS_STRING}, + {{ C_STRING_WITH_LEN("suid")}, +- my_offsetof(TABLE_LIST, view_suid), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_suid)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("with_check_option")}, +- my_offsetof(TABLE_LIST, with_check), ++ static_cast<int>(my_offsetof(TABLE_LIST, with_check)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("timestamp")}, +- my_offsetof(TABLE_LIST, timestamp), ++ static_cast<int>(my_offsetof(TABLE_LIST, timestamp)), + FILE_OPTIONS_TIMESTAMP}, + {{ C_STRING_WITH_LEN("create-version")}, +- my_offsetof(TABLE_LIST, file_version), ++ static_cast<int>(my_offsetof(TABLE_LIST, file_version)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("source")}, +- my_offsetof(TABLE_LIST, source), ++ static_cast<int>(my_offsetof(TABLE_LIST, source)), + FILE_OPTIONS_ESTRING}, + {{(char*) STRING_WITH_LEN("client_cs_name")}, +- my_offsetof(TABLE_LIST, view_client_cs_name), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_client_cs_name)), + FILE_OPTIONS_STRING}, + {{(char*) STRING_WITH_LEN("connection_cl_name")}, +- my_offsetof(TABLE_LIST, view_connection_cl_name), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_connection_cl_name)), + FILE_OPTIONS_STRING}, + {{(char*) STRING_WITH_LEN("view_body_utf8")}, +- my_offsetof(TABLE_LIST, view_body_utf8), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_body_utf8)), + FILE_OPTIONS_ESTRING}, + {{NullS, 0}, 0, + FILE_OPTIONS_STRING} diff --git a/databases/mysqlwsrep56-server/files/patch-sql_sys__vars.cc b/databases/mysqlwsrep56-server/files/patch-sql_sys__vars.cc new file mode 100644 index 000000000000..e8f0caff4aff --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-sql_sys__vars.cc @@ -0,0 +1,38 @@ +--- sql/sys_vars.cc.orig 2012-06-15 17:03:32.000000000 +0200 ++++ sql/sys_vars.cc 2012-06-15 17:16:23.000000000 +0200 +@@ -900,7 +900,7 @@ + "connection before closing it", + SESSION_VAR(net_interactive_timeout), + CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); + + static Sys_var_ulong Sys_join_buffer_size( + "join_buffer_size", +@@ -1401,7 +1401,7 @@ + "Number of seconds to wait for more data from a connection before " + "aborting the read", + SESSION_VAR(net_read_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1), ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_net_read_timeout)); + +@@ -1416,7 +1416,7 @@ + "Number of seconds to wait for a block to be written to a connection " + "before aborting the write", + SESSION_VAR(net_write_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1), ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_net_write_timeout)); + +@@ -2257,7 +2257,7 @@ + "The number of seconds the server waits for activity on a " + "connection before closing it", + SESSION_VAR(net_wait_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT)), ++ VALID_RANGE(1, INT_MAX32/1000), + DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); + + /** propagates changes to the relevant flag of @@optimizer_switch */ diff --git a/databases/mysqlwsrep56-server/files/patch-support-files_CMakeLists.txt b/databases/mysqlwsrep56-server/files/patch-support-files_CMakeLists.txt new file mode 100644 index 000000000000..3b760115195e --- /dev/null +++ b/databases/mysqlwsrep56-server/files/patch-support-files_CMakeLists.txt @@ -0,0 +1,12 @@ +--- support-files/CMakeLists.txt.orig 2017-01-25 07:58:07 UTC ++++ support-files/CMakeLists.txt +@@ -69,7 +69,9 @@ IF(UNIX) + INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles) + ENDIF() + ++IF(FALSE) + INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) ++ENDIF() + CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY) + CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql.spec @ONLY) + |