mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
Merge branch '10.4' into 10.4-mdev16188
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -94,7 +94,6 @@ packaging/rpm-oel/mysql.spec
|
|||||||
packaging/rpm-uln/mysql.10.0.11.spec
|
packaging/rpm-uln/mysql.10.0.11.spec
|
||||||
packaging/solaris/postinstall-solaris
|
packaging/solaris/postinstall-solaris
|
||||||
pcre/config.h
|
pcre/config.h
|
||||||
pcre/pcre*test.sh
|
|
||||||
pcre/pcre.h
|
pcre/pcre.h
|
||||||
pcre/pcre_chartables.c
|
pcre/pcre_chartables.c
|
||||||
pcre/pcregrep
|
pcre/pcregrep
|
||||||
@@ -263,6 +262,7 @@ storage/mroonga/vendor/groonga/src/groonga-benchmark
|
|||||||
storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset
|
storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset
|
||||||
storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result
|
storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result
|
||||||
storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
|
storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
|
||||||
|
zlib/zconf.h
|
||||||
xxx/*
|
xxx/*
|
||||||
yyy/*
|
yyy/*
|
||||||
zzz/*
|
zzz/*
|
||||||
|
@@ -111,8 +111,8 @@ addons:
|
|||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
|
- llvm-toolchain-trusty-5.0
|
||||||
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
|
- llvm-toolchain-trusty-6.0
|
||||||
packages: # make sure these include all compilers and all build dependencies (see list above)
|
packages: # make sure these include all compilers and all build dependencies (see list above)
|
||||||
- gcc-5
|
- gcc-5
|
||||||
- g++-5
|
- g++-5
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
|
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
|
||||||
# Copyright (c) 2008, 2017, MariaDB
|
# Copyright (c) 2008, 2018, MariaDB Corporation
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,22 +14,10 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
|
||||||
|
|
||||||
# explicitly set the policy to OLD
|
|
||||||
# (cannot use NEW, not everyone is on cmake-2.8.12 yet)
|
|
||||||
IF(POLICY CMP0022)
|
IF(POLICY CMP0022)
|
||||||
CMAKE_POLICY(SET CMP0022 OLD)
|
CMAKE_POLICY(SET CMP0022 NEW)
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
# We use the LOCATION target property (CMP0026)
|
|
||||||
# and get_target_property() for non-existent targets (CMP0045)
|
|
||||||
# and INSTALL_NAME_DIR (CMP0042)
|
|
||||||
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
|
|
||||||
CMAKE_VERSION VERSION_GREATER "3.0.0")
|
|
||||||
CMAKE_POLICY(SET CMP0026 OLD)
|
|
||||||
CMAKE_POLICY(SET CMP0045 OLD)
|
|
||||||
CMAKE_POLICY(SET CMP0042 OLD)
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(POLICY CMP0054)
|
IF(POLICY CMP0054)
|
||||||
CMAKE_POLICY(SET CMP0054 NEW)
|
CMAKE_POLICY(SET CMP0054 NEW)
|
||||||
@@ -89,6 +77,14 @@ ELSE()
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
PROJECT(${MYSQL_PROJECT_NAME})
|
PROJECT(${MYSQL_PROJECT_NAME})
|
||||||
|
|
||||||
|
IF(CMAKE_VERSION VERSION_LESS "3.1")
|
||||||
|
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||||
|
ENDIF()
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_CXX_STANDARD 11)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_NAME "MariaDB")
|
SET(CPACK_PACKAGE_NAME "MariaDB")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB: a very fast and robust SQL database server")
|
||||||
SET(CPACK_PACKAGE_URL "http://mariadb.org")
|
SET(CPACK_PACKAGE_URL "http://mariadb.org")
|
||||||
@@ -181,6 +177,12 @@ IF(UNIX)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
|
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
|
||||||
|
|
||||||
|
IF (WITHOUT_SERVER)
|
||||||
|
SET (SKIP_COMPONENTS "Server|IniFiles|SuportFiles|Readme")
|
||||||
|
ELSE()
|
||||||
|
SET (SKIP_COMPONENTS "N-O-N-E")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
||||||
|
|
||||||
INCLUDE(check_compiler_flag)
|
INCLUDE(check_compiler_flag)
|
||||||
@@ -445,7 +447,7 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
|
|||||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
|
||||||
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc)
|
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc)
|
||||||
|
|
||||||
IF(GIT_EXECUTABLE)
|
IF(GIT_EXECUTABLE AND EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
4
CREDITS
4
CREDITS
@@ -10,9 +10,11 @@ Microsoft https://microsoft.com/ (2017)
|
|||||||
Tencent Cloud https://cloud.tencent.com (2017)
|
Tencent Cloud https://cloud.tencent.com (2017)
|
||||||
Development Bank of Singapore https://dbs.com (2016)
|
Development Bank of Singapore https://dbs.com (2016)
|
||||||
IBM https://www.ibm.com (2017)
|
IBM https://www.ibm.com (2017)
|
||||||
|
Tencent Games http://game.qq.com/ (2018)
|
||||||
Visma https://visma.com (2015)
|
Visma https://visma.com (2015)
|
||||||
Acronis http://acronis.com (2016)
|
Acronis https://acronis.com (2016)
|
||||||
Nexedi https://www.nexedi.com (2016)
|
Nexedi https://www.nexedi.com (2016)
|
||||||
|
Percona https://www.percona.com (2018)
|
||||||
Tencent Game DBA http://tencentdba.com/about (2016)
|
Tencent Game DBA http://tencentdba.com/about (2016)
|
||||||
Tencent TDSQL http://tdsql.org (2016)
|
Tencent TDSQL http://tdsql.org (2016)
|
||||||
Verkkokauppa.com https://www.verkkokauppa.com (2015)
|
Verkkokauppa.com https://www.verkkokauppa.com (2015)
|
||||||
|
16
README.md
16
README.md
@@ -1,7 +1,7 @@
|
|||||||
Code status:
|
Code status:
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* [](https://travis-ci.org/MariaDB/server) travis-ci.org (10.3 branch)
|
* [](https://travis-ci.org/MariaDB/server) travis-ci.org (10.4 branch)
|
||||||
|
|
||||||
## MariaDB: drop-in replacement for MySQL
|
## MariaDB: drop-in replacement for MySQL
|
||||||
|
|
||||||
@@ -13,8 +13,8 @@ Please read the CREDITS file for details about the MariaDB Foundation,
|
|||||||
and who is developing MariaDB.
|
and who is developing MariaDB.
|
||||||
|
|
||||||
MariaDB is developed by many of the original developers of MySQL who
|
MariaDB is developed by many of the original developers of MySQL who
|
||||||
now work for the MariaDB Foundation and the MariaDB Corporation, and by many people in
|
now work for the MariaDB Foundation and the MariaDB Corporation,
|
||||||
the community.
|
and by many people in the community.
|
||||||
|
|
||||||
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
|
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
|
||||||
Corporation, Inc. For a list of developers and other contributors,
|
Corporation, Inc. For a list of developers and other contributors,
|
||||||
@@ -64,10 +64,14 @@ and COPYING.thirdparty files.
|
|||||||
Bug Reports:
|
Bug Reports:
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Bug and/or error reports regarding MariaDB should be submitted at
|
Bug and/or error reports regarding MariaDB should be submitted at:
|
||||||
https://mariadb.org/jira
|
https://jira.mariadb.org
|
||||||
|
|
||||||
Bugs in the MySQL code can also be submitted at https://bugs.mysql.com
|
For reporting security vulnerabilities see:
|
||||||
|
https://mariadb.org/about/security-policy/
|
||||||
|
|
||||||
|
Bugs in the MySQL code can also be submitted at:
|
||||||
|
https://bugs.mysql.com
|
||||||
|
|
||||||
The code for MariaDB, including all revision history, can be found at:
|
The code for MariaDB, including all revision history, can be found at:
|
||||||
https://github.com/MariaDB/server
|
https://github.com/MariaDB/server
|
||||||
|
2
VERSION
2
VERSION
@@ -1,4 +1,4 @@
|
|||||||
MYSQL_VERSION_MAJOR=10
|
MYSQL_VERSION_MAJOR=10
|
||||||
MYSQL_VERSION_MINOR=4
|
MYSQL_VERSION_MINOR=4
|
||||||
MYSQL_VERSION_PATCH=0
|
MYSQL_VERSION_PATCH=1
|
||||||
SERVER_MATURITY=alpha
|
SERVER_MATURITY=alpha
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
# Copyright (c) 2008, 2018, MariaDB Corporation
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -49,7 +49,7 @@ enum options_client
|
|||||||
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
|
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
|
||||||
OPT_DELETE_MASTER_LOGS, OPT_COMPACT,
|
OPT_DELETE_MASTER_LOGS, OPT_COMPACT,
|
||||||
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
||||||
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
||||||
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
||||||
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
|
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
|
||||||
OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
|
OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2009, 2017, MariaDB
|
Copyright (c) 2009, 2018, MariaDB Corporation
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -196,9 +196,6 @@ static char delimiter[16]= DEFAULT_DELIMITER;
|
|||||||
static uint delimiter_length= 1;
|
static uint delimiter_length= 1;
|
||||||
unsigned short terminal_width= 80;
|
unsigned short terminal_width= 80;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
#endif
|
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
static CHARSET_INFO *charset_info= &my_charset_latin1;
|
static CHARSET_INFO *charset_info= &my_charset_latin1;
|
||||||
|
|
||||||
@@ -1340,9 +1337,6 @@ sig_handler mysql_end(int sig)
|
|||||||
my_free(full_username);
|
my_free(full_username);
|
||||||
my_free(part_username);
|
my_free(part_username);
|
||||||
my_free(default_prompt);
|
my_free(default_prompt);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
my_free(current_prompt);
|
my_free(current_prompt);
|
||||||
while (embedded_server_arg_count > 1)
|
while (embedded_server_arg_count > 1)
|
||||||
my_free(embedded_server_args[--embedded_server_arg_count]);
|
my_free(embedded_server_args[--embedded_server_arg_count]);
|
||||||
@@ -1373,10 +1367,6 @@ static bool do_connect(MYSQL *mysql, const char *host, const char *user,
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
if (opt_plugin_dir && *opt_plugin_dir)
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||||
|
|
||||||
@@ -1493,7 +1483,7 @@ static struct my_option my_long_options[] =
|
|||||||
{"batch", 'B',
|
{"batch", 'B',
|
||||||
"Don't use history file. Disable interactive behavior. (Enables --silent.)",
|
"Don't use history file. Disable interactive behavior. (Enables --silent.)",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"binary-as-hex", 'b', "Print binary data as hex", &opt_binhex, &opt_binhex,
|
{"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", &charsets_dir,
|
"Directory for character set files.", &charsets_dir,
|
||||||
@@ -1612,7 +1602,7 @@ static struct my_option my_long_options[] =
|
|||||||
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
|
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
|
||||||
¤t_prompt, ¤t_prompt, 0, GET_STR_ALLOC,
|
¤t_prompt, ¤t_prompt, 0, GET_STR_ALLOC,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quick", 'q',
|
{"quick", 'q',
|
||||||
"Don't cache result, print it row by row. This may slow down the server "
|
"Don't cache result, print it row by row. This may slow down the server "
|
||||||
@@ -1626,11 +1616,6 @@ static struct my_option my_long_options[] =
|
|||||||
&opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
&opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
{"silent", 's', "Be more silent. Print results with a tab as separator, "
|
{"silent", 's', "Be more silent. Print results with a tab as separator, "
|
||||||
"each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
"each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name,
|
|
||||||
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC,
|
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@@ -135,13 +135,8 @@ static struct my_option my_long_options[]=
|
|||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", 0,
|
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"silent", OPT_SILENT, "Print less information", &opt_silent,
|
{"silent", OPT_SILENT, "Print less information", &opt_silent,
|
||||||
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
@@ -354,7 +349,6 @@ get_one_option(int optid, const struct my_option *opt,
|
|||||||
case 'P': /* --port */
|
case 'P': /* --port */
|
||||||
case 'S': /* --socket */
|
case 'S': /* --socket */
|
||||||
case OPT_MYSQL_PROTOCOL: /* --protocol */
|
case OPT_MYSQL_PROTOCOL: /* --protocol */
|
||||||
case OPT_SHARED_MEMORY_BASE_NAME: /* --shared-memory-base-name */
|
|
||||||
case OPT_PLUGIN_DIR: /* --plugin-dir */
|
case OPT_PLUGIN_DIR: /* --plugin-dir */
|
||||||
case OPT_DEFAULT_AUTH: /* --default-auth */
|
case OPT_DEFAULT_AUTH: /* --default-auth */
|
||||||
add_one_option_cmd_line(&conn_args, opt, argument);
|
add_one_option_cmd_line(&conn_args, opt, argument);
|
||||||
|
@@ -49,9 +49,6 @@ static char * unix_port=0;
|
|||||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||||
static bool sql_log_bin_off= false;
|
static bool sql_log_bin_off= false;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
#endif
|
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
static myf error_flags; /* flags to pass to my_printf_error, like ME_BELL */
|
static myf error_flags; /* flags to pass to my_printf_error, like ME_BELL */
|
||||||
|
|
||||||
@@ -185,18 +182,13 @@ static struct my_option my_long_options[] =
|
|||||||
#endif
|
#endif
|
||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
&tcp_port, &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&tcp_port, &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"relative", 'r',
|
{"relative", 'r',
|
||||||
"Show difference between current and previous values when used with -i. "
|
"Show difference between current and previous values when used with -i. "
|
||||||
"Currently only works with extended-status.",
|
"Currently only works with extended-status.",
|
||||||
&opt_relative, &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
&opt_relative, &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
|
||||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"silent", 's', "Silently exit if one can't connect to server.",
|
{"silent", 's', "Silently exit if one can't connect to server.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
@@ -367,10 +359,6 @@ int main(int argc,char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);
|
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);
|
||||||
|
|
||||||
@@ -496,9 +484,6 @@ err2:
|
|||||||
mysql_library_end();
|
mysql_library_end();
|
||||||
my_free(opt_password);
|
my_free(opt_password);
|
||||||
my_free(user);
|
my_free(user);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
free_defaults(save_argv);
|
free_defaults(save_argv);
|
||||||
my_end(my_end_arg);
|
my_end(my_end_arg);
|
||||||
return error;
|
return error;
|
||||||
|
@@ -82,7 +82,7 @@ ulong bytes_sent = 0L, bytes_received = 0L;
|
|||||||
ulong mysqld_net_retry_count = 10L;
|
ulong mysqld_net_retry_count = 10L;
|
||||||
ulong open_files_limit;
|
ulong open_files_limit;
|
||||||
ulong opt_binlog_rows_event_max_size;
|
ulong opt_binlog_rows_event_max_size;
|
||||||
uint test_flags = 0;
|
ulonglong test_flags = 0;
|
||||||
static uint opt_protocol= 0;
|
static uint opt_protocol= 0;
|
||||||
static FILE *result_file;
|
static FILE *result_file;
|
||||||
static char *result_file_name= 0;
|
static char *result_file_name= 0;
|
||||||
@@ -124,9 +124,6 @@ static uint my_end_arg;
|
|||||||
static const char* sock= 0;
|
static const char* sock= 0;
|
||||||
static char *opt_plugindir= 0, *opt_default_auth= 0;
|
static char *opt_plugindir= 0, *opt_default_auth= 0;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static const char *shared_memory_base_name= 0;
|
|
||||||
#endif
|
|
||||||
static char* user = 0;
|
static char* user = 0;
|
||||||
static char* pass = 0;
|
static char* pass = 0;
|
||||||
static char *charset= 0;
|
static char *charset= 0;
|
||||||
@@ -1644,7 +1641,7 @@ static struct my_option my_options[] =
|
|||||||
&port, &port, 0, GET_INT, REQUIRED_ARG,
|
&port, &port, 0, GET_INT, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server.",
|
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server.",
|
||||||
&remote_opt, &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
&remote_opt, &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||||
@@ -1685,12 +1682,6 @@ static struct my_option my_options[] =
|
|||||||
{"set-charset", OPT_SET_CHARSET,
|
{"set-charset", OPT_SET_CHARSET,
|
||||||
"Add 'SET NAMES character_set' to the output.", &charset,
|
"Add 'SET NAMES character_set' to the output.", &charset,
|
||||||
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name,
|
|
||||||
&shared_memory_base_name,
|
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"short-form", 's', "Just show regular queries: no extra info, no "
|
{"short-form", 's', "Just show regular queries: no extra info, no "
|
||||||
"row-based events and no row counts. This is mainly for testing only, "
|
"row-based events and no row counts. This is mainly for testing only, "
|
||||||
"and should not be used to feed to the MariaDB server. "
|
"and should not be used to feed to the MariaDB server. "
|
||||||
@@ -2134,11 +2125,6 @@ static Exit_status safe_connect()
|
|||||||
|
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
|
|
||||||
shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
||||||
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
||||||
"program_name", "mysqlbinlog");
|
"program_name", "mysqlbinlog");
|
||||||
|
@@ -55,7 +55,6 @@ static int first_error = 0;
|
|||||||
static char *opt_skip_database;
|
static char *opt_skip_database;
|
||||||
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
|
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
|
||||||
DYNAMIC_ARRAY views4repair;
|
DYNAMIC_ARRAY views4repair;
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
|
|
||||||
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_FIX_NAMES };
|
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_FIX_NAMES };
|
||||||
@@ -179,7 +178,7 @@ static struct my_option my_long_options[] =
|
|||||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||||
&opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quick", 'q',
|
{"quick", 'q',
|
||||||
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
|
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
|
||||||
@@ -188,11 +187,6 @@ static struct my_option my_long_options[] =
|
|||||||
{"repair", 'r',
|
{"repair", 'r',
|
||||||
"Can fix almost anything except unique keys that aren't unique.",
|
"Can fix almost anything except unique keys that aren't unique.",
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
|
||||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"silent", 's', "Print only error messages.", &opt_silent,
|
{"silent", 's', "Print only error messages.", &opt_silent,
|
||||||
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"skip_database", 0, "Don't process the database specified as argument",
|
{"skip_database", 0, "Don't process the database specified as argument",
|
||||||
@@ -1112,8 +1106,6 @@ static int dbConnect(char *host, char *user, char *passwd)
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
|
|
||||||
if (opt_plugin_dir && *opt_plugin_dir)
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||||
@@ -1253,8 +1245,7 @@ int main(int argc, char **argv)
|
|||||||
delete_dynamic(&alter_table_cmds);
|
delete_dynamic(&alter_table_cmds);
|
||||||
}
|
}
|
||||||
end1:
|
end1:
|
||||||
my_free(opt_password);
|
my_free(opt_password);;
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
mysql_library_end();
|
mysql_library_end();
|
||||||
free_defaults(defaults_argv);
|
free_defaults(defaults_argv);
|
||||||
my_end(my_end_arg);
|
my_end(my_end_arg);
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DUMP_VERSION "10.16"
|
#define DUMP_VERSION "10.17"
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
@@ -159,9 +159,6 @@ static MYSQL_RES *routine_res, *routine_list_res;
|
|||||||
FILE *md_result_file= 0;
|
FILE *md_result_file= 0;
|
||||||
FILE *stderror_file=0;
|
FILE *stderror_file=0;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
#endif
|
|
||||||
static uint opt_protocol= 0;
|
static uint opt_protocol= 0;
|
||||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||||
|
|
||||||
@@ -472,7 +469,7 @@ static struct my_option my_long_options[] =
|
|||||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
|
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
|
||||||
&quick, &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
&quick, &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
@@ -494,11 +491,6 @@ static struct my_option my_long_options[] =
|
|||||||
"Add 'SET NAMES default_character_set' to the output.",
|
"Add 'SET NAMES default_character_set' to the output.",
|
||||||
&opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
|
&opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
|
||||||
0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
|
||||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
Note that the combination --single-transaction --master-data
|
Note that the combination --single-transaction --master-data
|
||||||
will give bullet-proof binlog position only if server >=4.1.3. That's the
|
will give bullet-proof binlog position only if server >=4.1.3. That's the
|
||||||
@@ -1719,10 +1711,6 @@ static int connect_to_db(char *host, char *user,char *passwd)
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
|
|
||||||
if (opt_plugin_dir && *opt_plugin_dir)
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
@@ -2141,7 +2129,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name,
|
|||||||
{
|
{
|
||||||
create_stmt_ptr= (*row)[i];
|
create_stmt_ptr= (*row)[i];
|
||||||
create_stmt_len= lengths[i];
|
create_stmt_len= lengths[i];
|
||||||
#ifndef DBUG_OFF
|
#ifdef DBUG_ASSERT_EXISTS
|
||||||
body_found= 1;
|
body_found= 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -6255,10 +6243,6 @@ err:
|
|||||||
if (opt_slave_data)
|
if (opt_slave_data)
|
||||||
do_start_slave_sql(mysql);
|
do_start_slave_sql(mysql);
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dbDisconnect(current_host);
|
dbDisconnect(current_host);
|
||||||
if (!path)
|
if (!path)
|
||||||
write_footer(md_result_file);
|
write_footer(md_result_file);
|
||||||
|
@@ -65,10 +65,6 @@ static longlong opt_ignore_lines= -1;
|
|||||||
|
|
||||||
static char **argv_to_free;
|
static char **argv_to_free;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
{
|
{
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
@@ -157,15 +153,10 @@ static struct my_option my_long_options[] =
|
|||||||
&opt_mysql_port,
|
&opt_mysql_port,
|
||||||
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"replace", 'r', "If duplicate unique key was found, replace old row.",
|
{"replace", 'r', "If duplicate unique key was found, replace old row.",
|
||||||
&replace, &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&replace, &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
|
|
||||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"silent", 's', "Be more silent.", &silent, &silent, 0,
|
{"silent", 's', "Be more silent.", &silent, &silent, 0,
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
@@ -458,10 +449,6 @@ static MYSQL *db_connect(char *host, char *database,
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (opt_plugin_dir && *opt_plugin_dir)
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||||
@@ -514,9 +501,6 @@ static void safe_exit(int error, MYSQL *mysql)
|
|||||||
if (mysql)
|
if (mysql)
|
||||||
mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
free_defaults(argv_to_free);
|
free_defaults(argv_to_free);
|
||||||
mysql_library_end();
|
mysql_library_end();
|
||||||
my_free(opt_password);
|
my_free(opt_password);
|
||||||
|
@@ -39,9 +39,6 @@ static uint opt_verbose=0;
|
|||||||
static char *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME;
|
static char *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME;
|
||||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
#endif
|
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
|
|
||||||
static void get_options(int *argc,char ***argv);
|
static void get_options(int *argc,char ***argv);
|
||||||
@@ -131,10 +128,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
|
|
||||||
if (opt_plugin_dir && *opt_plugin_dir)
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
@@ -177,9 +171,6 @@ error:
|
|||||||
mysql_close(&mysql); /* Close & free connection */
|
mysql_close(&mysql); /* Close & free connection */
|
||||||
my_free(opt_password);
|
my_free(opt_password);
|
||||||
mysql_server_end();
|
mysql_server_end();
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
free_defaults(defaults_argv);
|
free_defaults(defaults_argv);
|
||||||
my_end(my_end_arg);
|
my_end(my_end_arg);
|
||||||
exit(error ? 1 : 0);
|
exit(error ? 1 : 0);
|
||||||
@@ -243,14 +234,8 @@ static struct my_option my_long_options[] =
|
|||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name,
|
|
||||||
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
|
||||||
0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"show-table-type", 't', "Show table type column.",
|
{"show-table-type", 't', "Show table type column.",
|
||||||
&opt_table_type, &opt_table_type, 0, GET_BOOL,
|
&opt_table_type, &opt_table_type, 0, GET_BOOL,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@@ -98,9 +98,6 @@ TODO:
|
|||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Global Thread counter */
|
/* Global Thread counter */
|
||||||
uint thread_counter;
|
uint thread_counter;
|
||||||
@@ -309,10 +306,6 @@ void set_mysql_connect_options(MYSQL *mysql)
|
|||||||
#endif
|
#endif
|
||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,10 +416,6 @@ int main(int argc, char **argv)
|
|||||||
statement_cleanup(pre_statements);
|
statement_cleanup(pre_statements);
|
||||||
statement_cleanup(post_statements);
|
statement_cleanup(post_statements);
|
||||||
option_cleanup(engine_options);
|
option_cleanup(engine_options);
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
my_free(shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
free_defaults(defaults_argv);
|
free_defaults(defaults_argv);
|
||||||
mysql_library_end();
|
mysql_library_end();
|
||||||
my_end(my_end_arg);
|
my_end(my_end_arg);
|
||||||
@@ -689,17 +678,11 @@ static struct my_option my_long_options[] =
|
|||||||
&pre_system, &pre_system,
|
&pre_system, &pre_system,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
"The protocol to use for connection (tcp, socket, pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"query", 'q', "Query to run or file containing query to run.",
|
{"query", 'q', "Query to run or file containing query to run.",
|
||||||
&user_supplied_query, &user_supplied_query,
|
&user_supplied_query, &user_supplied_query,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name,
|
|
||||||
&shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
|
||||||
0, 0, 0, 0, 0, 0},
|
|
||||||
#endif
|
|
||||||
{"silent", 's', "Run program in silent mode - no output.",
|
{"silent", 's', "Run program in silent mode - no output.",
|
||||||
&opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG,
|
&opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
Tool used for executing a .test file
|
Tool used for executing a .test file
|
||||||
|
|
||||||
See the "MySQL Test framework manual" for more information
|
See the "MySQL Test framework manual" for more information
|
||||||
http://dev.mysql.com/doc/mysqltest/en/index.html
|
https://mariadb.com/kb/en/library/mysqltest/
|
||||||
|
|
||||||
Please keep the test framework tools identical in all versions!
|
Please keep the test framework tools identical in all versions!
|
||||||
|
|
||||||
@@ -107,7 +107,6 @@ enum {
|
|||||||
static int record= 0, opt_sleep= -1;
|
static int record= 0, opt_sleep= -1;
|
||||||
static char *opt_db= 0, *opt_pass= 0;
|
static char *opt_db= 0, *opt_pass= 0;
|
||||||
const char *opt_user= 0, *opt_host= 0, *unix_sock= 0, *opt_basedir= "./";
|
const char *opt_user= 0, *opt_host= 0, *unix_sock= 0, *opt_basedir= "./";
|
||||||
static char *shared_memory_base_name=0;
|
|
||||||
const char *opt_logdir= "";
|
const char *opt_logdir= "";
|
||||||
const char *opt_prologue= 0, *opt_charsets_dir;
|
const char *opt_prologue= 0, *opt_charsets_dir;
|
||||||
static int opt_port= 0;
|
static int opt_port= 0;
|
||||||
@@ -5950,7 +5949,6 @@ do_handle_error:
|
|||||||
<opts> - options to use for the connection
|
<opts> - options to use for the connection
|
||||||
* SSL - use SSL if available
|
* SSL - use SSL if available
|
||||||
* COMPRESS - use compression if available
|
* COMPRESS - use compression if available
|
||||||
* SHM - use shared memory if available
|
|
||||||
* PIPE - use named pipe if available
|
* PIPE - use named pipe if available
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@@ -5962,7 +5960,6 @@ void do_connect(struct st_command *command)
|
|||||||
char *ssl_cipher __attribute__((unused))= 0;
|
char *ssl_cipher __attribute__((unused))= 0;
|
||||||
my_bool con_ssl= 0, con_compress= 0;
|
my_bool con_ssl= 0, con_compress= 0;
|
||||||
my_bool con_pipe= 0;
|
my_bool con_pipe= 0;
|
||||||
my_bool con_shm __attribute__ ((unused))= 0;
|
|
||||||
int read_timeout= 0;
|
int read_timeout= 0;
|
||||||
int write_timeout= 0;
|
int write_timeout= 0;
|
||||||
int connect_timeout= 0;
|
int connect_timeout= 0;
|
||||||
@@ -5977,9 +5974,6 @@ void do_connect(struct st_command *command)
|
|||||||
static DYNAMIC_STRING ds_sock;
|
static DYNAMIC_STRING ds_sock;
|
||||||
static DYNAMIC_STRING ds_options;
|
static DYNAMIC_STRING ds_options;
|
||||||
static DYNAMIC_STRING ds_default_auth;
|
static DYNAMIC_STRING ds_default_auth;
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
static DYNAMIC_STRING ds_shm;
|
|
||||||
#endif
|
|
||||||
const struct command_arg connect_args[] = {
|
const struct command_arg connect_args[] = {
|
||||||
{ "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" },
|
{ "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" },
|
||||||
{ "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" },
|
{ "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" },
|
||||||
@@ -6008,11 +6002,6 @@ void do_connect(struct st_command *command)
|
|||||||
die("Illegal argument for port: '%s'", ds_port.str);
|
die("Illegal argument for port: '%s'", ds_port.str);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
/* Shared memory */
|
|
||||||
init_dynamic_string(&ds_shm, ds_sock.str, 0, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Sock */
|
/* Sock */
|
||||||
if (ds_sock.length)
|
if (ds_sock.length)
|
||||||
{
|
{
|
||||||
@@ -6061,8 +6050,6 @@ void do_connect(struct st_command *command)
|
|||||||
con_compress= 1;
|
con_compress= 1;
|
||||||
else if (length == 4 && !strncmp(con_options, "PIPE", 4))
|
else if (length == 4 && !strncmp(con_options, "PIPE", 4))
|
||||||
con_pipe= 1;
|
con_pipe= 1;
|
||||||
else if (length == 3 && !strncmp(con_options, "SHM", 3))
|
|
||||||
con_shm= 1;
|
|
||||||
else if (strncasecmp(con_options, "read_timeout=",
|
else if (strncasecmp(con_options, "read_timeout=",
|
||||||
sizeof("read_timeout=")-1) == 0)
|
sizeof("read_timeout=")-1) == 0)
|
||||||
{
|
{
|
||||||
@@ -6168,22 +6155,6 @@ void do_connect(struct st_command *command)
|
|||||||
(char*)&connect_timeout);
|
(char*)&connect_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (con_shm)
|
|
||||||
{
|
|
||||||
uint protocol= MYSQL_PROTOCOL_MEMORY;
|
|
||||||
if (!ds_shm.length)
|
|
||||||
die("Missing shared memory base name");
|
|
||||||
mysql_options(con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
|
|
||||||
mysql_options(con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
|
|
||||||
}
|
|
||||||
else if (shared_memory_base_name)
|
|
||||||
{
|
|
||||||
mysql_options(con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
|
|
||||||
shared_memory_base_name);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Use default db name */
|
/* Use default db name */
|
||||||
if (ds_database.length == 0)
|
if (ds_database.length == 0)
|
||||||
dynstr_set(&ds_database, opt_db);
|
dynstr_set(&ds_database, opt_db);
|
||||||
@@ -6223,9 +6194,6 @@ void do_connect(struct st_command *command)
|
|||||||
dynstr_free(&ds_sock);
|
dynstr_free(&ds_sock);
|
||||||
dynstr_free(&ds_options);
|
dynstr_free(&ds_options);
|
||||||
dynstr_free(&ds_default_auth);
|
dynstr_free(&ds_default_auth);
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
dynstr_free(&ds_shm);
|
|
||||||
#endif
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7109,7 +7077,7 @@ static struct my_option my_long_options[] =
|
|||||||
GET_INT, REQUIRED_ARG, DEFAULT_MAX_CONN, 8, 5120, 0, 0, 0},
|
GET_INT, REQUIRED_ARG, DEFAULT_MAX_CONN, 8, 5120, 0, 0, 0},
|
||||||
{"password", 'p', "Password to use when connecting to server.",
|
{"password", 'p', "Password to use when connecting to server.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe).",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"port", 'P', "Port number to use for connection or 0 for default to, in "
|
{"port", 'P', "Port number to use for connection or 0 for default to, in "
|
||||||
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
|
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
|
||||||
@@ -7142,10 +7110,6 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"server-file", 'F', "Read embedded server arguments from file.",
|
{"server-file", 'F', "Read embedded server arguments from file.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"shared-memory-base-name", 0,
|
|
||||||
"Base name of shared memory.", &shared_memory_base_name,
|
|
||||||
&shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
|
||||||
0, 0, 0},
|
|
||||||
{"silent", 's', "Suppress all normal output. Synonym for --quiet.",
|
{"silent", 's', "Suppress all normal output. Synonym for --quiet.",
|
||||||
&silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&silent, &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
|
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
|
||||||
@@ -9340,11 +9304,6 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(con->mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!(con->name = my_strdup("default", MYF(MY_WME))))
|
if (!(con->name = my_strdup("default", MYF(MY_WME))))
|
||||||
die("Out of memory");
|
die("Out of memory");
|
||||||
mysql_options(con->mysql, MYSQL_OPT_NONBLOCK, 0);
|
mysql_options(con->mysql, MYSQL_OPT_NONBLOCK, 0);
|
||||||
|
@@ -2,6 +2,11 @@
|
|||||||
# Wrapper for CPackRPM.cmake
|
# Wrapper for CPackRPM.cmake
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Support for per-component LICENSE and VENDOR
|
||||||
|
#
|
||||||
|
# per component values, if present, are copied into global CPACK_RPM_PACKAGE_xxx
|
||||||
|
#
|
||||||
macro(set_from_component WHAT)
|
macro(set_from_component WHAT)
|
||||||
set(orig_CPACK_RPM_PACKAGE_${WHAT} ${CPACK_RPM_PACKAGE_${WHAT}})
|
set(orig_CPACK_RPM_PACKAGE_${WHAT} ${CPACK_RPM_PACKAGE_${WHAT}})
|
||||||
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT})
|
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT})
|
||||||
@@ -15,6 +20,33 @@ endmacro()
|
|||||||
set_from_component(LICENSE)
|
set_from_component(LICENSE)
|
||||||
set_from_component(VENDOR)
|
set_from_component(VENDOR)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Support for the %posttrans scriptlet
|
||||||
|
#
|
||||||
|
# the scriptlet, if present, is appended (together with the %posttrans tag)
|
||||||
|
# to the pre-uninstall scriptlet
|
||||||
|
#
|
||||||
|
set(base_time "PRE")
|
||||||
|
set(base_type "UNINSTALL")
|
||||||
|
set(base_var CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_${base_time}_${base_type}_SCRIPT_FILE)
|
||||||
|
set(acc)
|
||||||
|
|
||||||
|
macro(read_one_file time_ type_ tag_)
|
||||||
|
set(var CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_${time_}_${type_}_SCRIPT_FILE)
|
||||||
|
if (${var})
|
||||||
|
file(READ ${${var}} content)
|
||||||
|
set(acc "${tag_}\n${content}\n\n${acc}")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
read_one_file("POST" "TRANS" "%posttrans")
|
||||||
|
if (acc)
|
||||||
|
set(orig_${base_var} ${${base_var}})
|
||||||
|
read_one_file(${base_time} ${base_type} "")
|
||||||
|
set(${base_var} ${CPACK_TOPLEVEL_DIRECTORY}/SPECS/${CPACK_RPM_PACKAGE_COMPONENT}_${base_time}_${base_type}.scriptlet)
|
||||||
|
file(WRITE ${${base_var}} "${acc}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# load the original CPackRPM.cmake
|
# load the original CPackRPM.cmake
|
||||||
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||||
unset(CMAKE_MODULE_PATH)
|
unset(CMAKE_MODULE_PATH)
|
||||||
@@ -23,10 +55,10 @@ set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})
|
|||||||
|
|
||||||
restore(LICENSE)
|
restore(LICENSE)
|
||||||
restore(VENDOR)
|
restore(VENDOR)
|
||||||
|
set(${base_var} ${orig_${base_var}})
|
||||||
|
|
||||||
# per-component cleanup
|
# per-component cleanup
|
||||||
foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
|
foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
|
||||||
unset(TMP_RPM_${_RPM_SPEC_HEADER})
|
unset(TMP_RPM_${_RPM_SPEC_HEADER})
|
||||||
unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
@@ -1,18 +0,0 @@
|
|||||||
find_path(
|
|
||||||
ZSTD_INCLUDE_DIR
|
|
||||||
NAMES "zstd.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(
|
|
||||||
ZSTD_LIBRARY
|
|
||||||
NAMES zstd
|
|
||||||
)
|
|
||||||
|
|
||||||
set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(
|
|
||||||
ZSTD DEFAULT_MSG ZSTD_INCLUDE_DIR ZSTD_LIBRARIES)
|
|
||||||
|
|
||||||
mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARIES ZSTD_FOUND)
|
|
||||||
|
|
25
cmake/Findzstd.cmake
Normal file
25
cmake/Findzstd.cmake
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# - Find zstd
|
||||||
|
# Find the zstd compression library and includes
|
||||||
|
#
|
||||||
|
# ZSTD_INCLUDE_DIR - where to find zstd.h, etc.
|
||||||
|
# ZSTD_LIBRARIES - List of libraries when using zstd.
|
||||||
|
# ZSTD_FOUND - True if zstd found.
|
||||||
|
|
||||||
|
if (DEFINED ZSTD_LIBRARIES)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(ZSTD_INCLUDE_DIR
|
||||||
|
NAMES zstd.h
|
||||||
|
HINTS ${ZSTD_ROOT_DIR}/include)
|
||||||
|
|
||||||
|
find_library(ZSTD_LIBRARIES
|
||||||
|
NAMES zstd
|
||||||
|
HINTS ${ZSTD_ROOT_DIR}/lib)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
ZSTD_LIBRARIES
|
||||||
|
ZSTD_INCLUDE_DIR)
|
@@ -81,6 +81,8 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "
|
|||||||
%define _bindir ${INSTALL_BINDIRABS}
|
%define _bindir ${INSTALL_BINDIRABS}
|
||||||
%define _sbindir ${INSTALL_SBINDIRABS}
|
%define _sbindir ${INSTALL_SBINDIRABS}
|
||||||
%define _sysconfdir ${INSTALL_SYSCONFDIR}
|
%define _sysconfdir ${INSTALL_SYSCONFDIR}
|
||||||
|
%define restart_flag_dir %{_localstatedir}/lib/rpm-state/mariadb
|
||||||
|
%define restart_flag %{restart_flag_dir}/need-restart
|
||||||
")
|
")
|
||||||
|
|
||||||
# this creative hack is described here: http://www.cmake.org/pipermail/cmake/2012-January/048416.html
|
# this creative hack is described here: http://www.cmake.org/pipermail/cmake/2012-January/048416.html
|
||||||
@@ -97,12 +99,15 @@ SET(ignored
|
|||||||
"%ignore /etc"
|
"%ignore /etc"
|
||||||
"%ignore /etc/init.d"
|
"%ignore /etc/init.d"
|
||||||
"%ignore /etc/logrotate.d"
|
"%ignore /etc/logrotate.d"
|
||||||
|
"%ignore /etc/systemd"
|
||||||
|
"%ignore /etc/systemd/system"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}"
|
"%ignore ${CMAKE_INSTALL_PREFIX}"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/include"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/include"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/lib"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/lib"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
|
||||||
|
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/sbin"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/sbin"
|
||||||
"%ignore ${CMAKE_INSTALL_PREFIX}/share"
|
"%ignore ${CMAKE_INSTALL_PREFIX}/share"
|
||||||
@@ -174,6 +179,7 @@ SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/r
|
|||||||
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
|
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
|
||||||
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
|
SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
|
||||||
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
|
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
|
||||||
|
SET(CPACK_RPM_server_POST_TRANS_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-posttrans.sh)
|
||||||
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||||
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||||
SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
|
||||||
|
@@ -14,11 +14,6 @@
|
|||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
# This script creates initial database for packaging on Windows
|
# This script creates initial database for packaging on Windows
|
||||||
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
|
|
||||||
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
|
||||||
SET(MYSQLD_EXECUTABLE "@MYSQLD_EXECUTABLE@")
|
|
||||||
SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
|
|
||||||
SET(WIN32 "@WIN32@")
|
|
||||||
# Force Visual Studio to output to stdout
|
# Force Visual Studio to output to stdout
|
||||||
IF(ENV{VS_UNICODE_OUTPUT})
|
IF(ENV{VS_UNICODE_OUTPUT})
|
||||||
SET ($ENV{VS_UNICODE_OUTPUT})
|
SET ($ENV{VS_UNICODE_OUTPUT})
|
||||||
@@ -32,30 +27,27 @@ ENDIF()
|
|||||||
# Create bootstrapper SQL script
|
# Create bootstrapper SQL script
|
||||||
FILE(WRITE bootstrap.sql "use mysql;\n" )
|
FILE(WRITE bootstrap.sql "use mysql;\n" )
|
||||||
FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql mysql_performance_tables.sql)
|
FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql mysql_performance_tables.sql)
|
||||||
FILE(STRINGS ${CMAKE_SOURCE_DIR}/scripts/${FILENAME} CONTENTS)
|
FILE(STRINGS ${TOP_SRCDIR}/scripts/${FILENAME} CONTENTS)
|
||||||
FOREACH(STR ${CONTENTS})
|
FOREACH(STR ${CONTENTS})
|
||||||
IF(NOT STR MATCHES "@current_hostname")
|
IF(NOT STR MATCHES "@current_hostname")
|
||||||
FILE(APPEND bootstrap.sql "${STR}\n")
|
FILE(APPEND bootstrap.sql "${STR}\n")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS)
|
FILE(READ ${TOP_SRCDIR}/scripts/fill_help_tables.sql CONTENTS)
|
||||||
FILE(APPEND bootstrap.sql "${CONTENTS}")
|
FILE(APPEND bootstrap.sql "${CONTENTS}")
|
||||||
|
|
||||||
FILE(REMOVE_RECURSE mysql performance_schema)
|
FILE(REMOVE_RECURSE mysql performance_schema)
|
||||||
FILE(REMOVE ibdata1 ib_logfile0 ib_logfile1)
|
FILE(REMOVE ibdata1 ib_logfile0 ib_logfile1)
|
||||||
|
|
||||||
MAKE_DIRECTORY(mysql)
|
MAKE_DIRECTORY(mysql)
|
||||||
IF(WIN32)
|
|
||||||
SET(CONSOLE --console)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
SET(BOOTSTRAP_COMMAND
|
SET(BOOTSTRAP_COMMAND
|
||||||
${MYSQLD_EXECUTABLE}
|
${MYSQLD_EXECUTABLE}
|
||||||
--no-defaults
|
--no-defaults
|
||||||
${CONSOLE}
|
--console
|
||||||
--bootstrap
|
--bootstrap
|
||||||
--lc-messages-dir=${CMAKE_CURRENT_BINARY_DIR}/share
|
--lc-messages-dir=${BINDIR}/share
|
||||||
--basedir=.
|
--basedir=.
|
||||||
--datadir=.
|
--datadir=.
|
||||||
--default-storage-engine=MyISAM
|
--default-storage-engine=MyISAM
|
||||||
@@ -65,10 +57,10 @@ SET(BOOTSTRAP_COMMAND
|
|||||||
|
|
||||||
GET_FILENAME_COMPONENT(CWD . ABSOLUTE)
|
GET_FILENAME_COMPONENT(CWD . ABSOLUTE)
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND "@CMAKE_COMMAND@" -E echo Executing ${BOOTSTRAP_COMMAND}
|
COMMAND "${CMAKE_COMMAND}" -E echo Executing ${BOOTSTRAP_COMMAND}
|
||||||
)
|
)
|
||||||
EXECUTE_PROCESS (
|
EXECUTE_PROCESS (
|
||||||
COMMAND "@CMAKE_COMMAND@" -E
|
COMMAND "${CMAKE_COMMAND}" -E
|
||||||
echo input file bootstrap.sql, current directory ${CWD}
|
echo input file bootstrap.sql, current directory ${CWD}
|
||||||
)
|
)
|
||||||
EXECUTE_PROCESS (
|
EXECUTE_PROCESS (
|
@@ -46,6 +46,10 @@ MACRO(CHECK_DTRACE)
|
|||||||
AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||||
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
|
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
# On GNU/Hurd, dtrace is not supported
|
||||||
|
IF(DTRACE AND CMAKE_SYSTEM_NAME MATCHES "GNU")
|
||||||
|
SET(ENABLE_DTRACE OFF CACHE BOOL "Disable dtrace")
|
||||||
|
ENDIF()
|
||||||
SET(HAVE_DTRACE ${ENABLE_DTRACE})
|
SET(HAVE_DTRACE ${ENABLE_DTRACE})
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
|
@@ -11,9 +11,6 @@ SET(LIBS "")
|
|||||||
IF(POLICY CMP0011)
|
IF(POLICY CMP0011)
|
||||||
CMAKE_POLICY(SET CMP0011 NEW)
|
CMAKE_POLICY(SET CMP0011 NEW)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(POLICY CMP0007)
|
|
||||||
CMAKE_POLICY(SET CMP0007 OLD)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable
|
# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable
|
||||||
# returned string in ${var} is can be passed to linker's command line
|
# returned string in ${var} is can be passed to linker's command line
|
||||||
|
@@ -33,26 +33,17 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
|||||||
SET(targets ${ARG_UNPARSED_ARGUMENTS})
|
SET(targets ${ARG_UNPARSED_ARGUMENTS})
|
||||||
FOREACH(target ${targets})
|
FOREACH(target ${targets})
|
||||||
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
||||||
|
IF(target_type MATCHES "STATIC")
|
||||||
|
RETURN()
|
||||||
|
ENDIF()
|
||||||
set(comp "")
|
set(comp "")
|
||||||
|
|
||||||
IF(target MATCHES "mysqld" OR type MATCHES "MODULE")
|
IF((target STREQUAL "mysqld"))
|
||||||
#MESSAGE("PDB: ${targets}")
|
|
||||||
SET(comp Server)
|
SET(comp Server)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT comp MATCHES Server)
|
|
||||||
IF(ARG_COMPONENT MATCHES Development
|
|
||||||
OR ARG_COMPONENT MATCHES SharedLibraries
|
|
||||||
OR ARG_COMPONENT MATCHES Embedded)
|
|
||||||
SET(comp Debuginfo)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT comp)
|
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION symbols COMPONENT Debuginfo)
|
||||||
SET(comp Debuginfo_archive_only) # not in MSI
|
IF(comp)
|
||||||
ENDIF()
|
|
||||||
IF(NOT target_type MATCHES "STATIC")
|
|
||||||
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
|
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
@@ -115,7 +106,12 @@ FUNCTION(INSTALL_SCRIPT)
|
|||||||
SET(COMP)
|
SET(COMP)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF (COMP MATCHES ${SKIP_COMPONENTS})
|
||||||
|
RETURN()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} ${COMP})
|
INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||||
|
|
||||||
INSTALL_MANPAGE(${script})
|
INSTALL_MANPAGE(${script})
|
||||||
ENDFUNCTION()
|
ENDFUNCTION()
|
||||||
|
|
||||||
@@ -132,6 +128,10 @@ FUNCTION(INSTALL_DOCUMENTATION)
|
|||||||
SET(destination ${INSTALL_DOCDIR})
|
SET(destination ${INSTALL_DOCDIR})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF (ARG_COMPONENT MATCHES ${SKIP_COMPONENTS})
|
||||||
|
RETURN()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
STRING(TOUPPER ${ARG_COMPONENT} COMPUP)
|
STRING(TOUPPER ${ARG_COMPONENT} COMPUP)
|
||||||
IF(CPACK_COMPONENT_${COMPUP}_GROUP)
|
IF(CPACK_COMPONENT_${COMPUP}_GROUP)
|
||||||
SET(group ${CPACK_COMPONENT_${COMPUP}_GROUP})
|
SET(group ${CPACK_COMPONENT_${COMPUP}_GROUP})
|
||||||
@@ -150,21 +150,17 @@ ENDFUNCTION()
|
|||||||
|
|
||||||
|
|
||||||
# Install symbolic link to CMake target.
|
# Install symbolic link to CMake target.
|
||||||
# the link is created in the same directory as target
|
# the link is created in the current build directory
|
||||||
# and extension will be the same as for target file.
|
# and extension will be the same as for target file.
|
||||||
MACRO(INSTALL_SYMLINK linkname target destination component)
|
MACRO(INSTALL_SYMLINK linkname target destination component)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
GET_TARGET_PROPERTY(location ${target} LOCATION)
|
SET(output ${CMAKE_CURRENT_BINARY_DIR}/${linkname})
|
||||||
GET_FILENAME_COMPONENT(path ${location} PATH)
|
|
||||||
GET_FILENAME_COMPONENT(name ${location} NAME)
|
|
||||||
SET(output ${path}/${linkname})
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${output}
|
OUTPUT ${output}
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
|
COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${linkname}
|
||||||
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
|
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
|
||||||
${name}
|
$<TARGET_FILE_NAME:${target}>
|
||||||
${linkname}
|
${linkname}
|
||||||
WORKING_DIRECTORY ${path}
|
|
||||||
DEPENDS ${target}
|
DEPENDS ${target}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -250,8 +246,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
# Install man pages on Unix
|
# Install man pages on Unix
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
|
INSTALL_MANPAGE($<TARGET_FILE:${target}>)
|
||||||
INSTALL_MANPAGE(${target_location})
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
@@ -268,6 +263,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug
|
|||||||
|
|
||||||
|
|
||||||
FUNCTION(INSTALL_DEBUG_TARGET target)
|
FUNCTION(INSTALL_DEBUG_TARGET target)
|
||||||
|
RETURN() # XXX unused?
|
||||||
CMAKE_PARSE_ARGUMENTS(ARG
|
CMAKE_PARSE_ARGUMENTS(ARG
|
||||||
""
|
""
|
||||||
"DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
|
"DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
|
||||||
|
@@ -136,20 +136,24 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
|
|||||||
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c)
|
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c)
|
||||||
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
|
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
|
||||||
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
|
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
|
||||||
|
IF(NOT _SKIP_PIC)
|
||||||
|
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS
|
||||||
|
"${CMAKE_SHARED_LIBRARY_C_FLAGS}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(OSLIBS)
|
SET(OSLIBS)
|
||||||
FOREACH(LIB ${LIBS_TO_MERGE})
|
FOREACH(LIB ${LIBS_TO_MERGE})
|
||||||
GET_TARGET_PROPERTY(LIB_LOCATION ${LIB} LOCATION)
|
IF(NOT TARGET ${LIB})
|
||||||
GET_TARGET_PROPERTY(LIB_TYPE ${LIB} TYPE)
|
|
||||||
IF(NOT LIB_LOCATION)
|
|
||||||
# 3rd party library like libz.so. Make sure that everything
|
# 3rd party library like libz.so. Make sure that everything
|
||||||
# that links to our library links to this one as well.
|
# that links to our library links to this one as well.
|
||||||
LIST(APPEND OSLIBS ${LIB})
|
LIST(APPEND OSLIBS ${LIB})
|
||||||
ELSE()
|
ELSE()
|
||||||
|
GET_TARGET_PROPERTY(LIB_TYPE ${LIB} TYPE)
|
||||||
# This is a target in current project
|
# This is a target in current project
|
||||||
# (can be a static or shared lib)
|
# (can be a static or shared lib)
|
||||||
IF(LIB_TYPE STREQUAL "STATIC_LIBRARY")
|
IF(LIB_TYPE STREQUAL "STATIC_LIBRARY")
|
||||||
SET(STATIC_LIBS ${STATIC_LIBS} ${LIB_LOCATION})
|
SET(STATIC_TGTS ${STATIC_TGTS} ${LIB})
|
||||||
|
SET(STATIC_LIBS ${STATIC_LIBS} $<TARGET_FILE:${LIB}>)
|
||||||
ADD_DEPENDENCIES(${TARGET} ${LIB})
|
ADD_DEPENDENCIES(${TARGET} ${LIB})
|
||||||
# Extract dependent OS libraries
|
# Extract dependent OS libraries
|
||||||
GET_DEPENDEND_OS_LIBS(${LIB} LIB_OSLIBS)
|
GET_DEPENDEND_OS_LIBS(${LIB} LIB_OSLIBS)
|
||||||
@@ -171,7 +175,7 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
|
|||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${SOURCE_FILE}
|
OUTPUT ${SOURCE_FILE}
|
||||||
COMMAND ${CMAKE_COMMAND} -E touch ${SOURCE_FILE}
|
COMMAND ${CMAKE_COMMAND} -E touch ${SOURCE_FILE}
|
||||||
DEPENDS ${STATIC_LIBS})
|
DEPENDS ${STATIC_TGTS})
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
# To merge libs, just pass them to lib.exe command line.
|
# To merge libs, just pass them to lib.exe command line.
|
||||||
@@ -182,29 +186,27 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
|
|||||||
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES STATIC_LIBRARY_FLAGS
|
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES STATIC_LIBRARY_FLAGS
|
||||||
"${LINKER_EXTRA_FLAGS}")
|
"${LINKER_EXTRA_FLAGS}")
|
||||||
ELSE()
|
ELSE()
|
||||||
GET_TARGET_PROPERTY(TARGET_LOCATION ${TARGET} LOCATION)
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
# Use OSX's libtool to merge archives (ihandles universal
|
# Use OSX's libtool to merge archives (ihandles universal
|
||||||
# binaries properly)
|
# binaries properly)
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
|
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
|
||||||
COMMAND rm ${TARGET_LOCATION}
|
COMMAND rm $<TARGET_FILE:${TARGET}>
|
||||||
COMMAND libtool -static -o ${TARGET_LOCATION}
|
COMMAND libtool -static -o $<TARGET_FILE:${TARGET}>
|
||||||
${STATIC_LIBS}
|
${STATIC_LIBS}
|
||||||
)
|
)
|
||||||
ELSE()
|
ELSE()
|
||||||
# Generic Unix, Cygwin or MinGW. In post-build step, call
|
# Generic Unix, Cygwin or MinGW. In post-build step, call
|
||||||
# script, that extracts objects from archives with "ar x"
|
# script, that extracts objects from archives with "ar x"
|
||||||
# and repacks them with "ar r"
|
# and repacks them with "ar r"
|
||||||
SET(TARGET ${TARGET})
|
|
||||||
CONFIGURE_FILE(
|
|
||||||
${MYSQL_CMAKE_SCRIPT_DIR}/merge_archives_unix.cmake.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/merge_archives_${TARGET}.cmake
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
|
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
|
||||||
COMMAND rm ${TARGET_LOCATION}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
COMMAND ${CMAKE_COMMAND} -P
|
-DTARGET_LOCATION="$<TARGET_FILE:${TARGET}>"
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/merge_archives_${TARGET}.cmake
|
-DTARGET="${TARGET}"
|
||||||
|
-DSTATIC_LIBS="${STATIC_LIBS}"
|
||||||
|
-DCMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
-DCMAKE_AR="${CMAKE_AR}"
|
||||||
|
-DCMAKE_RANLIB="${CMAKE_RANLIB}"
|
||||||
|
-P "${MYSQL_CMAKE_SCRIPT_DIR}/merge_archives_unix.cmake"
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@@ -241,11 +243,11 @@ MACRO(MERGE_LIBRARIES)
|
|||||||
# check for non-PIC libraries
|
# check for non-PIC libraries
|
||||||
IF(NOT _SKIP_PIC)
|
IF(NOT _SKIP_PIC)
|
||||||
FOREACH(LIB ${LIBS})
|
FOREACH(LIB ${LIBS})
|
||||||
GET_TARGET_PROPERTY(${LIB} TYPE LIBTYPE)
|
GET_TARGET_PROPERTY(LTYPE ${LIB} TYPE)
|
||||||
IF(LIBTYPE STREQUAL "STATIC_LIBRARY")
|
IF(LTYPE STREQUAL "STATIC_LIBRARY")
|
||||||
GET_TARGET_PROPERTY(LIB COMPILE_FLAGS LIB_COMPILE_FLAGS)
|
GET_TARGET_PROPERTY(LIB_COMPILE_FLAGS ${LIB} COMPILE_FLAGS)
|
||||||
STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
|
STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
|
||||||
"<PIC_FLAG>" LIB_COMPILE_FLAGS ${LIB_COMPILE_FLAG})
|
"<PIC_FLAG>" LIB_COMPILE_FLAGS "${LIB_COMPILE_FLAGS}")
|
||||||
IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>")
|
IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>")
|
||||||
MESSAGE(FATAL_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n"
|
"Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n"
|
||||||
@@ -269,7 +271,7 @@ MACRO(MERGE_LIBRARIES)
|
|||||||
IF (ARG_SOVERSION)
|
IF (ARG_SOVERSION)
|
||||||
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES SOVERSION ${ARG_VERSION})
|
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES SOVERSION ${ARG_VERSION})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
TARGET_LINK_LIBRARIES(${TARGET} ${LIBS})
|
TARGET_LINK_LIBRARIES(${TARGET} LINK_PRIVATE ${LIBS})
|
||||||
IF(ARG_OUTPUT_NAME)
|
IF(ARG_OUTPUT_NAME)
|
||||||
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME "${ARG_OUTPUT_NAME}")
|
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME "${ARG_OUTPUT_NAME}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@@ -282,7 +284,6 @@ MACRO(MERGE_LIBRARIES)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
|
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
|
||||||
IF(ARG_SHARED AND LINK_FLAG_NO_UNDEFINED)
|
IF(ARG_SHARED AND LINK_FLAG_NO_UNDEFINED)
|
||||||
# Do not allow undefined symbols in shared libraries
|
# Do not allow undefined symbols in shared libraries
|
||||||
GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${TARGET} LINK_FLAGS)
|
GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${TARGET} LINK_FLAGS)
|
||||||
@@ -295,18 +296,11 @@ MACRO(MERGE_LIBRARIES)
|
|||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
FUNCTION(GET_DEPENDEND_OS_LIBS target result)
|
FUNCTION(GET_DEPENDEND_OS_LIBS target result)
|
||||||
SET(deps ${${target}_LIB_DEPENDS})
|
FOREACH(lib ${${target}_LIB_DEPENDS})
|
||||||
IF(deps)
|
IF(NOT TARGET ${lib})
|
||||||
FOREACH(lib ${deps})
|
SET(ret ${ret} ${lib})
|
||||||
# Filter out keywords for used for debug vs optimized builds
|
|
||||||
IF(NOT lib MATCHES "general" AND NOT lib MATCHES "debug" AND NOT lib MATCHES "optimized")
|
|
||||||
GET_TARGET_PROPERTY(lib_location ${lib} LOCATION)
|
|
||||||
IF(NOT lib_location)
|
|
||||||
SET(ret ${ret} ${lib})
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
|
||||||
SET(${result} ${ret} PARENT_SCOPE)
|
SET(${result} ${ret} PARENT_SCOPE)
|
||||||
ENDFUNCTION()
|
ENDFUNCTION()
|
||||||
|
|
||||||
|
@@ -110,7 +110,7 @@ CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
|
|||||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
|
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
|
||||||
${PACKAGE_DIR}/sql/sql_yacc_ora.hh COPYONLY)
|
${PACKAGE_DIR}/sql/sql_yacc_ora.hh COPYONLY)
|
||||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
|
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
|
||||||
${PACKAGE_DIR}/sql/sql_yacc_orac.cc COPYONLY)
|
${PACKAGE_DIR}/sql/sql_yacc_ora.cc COPYONLY)
|
||||||
|
|
||||||
# Add documentation, if user has specified where to find them
|
# Add documentation, if user has specified where to find them
|
||||||
IF(MYSQL_DOCS_LOCATION)
|
IF(MYSQL_DOCS_LOCATION)
|
||||||
|
@@ -14,19 +14,12 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
# This script merges many static libraries into
|
FILE(REMOVE "${TARGET_LOCATION}")
|
||||||
# one big library on Unix.
|
|
||||||
SET(TARGET_LOCATION "@TARGET_LOCATION@")
|
|
||||||
SET(TARGET "@TARGET@")
|
|
||||||
SET(STATIC_LIBS "@STATIC_LIBS@")
|
|
||||||
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
|
||||||
SET(CMAKE_AR "@CMAKE_AR@")
|
|
||||||
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
|
|
||||||
|
|
||||||
|
|
||||||
SET(TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/merge_archives_${TARGET})
|
SET(TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/merge_archives_${TARGET})
|
||||||
MAKE_DIRECTORY(${TEMP_DIR})
|
MAKE_DIRECTORY(${TEMP_DIR})
|
||||||
# Extract each archive to its own subdirectory(avoid object filename clashes)
|
# Extract each archive to its own subdirectory(avoid object filename clashes)
|
||||||
|
SEPARATE_ARGUMENTS(STATIC_LIBS UNIX_COMMAND "${STATIC_LIBS}")
|
||||||
FOREACH(LIB ${STATIC_LIBS})
|
FOREACH(LIB ${STATIC_LIBS})
|
||||||
GET_FILENAME_COMPONENT(NAME_NO_EXT ${LIB} NAME_WE)
|
GET_FILENAME_COMPONENT(NAME_NO_EXT ${LIB} NAME_WE)
|
||||||
SET(TEMP_SUBDIR ${TEMP_DIR}/${NAME_NO_EXT})
|
SET(TEMP_SUBDIR ${TEMP_DIR}/${NAME_NO_EXT})
|
@@ -75,6 +75,9 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
|
|||||||
ELSE()
|
ELSE()
|
||||||
SET(COMP COMPONENT Client)
|
SET(COMP COMPONENT Client)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
IF (COMP MATCHES ${SKIP_COMPONENTS})
|
||||||
|
RETURN()
|
||||||
|
ENDIF()
|
||||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFUNCTION()
|
ENDFUNCTION()
|
||||||
|
@@ -96,7 +96,8 @@ IF(MSVC)
|
|||||||
|
|
||||||
# Disable mingw based pkg-config found in Strawberry perl
|
# Disable mingw based pkg-config found in Strawberry perl
|
||||||
SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "")
|
SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "")
|
||||||
SET(MSVC_CRT_TYPE /MT CACHE STRING
|
|
||||||
|
SET(MSVC_CRT_TYPE /MD CACHE STRING
|
||||||
"Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)"
|
"Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)"
|
||||||
)
|
)
|
||||||
SET(VALID_CRT_TYPES /MTd /MDd /MD /MT)
|
SET(VALID_CRT_TYPES /MTd /MDd /MD /MT)
|
||||||
@@ -106,9 +107,7 @@ IF(MSVC)
|
|||||||
|
|
||||||
IF(MSVC_CRT_TYPE MATCHES "/MD")
|
IF(MSVC_CRT_TYPE MATCHES "/MD")
|
||||||
# Dynamic runtime (DLLs), need to install CRT libraries.
|
# Dynamic runtime (DLLs), need to install CRT libraries.
|
||||||
SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)# upgrade wizard
|
|
||||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT VCCRT)
|
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT VCCRT)
|
||||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS TRUE)
|
|
||||||
SET(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
SET(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||||
IF(MSVC_CRT_TYPE STREQUAL "/MDd")
|
IF(MSVC_CRT_TYPE STREQUAL "/MDd")
|
||||||
SET (CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE)
|
SET (CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE)
|
||||||
@@ -205,9 +204,8 @@ IF(MSVC)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Always link with socket library
|
# Always link with socket library
|
||||||
LINK_LIBRARIES(ws2_32)
|
STRING(APPEND CMAKE_C_STANDARD_LIBRARIES " ws2_32.lib")
|
||||||
# ..also for tests
|
STRING(APPEND CMAKE_CXX_STANDARD_LIBRARIES " ws2_32.lib")
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
|
||||||
|
|
||||||
# System checks
|
# System checks
|
||||||
SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs
|
SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs
|
||||||
@@ -278,3 +276,17 @@ ENDIF()
|
|||||||
|
|
||||||
SET(FN_NO_CASE_SENSE 1)
|
SET(FN_NO_CASE_SENSE 1)
|
||||||
SET(USE_SYMDIR 1)
|
SET(USE_SYMDIR 1)
|
||||||
|
|
||||||
|
# Force static C runtime for targets in current directory
|
||||||
|
# (useful to get rid of MFC dll's dependency, or in installer)
|
||||||
|
MACRO(FORCE_STATIC_CRT)
|
||||||
|
FOREACH(flag
|
||||||
|
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
|
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
||||||
|
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
|
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT
|
||||||
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL
|
||||||
|
)
|
||||||
|
STRING(REGEX REPLACE "/MD[d]?" "/MT" "${flag}" "${${flag}}" )
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDMACRO()
|
||||||
|
@@ -77,6 +77,9 @@ IF(NOT VERSION)
|
|||||||
SET(DEFAULT_MACHINE "i386")
|
SET(DEFAULT_MACHINE "i386")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "GNU")
|
||||||
|
SET(DEFAULT_PLATFORM "GNU")
|
||||||
|
SET(DEFAULT_MACHINE "i386")
|
||||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
@@ -132,7 +135,7 @@ IF(NOT VERSION)
|
|||||||
|
|
||||||
SET(package_name "mariadb${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
|
SET(package_name "mariadb${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Packaging as: ${package_name}")
|
MESSAGE_ONCE(package_name "Packaging as: ${package_name}")
|
||||||
|
|
||||||
# Sometimes package suffix is added (something like "-icc-glibc23")
|
# Sometimes package suffix is added (something like "-icc-glibc23")
|
||||||
IF(PACKAGE_SUFFIX)
|
IF(PACKAGE_SUFFIX)
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2018, Oracle and/or its affiliates.
|
||||||
|
# Copyright (c) 2011, 2018, MariaDB Corporation
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -238,11 +239,13 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||||||
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
|
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
|
||||||
IF(NOT ARG_CLIENT AND UNIX)
|
IF(NOT ARG_CLIENT AND UNIX)
|
||||||
IF (NOT ARG_CONFIG)
|
IF (NOT ARG_CONFIG)
|
||||||
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
|
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.cnf")
|
||||||
FILE(WRITE ${ARG_CONFIG} "[mariadb]\nplugin-load-add=${ARG_MODULE_OUTPUT_NAME}.so\n")
|
FILE(WRITE ${ARG_CONFIG} "[mariadb]\nplugin-load-add=${ARG_MODULE_OUTPUT_NAME}.so\n")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
INSTALL(FILES ${ARG_CONFIG} COMPONENT ${ARG_COMPONENT} DESTINATION ${INSTALL_SYSCONF2DIR})
|
INSTALL(FILES ${ARG_CONFIG} COMPONENT ${ARG_COMPONENT} DESTINATION ${INSTALL_SYSCONF2DIR})
|
||||||
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} "%config(noreplace) ${INSTALL_SYSCONF2DIR}/*" PARENT_SCOPE)
|
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} "%config(noreplace) ${INSTALL_SYSCONF2DIR}/*" PARENT_SCOPE)
|
||||||
|
SET(CPACK_RPM_${ARG_COMPONENT}_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/plugin-postin.sh PARENT_SCOPE)
|
||||||
|
SET(CPACK_RPM_${ARG_COMPONENT}_POST_TRANS_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-posttrans.sh PARENT_SCOPE)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
|
@@ -159,12 +159,12 @@ MACRO (MYSQL_CHECK_SSL)
|
|||||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||||
ELSE()
|
ELSE()
|
||||||
IF(WITH_SSL STREQUAL "system")
|
IF(WITH_SSL STREQUAL "system")
|
||||||
MESSAGE(SEND_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support")
|
MESSAGE(FATAL_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
MYSQL_USE_BUNDLED_SSL()
|
MYSQL_USE_BUNDLED_SSL()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE(SEND_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"Wrong option for WITH_SSL. Valid values are: ${WITH_SSL_DOC}")
|
"Wrong option for WITH_SSL. Valid values are: ${WITH_SSL_DOC}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
# update submodules automatically
|
# update submodules automatically
|
||||||
|
|
||||||
|
OPTION(UPDATE_SUBMODULES "Update submodules automatically" ON)
|
||||||
|
IF(NOT UPDATE_SUBMODULES)
|
||||||
|
RETURN()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" config --get cmake.update-submodules
|
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" config --get cmake.update-submodules
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
|
@@ -20,10 +20,12 @@ MACRO(CHECK_SYSTEMD)
|
|||||||
SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support")
|
SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support")
|
||||||
IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto")
|
IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto")
|
||||||
IF(PKG_CONFIG_FOUND)
|
IF(PKG_CONFIG_FOUND)
|
||||||
IF(WITH_SYSTEMD STREQUAL "yes")
|
IF (NOT DEFINED LIBSYSTEMD_FOUND)
|
||||||
pkg_search_module(LIBSYSTEMD REQUIRED libsystemd libsystemd-daemon)
|
IF(WITH_SYSTEMD STREQUAL "yes")
|
||||||
ELSE()
|
pkg_search_module(LIBSYSTEMD REQUIRED libsystemd libsystemd-daemon)
|
||||||
pkg_search_module(LIBSYSTEMD libsystemd libsystemd-daemon)
|
ELSE()
|
||||||
|
pkg_search_module(LIBSYSTEMD libsystemd libsystemd-daemon)
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(HAVE_DLOPEN)
|
IF(HAVE_DLOPEN)
|
||||||
SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})
|
SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,15 +14,12 @@
|
|||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
MACRO (MYSQL_USE_BUNDLED_ZLIB)
|
MACRO (MYSQL_USE_BUNDLED_ZLIB)
|
||||||
SET(ZLIB_LIBRARY zlib)
|
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
|
||||||
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib)
|
SET(BUILD_BUNDLED_ZLIB 1)
|
||||||
|
SET(ZLIB_LIBRARY zlib CACHE INTERNAL "Bundled zlib library")
|
||||||
SET(ZLIB_FOUND TRUE)
|
SET(ZLIB_FOUND TRUE)
|
||||||
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
|
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
|
||||||
ADD_SUBDIRECTORY(zlib)
|
ADD_SUBDIRECTORY(zlib)
|
||||||
GET_TARGET_PROPERTY(src zlib SOURCES)
|
|
||||||
FOREACH(file ${src})
|
|
||||||
SET(ZLIB_SOURCES ${ZLIB_SOURCES} ${CMAKE_SOURCE_DIR}/zlib/${file})
|
|
||||||
ENDFOREACH()
|
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
# MYSQL_CHECK_ZLIB_WITH_COMPRESS
|
# MYSQL_CHECK_ZLIB_WITH_COMPRESS
|
||||||
@@ -37,15 +34,10 @@ ENDMACRO()
|
|||||||
|
|
||||||
MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
|
MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
|
||||||
|
|
||||||
IF(CMAKE_SYSTEM_NAME STREQUAL "OS400" OR
|
# For NDBCLUSTER: Use bundled zlib by default
|
||||||
CMAKE_SYSTEM_NAME STREQUAL "AIX" OR
|
|
||||||
CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
||||||
# Use bundled zlib on some platforms by default (system one is too
|
|
||||||
# old or not existent)
|
|
||||||
IF (NOT WITH_ZLIB)
|
IF (NOT WITH_ZLIB)
|
||||||
SET(WITH_ZLIB "bundled" CACHE STRING "By default use bundled zlib on this platform")
|
SET(WITH_ZLIB "bundled" CACHE STRING "By default use bundled zlib on this platform")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(WITH_ZLIB STREQUAL "bundled")
|
IF(WITH_ZLIB STREQUAL "bundled")
|
||||||
MYSQL_USE_BUNDLED_ZLIB()
|
MYSQL_USE_BUNDLED_ZLIB()
|
||||||
|
@@ -559,12 +559,8 @@
|
|||||||
#cmakedefine WSREP_PROC_INFO 1
|
#cmakedefine WSREP_PROC_INFO 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AIX
|
#if !defined(__STDC_FORMAT_MACROS)
|
||||||
/*
|
|
||||||
AIX includes inttypes.h from sys/types.h
|
|
||||||
Explicitly request format macros before the first inclusion of inttypes.h
|
|
||||||
*/
|
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
#endif
|
#endif // !defined(__STDC_FORMAT_MACROS)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -986,11 +986,14 @@ CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6" sin6_len
|
|||||||
|
|
||||||
SET(CMAKE_EXTRA_INCLUDE_FILES)
|
SET(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
|
||||||
CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
|
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_INO)
|
||||||
IF(NOT HAVE_UCONTEXT_H)
|
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
|
||||||
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
|
SET(SPRINTF_RETURNS_INT 1)
|
||||||
|
CHECK_INCLUDE_FILE(ucontext.h HAVE_FILE_UCONTEXT_H)
|
||||||
|
IF(NOT HAVE_FILE_UCONTEXT_H)
|
||||||
|
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_FILE_UCONTEXT_H)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(HAVE_UCONTEXT_H)
|
IF(HAVE_FILE_UCONTEXT_H)
|
||||||
CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
|
CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
2
debian/additions/innotop/changelog.innotop
vendored
2
debian/additions/innotop/changelog.innotop
vendored
@@ -77,7 +77,7 @@ Changelog for innotop:
|
|||||||
* remove cxn from $meta->{group_by} if there's only one connection displayed
|
* remove cxn from $meta->{group_by} if there's only one connection displayed
|
||||||
* fix for issue 19 - cxn column won't become visible when viewing two
|
* fix for issue 19 - cxn column won't become visible when viewing two
|
||||||
connections after having viewed one connection
|
connections after having viewed one connection
|
||||||
* supress errors resulting from the addition of a 'BACKGROUND THREAD'
|
* suppress errors resulting from the addition of a 'BACKGROUND THREAD'
|
||||||
section in the output of 'show innodb status'
|
section in the output of 'show innodb status'
|
||||||
* possible fix for issue 22 - Useless use of a constant in void context
|
* possible fix for issue 22 - Useless use of a constant in void context
|
||||||
* small change to set_to_tbl() around hiding the cxn column if there
|
* small change to set_to_tbl() around hiding the cxn column if there
|
||||||
|
14
debian/additions/innotop/innotop
vendored
14
debian/additions/innotop/innotop
vendored
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||||
# Street, Fifth Floor, Boston, MA 02110-1301 USA
|
# Street, Fifth Floor, Boston, MA 02111-1301 USA
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings FATAL => 'all';
|
use warnings FATAL => 'all';
|
||||||
@@ -1438,8 +1438,8 @@ systems, you can issue `man perlgpl' or `man perlartistic' to read these
|
|||||||
licenses.
|
licenses.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA.
|
Street, Fifth Floor, Boston, MA 02111-1301 USA.
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
# Configuration information and global setup {{{1
|
# Configuration information and global setup {{{1
|
||||||
@@ -4657,7 +4657,7 @@ my %stmt_maker_for = (
|
|||||||
my $sth;
|
my $sth;
|
||||||
eval { # This can fail if the table doesn't exist, INFORMATION_SCHEMA doesn't exist, etc.
|
eval { # This can fail if the table doesn't exist, INFORMATION_SCHEMA doesn't exist, etc.
|
||||||
my $cols = $dbh->selectall_arrayref(q{SHOW /*innotop*/ COLUMNS FROM INFORMATION_SCHEMA.PROCESSLIST LIKE 'TIME_MS'});
|
my $cols = $dbh->selectall_arrayref(q{SHOW /*innotop*/ COLUMNS FROM INFORMATION_SCHEMA.PROCESSLIST LIKE 'TIME_MS'});
|
||||||
if ( @$cols ) { # The TIME_MS colum exists
|
if ( @$cols ) { # The TIME_MS column exists
|
||||||
$sth = $dbh->prepare(q{SELECT /*innotop*/ ID, USER, HOST, DB, COMMAND, CASE WHEN TIME_MS/1000 > 365*86400 THEN TIME ELSE TIME_MS/1000 END AS TIME, STATE, INFO FROM INFORMATION_SCHEMA.PROCESSLIST});
|
$sth = $dbh->prepare(q{SELECT /*innotop*/ ID, USER, HOST, DB, COMMAND, CASE WHEN TIME_MS/1000 > 365*86400 THEN TIME ELSE TIME_MS/1000 END AS TIME, STATE, INFO FROM INFORMATION_SCHEMA.PROCESSLIST});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -11653,7 +11653,7 @@ show you something like this:
|
|||||||
pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m
|
pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m
|
||||||
buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo
|
buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo
|
||||||
total_mem_alloc Memory Total memory allocate IB_bp_total_m
|
total_mem_alloc Memory Total memory allocate IB_bp_total_m
|
||||||
add_pool_alloc Add'l Pool Additonal pool alloca IB_bp_add_poo
|
add_pool_alloc Add'l Pool Additional pool alloca IB_bp_add_poo
|
||||||
|
|
||||||
The first line shows which table you're editing, and reminds you again to press
|
The first line shows which table you're editing, and reminds you again to press
|
||||||
'?' for a list of key mappings. The rest is a tabular representation of the
|
'?' for a list of key mappings. The rest is a tabular representation of the
|
||||||
@@ -12233,8 +12233,8 @@ systems, you can issue `man perlgpl' or `man perlartistic' to read these
|
|||||||
licenses.
|
licenses.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA.
|
Street, Fifth Floor, Boston, MA 02111-1301 USA.
|
||||||
|
|
||||||
Execute innotop and press '!' to see this information at any time.
|
Execute innotop and press '!' to see this information at any time.
|
||||||
|
|
||||||
|
6
debian/additions/innotop/innotop.1
vendored
6
debian/additions/innotop/innotop.1
vendored
@@ -1678,7 +1678,7 @@ show you something like this:
|
|||||||
\& pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m
|
\& pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m
|
||||||
\& buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo
|
\& buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo
|
||||||
\& total_mem_alloc Memory Total memory allocate IB_bp_total_m
|
\& total_mem_alloc Memory Total memory allocate IB_bp_total_m
|
||||||
\& add_pool_alloc Add\*(Aql Pool Additonal pool alloca IB_bp_add_poo
|
\& add_pool_alloc Add\*(Aql Pool Additional pool alloca IB_bp_add_poo
|
||||||
.Ve
|
.Ve
|
||||||
.PP
|
.PP
|
||||||
The first line shows which table you're editing, and reminds you again to press
|
The first line shows which table you're editing, and reminds you again to press
|
||||||
@@ -2183,8 +2183,8 @@ systems, you can issue `man perlgpl' or `man perlartistic' to read these
|
|||||||
licenses.
|
licenses.
|
||||||
.PP
|
.PP
|
||||||
You should have received a copy of the \s-1GNU\s0 General Public License along with
|
You should have received a copy of the \s-1GNU\s0 General Public License along with
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||||
Place, Suite 330, Boston, \s-1MA 02111\-1307 USA.\s0
|
Street, Fifth Floor, Boston, \s-1MA\s0 02111\-1301 \s-1USA\s0.
|
||||||
.PP
|
.PP
|
||||||
Execute innotop and press '!' to see this information at any time.
|
Execute innotop and press '!' to see this information at any time.
|
||||||
.SH "AUTHOR"
|
.SH "AUTHOR"
|
||||||
|
2
debian/autobake-deb.sh
vendored
2
debian/autobake-deb.sh
vendored
@@ -102,7 +102,7 @@ fi
|
|||||||
# AWS SDK also requires the build machine to have network access and git, so
|
# AWS SDK also requires the build machine to have network access and git, so
|
||||||
# it cannot be part of the base version included in Linux distros, but a pure
|
# it cannot be part of the base version included in Linux distros, but a pure
|
||||||
# custom built plugin.
|
# custom built plugin.
|
||||||
if [[ $GCCVERSION -gt 40800 ]] && [[ ! $TRAVIS ]] && ping -c 1 github.com
|
if [[ $GCCVERSION -gt 40800 ]] && [[ ! $TRAVIS ]] && wget --timeout 15 --tries 1 --quiet --output-document /dev/null https://github.com/
|
||||||
then
|
then
|
||||||
cat <<EOF >> debian/control
|
cat <<EOF >> debian/control
|
||||||
|
|
||||||
|
2
debian/mariadb-plugin-tokudb.install
vendored
2
debian/mariadb-plugin-tokudb.install
vendored
@@ -4,5 +4,5 @@ usr/bin/tokuft_logprint
|
|||||||
usr/bin/tokuftdump
|
usr/bin/tokuftdump
|
||||||
usr/lib/mysql/plugin/ha_tokudb.so
|
usr/lib/mysql/plugin/ha_tokudb.so
|
||||||
usr/share/doc/mariadb-server-10.4/README.md usr/share/doc/mariadb-plugin-tokudb/README.md
|
usr/share/doc/mariadb-server-10.4/README.md usr/share/doc/mariadb-plugin-tokudb/README.md
|
||||||
usr/share/man/man1/tokuft_logdump.1
|
usr/share/man/man1/tokuft_logprint.1
|
||||||
usr/share/man/man1/tokuftdump.1
|
usr/share/man/man1/tokuftdump.1
|
||||||
|
1
debian/rules
vendored
1
debian/rules
vendored
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
export DH_VERBOSE=1
|
export DH_VERBOSE=1
|
||||||
|
export DEB_BUILD_HARDENING=1
|
||||||
|
|
||||||
# enable Debian Hardening
|
# enable Debian Hardening
|
||||||
# see: https://wiki.debian.org/Hardening
|
# see: https://wiki.debian.org/Hardening
|
||||||
|
@@ -35,8 +35,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|||||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA
|
||||||
|
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ struct datadir_thread_ctxt_t {
|
|||||||
datadir_iter_t *it;
|
datadir_iter_t *it;
|
||||||
uint n_thread;
|
uint n_thread;
|
||||||
uint *count;
|
uint *count;
|
||||||
pthread_mutex_t count_mutex;
|
pthread_mutex_t* count_mutex;
|
||||||
os_thread_id_t id;
|
os_thread_id_t id;
|
||||||
bool ret;
|
bool ret;
|
||||||
};
|
};
|
||||||
@@ -471,6 +471,21 @@ struct datafile_cur_t {
|
|||||||
size_t buf_size;
|
size_t buf_size;
|
||||||
size_t buf_read;
|
size_t buf_read;
|
||||||
size_t buf_offset;
|
size_t buf_offset;
|
||||||
|
|
||||||
|
explicit datafile_cur_t(const char* filename = NULL) :
|
||||||
|
file(), thread_n(0), orig_buf(NULL), buf(NULL), buf_size(0),
|
||||||
|
buf_read(0), buf_offset(0)
|
||||||
|
{
|
||||||
|
memset(rel_path, 0, sizeof rel_path);
|
||||||
|
if (filename) {
|
||||||
|
strncpy(abs_path, filename, sizeof abs_path);
|
||||||
|
abs_path[(sizeof abs_path) - 1] = 0;
|
||||||
|
} else {
|
||||||
|
abs_path[0] = '\0';
|
||||||
|
}
|
||||||
|
rel_path[0] = '\0';
|
||||||
|
memset(&statinfo, 0, sizeof statinfo);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static
|
static
|
||||||
@@ -489,9 +504,7 @@ datafile_open(const char *file, datafile_cur_t *cursor, uint thread_n)
|
|||||||
{
|
{
|
||||||
bool success;
|
bool success;
|
||||||
|
|
||||||
memset(cursor, 0, sizeof(datafile_cur_t));
|
new (cursor) datafile_cur_t(file);
|
||||||
|
|
||||||
strncpy(cursor->abs_path, file, sizeof(cursor->abs_path));
|
|
||||||
|
|
||||||
/* Get the relative path for the destination tablespace name, i.e. the
|
/* Get the relative path for the destination tablespace name, i.e. the
|
||||||
one that can be appended to the backup root directory. Non-system
|
one that can be appended to the backup root directory. Non-system
|
||||||
@@ -630,32 +643,36 @@ static
|
|||||||
int
|
int
|
||||||
mkdirp(const char *pathname, int Flags, myf MyFlags)
|
mkdirp(const char *pathname, int Flags, myf MyFlags)
|
||||||
{
|
{
|
||||||
char parent[PATH_MAX], *p;
|
char *parent, *p;
|
||||||
|
|
||||||
/* make a parent directory path */
|
/* make a parent directory path */
|
||||||
strncpy(parent, pathname, sizeof(parent));
|
if (!(parent= strdup(pathname)))
|
||||||
parent[sizeof(parent) - 1] = 0;
|
return(-1);
|
||||||
|
|
||||||
for (p = parent + strlen(parent);
|
for (p = parent + strlen(parent);
|
||||||
!is_path_separator(*p) && p != parent; p--);
|
!is_path_separator(*p) && p != parent; p--) ;
|
||||||
|
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
|
||||||
/* try to make parent directory */
|
/* try to make parent directory */
|
||||||
if (p != parent && mkdirp(parent, Flags, MyFlags) != 0) {
|
if (p != parent && mkdirp(parent, Flags, MyFlags) != 0) {
|
||||||
|
free(parent);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make this one if parent has been made */
|
/* make this one if parent has been made */
|
||||||
if (my_mkdir(pathname, Flags, MyFlags) == 0) {
|
if (my_mkdir(pathname, Flags, MyFlags) == 0) {
|
||||||
|
free(parent);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if it already exists that is fine */
|
/* if it already exists that is fine */
|
||||||
if (errno == EEXIST) {
|
if (errno == EEXIST) {
|
||||||
|
free(parent);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(parent);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,17 +682,24 @@ bool
|
|||||||
equal_paths(const char *first, const char *second)
|
equal_paths(const char *first, const char *second)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_REALPATH
|
#ifdef HAVE_REALPATH
|
||||||
char real_first[PATH_MAX];
|
char *real_first, *real_second;
|
||||||
char real_second[PATH_MAX];
|
int result;
|
||||||
|
|
||||||
if (realpath(first, real_first) == NULL) {
|
real_first = realpath(first, 0);
|
||||||
return false;
|
if (real_first == NULL) {
|
||||||
}
|
|
||||||
if (realpath(second, real_second) == NULL) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (strcmp(real_first, real_second) == 0);
|
real_second = realpath(second, 0);
|
||||||
|
if (real_second == NULL) {
|
||||||
|
free(real_first);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = strcmp(real_first, real_second);
|
||||||
|
free(real_first);
|
||||||
|
free(real_second);
|
||||||
|
return result == 0;
|
||||||
#else
|
#else
|
||||||
return strcmp(first, second) == 0;
|
return strcmp(first, second) == 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -937,7 +961,7 @@ run_data_threads(datadir_iter_t *it, os_thread_func_t func, uint n)
|
|||||||
data_threads[i].it = it;
|
data_threads[i].it = it;
|
||||||
data_threads[i].n_thread = i + 1;
|
data_threads[i].n_thread = i + 1;
|
||||||
data_threads[i].count = &count;
|
data_threads[i].count = &count;
|
||||||
data_threads[i].count_mutex = count_mutex;
|
data_threads[i].count_mutex = &count_mutex;
|
||||||
os_thread_create(func, data_threads + i, &data_threads[i].id);
|
os_thread_create(func, data_threads + i, &data_threads[i].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1323,7 +1347,8 @@ backup_files(const char *from, bool prep_mode)
|
|||||||
if (rsync_tmpfile == NULL) {
|
if (rsync_tmpfile == NULL) {
|
||||||
msg("Error: can't open file %s\n",
|
msg("Error: can't open file %s\n",
|
||||||
rsync_tmpfile_name);
|
rsync_tmpfile_name);
|
||||||
return(false);
|
ret = false;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (fgets(path, sizeof(path), rsync_tmpfile)) {
|
while (fgets(path, sizeof(path), rsync_tmpfile)) {
|
||||||
@@ -1360,6 +1385,28 @@ out:
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void backup_fix_ddl(void);
|
||||||
|
|
||||||
|
static lsn_t get_current_lsn(MYSQL *connection)
|
||||||
|
{
|
||||||
|
static const char lsn_prefix[] = "\nLog sequence number ";
|
||||||
|
lsn_t lsn = 0;
|
||||||
|
if (MYSQL_RES *res = xb_mysql_query(connection,
|
||||||
|
"SHOW ENGINE INNODB STATUS",
|
||||||
|
true, false)) {
|
||||||
|
if (MYSQL_ROW row = mysql_fetch_row(res)) {
|
||||||
|
if (const char *p = strstr(row[2], lsn_prefix)) {
|
||||||
|
p += sizeof lsn_prefix - 1;
|
||||||
|
lsn = lsn_t(strtoll(p, NULL, 10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mysql_free_result(res);
|
||||||
|
}
|
||||||
|
return lsn;
|
||||||
|
}
|
||||||
|
|
||||||
|
lsn_t server_lsn_after_lock;
|
||||||
|
extern void backup_wait_for_lsn(lsn_t lsn);
|
||||||
/** Start --backup */
|
/** Start --backup */
|
||||||
bool backup_start()
|
bool backup_start()
|
||||||
{
|
{
|
||||||
@@ -1379,6 +1426,7 @@ bool backup_start()
|
|||||||
if (!lock_tables(mysql_connection)) {
|
if (!lock_tables(mysql_connection)) {
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
server_lsn_after_lock = get_current_lsn(mysql_connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!backup_files(fil_path_to_mysql_datadir, false)) {
|
if (!backup_files(fil_path_to_mysql_datadir, false)) {
|
||||||
@@ -1393,6 +1441,10 @@ bool backup_start()
|
|||||||
rocksdb_create_checkpoint();
|
rocksdb_create_checkpoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msg_ts("Waiting for log copy thread to read lsn %llu\n", (ulonglong)server_lsn_after_lock);
|
||||||
|
backup_wait_for_lsn(server_lsn_after_lock);
|
||||||
|
backup_fix_ddl();
|
||||||
|
|
||||||
// There is no need to stop slave thread before coping non-Innodb data when
|
// There is no need to stop slave thread before coping non-Innodb data when
|
||||||
// --no-lock option is used because --no-lock option requires that no DDL or
|
// --no-lock option is used because --no-lock option requires that no DDL or
|
||||||
// DML to non-transaction tables can occur.
|
// DML to non-transaction tables can occur.
|
||||||
@@ -1985,9 +2037,9 @@ cleanup:
|
|||||||
|
|
||||||
datadir_node_free(&node);
|
datadir_node_free(&node);
|
||||||
|
|
||||||
pthread_mutex_lock(&ctxt->count_mutex);
|
pthread_mutex_lock(ctxt->count_mutex);
|
||||||
--(*ctxt->count);
|
--(*ctxt->count);
|
||||||
pthread_mutex_unlock(&ctxt->count_mutex);
|
pthread_mutex_unlock(ctxt->count_mutex);
|
||||||
|
|
||||||
ctxt->ret = ret;
|
ctxt->ret = ret;
|
||||||
|
|
||||||
@@ -2202,6 +2254,7 @@ static void rocksdb_lock_checkpoint()
|
|||||||
msg_ts("Could not obtain rocksdb checkpont lock\n");
|
msg_ts("Could not obtain rocksdb checkpont lock\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
mysql_free_result(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rocksdb_unlock_checkpoint()
|
static void rocksdb_unlock_checkpoint()
|
||||||
|
@@ -34,8 +34,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|||||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA
|
||||||
|
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
#define MYSQL_CLIENT
|
#define MYSQL_CLIENT
|
||||||
@@ -917,6 +917,7 @@ DECLARE_THREAD(kill_mdl_waiters_thread(void *))
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mysql_free_result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
@@ -1758,57 +1759,63 @@ backup_cleanup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static pthread_mutex_t mdl_lock_con_mutex;
|
|
||||||
static MYSQL *mdl_con = NULL;
|
static MYSQL *mdl_con = NULL;
|
||||||
|
|
||||||
|
std::map<ulint, std::string> spaceid_to_tablename;
|
||||||
|
|
||||||
void
|
void
|
||||||
mdl_lock_init()
|
mdl_lock_init()
|
||||||
{
|
{
|
||||||
pthread_mutex_init(&mdl_lock_con_mutex, NULL);
|
|
||||||
mdl_con = xb_mysql_connect();
|
mdl_con = xb_mysql_connect();
|
||||||
if (mdl_con)
|
if (!mdl_con)
|
||||||
{
|
{
|
||||||
xb_mysql_query(mdl_con, "BEGIN", false, true);
|
msg("FATAL: cannot create connection for MDL locks");
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
const char *query =
|
||||||
|
"SELECT NAME, SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE '%%/%%'";
|
||||||
|
|
||||||
|
MYSQL_RES *mysql_result = xb_mysql_query(mdl_con, query, true, true);
|
||||||
|
while (MYSQL_ROW row = mysql_fetch_row(mysql_result)) {
|
||||||
|
int err;
|
||||||
|
ulint id = (ulint)my_strtoll10(row[1], 0, &err);
|
||||||
|
spaceid_to_tablename[id] = ut_get_name(0, row[0]);
|
||||||
|
}
|
||||||
|
mysql_free_result(mysql_result);
|
||||||
|
|
||||||
|
xb_mysql_query(mdl_con, "BEGIN", false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mdl_lock_table(ulint space_id)
|
mdl_lock_table(ulint space_id)
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
if (space_id == 0)
|
||||||
oss << "SELECT NAME "
|
return;
|
||||||
"FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES "
|
|
||||||
"WHERE SPACE = " << space_id << " AND NAME LIKE '%%/%%'";
|
|
||||||
|
|
||||||
pthread_mutex_lock(&mdl_lock_con_mutex);
|
std::string full_table_name = spaceid_to_tablename[space_id];
|
||||||
|
|
||||||
MYSQL_RES *mysql_result = xb_mysql_query(mdl_con, oss.str().c_str(), true, true);
|
DBUG_EXECUTE_IF("rename_during_mdl_lock_table",
|
||||||
|
if (full_table_name == "`test`.`t1`")
|
||||||
|
xb_mysql_query(mysql_connection, "RENAME TABLE test.t1 to test.t2", false, true);
|
||||||
|
);
|
||||||
|
|
||||||
while (MYSQL_ROW row = mysql_fetch_row(mysql_result)) {
|
std::ostringstream lock_query;
|
||||||
|
lock_query << "SELECT 1 FROM " << full_table_name << " LIMIT 0";
|
||||||
DBUG_EXECUTE_IF("rename_during_mdl_lock_table",
|
msg_ts("Locking MDL for %s\n", full_table_name.c_str());
|
||||||
if (strcmp(row[0], "test/t1") == 0)
|
if (mysql_query(mdl_con, lock_query.str().c_str())) {
|
||||||
xb_mysql_query(mysql_connection, "RENAME TABLE test.t1 to test.t2", false, true
|
msg_ts("Warning : locking MDL failed for space id %zu, name %s\n", space_id, full_table_name.c_str());
|
||||||
););
|
} else {
|
||||||
|
MYSQL_RES *r = mysql_store_result(mdl_con);
|
||||||
std::string full_table_name = ut_get_name(0,row[0]);
|
mysql_free_result(r);
|
||||||
std::ostringstream lock_query;
|
|
||||||
lock_query << "SELECT 1 FROM " << full_table_name << " LIMIT 0";
|
|
||||||
msg_ts("Locking MDL for %s\n", full_table_name.c_str());
|
|
||||||
xb_mysql_query(mdl_con, lock_query.str().c_str(), false, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_unlock(&mdl_lock_con_mutex);
|
|
||||||
mysql_free_result(mysql_result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
mdl_unlock_all()
|
mdl_unlock_all()
|
||||||
{
|
{
|
||||||
msg_ts("Unlocking MDL for all tables\n");
|
msg_ts("Unlocking MDL for all tables\n");
|
||||||
xb_mysql_query(mdl_con, "COMMIT", false, true);
|
xb_mysql_query(mdl_con, "COMMIT", false, true);
|
||||||
mysql_close(mdl_con);
|
mysql_close(mdl_con);
|
||||||
pthread_mutex_destroy(&mdl_lock_con_mutex);
|
spaceid_to_tablename.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this program; if not, write to the Free Software
|
* License along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -109,6 +109,9 @@ Write to a datasink file.
|
|||||||
int
|
int
|
||||||
ds_write(ds_file_t *file, const void *buf, size_t len)
|
ds_write(ds_file_t *file, const void *buf, size_t len)
|
||||||
{
|
{
|
||||||
|
if (len == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return file->datasink->write(file, (const uchar *)buf, len);
|
return file->datasink->write(file, (const uchar *)buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,6 +51,36 @@ static void add_to_plugin_load_list(const char *plugin_def)
|
|||||||
|
|
||||||
static char XTRABACKUP_EXE[] = "xtrabackup";
|
static char XTRABACKUP_EXE[] = "xtrabackup";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Read "plugin-load" value (encryption plugin) from backup-my.cnf during
|
||||||
|
prepare phase.
|
||||||
|
The value is stored during backup phase.
|
||||||
|
*/
|
||||||
|
static std::string get_encryption_plugin_from_cnf()
|
||||||
|
{
|
||||||
|
FILE *f = fopen("backup-my.cnf", "r");
|
||||||
|
if (!f)
|
||||||
|
{
|
||||||
|
msg("cannot open backup-my.cnf for reading\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
char line[512];
|
||||||
|
std::string plugin_load;
|
||||||
|
while (fgets(line, sizeof(line), f))
|
||||||
|
{
|
||||||
|
if (strncmp(line, "plugin_load=", 12) == 0)
|
||||||
|
{
|
||||||
|
plugin_load = line + 12;
|
||||||
|
// remote \n at the end of string
|
||||||
|
plugin_load.resize(plugin_load.size() - 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
|
return plugin_load;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void encryption_plugin_backup_init(MYSQL *mysql)
|
void encryption_plugin_backup_init(MYSQL *mysql)
|
||||||
{
|
{
|
||||||
MYSQL_RES *result;
|
MYSQL_RES *result;
|
||||||
@@ -78,7 +108,17 @@ void encryption_plugin_backup_init(MYSQL *mysql)
|
|||||||
|
|
||||||
std::string plugin_load(name);
|
std::string plugin_load(name);
|
||||||
if (library)
|
if (library)
|
||||||
|
{
|
||||||
|
/* Remove shared library suffixes, in case we'll prepare on different OS.*/
|
||||||
|
const char *extensions[] = { ".dll", ".so", 0 };
|
||||||
|
for (size_t i = 0; extensions[i]; i++)
|
||||||
|
{
|
||||||
|
const char *ext = extensions[i];
|
||||||
|
if (ends_with(library, ext))
|
||||||
|
library[strlen(library) - strlen(ext)] = 0;
|
||||||
|
}
|
||||||
plugin_load += std::string("=") + library;
|
plugin_load += std::string("=") + library;
|
||||||
|
}
|
||||||
|
|
||||||
oss << "plugin_load=" << plugin_load << std::endl;
|
oss << "plugin_load=" << plugin_load << std::endl;
|
||||||
|
|
||||||
@@ -140,14 +180,18 @@ extern int finalize_encryption_plugin(st_plugin_int *plugin);
|
|||||||
|
|
||||||
void encryption_plugin_prepare_init(int argc, char **argv)
|
void encryption_plugin_prepare_init(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
std::string plugin_load= get_encryption_plugin_from_cnf();
|
||||||
if (!xb_plugin_load)
|
if (plugin_load.size())
|
||||||
|
{
|
||||||
|
msg("Loading encryption plugin from %s\n", plugin_load.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
finalize_encryption_plugin(0);
|
finalize_encryption_plugin(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_to_plugin_load_list(xb_plugin_load);
|
add_to_plugin_load_list(plugin_load.c_str());
|
||||||
|
|
||||||
if (xb_plugin_dir)
|
if (xb_plugin_dir)
|
||||||
strncpy(opt_plugin_dir, xb_plugin_dir, FN_REFLEN);
|
strncpy(opt_plugin_dir, xb_plugin_dir, FN_REFLEN);
|
||||||
|
@@ -130,14 +130,15 @@ Open a source file cursor and initialize the associated read filter.
|
|||||||
be skipped and XB_FIL_CUR_ERROR on error. */
|
be skipped and XB_FIL_CUR_ERROR on error. */
|
||||||
xb_fil_cur_result_t
|
xb_fil_cur_result_t
|
||||||
xb_fil_cur_open(
|
xb_fil_cur_open(
|
||||||
/*============*/
|
/*============*/
|
||||||
xb_fil_cur_t* cursor, /*!< out: source file cursor */
|
xb_fil_cur_t* cursor, /*!< out: source file cursor */
|
||||||
xb_read_filt_t* read_filter, /*!< in/out: the read filter */
|
xb_read_filt_t* read_filter, /*!< in/out: the read filter */
|
||||||
fil_node_t* node, /*!< in: source tablespace node */
|
fil_node_t* node, /*!< in: source tablespace node */
|
||||||
uint thread_n) /*!< thread number for diagnostics */
|
uint thread_n, /*!< thread number for diagnostics */
|
||||||
|
ulonglong max_file_size)
|
||||||
{
|
{
|
||||||
bool success;
|
bool success;
|
||||||
|
int err;
|
||||||
/* Initialize these first so xb_fil_cur_close() handles them correctly
|
/* Initialize these first so xb_fil_cur_close() handles them correctly
|
||||||
in case of error */
|
in case of error */
|
||||||
cursor->orig_buf = NULL;
|
cursor->orig_buf = NULL;
|
||||||
@@ -172,7 +173,7 @@ xb_fil_cur_open(
|
|||||||
"tablespace %s\n",
|
"tablespace %s\n",
|
||||||
thread_n, cursor->abs_path);
|
thread_n, cursor->abs_path);
|
||||||
|
|
||||||
return(XB_FIL_CUR_ERROR);
|
return(XB_FIL_CUR_SKIP);
|
||||||
}
|
}
|
||||||
mutex_enter(&fil_system.mutex);
|
mutex_enter(&fil_system.mutex);
|
||||||
|
|
||||||
@@ -193,14 +194,31 @@ xb_fil_cur_open(
|
|||||||
|
|
||||||
cursor->node = node;
|
cursor->node = node;
|
||||||
cursor->file = node->handle;
|
cursor->file = node->handle;
|
||||||
|
#ifdef _WIN32
|
||||||
if (stat(cursor->abs_path, &cursor->statinfo)) {
|
HANDLE hDup;
|
||||||
msg("[%02u] mariabackup: error: cannot stat %s\n",
|
DuplicateHandle(GetCurrentProcess(),cursor->file.m_file,
|
||||||
|
GetCurrentProcess(), &hDup, 0, FALSE, DUPLICATE_SAME_ACCESS);
|
||||||
|
int filenr = _open_osfhandle((intptr_t)hDup, 0);
|
||||||
|
if (filenr < 0) {
|
||||||
|
err = EINVAL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
err = _fstat64(filenr, &cursor->statinfo);
|
||||||
|
close(filenr);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
err = fstat(cursor->file.m_file, &cursor->statinfo);
|
||||||
|
#endif
|
||||||
|
if (max_file_size < (ulonglong)cursor->statinfo.st_size) {
|
||||||
|
cursor->statinfo.st_size = (ulonglong)max_file_size;
|
||||||
|
}
|
||||||
|
if (err) {
|
||||||
|
msg("[%02u] mariabackup: error: cannot fstat %s\n",
|
||||||
thread_n, cursor->abs_path);
|
thread_n, cursor->abs_path);
|
||||||
|
|
||||||
xb_fil_cur_close(cursor);
|
xb_fil_cur_close(cursor);
|
||||||
|
|
||||||
return(XB_FIL_CUR_ERROR);
|
return(XB_FIL_CUR_SKIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srv_file_flush_method == SRV_O_DIRECT
|
if (srv_file_flush_method == SRV_O_DIRECT
|
||||||
@@ -325,39 +343,39 @@ read_retry:
|
|||||||
page += page_size, i++) {
|
page += page_size, i++) {
|
||||||
ulint page_no = cursor->buf_page_no + i;
|
ulint page_no = cursor->buf_page_no + i;
|
||||||
|
|
||||||
if (cursor->space_id == TRX_SYS_SPACE &&
|
if (cursor->space_id == TRX_SYS_SPACE &&
|
||||||
page_no >= FSP_EXTENT_SIZE &&
|
page_no >= FSP_EXTENT_SIZE &&
|
||||||
page_no < FSP_EXTENT_SIZE * 3) {
|
page_no < FSP_EXTENT_SIZE * 3) {
|
||||||
/* We ignore the doublewrite buffer pages */
|
/* We ignore the doublewrite buffer pages */
|
||||||
} else if (!fil_space_verify_crypt_checksum(
|
} else if (!fil_space_verify_crypt_checksum(
|
||||||
page, cursor->page_size, space->id, page_no)
|
page, cursor->page_size, space->id, page_no)
|
||||||
&& buf_page_is_corrupted(true, page,
|
&& buf_page_is_corrupted(true, page,
|
||||||
cursor->page_size,
|
cursor->page_size,
|
||||||
space)) {
|
space)) {
|
||||||
retry_count--;
|
retry_count--;
|
||||||
if (retry_count == 0) {
|
if (retry_count == 0) {
|
||||||
msg("[%02u] mariabackup: "
|
msg("[%02u] mariabackup: "
|
||||||
"Error: failed to read page after "
|
"Error: failed to read page after "
|
||||||
"10 retries. File %s seems to be "
|
"10 retries. File %s seems to be "
|
||||||
"corrupted.\n", cursor->thread_n,
|
"corrupted.\n", cursor->thread_n,
|
||||||
cursor->abs_path);
|
cursor->abs_path);
|
||||||
ret = XB_FIL_CUR_ERROR;
|
ret = XB_FIL_CUR_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retry_count == 9) {
|
if (retry_count == 9) {
|
||||||
msg("[%02u] mariabackup: "
|
msg("[%02u] mariabackup: "
|
||||||
"Database page corruption detected at page "
|
"Database page corruption detected at page "
|
||||||
ULINTPF ", retrying...\n",
|
ULINTPF ", retrying...\n",
|
||||||
cursor->thread_n, page_no);
|
cursor->thread_n, page_no);
|
||||||
}
|
}
|
||||||
|
|
||||||
os_thread_sleep(100000);
|
os_thread_sleep(100000);
|
||||||
|
|
||||||
goto read_retry;
|
goto read_retry;
|
||||||
}
|
}
|
||||||
cursor->buf_read += page_size;
|
cursor->buf_read += page_size;
|
||||||
cursor->buf_npages++;
|
cursor->buf_npages++;
|
||||||
}
|
}
|
||||||
|
|
||||||
posix_fadvise(cursor->file, offset, to_read, POSIX_FADV_DONTNEED);
|
posix_fadvise(cursor->file, offset, to_read, POSIX_FADV_DONTNEED);
|
||||||
@@ -373,7 +391,9 @@ xb_fil_cur_close(
|
|||||||
/*=============*/
|
/*=============*/
|
||||||
xb_fil_cur_t *cursor) /*!< in/out: source file cursor */
|
xb_fil_cur_t *cursor) /*!< in/out: source file cursor */
|
||||||
{
|
{
|
||||||
cursor->read_filter->deinit(&cursor->read_filter_ctxt);
|
if (cursor->read_filter) {
|
||||||
|
cursor->read_filter->deinit(&cursor->read_filter_ctxt);
|
||||||
|
}
|
||||||
|
|
||||||
free(cursor->orig_buf);
|
free(cursor->orig_buf);
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ struct xb_fil_cur_t {
|
|||||||
ulint space_size; /*!< space size in pages */
|
ulint space_size; /*!< space size in pages */
|
||||||
|
|
||||||
/** TODO: remove this default constructor */
|
/** TODO: remove this default constructor */
|
||||||
xb_fil_cur_t() : page_size(0), read_filter_ctxt() {}
|
xb_fil_cur_t() : page_size(0), read_filter(0), read_filter_ctxt() {}
|
||||||
|
|
||||||
/** @return whether this is not a file-per-table tablespace */
|
/** @return whether this is not a file-per-table tablespace */
|
||||||
bool is_system() const
|
bool is_system() const
|
||||||
@@ -87,7 +87,8 @@ xb_fil_cur_open(
|
|||||||
xb_fil_cur_t* cursor, /*!< out: source file cursor */
|
xb_fil_cur_t* cursor, /*!< out: source file cursor */
|
||||||
xb_read_filt_t* read_filter, /*!< in/out: the read filter */
|
xb_read_filt_t* read_filter, /*!< in/out: the read filter */
|
||||||
fil_node_t* node, /*!< in: source tablespace node */
|
fil_node_t* node, /*!< in: source tablespace node */
|
||||||
uint thread_n); /*!< thread number for diagnostics */
|
uint thread_n, /*!< thread number for diagnostics */
|
||||||
|
ulonglong max_file_size = ULLONG_MAX);
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Reads and verifies the next block of pages from the source
|
Reads and verifies the next block of pages from the source
|
||||||
|
@@ -34,8 +34,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|||||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
*******************************************************/
|
*******************************************************/
|
||||||
|
|
||||||
|
@@ -75,8 +75,7 @@ xb_write_galera_info(bool incremental_prepare)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&xid, 0, sizeof(xid));
|
xid.null();
|
||||||
xid.formatID = -1;
|
|
||||||
|
|
||||||
if (!trx_rseg_read_wsrep_checkpoint(xid)) {
|
if (!trx_rseg_read_wsrep_checkpoint(xid)) {
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -41,24 +41,6 @@ const char *default_dbug_option="d:t:o,/tmp/my_print_defaults.trace";
|
|||||||
|
|
||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
NB: --config-file is troublesome, because get_defaults_options() doesn't
|
|
||||||
know about it, but we pretend --config-file is like --defaults-file. In
|
|
||||||
fact they behave differently: see the comments at the top of
|
|
||||||
mysys/default.c for how --defaults-file should behave.
|
|
||||||
|
|
||||||
This --config-file option behaves as:
|
|
||||||
- If it has a directory name part (absolute or relative), then only this
|
|
||||||
file is read; no error is given if the file doesn't exist
|
|
||||||
- If the file has no directory name part, the standard locations are
|
|
||||||
searched for a file of this name (and standard filename extensions are
|
|
||||||
added if the file has no extension)
|
|
||||||
*/
|
|
||||||
{"config-file", 'c', "Deprecated, please use --defaults-file instead. "
|
|
||||||
"Name of config file to read; if no extension is given, default "
|
|
||||||
"extension (e.g., .ini or .cnf) will be added",
|
|
||||||
(char**) &config_file, (char**) &config_file, 0, GET_STR, REQUIRED_ARG,
|
|
||||||
0, 0, 0, 0, 0, 0},
|
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@@ -66,8 +48,8 @@ static struct my_option my_long_options[] =
|
|||||||
{"debug", '#', "Output debug log", (char**) &default_dbug_option,
|
{"debug", '#', "Output debug log", (char**) &default_dbug_option,
|
||||||
(char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
(char**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"defaults-file", 'c', "Like --config-file, except: if first option, "
|
{"defaults-file", 'c',
|
||||||
"then read this file only, do not read global or per-user config "
|
"Read this file only, do not read global or per-user config "
|
||||||
"files; should be the first option",
|
"files; should be the first option",
|
||||||
(char**) &config_file, (char*) &config_file, 0, GET_STR, REQUIRED_ARG,
|
(char**) &config_file, (char*) &config_file, 0, GET_STR, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
@@ -80,11 +62,6 @@ static struct my_option my_long_options[] =
|
|||||||
"In addition to the given groups, read also groups with this suffix",
|
"In addition to the given groups, read also groups with this suffix",
|
||||||
(char**) &my_defaults_group_suffix, (char**) &my_defaults_group_suffix,
|
(char**) &my_defaults_group_suffix, (char**) &my_defaults_group_suffix,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"extra-file", 'e',
|
|
||||||
"Deprecated. Synonym for --defaults-extra-file.",
|
|
||||||
(void *)&my_defaults_extra_file,
|
|
||||||
(void *)&my_defaults_extra_file, 0, GET_STR,
|
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
{"mysqld", 0, "Read the same set of groups that the mysqld binary does.",
|
{"mysqld", 0, "Read the same set of groups that the mysqld binary does.",
|
||||||
&opt_mysqld, &opt_mysqld, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_mysqld, &opt_mysqld, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
{"no-defaults", 'n', "Return an empty string (useful for scripts).",
|
||||||
@@ -107,7 +84,7 @@ static void cleanup_and_exit(int exit_code)
|
|||||||
|
|
||||||
static void version()
|
static void version()
|
||||||
{
|
{
|
||||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
|
printf("%s Ver 1.7 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -105,11 +105,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
print_version();
|
print_version();
|
||||||
|
my_end(0);
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
case '?':
|
case '?':
|
||||||
usage();
|
usage();
|
||||||
|
my_end(0);
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -122,7 +124,10 @@ static int get_options(int *argc,char ***argv)
|
|||||||
int ho_error;
|
int ho_error;
|
||||||
|
|
||||||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||||
|
{
|
||||||
|
my_end(0);
|
||||||
exit(ho_error);
|
exit(ho_error);
|
||||||
|
}
|
||||||
|
|
||||||
if (!*argc && !print_all_codes)
|
if (!*argc && !print_all_codes)
|
||||||
{
|
{
|
||||||
@@ -260,7 +265,10 @@ int main(int argc,char *argv[])
|
|||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
if (get_options(&argc,&argv))
|
if (get_options(&argc,&argv))
|
||||||
|
{
|
||||||
|
my_end(0);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
my_handler_error_register();
|
my_handler_error_register();
|
||||||
|
|
||||||
|
@@ -79,6 +79,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
case 'I':
|
case 'I':
|
||||||
case '?':
|
case '?':
|
||||||
usage();
|
usage();
|
||||||
|
my_end(0);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -91,7 +92,10 @@ static int get_options(int *argc,char ***argv)
|
|||||||
int ho_error;
|
int ho_error;
|
||||||
|
|
||||||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||||
|
{
|
||||||
|
my_end(0);
|
||||||
exit(ho_error);
|
exit(ho_error);
|
||||||
|
}
|
||||||
|
|
||||||
if (*argc == 0)
|
if (*argc == 0)
|
||||||
{
|
{
|
||||||
@@ -113,10 +117,14 @@ int main(int argc, char **argv)
|
|||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
if (get_options(&argc,&argv))
|
if (get_options(&argc,&argv))
|
||||||
|
{
|
||||||
|
my_end(0);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
while (argc--)
|
while (argc--)
|
||||||
{
|
{
|
||||||
|
my_bool do_more;
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
#endif
|
#endif
|
||||||
@@ -125,13 +133,13 @@ int main(int argc, char **argv)
|
|||||||
/* Not compatible with IPv6! Probably should use getnameinfo(). */
|
/* Not compatible with IPv6! Probably should use getnameinfo(). */
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
taddr = inet_addr(ip);
|
taddr = inet_addr(ip);
|
||||||
if(taddr != INADDR_NONE)
|
do_more= (taddr != INADDR_NONE);
|
||||||
{
|
|
||||||
#else
|
#else
|
||||||
if (inet_aton(ip, &addr) != 0)
|
if ((do_more= (inet_aton(ip, &addr) != 0)))
|
||||||
{
|
|
||||||
taddr= addr.s_addr;
|
taddr= addr.s_addr;
|
||||||
#endif
|
#endif
|
||||||
|
if (do_more)
|
||||||
|
{
|
||||||
if (taddr == htonl(INADDR_BROADCAST))
|
if (taddr == htonl(INADDR_BROADCAST))
|
||||||
{
|
{
|
||||||
puts("Broadcast");
|
puts("Broadcast");
|
||||||
@@ -205,5 +213,6 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
my_end(0);
|
||||||
exit(error);
|
exit(error);
|
||||||
}
|
}
|
||||||
|
@@ -20,9 +20,6 @@ INCLUDE_DIRECTORIES(
|
|||||||
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||||
#Remove -fno-implicit-templates
|
|
||||||
#(yassl sources cannot be compiled with it)
|
|
||||||
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
|
||||||
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
|
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
|
||||||
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
|
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
|
||||||
src/yassl_imp.cpp src/yassl_int.cpp)
|
src/yassl_imp.cpp src/yassl_int.cpp)
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Data in big-endian format.
|
Data in big-endian format.
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Endianness-independent definitions for architectures other
|
Endianness-independent definitions for architectures other
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Optimized function-like macros for the x86 architecture (_WIN32 included).
|
Optimized function-like macros for the x86 architecture (_WIN32 included).
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Optimized function-like macros for the x86 architecture (_WIN32 included).
|
Optimized function-like macros for the x86 architecture (_WIN32 included).
|
||||||
|
@@ -319,6 +319,12 @@ int json_skip_to_level(json_engine_t *j, int level);
|
|||||||
json_skip_to_level((json_engine), (json_engine)->stack_p)
|
json_skip_to_level((json_engine), (json_engine)->stack_p)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
works as json_skip_level() but also counts items on the current
|
||||||
|
level skipped.
|
||||||
|
*/
|
||||||
|
int json_skip_level_and_count(json_engine_t *j, int *n_items_skipped);
|
||||||
|
|
||||||
#define json_skip_array_item json_skip_key
|
#define json_skip_array_item json_skip_key
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Data in little-endian format.
|
Data in little-endian format.
|
||||||
|
@@ -362,7 +362,6 @@ extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
|
|||||||
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
||||||
extern MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler;
|
extern MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler;
|
||||||
extern MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler;
|
extern MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler;
|
||||||
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
|
|
||||||
|
|
||||||
/* Some typedef to make it easy for C++ to make function pointers */
|
/* Some typedef to make it easy for C++ to make function pointers */
|
||||||
typedef int (*my_charset_conv_mb_wc)(CHARSET_INFO *, my_wc_t *,
|
typedef int (*my_charset_conv_mb_wc)(CHARSET_INFO *, my_wc_t *,
|
||||||
@@ -370,7 +369,7 @@ typedef int (*my_charset_conv_mb_wc)(CHARSET_INFO *, my_wc_t *,
|
|||||||
typedef int (*my_charset_conv_wc_mb)(CHARSET_INFO *, my_wc_t,
|
typedef int (*my_charset_conv_wc_mb)(CHARSET_INFO *, my_wc_t,
|
||||||
uchar *, uchar *);
|
uchar *, uchar *);
|
||||||
typedef size_t (*my_charset_conv_case)(CHARSET_INFO *,
|
typedef size_t (*my_charset_conv_case)(CHARSET_INFO *,
|
||||||
char *, size_t, char *, size_t);
|
const char *, size_t, char *, size_t);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
A structure to return the statistics of a native string copying,
|
A structure to return the statistics of a native string copying,
|
||||||
@@ -725,9 +724,11 @@ size_t my_copy_fix_mb(CHARSET_INFO *cs,
|
|||||||
/* Functions for 8bit */
|
/* Functions for 8bit */
|
||||||
extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *);
|
extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *);
|
||||||
extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *);
|
extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *);
|
||||||
extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
extern size_t my_caseup_8bit(CHARSET_INFO *,
|
||||||
|
const char *src, size_t srclen,
|
||||||
char *dst, size_t dstlen);
|
char *dst, size_t dstlen);
|
||||||
extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
extern size_t my_casedn_8bit(CHARSET_INFO *,
|
||||||
|
const char *src, size_t srclen,
|
||||||
char *dst, size_t dstlen);
|
char *dst, size_t dstlen);
|
||||||
|
|
||||||
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
|
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
|
||||||
@@ -821,17 +822,17 @@ int my_charlen_8bit(CHARSET_INFO *, const uchar *str, const uchar *end);
|
|||||||
/* Functions for multibyte charsets */
|
/* Functions for multibyte charsets */
|
||||||
extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
|
extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
|
||||||
extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
|
extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
|
||||||
extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
|
extern size_t my_caseup_mb(CHARSET_INFO *,
|
||||||
char *dst, size_t dstlen);
|
const char *src, size_t srclen,
|
||||||
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
|
char *dst, size_t dstlen);
|
||||||
char *dst, size_t dstlen);
|
extern size_t my_casedn_mb(CHARSET_INFO *,
|
||||||
extern size_t my_caseup_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
|
const char *src, size_t srclen,
|
||||||
char *dst, size_t dstlen);
|
char *dst, size_t dstlen);
|
||||||
extern size_t my_casedn_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
|
extern size_t my_caseup_ujis(CHARSET_INFO *,
|
||||||
char *dst, size_t dstlen);
|
const char *src, size_t srclen,
|
||||||
extern size_t my_caseup_ujis(CHARSET_INFO *, char *src, size_t srclen,
|
|
||||||
char *dst, size_t dstlen);
|
char *dst, size_t dstlen);
|
||||||
extern size_t my_casedn_ujis(CHARSET_INFO *, char *src, size_t srclen,
|
extern size_t my_casedn_ujis(CHARSET_INFO *,
|
||||||
|
const char *src, size_t srclen,
|
||||||
char *dst, size_t dstlen);
|
char *dst, size_t dstlen);
|
||||||
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
|
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
|
||||||
|
|
||||||
@@ -870,14 +871,6 @@ size_t my_strnxfrm_mb_nopad(CHARSET_INFO *,
|
|||||||
uchar *dst, size_t dstlen, uint nweights,
|
uchar *dst, size_t dstlen, uint nweights,
|
||||||
const uchar *src, size_t srclen, uint flags);
|
const uchar *src, size_t srclen, uint flags);
|
||||||
|
|
||||||
size_t my_strnxfrm_unicode(CHARSET_INFO *,
|
|
||||||
uchar *dst, size_t dstlen, uint nweights,
|
|
||||||
const uchar *src, size_t srclen, uint flags);
|
|
||||||
|
|
||||||
size_t my_strnxfrm_unicode_nopad(CHARSET_INFO *,
|
|
||||||
uchar *dst, size_t dstlen, uint nweights,
|
|
||||||
const uchar *src, size_t srclen, uint flags);
|
|
||||||
|
|
||||||
size_t my_strnxfrmlen_unicode(CHARSET_INFO *, size_t);
|
size_t my_strnxfrmlen_unicode(CHARSET_INFO *, size_t);
|
||||||
|
|
||||||
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *,
|
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *,
|
||||||
|
@@ -99,7 +99,7 @@ extern char *strmake(char *dst,const char *src,size_t length);
|
|||||||
#define strmake_buf(D,S) strmake(D, S, sizeof(D) - 1)
|
#define strmake_buf(D,S) strmake(D, S, sizeof(D) - 1)
|
||||||
#else
|
#else
|
||||||
#define strmake_buf(D,S) ({ \
|
#define strmake_buf(D,S) ({ \
|
||||||
typeof (D) __x __attribute__((unused)) = { 2 }; \
|
__typeof__ (D) __x __attribute__((unused)) = { 2 }; \
|
||||||
strmake(D, S, sizeof(D) - 1); \
|
strmake(D, S, sizeof(D) - 1); \
|
||||||
})
|
})
|
||||||
#endif
|
#endif
|
||||||
|
@@ -106,11 +106,11 @@ static inline uint32 my_clear_highest_bit(uint32 v)
|
|||||||
|
|
||||||
static inline uint32 my_reverse_bits(uint32 key)
|
static inline uint32 my_reverse_bits(uint32 key)
|
||||||
{
|
{
|
||||||
return (uint32)
|
return
|
||||||
(_my_bits_reverse_table[ key & 255] << 24) |
|
((uint32)_my_bits_reverse_table[ key & 255] << 24) |
|
||||||
(_my_bits_reverse_table[(key>> 8) & 255] << 16) |
|
((uint32)_my_bits_reverse_table[(key>> 8) & 255] << 16) |
|
||||||
(_my_bits_reverse_table[(key>>16) & 255] << 8) |
|
((uint32)_my_bits_reverse_table[(key>>16) & 255] << 8) |
|
||||||
_my_bits_reverse_table[(key>>24) ];
|
(uint32)_my_bits_reverse_table[(key>>24) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* instructions for specific cpu's */
|
/* instructions for specific cpu's */
|
||||||
|
@@ -133,11 +133,6 @@
|
|||||||
#define F_UNLCK 3
|
#define F_UNLCK 3
|
||||||
#define F_TO_EOF 0x3FFFFFFF
|
#define F_TO_EOF 0x3FFFFFFF
|
||||||
|
|
||||||
/* Shared memory and named pipe connections are supported. */
|
|
||||||
#define HAVE_SMEM 1
|
|
||||||
#define HAVE_NAMED_PIPE 1
|
|
||||||
#define shared_memory_buffer_length 16000
|
|
||||||
#define default_shared_memory_base_name "MYSQL"
|
|
||||||
#endif /* _WIN32*/
|
#endif /* _WIN32*/
|
||||||
|
|
||||||
|
|
||||||
@@ -246,7 +241,9 @@
|
|||||||
AIX includes inttypes.h from sys/types.h
|
AIX includes inttypes.h from sys/types.h
|
||||||
Explicitly request format macros before the first inclusion of inttypes.h
|
Explicitly request format macros before the first inclusion of inttypes.h
|
||||||
*/
|
*/
|
||||||
#define __STDC_FORMAT_MACROS
|
#if !defined(__STDC_FORMAT_MACROS)
|
||||||
|
#define __STDC_FORMAT_MACROS
|
||||||
|
#endif // !defined(__STDC_FORMAT_MACROS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -984,7 +981,6 @@ typedef unsigned long my_off_t;
|
|||||||
TODO Convert these to use Bitmap class.
|
TODO Convert these to use Bitmap class.
|
||||||
*/
|
*/
|
||||||
typedef ulonglong table_map; /* Used for table bits in join */
|
typedef ulonglong table_map; /* Used for table bits in join */
|
||||||
typedef ulong nesting_map; /* Used for flags of nesting constructs */
|
|
||||||
|
|
||||||
/* often used type names - opaque declarations */
|
/* often used type names - opaque declarations */
|
||||||
typedef const struct charset_info_st CHARSET_INFO;
|
typedef const struct charset_info_st CHARSET_INFO;
|
||||||
@@ -1052,7 +1048,9 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */
|
|||||||
|
|
||||||
#include <my_byteorder.h>
|
#include <my_byteorder.h>
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET_utf8
|
#ifdef HAVE_CHARSET_utf8mb4
|
||||||
|
#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8mb4"
|
||||||
|
#elif defined(HAVE_CHARSET_utf8)
|
||||||
#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
|
#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
|
||||||
#else
|
#else
|
||||||
#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME
|
#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME
|
||||||
@@ -1186,8 +1184,6 @@ typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
|
|||||||
/* Things we don't need in the embedded version of MySQL */
|
/* Things we don't need in the embedded version of MySQL */
|
||||||
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
||||||
|
|
||||||
#undef HAVE_SMEM /* No shared memory */
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define HAVE_REPLICATION
|
#define HAVE_REPLICATION
|
||||||
#define HAVE_EXTERNAL_CLIENT
|
#define HAVE_EXTERNAL_CLIENT
|
||||||
|
@@ -161,7 +161,7 @@ int pthread_cancel(pthread_t thread);
|
|||||||
#define pthread_key(T,V) pthread_key_t V
|
#define pthread_key(T,V) pthread_key_t V
|
||||||
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
|
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
|
||||||
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
|
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
|
||||||
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
|
#define pthread_detach_this_thread()
|
||||||
#define pthread_handler_t EXTERNC void *
|
#define pthread_handler_t EXTERNC void *
|
||||||
typedef void *(* pthread_handler)(void *);
|
typedef void *(* pthread_handler)(void *);
|
||||||
|
|
||||||
|
@@ -24,7 +24,9 @@
|
|||||||
sd-daemon.h may include inttypes.h. Explicitly request format macros before
|
sd-daemon.h may include inttypes.h. Explicitly request format macros before
|
||||||
the first inclusion of inttypes.h.
|
the first inclusion of inttypes.h.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(__STDC_FORMAT_MACROS)
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
|
#endif // !defined(__STDC_FORMAT_MACROS)
|
||||||
#include <systemd/sd-daemon.h>
|
#include <systemd/sd-daemon.h>
|
||||||
/** INTERVAL in seconds followed by printf style status */
|
/** INTERVAL in seconds followed by printf style status */
|
||||||
#define service_manager_extend_timeout(INTERVAL, FMTSTR, ...) \
|
#define service_manager_extend_timeout(INTERVAL, FMTSTR, ...) \
|
||||||
|
@@ -903,6 +903,7 @@ static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
|
|||||||
}
|
}
|
||||||
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
||||||
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
||||||
|
extern LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str);
|
||||||
extern my_bool my_compress(uchar *, size_t *, size_t *);
|
extern my_bool my_compress(uchar *, size_t *, size_t *);
|
||||||
extern my_bool my_uncompress(uchar *, size_t , size_t *);
|
extern my_bool my_uncompress(uchar *, size_t , size_t *);
|
||||||
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
|
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
|
||||||
|
@@ -61,18 +61,23 @@ extern uchar days_in_month[];
|
|||||||
TIME_FUZZY_DATES is used for the result will only be used for comparison
|
TIME_FUZZY_DATES is used for the result will only be used for comparison
|
||||||
purposes. Conversion is as relaxed as possible.
|
purposes. Conversion is as relaxed as possible.
|
||||||
*/
|
*/
|
||||||
#define TIME_FUZZY_DATES 1U
|
#define C_TIME_FUZZY_DATES 1U
|
||||||
#define TIME_DATETIME_ONLY 2U
|
#define C_TIME_DATETIME_ONLY 2U
|
||||||
#define TIME_TIME_ONLY 4U
|
#define C_TIME_TIME_ONLY 4U
|
||||||
#define TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */
|
#define C_TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */
|
||||||
#define TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */
|
#define C_TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */
|
||||||
#define TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */
|
#define C_TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */
|
||||||
|
|
||||||
#define MYSQL_TIME_WARN_TRUNCATED 1U
|
#define MYSQL_TIME_WARN_TRUNCATED 1U
|
||||||
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2U
|
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2U
|
||||||
|
#define MYSQL_TIME_WARN_EDOM 4U
|
||||||
|
#define MYSQL_TIME_WARN_ZERO_DATE 8U
|
||||||
#define MYSQL_TIME_NOTE_TRUNCATED 16U
|
#define MYSQL_TIME_NOTE_TRUNCATED 16U
|
||||||
|
|
||||||
#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE)
|
#define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|\
|
||||||
|
MYSQL_TIME_WARN_OUT_OF_RANGE|\
|
||||||
|
MYSQL_TIME_WARN_EDOM|\
|
||||||
|
MYSQL_TIME_WARN_ZERO_DATE)
|
||||||
#define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED)
|
#define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED)
|
||||||
|
|
||||||
#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS)
|
#define MYSQL_TIME_WARN_HAVE_WARNINGS(x) MY_TEST((x) & MYSQL_TIME_WARN_WARNINGS)
|
||||||
@@ -110,6 +115,8 @@ static inline void my_time_status_init(MYSQL_TIME_STATUS *status)
|
|||||||
|
|
||||||
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
|
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
|
||||||
ulonglong flags, int *was_cut);
|
ulonglong flags, int *was_cut);
|
||||||
|
my_bool str_to_DDhhmmssff(const char *str, size_t length, MYSQL_TIME *l_time,
|
||||||
|
ulong max_hour, MYSQL_TIME_STATUS *status);
|
||||||
my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
|
my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time,
|
||||||
ulonglong flag, MYSQL_TIME_STATUS *status);
|
ulonglong flag, MYSQL_TIME_STATUS *status);
|
||||||
my_bool str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
|
my_bool str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
|
||||||
@@ -117,16 +124,6 @@ my_bool str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time,
|
|||||||
longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
|
longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
|
||||||
ulonglong flags, int *was_cut);
|
ulonglong flags, int *was_cut);
|
||||||
|
|
||||||
static inline
|
|
||||||
longlong double_to_datetime(double nr, MYSQL_TIME *ltime, ulonglong flags, int *cut)
|
|
||||||
{
|
|
||||||
if (nr < 0 || nr > LONGLONG_MAX)
|
|
||||||
nr= (double)LONGLONG_MAX;
|
|
||||||
return number_to_datetime((longlong) floor(nr),
|
|
||||||
(ulong)((nr-floor(nr))*TIME_SECOND_PART_FACTOR),
|
|
||||||
ltime, flags, cut);
|
|
||||||
}
|
|
||||||
|
|
||||||
int number_to_time(my_bool neg, ulonglong nr, ulong sec_part,
|
int number_to_time(my_bool neg, ulonglong nr, ulong sec_part,
|
||||||
MYSQL_TIME *ltime, int *was_cut);
|
MYSQL_TIME *ltime, int *was_cut);
|
||||||
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
|
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
|
||||||
|
@@ -100,12 +100,13 @@ typedef struct st_handler_check_param
|
|||||||
time_t backup_time; /* To sign backup files */
|
time_t backup_time; /* To sign backup files */
|
||||||
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
||||||
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
|
||||||
uint out_flag, warning_printed, error_printed, note_printed, verbose;
|
uint out_flag, error_printed, verbose;
|
||||||
uint opt_sort_key, total_files, max_level;
|
uint opt_sort_key, total_files, max_level;
|
||||||
uint key_cache_block_size, pagecache_block_size;
|
uint key_cache_block_size, pagecache_block_size;
|
||||||
int tmpfile_createflag, err_count;
|
int tmpfile_createflag, err_count;
|
||||||
myf myf_rw;
|
myf myf_rw;
|
||||||
uint16 language;
|
uint16 language;
|
||||||
|
my_bool warning_printed, note_printed, wrong_trd_printed;
|
||||||
my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
|
my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
|
||||||
my_bool retry_repair, force_sort, calc_checksum, static_row_size;
|
my_bool retry_repair, force_sort, calc_checksum, static_row_size;
|
||||||
char temp_filename[FN_REFLEN];
|
char temp_filename[FN_REFLEN];
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <mysql/plugin.h>
|
#include <mysql/plugin.h>
|
||||||
|
|
||||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0201
|
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0202
|
||||||
|
|
||||||
#include <mysql/plugin_auth_common.h>
|
#include <mysql/plugin_auth_common.h>
|
||||||
|
|
||||||
@@ -60,7 +60,8 @@ typedef struct st_mysql_server_auth_info
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
A corresponding column value from the mysql.user table for the
|
A corresponding column value from the mysql.user table for the
|
||||||
matching account name
|
matching account name or the preprocessed value, if preprocess_hash
|
||||||
|
method is not NULL
|
||||||
*/
|
*/
|
||||||
const char *auth_string;
|
const char *auth_string;
|
||||||
|
|
||||||
@@ -130,6 +131,47 @@ struct st_mysql_auth
|
|||||||
used for authorization.
|
used for authorization.
|
||||||
*/
|
*/
|
||||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
|
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
|
||||||
|
/**
|
||||||
|
Create a password hash (or digest) out of a plain-text password
|
||||||
|
|
||||||
|
Used in SET PASSWORD, GRANT, and CREATE USER to convert user specified
|
||||||
|
plain-text password into a value that will be stored in mysql.user table.
|
||||||
|
|
||||||
|
@see preprocess_hash
|
||||||
|
|
||||||
|
@param password plain-text password
|
||||||
|
@param password_length plain-text password length
|
||||||
|
@param hash the digest will be stored there
|
||||||
|
@param hash_length in: hash buffer size
|
||||||
|
out: the actual length of the hash
|
||||||
|
|
||||||
|
@return 0 for ok, 1 for error
|
||||||
|
|
||||||
|
Can be NULL.
|
||||||
|
*/
|
||||||
|
int (*hash_password)(const char *password, size_t password_length,
|
||||||
|
char *hash, size_t *hash_length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Prepare the password hash for authentication.
|
||||||
|
|
||||||
|
Password hash is stored in the authentication_string column of the
|
||||||
|
mysql.user table in a text form. If a plugin needs to preprocess the
|
||||||
|
value somehow before the authentication (e.g. convert from hex or base64
|
||||||
|
to binary), it can do it in this method. This way the conversion
|
||||||
|
will happen only once, not for every authentication attempt.
|
||||||
|
|
||||||
|
The value written to the out buffer will be cached and later made
|
||||||
|
available to the authenticate_user() method in the
|
||||||
|
MYSQL_SERVER_AUTH_INFO::auth_string[] buffer.
|
||||||
|
|
||||||
|
@return 0 for ok, 1 for error
|
||||||
|
|
||||||
|
Can be NULL, in this case the mysql.user.authentication_string value will
|
||||||
|
be given to the authenticate_user() method as is, unconverted.
|
||||||
|
*/
|
||||||
|
int (*preprocess_hash)(const char *hash, size_t hash_length,
|
||||||
|
unsigned char *out, size_t *out_length);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -561,4 +561,8 @@ struct st_mysql_auth
|
|||||||
int interface_version;
|
int interface_version;
|
||||||
const char *client_auth_plugin;
|
const char *client_auth_plugin;
|
||||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
|
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
|
||||||
|
int (*hash_password)(const char *password, size_t password_length,
|
||||||
|
char *hash, size_t *hash_length);
|
||||||
|
int (*preprocess_hash)(const char *hash, size_t hash_length,
|
||||||
|
unsigned char *out, size_t *out_length);
|
||||||
};
|
};
|
||||||
|
@@ -42,8 +42,8 @@ struct st_mariadb_password_validation
|
|||||||
Function provided by the plugin which should perform password validation
|
Function provided by the plugin which should perform password validation
|
||||||
and return 0 if the password has passed the validation.
|
and return 0 if the password has passed the validation.
|
||||||
*/
|
*/
|
||||||
int (*validate_password)(MYSQL_CONST_LEX_STRING *username,
|
int (*validate_password)(const MYSQL_CONST_LEX_STRING *username,
|
||||||
MYSQL_CONST_LEX_STRING *password);
|
const MYSQL_CONST_LEX_STRING *password);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -531,6 +531,6 @@ void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
|
|||||||
struct st_mariadb_password_validation
|
struct st_mariadb_password_validation
|
||||||
{
|
{
|
||||||
int interface_version;
|
int interface_version;
|
||||||
int (*validate_password)(MYSQL_CONST_LEX_STRING *username,
|
int (*validate_password)(const MYSQL_CONST_LEX_STRING *username,
|
||||||
MYSQL_CONST_LEX_STRING *password);
|
const MYSQL_CONST_LEX_STRING *password);
|
||||||
};
|
};
|
||||||
|
@@ -735,7 +735,7 @@ inline_mysql_socket_send
|
|||||||
MYSQL_SOCKET mysql_socket, const SOCKBUF_T *buf, size_t n, int flags)
|
MYSQL_SOCKET mysql_socket, const SOCKBUF_T *buf, size_t n, int flags)
|
||||||
{
|
{
|
||||||
ssize_t result;
|
ssize_t result;
|
||||||
|
DBUG_ASSERT(mysql_socket.fd != INVALID_SOCKET);
|
||||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||||
{
|
{
|
||||||
@@ -776,7 +776,7 @@ inline_mysql_socket_recv
|
|||||||
MYSQL_SOCKET mysql_socket, SOCKBUF_T *buf, size_t n, int flags)
|
MYSQL_SOCKET mysql_socket, SOCKBUF_T *buf, size_t n, int flags)
|
||||||
{
|
{
|
||||||
ssize_t result;
|
ssize_t result;
|
||||||
|
DBUG_ASSERT(mysql_socket.fd != INVALID_SOCKET);
|
||||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||||
{
|
{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2013, Monty Program Ab.
|
/* Copyright (c) 2013, 2018, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
time-consuming loops, and gracefully abort the operation if it is
|
time-consuming loops, and gracefully abort the operation if it is
|
||||||
non-zero.
|
non-zero.
|
||||||
|
|
||||||
thd_is_killed(thd)
|
thd_killed(thd)
|
||||||
@return 0 - no KILL statement was issued, continue normally
|
@return 0 - no KILL statement was issued, continue normally
|
||||||
@return 1 - there was a KILL statement, abort the execution.
|
@return 1 - there was a KILL statement, abort the execution.
|
||||||
|
|
||||||
|
@@ -112,6 +112,7 @@ extern struct wsrep_service_st {
|
|||||||
int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
|
int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
|
||||||
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
|
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
|
||||||
void (*wsrep_unlock_rollback_func)();
|
void (*wsrep_unlock_rollback_func)();
|
||||||
|
void (*wsrep_set_data_home_dir_func)(const char *data_dir);
|
||||||
} *wsrep_service;
|
} *wsrep_service;
|
||||||
|
|
||||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||||
@@ -155,6 +156,7 @@ extern struct wsrep_service_st {
|
|||||||
#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
|
#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
|
||||||
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
|
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
|
||||||
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
|
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
|
||||||
|
#define wsrep_set_data_home_dir(A) wsrep_service->wsrep_set_data_home_dir_func(A)
|
||||||
|
|
||||||
#define wsrep_debug get_wsrep_debug()
|
#define wsrep_debug get_wsrep_debug()
|
||||||
#define wsrep_log_conflicts get_wsrep_log_conflicts()
|
#define wsrep_log_conflicts get_wsrep_log_conflicts()
|
||||||
@@ -214,6 +216,7 @@ void wsrep_thd_awake(THD *thd, my_bool signal);
|
|||||||
void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state);
|
void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state);
|
||||||
bool wsrep_thd_ignore_table(THD *thd);
|
bool wsrep_thd_ignore_table(THD *thd);
|
||||||
void wsrep_unlock_rollback();
|
void wsrep_unlock_rollback();
|
||||||
|
void wsrep_set_data_home_dir(const char *data_dir);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
||||||
|
|
||||||
#undef HAVE_DLOPEN /* No udf functions */
|
#undef HAVE_DLOPEN /* No udf functions */
|
||||||
#undef HAVE_SMEM /* No shared memory */
|
|
||||||
|
|
||||||
#endif /* EMBEDDED_LIBRARY */
|
#endif /* EMBEDDED_LIBRARY */
|
||||||
#endif /* MYSQL_EMBED_INCLUDED */
|
#endif /* MYSQL_EMBED_INCLUDED */
|
||||||
|
@@ -41,4 +41,4 @@
|
|||||||
#define VERSION_thd_specifics 0x0100
|
#define VERSION_thd_specifics 0x0100
|
||||||
#define VERSION_thd_timezone 0x0100
|
#define VERSION_thd_timezone 0x0100
|
||||||
#define VERSION_thd_wait 0x0100
|
#define VERSION_thd_wait 0x0100
|
||||||
#define VERSION_wsrep 0x0201
|
#define VERSION_wsrep 0x0202
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#ifndef SQL_COMMON_INCLUDED
|
#ifndef SQL_COMMON_INCLUDED
|
||||||
#define SQL_COMMON_INCLUDED
|
#define SQL_COMMON_INCLUDED
|
||||||
/* Copyright (c) 2003, 2012, Oracle and/or its affiliates.
|
/* Copyright (c) 2003, 2018, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2010, 2012, Monty Program Ab
|
Copyright (c) 2010, 2018, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -30,9 +30,9 @@
|
|||||||
#define EVP_CIPHER_CTX_SIZE 176
|
#define EVP_CIPHER_CTX_SIZE 176
|
||||||
#define EVP_MD_CTX_SIZE 48
|
#define EVP_MD_CTX_SIZE 48
|
||||||
#undef EVP_MD_CTX_init
|
#undef EVP_MD_CTX_init
|
||||||
#define EVP_MD_CTX_init(X) do { bzero((X), EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
|
#define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
|
||||||
#undef EVP_CIPHER_CTX_init
|
#undef EVP_CIPHER_CTX_init
|
||||||
#define EVP_CIPHER_CTX_init(X) do { bzero((X), EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
|
#define EVP_CIPHER_CTX_init(X) do { memset((X), 0, EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Macros below are deprecated. OpenSSL 1.1 may define them or not,
|
Macros below are deprecated. OpenSSL 1.1 may define them or not,
|
||||||
|
@@ -38,7 +38,7 @@ typedef struct st_vio Vio;
|
|||||||
enum enum_vio_type
|
enum enum_vio_type
|
||||||
{
|
{
|
||||||
VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE,
|
VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE,
|
||||||
VIO_TYPE_SSL, VIO_TYPE_SHARED_MEMORY
|
VIO_TYPE_SSL
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,13 +68,6 @@ Vio* vio_new(my_socket sd, enum enum_vio_type type, uint flags);
|
|||||||
Vio* mysql_socket_vio_new(MYSQL_SOCKET mysql_socket, enum enum_vio_type type, uint flags);
|
Vio* mysql_socket_vio_new(MYSQL_SOCKET mysql_socket, enum enum_vio_type type, uint flags);
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
Vio* vio_new_win32pipe(HANDLE hPipe);
|
Vio* vio_new_win32pipe(HANDLE hPipe);
|
||||||
Vio* vio_new_win32shared_memory(HANDLE handle_file_map,
|
|
||||||
HANDLE handle_map,
|
|
||||||
HANDLE event_server_wrote,
|
|
||||||
HANDLE event_server_read,
|
|
||||||
HANDLE event_client_wrote,
|
|
||||||
HANDLE event_client_read,
|
|
||||||
HANDLE event_conn_closed);
|
|
||||||
#else
|
#else
|
||||||
#define HANDLE void *
|
#define HANDLE void *
|
||||||
#endif /* __WIN__ */
|
#endif /* __WIN__ */
|
||||||
@@ -265,22 +258,9 @@ struct st_vio
|
|||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
void *ssl_arg;
|
void *ssl_arg;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
HANDLE handle_file_map;
|
|
||||||
char *handle_map;
|
|
||||||
HANDLE event_server_wrote;
|
|
||||||
HANDLE event_server_read;
|
|
||||||
HANDLE event_client_wrote;
|
|
||||||
HANDLE event_client_read;
|
|
||||||
HANDLE event_conn_closed;
|
|
||||||
size_t shared_memory_remain;
|
|
||||||
char *shared_memory_pos;
|
|
||||||
#endif /* HAVE_SMEM */
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE hPipe;
|
HANDLE hPipe;
|
||||||
OVERLAPPED overlapped;
|
OVERLAPPED overlapped;
|
||||||
DWORD read_timeout_ms;
|
|
||||||
DWORD write_timeout_ms;
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif /* vio_violite_h_ */
|
#endif /* vio_violite_h_ */
|
||||||
|
@@ -25,7 +25,12 @@
|
|||||||
#define WSREP_MYSQL_DB (char *)"mysql"
|
#define WSREP_MYSQL_DB (char *)"mysql"
|
||||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
|
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
|
||||||
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
|
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
|
||||||
goto error;
|
goto wsrep_error_label;
|
||||||
|
|
||||||
|
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) \
|
||||||
|
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, \
|
||||||
|
table_list_, alter_info_)) \
|
||||||
|
goto wsrep_error_label;
|
||||||
|
|
||||||
#define WSREP_TO_ISOLATION_END \
|
#define WSREP_TO_ISOLATION_END \
|
||||||
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
|
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
|
||||||
@@ -37,7 +42,7 @@
|
|||||||
*/
|
*/
|
||||||
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
|
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
|
||||||
if (WSREP(thd) && !thd->lex->no_write_to_binlog \
|
if (WSREP(thd) && !thd->lex->no_write_to_binlog \
|
||||||
&& wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error;
|
&& wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto wsrep_error_label;
|
||||||
|
|
||||||
#define WSREP_DEBUG(...) \
|
#define WSREP_DEBUG(...) \
|
||||||
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
||||||
@@ -45,9 +50,9 @@
|
|||||||
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
|
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
|
||||||
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
|
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
|
||||||
|
|
||||||
#define WSREP_SYNC_WAIT(thd_, before_) \
|
#define WSREP_SYNC_WAIT(thd_, before_) \
|
||||||
{ if (WSREP_CLIENT(thd_) && \
|
{ if (WSREP_CLIENT(thd_) && \
|
||||||
wsrep_sync_wait(thd_, before_)) goto error; }
|
wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define IF_WSREP(A,B) B
|
#define IF_WSREP(A,B) B
|
||||||
@@ -56,7 +61,8 @@
|
|||||||
#define WSREP_INFO(...)
|
#define WSREP_INFO(...)
|
||||||
#define WSREP_WARN(...)
|
#define WSREP_WARN(...)
|
||||||
#define WSREP_ERROR(...)
|
#define WSREP_ERROR(...)
|
||||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
|
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0)
|
||||||
|
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_)
|
||||||
#define WSREP_TO_ISOLATION_END
|
#define WSREP_TO_ISOLATION_END
|
||||||
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
|
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
|
||||||
#define WSREP_SYNC_WAIT(thd_, before_)
|
#define WSREP_SYNC_WAIT(thd_, before_)
|
||||||
|
Submodule libmariadb updated: ebf5db6cd0...17d0e53176
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (c) 2006, 2011, Oracle and/or its affiliates.
|
# Copyright (c) 2006, 2011, Oracle and/or its affiliates.
|
||||||
|
# Copyright (c) 2009, 2018, MariaDB Corporation
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -155,8 +156,7 @@ SET(LIBS
|
|||||||
# (with corresponding target ${engine}_embedded)
|
# (with corresponding target ${engine}_embedded)
|
||||||
SET(EMBEDDED_LIBS)
|
SET(EMBEDDED_LIBS)
|
||||||
FOREACH(LIB ${LIBS})
|
FOREACH(LIB ${LIBS})
|
||||||
GET_TARGET_PROPERTY(EMBEDDED_LOCATION ${LIB}_embedded LOCATION)
|
IF(TARGET ${LIB}_embedded)
|
||||||
IF(EMBEDDED_LOCATION)
|
|
||||||
LIST(APPEND EMBEDDED_LIBS ${LIB}_embedded)
|
LIST(APPEND EMBEDDED_LIBS ${LIB}_embedded)
|
||||||
ELSE()
|
ELSE()
|
||||||
LIST(APPEND EMBEDDED_LIBS ${LIB})
|
LIST(APPEND EMBEDDED_LIBS ${LIB})
|
||||||
@@ -453,4 +453,3 @@ IF(NOT DISABLE_SHARED)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@@ -26,12 +26,15 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
|
|||||||
mysqld_safe_helper.1 tokuftdump.1 wsrep_sst_common.1
|
mysqld_safe_helper.1 tokuftdump.1 wsrep_sst_common.1
|
||||||
wsrep_sst_mysqldump.1 wsrep_sst_rsync.1
|
wsrep_sst_mysqldump.1 wsrep_sst_rsync.1
|
||||||
wsrep_sst_xtrabackup-v2.1 wsrep_sst_xtrabackup.1
|
wsrep_sst_xtrabackup-v2.1 wsrep_sst_xtrabackup.1
|
||||||
galera_recovery.1 galera_new_cluster.1 tokuft_logdump.1)
|
galera_recovery.1 galera_new_cluster.1 tokuft_logprint.1
|
||||||
|
mysql_ldb.1
|
||||||
|
wsrep_sst_mariabackup.1 mbstream.1 mariabackup.1
|
||||||
|
wsrep_sst_rsync_wan.1)
|
||||||
SET(MAN8_SERVER mysqld.8)
|
SET(MAN8_SERVER mysqld.8)
|
||||||
SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
|
SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
|
||||||
mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1
|
mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1
|
||||||
mysqldump.1 mysqlimport.1 mysqlshow.1 mysqlslap.1
|
mysqldump.1 mysqlimport.1 mysqlshow.1 mysqlslap.1
|
||||||
mysql_plugin.1)
|
mysql_plugin.1 mysql_embedded.1)
|
||||||
SET(MAN1_DEVEL mysql_config.1)
|
SET(MAN1_DEVEL mysql_config.1)
|
||||||
SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl.1 mysql_client_test.1
|
SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl.1 mysql_client_test.1
|
||||||
mysqltest_embedded.1 mysql_client_test_embedded.1 my_safe_process.1)
|
mysqltest_embedded.1 mysql_client_test_embedded.1 my_safe_process.1)
|
||||||
|
16
man/mariabackup.1
Normal file
16
man/mariabackup.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBMARIABACKUP\FR" "1" "9 August 2018" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
mariabackup \- Backup tool
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use \fBmariabackup \-\-help\fR for details on usage\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/mbstream.1
Normal file
16
man/mbstream.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBMBSTREAM\FR" "1" "9 August 2018" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
mbstream \- Serialize/deserialize files in the XBSTREAM format
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use \fBmbstream \-\-help\fR for details on usage\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
@@ -74,14 +74,14 @@ Display a help message and exit\&.
|
|||||||
.\}
|
.\}
|
||||||
.\" my_print_defaults: config-file option
|
.\" my_print_defaults: config-file option
|
||||||
.\" config-file option: my_print_defaults
|
.\" config-file option: my_print_defaults
|
||||||
\fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR,
|
\fB
|
||||||
.\" my_print_defaults: defaults-file option
|
.\" my_print_defaults: defaults-file option
|
||||||
.\" defaults-file option: my_print_defaults
|
.\" defaults-file option: my_print_defaults
|
||||||
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR,
|
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR,
|
||||||
\fB\-c \fR\fB\fIfile_name\fR\fR
|
\fB\-c \fR\fB\fIfile_name\fR\fR
|
||||||
.sp
|
.sp
|
||||||
Read only the given option file\&. If no extension is given, default extension(.ini or .cnf) will
|
Read only the given option file\&. If no extension is given, default extension(.ini or .cnf) will
|
||||||
be used\&. \fB\-\-config-file\fR is deprecated, use \fB\-\-defaults\-file\fR instead\&. If \fB\-\-defaults\-file\fR is
|
be used\&. If \fB\-\-defaults\-file\fR is
|
||||||
the first option, then read this file only, do not read global or per\-user config files; should be the first option.
|
the first option, then read this file only, do not read global or per\-user config files; should be the first option.
|
||||||
.RE
|
.RE
|
||||||
.sp
|
.sp
|
||||||
@@ -118,11 +118,10 @@ string is
|
|||||||
\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR,
|
\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR,
|
||||||
.\" my_print_defaults: extra-file option
|
.\" my_print_defaults: extra-file option
|
||||||
.\" extra-file option: my_print_defaults
|
.\" extra-file option: my_print_defaults
|
||||||
\fB\-\-extra\-file=\fR\fB\fIfile_name\fR\fR,
|
|
||||||
\fB\-e \fR\fB\fIfile_name\fR\fR
|
\fB\-e \fR\fB\fIfile_name\fR\fR
|
||||||
.sp
|
.sp
|
||||||
Read this option file after the global option file but (on Unix) before the user option
|
Read this option file after the global option file but (on Unix) before the user option
|
||||||
file\&. Should be the first option\&. \fB\-\-extra\-file\fR is deprecated, use \fB\-\-defaults\-extra\-file\fR\&.
|
file\&. Should be the first option\&.
|
||||||
.RE
|
.RE
|
||||||
.sp
|
.sp
|
||||||
.RS 4
|
.RS 4
|
||||||
|
1
man/mysql_embedded.1
Normal file
1
man/mysql_embedded.1
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.so man1/mysql.1
|
16
man/mysql_ldb.1
Normal file
16
man/mysql_ldb.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBMYSQL_LDB\FR" "1" "9 August 2018" "MariaDB 10\&.2" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
mysql_ldb \- RocksDB tool
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use \fBmysql_ldb \-\-help\fR for details on usage\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
@@ -11,6 +11,6 @@
|
|||||||
.SH NAME
|
.SH NAME
|
||||||
tokuft_logprint \- Dump the log from stdin to stdout
|
tokuft_logprint \- Dump the log from stdin to stdout
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Use: Dump the log from stdin to stdout\.
|
Use: Dump the log from stdin to stdout\. Use \fBtokuft_logprint \-\-help\fR for details on usage\.
|
||||||
.PP
|
.PP
|
||||||
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/wsrep_sst_mariabackup.1
Normal file
16
man/wsrep_sst_mariabackup.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_MARIABACKUP\FR" "1" "8 August 2018" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_mariabackup \- mariabackup\-based state snapshot transfer
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: mariabackup-based state snapshot transfer\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
@@ -1,6 +1,6 @@
|
|||||||
'\" t
|
'\" t
|
||||||
.\"
|
.\"
|
||||||
.TH "\FBWSREP_SST_RSYNC\FR" "1" "9 May 2017" "MariaDB 10\&.3" "MariaDB Database System"
|
.TH "\FBWSREP_SST_RSYNC\FR" "1" "9 August 2018" "MariaDB 10\&.3" "MariaDB Database System"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * set default formatting
|
.\" * set default formatting
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
.ad l
|
.ad l
|
||||||
.SH NAME
|
.SH NAME
|
||||||
wsrep_sst_mysqldump \- rsync-based state snapshot transfer
|
wsrep_sst_rsync \- rsync-based state snapshot transfer
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Use: rsync-based state snapshot transfer\.
|
Use: rsync-based state snapshot transfer\.
|
||||||
.PP
|
.PP
|
||||||
|
16
man/wsrep_sst_rsync_wan.1
Normal file
16
man/wsrep_sst_rsync_wan.1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_RSYNC_WAN\FR" "1" "9 August 2018" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_rsync_wan \- rsync_wan (rsync with delta transfers)\-based state snapshot transfer
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: rsync_wan\-based state snapshot transfer\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user