Commit 5a2d9853 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

New upstream version 10.1.31

parent de111ba6
...@@ -56,9 +56,9 @@ ENDIF() ...@@ -56,9 +56,9 @@ ENDIF()
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel") "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel")
# MAX_INDEXES - Set the maximum number of indexes per table, default 64U # MAX_INDEXES - Set the maximum number of indexes per table, default 64
IF (NOT MAX_INDEXES) IF (NOT MAX_INDEXES)
SET(MAX_INDEXES 64U) SET(MAX_INDEXES 64)
ENDIF(NOT MAX_INDEXES) ENDIF(NOT MAX_INDEXES)
IF (${MAX_INDEXES} GREATER 128) IF (${MAX_INDEXES} GREATER 128)
......
...@@ -3,8 +3,9 @@ organization registered in the USA. ...@@ -3,8 +3,9 @@ organization registered in the USA.
The current main sponsors of the MariaDB Foundation are: The current main sponsors of the MariaDB Foundation are:
Alibaba Cloud https://intl.aliyun.com (2017) Alibaba Cloud https://www.alibabacloud.com/ (2017)
Booking.com https://www.booking.com (2013) Booking.com https://www.booking.com (2013)
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)
......
commit: 461cf3e5a3c2d346d75b1407b285f8daf9d01f67 commit: aba15b864af664276261dcbbdaef35268d407af1
date: 2017-12-21 17:40:01 +0200 date: 2018-02-04 04:28:14 +0200
build-date: 2017-12-21 15:48:56 +0000 build-date: 2018-02-04 02:30:32 +0000
short: 461cf3e short: aba15b8
branch: HEAD branch: HEAD
MariaDB source 10.1.30 MariaDB source 10.1.31
MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=1 MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=30 MYSQL_VERSION_PATCH=31
...@@ -1140,6 +1140,7 @@ int main(int argc,char *argv[]) ...@@ -1140,6 +1140,7 @@ int main(int argc,char *argv[])
current_prompt = my_strdup(default_prompt,MYF(MY_WME)); current_prompt = my_strdup(default_prompt,MYF(MY_WME));
prompt_counter=0; prompt_counter=0;
aborted= 0; aborted= 0;
sf_leaking_memory= 1; /* no memory leak reports yet */
outfile[0]=0; // no (default) outfile outfile[0]=0; // no (default) outfile
strmov(pager, "stdout"); // the default, if --pager wasn't given strmov(pager, "stdout"); // the default, if --pager wasn't given
...@@ -1200,6 +1201,7 @@ int main(int argc,char *argv[]) ...@@ -1200,6 +1201,7 @@ int main(int argc,char *argv[])
my_end(0); my_end(0);
exit(1); exit(1);
} }
sf_leaking_memory= 0;
glob_buffer.realloc(512); glob_buffer.realloc(512);
completion_hash_init(&ht, 128); completion_hash_init(&ht, 128);
init_alloc_root(&hash_mem_root, 16384, 0, MYF(0)); init_alloc_root(&hash_mem_root, 16384, 0, MYF(0));
...@@ -1795,10 +1797,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -1795,10 +1797,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib, if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0) opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1); exit(1);
}
#endif #endif
break; break;
case OPT_SERVER_ARG: case OPT_SERVER_ARG:
...@@ -4593,8 +4592,11 @@ static char *get_arg(char *line, get_arg_mode mode) ...@@ -4593,8 +4592,11 @@ static char *get_arg(char *line, get_arg_mode mode)
} }
for (start=ptr ; *ptr; ptr++) for (start=ptr ; *ptr; ptr++)
{ {
if ((*ptr == '\\' && ptr[1]) || // escaped character /* if short_cmd use historical rules (only backslash) otherwise SQL rules */
(!short_cmd && qtype && *ptr == qtype && ptr[1] == qtype)) // quote if (short_cmd
? (*ptr == '\\' && ptr[1]) // escaped character
: (*ptr == '\\' && ptr[1] && qtype != '`') || // escaped character
(qtype && *ptr == qtype && ptr[1] == qtype)) // quote
{ {
// Remove (or skip) the backslash (or a second quote) // Remove (or skip) the backslash (or a second quote)
if (mode != CHECK) if (mode != CHECK)
......
...@@ -1523,7 +1523,6 @@ static void cleanup_and_exit(int exit_code) ...@@ -1523,7 +1523,6 @@ static void cleanup_and_exit(int exit_code)
} }
} }
sf_leaking_memory= 0; /* all memory should be freed by now */
exit(exit_code); exit(exit_code);
} }
...@@ -7294,10 +7293,7 @@ get_one_option(int optid, const struct my_option *opt, char *argument) ...@@ -7294,10 +7293,7 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib, if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0) opt->name)) <= 0)
{
sf_leaking_memory= 1; /* no memory leak reports here */
exit(1); exit(1);
}
#endif #endif
break; break;
case '?': case '?':
......
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
# 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
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
#cmakedefine HAVE_CUSERID 1 #cmakedefine HAVE_CUSERID 1
#cmakedefine HAVE_CXX_NEW 1 #cmakedefine HAVE_CXX_NEW 1
#cmakedefine HAVE_DIRECTIO 1 #cmakedefine HAVE_DIRECTIO 1
#cmakedefine HAVE_DLADDR 1
#cmakedefine HAVE_DLERROR 1 #cmakedefine HAVE_DLERROR 1
#cmakedefine HAVE_DLOPEN 1 #cmakedefine HAVE_DLOPEN 1
#cmakedefine HAVE_DOPRNT 1 #cmakedefine HAVE_DOPRNT 1
......
...@@ -344,6 +344,7 @@ CHECK_FUNCTION_EXISTS (ftruncate HAVE_FTRUNCATE) ...@@ -344,6 +344,7 @@ CHECK_FUNCTION_EXISTS (ftruncate HAVE_FTRUNCATE)
CHECK_FUNCTION_EXISTS (getline HAVE_GETLINE) CHECK_FUNCTION_EXISTS (getline HAVE_GETLINE)
CHECK_FUNCTION_EXISTS (compress HAVE_COMPRESS) CHECK_FUNCTION_EXISTS (compress HAVE_COMPRESS)
CHECK_FUNCTION_EXISTS (crypt HAVE_CRYPT) CHECK_FUNCTION_EXISTS (crypt HAVE_CRYPT)
CHECK_FUNCTION_EXISTS (dladdr HAVE_DLADDR)
CHECK_FUNCTION_EXISTS (dlerror HAVE_DLERROR) CHECK_FUNCTION_EXISTS (dlerror HAVE_DLERROR)
CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN) CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN)
CHECK_FUNCTION_EXISTS (fchmod HAVE_FCHMOD) CHECK_FUNCTION_EXISTS (fchmod HAVE_FCHMOD)
...@@ -407,7 +408,6 @@ CHECK_FUNCTION_EXISTS (pthread_sigmask HAVE_PTHREAD_SIGMASK) ...@@ -407,7 +408,6 @@ CHECK_FUNCTION_EXISTS (pthread_sigmask HAVE_PTHREAD_SIGMASK)
CHECK_FUNCTION_EXISTS (pthread_threadmask HAVE_PTHREAD_THREADMASK) CHECK_FUNCTION_EXISTS (pthread_threadmask HAVE_PTHREAD_THREADMASK)
CHECK_FUNCTION_EXISTS (pthread_yield_np HAVE_PTHREAD_YIELD_NP) CHECK_FUNCTION_EXISTS (pthread_yield_np HAVE_PTHREAD_YIELD_NP)
CHECK_FUNCTION_EXISTS (putenv HAVE_PUTENV) CHECK_FUNCTION_EXISTS (putenv HAVE_PUTENV)
CHECK_FUNCTION_EXISTS (readdir_r HAVE_READDIR_R)
CHECK_FUNCTION_EXISTS (readlink HAVE_READLINK) CHECK_FUNCTION_EXISTS (readlink HAVE_READLINK)
CHECK_FUNCTION_EXISTS (re_comp HAVE_RE_COMP) CHECK_FUNCTION_EXISTS (re_comp HAVE_RE_COMP)
CHECK_FUNCTION_EXISTS (regcomp HAVE_REGCOMP) CHECK_FUNCTION_EXISTS (regcomp HAVE_REGCOMP)
...@@ -465,6 +465,16 @@ IF(HAVE_SYS_EVENT_H) ...@@ -465,6 +465,16 @@ IF(HAVE_SYS_EVENT_H)
CHECK_FUNCTION_EXISTS (kqueue HAVE_KQUEUE) CHECK_FUNCTION_EXISTS (kqueue HAVE_KQUEUE)
ENDIF() ENDIF()
# readdir_r might exist, but be marked deprecated
SET(CMAKE_REQUIRED_FLAGS -Werror)
CHECK_CXX_SOURCE_COMPILES(
"#include <dirent.h>
int main() {
readdir_r(0,0,0);
return 0;
}" HAVE_READDIR_R)
SET(CMAKE_REQUIRED_FLAGS)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Support for WL#2373 (Use cycle counter for timing) # Support for WL#2373 (Use cycle counter for timing)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
......
...@@ -1183,10 +1183,10 @@ debug_sync_point(const char *name) ...@@ -1183,10 +1183,10 @@ debug_sync_point(const char *name)
} }
static const char *xb_client_default_groups[]= static const char *xb_client_default_groups[]=
{ "xtrabackup", "client", 0, 0, 0 }; { "xtrabackup", "mariabackup", "client", 0, 0, 0 };
static const char *xb_server_default_groups[]= static const char *xb_server_default_groups[]=
{ "xtrabackup", "mysqld", 0, 0, 0 }; { "xtrabackup", "mariabackup", "mysqld", 0, 0, 0 };
static void print_version(void) static void print_version(void)
{ {
...@@ -1213,7 +1213,7 @@ GNU General Public License for more details.\n\ ...@@ -1213,7 +1213,7 @@ GNU General Public License for more details.\n\
\n\ \n\
You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt\n"); You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt\n");
printf("Usage: [%s [--defaults-file=#] --backup | %s [--defaults-file=#] --prepare] [OPTIONS]\n",my_progname,my_progname); printf("Usage: %s [--defaults-file=#] [--backup | --prepare | --copy-back | --move-back] [OPTIONS]\n",my_progname);
print_defaults("my", xb_server_default_groups); print_defaults("my", xb_server_default_groups);
my_print_help(xb_client_options); my_print_help(xb_client_options);
my_print_help(xb_server_options); my_print_help(xb_server_options);
...@@ -2698,7 +2698,7 @@ xtrabackup_scan_log_recs( ...@@ -2698,7 +2698,7 @@ xtrabackup_scan_log_recs(
if (srv_encrypt_log) { if (srv_encrypt_log) {
log_encrypt_before_write(scanned_checkpoint_no, log_encrypt_before_write(scanned_checkpoint_no,
log_sys->buf, write_size); log_sys->buf, start_lsn, write_size);
} }
if (ds_write(dst_log_file, log_sys->buf, write_size)) { if (ds_write(dst_log_file, log_sys->buf, write_size)) {
...@@ -4246,16 +4246,11 @@ xtrabackup_init_temp_log(void) ...@@ -4246,16 +4246,11 @@ xtrabackup_init_temp_log(void)
ib_int64_t file_size; ib_int64_t file_size;
lsn_t max_no; lsn_t max_no = 0;
lsn_t max_lsn; lsn_t max_lsn = 0;
lsn_t checkpoint_no;
ulint fold; ulint fold;
bool checkpoint_found;
max_no = 0;
if (!log_buf) { if (!log_buf) {
goto error; goto error;
} }
...@@ -4354,35 +4349,29 @@ xtrabackup_init_temp_log(void) ...@@ -4354,35 +4349,29 @@ xtrabackup_init_temp_log(void)
// ' ', 4); // ' ', 4);
} }
checkpoint_found = false;
/* read last checkpoint lsn */ /* read last checkpoint lsn */
for (field = LOG_CHECKPOINT_1; field <= LOG_CHECKPOINT_2; for (field = LOG_CHECKPOINT_1; field <= LOG_CHECKPOINT_2;
field += LOG_CHECKPOINT_2 - LOG_CHECKPOINT_1) { field += LOG_CHECKPOINT_2 - LOG_CHECKPOINT_1) {
if (!recv_check_cp_is_consistent(const_cast<const byte *> if (!recv_check_cp_is_consistent(const_cast<const byte *>
(log_buf + field))) (log_buf + field)))
goto not_consistent; continue;
checkpoint_no = mach_read_from_8(log_buf + field + lsn_t checkpoint_no = mach_read_from_8(log_buf + field +
LOG_CHECKPOINT_NO); LOG_CHECKPOINT_NO);
if (checkpoint_no >= max_no) { if (checkpoint_no >= max_no) {
max_no = checkpoint_no; max_no = checkpoint_no;
max_lsn = mach_read_from_8(log_buf + field + max_lsn = mach_read_from_8(log_buf + field +
LOG_CHECKPOINT_LSN); LOG_CHECKPOINT_LSN);
checkpoint_found = true;
} }
not_consistent:
;
} }
if (!checkpoint_found) { if (!max_lsn) {
msg("mariabackup: No valid checkpoint found.\n"); msg("mariabackup: No valid checkpoint found.\n");
goto error; goto error;
} }
/* It seems to be needed to overwrite the both checkpoint area. */ /* It seems to be needed to overwrite the both checkpoint area. */
mach_write_to_8(log_buf + LOG_CHECKPOINT_1 + LOG_CHECKPOINT_LSN, mach_write_to_8(log_buf + LOG_CHECKPOINT_1 + LOG_CHECKPOINT_LSN,
max_lsn); max_lsn);
...@@ -5459,7 +5448,12 @@ xb_export_cfg_write_table( ...@@ -5459,7 +5448,12 @@ xb_export_cfg_write_table(
mach_write_to_4(ptr, col->len); mach_write_to_4(ptr, col->len);
ptr += sizeof(ib_uint32_t); ptr += sizeof(ib_uint32_t);
mach_write_to_4(ptr, col->mbminmaxlen); /* FIXME: This will not work if mbminlen>4.
This field is also redundant, because the lengths
are a property of the character set encoding, which
in turn is encodedin prtype above. */
mach_write_to_4(ptr, col->mbmaxlen * 5 + col->mbminlen);
ptr += sizeof(ib_uint32_t); ptr += sizeof(ib_uint32_t);
mach_write_to_4(ptr, col->ind); mach_write_to_4(ptr, col->ind);
...@@ -6165,9 +6159,19 @@ xb_init() ...@@ -6165,9 +6159,19 @@ xb_init()
return(false); return(false);
} }
if (opt_rsync && xtrabackup_stream_fmt) { if (xtrabackup_backup && opt_rsync)
msg("Error: --rsync doesn't work with --stream\n"); {
return(false); if (xtrabackup_stream_fmt)
{
msg("Error: --rsync doesn't work with --stream\n");
return(false);
}
bool have_rsync = IF_WIN(false, (system("rsync --version > /dev/null 2>&1") == 0));
if (!have_rsync)
{
msg("Error: rsync executable not found, cannot run backup with --rsync\n");
return false;
}
} }
n_mixed_options = 0; n_mixed_options = 0;
......
...@@ -69,6 +69,9 @@ typedef struct st_mysql_lex_string LEX_STRING; ...@@ -69,6 +69,9 @@ typedef struct st_mysql_lex_string LEX_STRING;
#define DYNCOL_UTF (&my_charset_utf8_general_ci) #define DYNCOL_UTF (&my_charset_utf8_general_ci)
#endif #endif
/* escape json strings */
#define DYNCOL_JSON_ESC ((char)1)
enum enum_dyncol_func_result enum enum_dyncol_func_result
{ {
ER_DYNCOL_OK= 0, ER_DYNCOL_OK= 0,
......
...@@ -91,17 +91,19 @@ typedef struct st_HA_KEYSEG /* Key-portion */ ...@@ -91,17 +91,19 @@ typedef struct st_HA_KEYSEG /* Key-portion */
#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3) #define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \ static inline uint16 get_rec_bits(const uchar *ptr, uchar ofs, uint len)
(((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \ {
((1 << (bit_len)) - 1)) uint16 val= ptr[0];
if (ofs + len > 8)
#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \ val|= (uint16)(ptr[1]) << 8;
{ \ return (val >> ofs) & ((1 << len) - 1);
(bit_ptr)[0]= ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \ }
((bits) << (bit_ofs)); \
if ((bit_ofs) + (bit_len) > 8) \ static inline void set_rec_bits(uint16 bits, uchar *ptr, uchar ofs, uint len)
(bit_ptr)[1]= ((bit_ptr)[1] & ~((1 << ((bit_len) - 8 + (bit_ofs))) - 1)) | \ {
((bits) >> (8 - (bit_ofs))); \ ptr[0]= (ptr[0] & ~(((1 << len) - 1) << ofs)) | (bits << ofs);
if (ofs + len > 8)
ptr[1]= (ptr[1] & ~((1 << (len - 8 + ofs)) - 1)) | (bits >> (8 - ofs));
} }
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \ #define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
......
...@@ -1091,11 +1091,19 @@ static inline char *dlerror(void) ...@@ -1091,11 +1091,19 @@ static inline char *dlerror(void)
#ifndef HAVE_DLERROR #ifndef HAVE_DLERROR
#define dlerror() "" #define dlerror() ""
#endif #endif
#ifndef HAVE_DLADDR
#define dladdr(A, B) 0
/* Dummy definition in case we're missing dladdr() */
typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
#endif
#else #else
#define dlerror() "No support for dynamic loading (static build?)" #define dlerror() "No support for dynamic loading (static build?)"
#define dlopen(A,B) 0 #define dlopen(A,B) 0
#define dlsym(A,B) 0 #define dlsym(A,B) 0
#define dlclose(A) 0 #define dlclose(A) 0
#define dladdr(A, B) 0
/* Dummy definition in case we're missing dladdr() */
typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
#endif #endif
/* /*
......
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
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 Street, Fifth Floor, Boston, MA 02111-1301 USA */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
/* clang -> gcc */
#ifndef __has_feature
# define __has_feature(x) 0
#endif
#if __has_feature(address_sanitizer)
# define __SANITIZE_ADDRESS__ 1
#endif
#ifdef HAVE_valgrind #ifdef HAVE_valgrind
#define IF_VALGRIND(A,B) A #define IF_VALGRIND(A,B) A
#else #else
...@@ -25,7 +33,13 @@ ...@@ -25,7 +33,13 @@
# define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len) # define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
# define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len) # define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len) # define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
#else /* HAVE_VALGRIND */ #elif defined(__SANITIZE_ADDRESS__)
# include <sanitizer/asan_interface.h>
# define MEM_UNDEFINED(a,len) ASAN_UNPOISON_MEMORY_REGION(a,len)
# define MEM_NOACCESS(a,len) ASAN_POISON_MEMORY_REGION(a,len)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
#else
# define MEM_UNDEFINED(a,len) ((void) 0) # define MEM_UNDEFINED(a,len) ((void) 0)
# define MEM_NOACCESS(a,len) ((void) 0) # define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
...@@ -33,11 +47,9 @@ ...@@ -33,11 +47,9 @@
#endif /* HAVE_VALGRIND */ #endif /* HAVE_VALGRIND */
#ifndef DBUG_OFF #ifndef DBUG_OFF
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); memset(A, C, trash_tmp); MEM_UNDEFINED(A, trash_tmp); } while (0) #define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0)
#else #else
#define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute__((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0) #define TRASH_FILL(A,B,C) do { const size_t trash_tmp __attribute__((unused))= (B); MEM_UNDEFINED(A,trash_tmp); } while (0)
#endif #endif
#define TRASH_ALLOC(A,B) TRASH_FILL(A,B,0xA5) #define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
#define TRASH_FREE(A,B) TRASH_FILL(A,B,0x8F) #define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0)
#define TRASH(A,B) TRASH_FREE(A,B)
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef _welcome_copyright_notice_h_ #ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_ #define _welcome_copyright_notice_h_
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2017" #define COPYRIGHT_NOTICE_CURRENT_YEAR "2018"
/* /*
This define specifies copyright notice which is displayed by every MySQL This define specifies copyright notice which is displayed by every MySQL
......
...@@ -500,14 +500,14 @@ IF(NOT DISABLE_SHARED) ...@@ -500,14 +500,14 @@ IF(NOT DISABLE_SHARED)
OUTPUT_NAME mysqlclient OUTPUT_NAME mysqlclient
VERSION "${OS_SHARED_LIB_VERSION}" VERSION "${OS_SHARED_LIB_VERSION}"
SOVERSION "${SHARED_LIB_MAJOR_VERSION}") SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS) IF(VERSION_SCRIPT_LINK_FLAGS)
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS) GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
IF(NOT libmysql_link_flags) IF(NOT libmysql_link_flags)
# Avoid libmysql_link_flags-NOTFOUND # Avoid libmysql_link_flags-NOTFOUND
SET(libmysql_link_flags) SET(libmysql_link_flags)
ENDIF() ENDIF()
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}") "${libmysql_link_flags} ${VERSION_SCRIPT_LINK_FLAGS}")
ENDIF() ENDIF()
# clean direct output needs to be set several targets have the same name # clean direct output needs to be set several targets have the same name
#(mysqlclient in this case) #(mysqlclient in this case)
......
'\" t '\" t
.\" .\"
.TH "\FBMYSQLADMIN\FR" "1" "14/12/2015" "MariaDB 10\&.1" "MariaDB Database System" .TH "\FBMYSQLADMIN\FR" "1" "28 December 2017" "MariaDB 10\&.1" "MariaDB Database System"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
...@@ -106,6 +106,97 @@ Display the server status variables and their values\&. ...@@ -106,6 +106,97 @@ Display the server status variables and their values\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
flush\-all\-statistics
.sp
Flush all statistics tables\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-all\-status
.sp
Flush all status and statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-binary\-log
.sp
Flush the binary log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-client\-statistics
.sp
Flush client statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-engine\-log
.sp
Flush engine log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-error\-log
.sp
Flush error log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-general\-log
.sp
Flush general query log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-hosts flush\-hosts
.sp .sp
Flush all information in the host cache\&. Flush all information in the host cache\&.
...@@ -119,6 +210,19 @@ Flush all information in the host cache\&. ...@@ -119,6 +210,19 @@ Flush all information in the host cache\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
flush\-index\-statistics
.sp
Flush index statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-logs flush\-logs
.sp .sp
Flush all logs\&. Flush all logs\&.
...@@ -146,6 +250,32 @@ reload)\&. ...@@ -146,6 +250,32 @@ reload)\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
flush\-relay\-log
.sp
Flush relay log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-slow\-log
.sp
Flush slow query log\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-status flush\-status
.sp .sp
Clear status variables\&. Clear status variables\&.
...@@ -159,6 +289,19 @@ Clear status variables\&. ...@@ -159,6 +289,19 @@ Clear status variables\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
flush\-table\-statistics
.sp
Flush table statistics\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
flush\-tables flush\-tables
.sp .sp
Flush all tables\&. Flush all tables\&.
...@@ -185,6 +328,19 @@ Flush the thread cache\&. ...@@ -185,6 +328,19 @@ Flush the thread cache\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
flush\-user\-resources
.sp
Flush user resources\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
kill \fIid\fR,\fIid\fR,\&.\&.\&. kill \fIid\fR,\fIid\fR,\&.\&.\&.
.sp .sp
Kill server threads\&. If multiple thread ID values are given, there must be no spaces in the list\&. Kill server threads\&. If multiple thread ID values are given, there must be no spaces in the list\&.
...@@ -344,6 +500,19 @@ Stop the server\&. ...@@ -344,6 +500,19 @@ Stop the server\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
start\-all\-slaves
.sp
Start all slaves\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
start\-slave start\-slave
.sp .sp
Start replication on a slave server\&. Start replication on a slave server\&.
...@@ -370,6 +539,19 @@ Display a short server status message\&. ...@@ -370,6 +539,19 @@ Display a short server status message\&.
.sp -1 .sp -1
.IP \(bu 2.3 .IP \(bu 2.3
.\} .\}
stop\-all\-slaves
.sp
Stop all slaves\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
stop\-slave stop\-slave
.sp .sp
Stop replication on a slave server\&. Stop replication on a slave server\&.
...@@ -821,7 +1003,7 @@ Connect to the MariaDB server on the given host\&. ...@@ -821,7 +1003,7 @@ Connect to the MariaDB server on the given host\&.
\fB\-\-local\fR, \fB\-\-local\fR,
\fB\-l\fR \fB\-l\fR
.sp .sp
Suppress the SQL command(s) from being written to the binary log by enabling sql_log_bin=0 for the session\&. Suppress the SQL command(s) from being written to the binary log by using FLUSH LOCAL or enabling sql_log_bin=0 for the session\&.
.RE .RE
.sp .sp
.RS 4 .RS 4
......
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 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
......
# truncate a giving file, all contents of the file are be cleared # truncate a giving file, all contents of the file are be cleared
if (!$file) if (!$TRUNCATE_FILE)
{ {
--echo Please assign a file name to $file!! die TRUNCATE_FILE is not set;
exit;
} }
let TRUNCATE_FILE= $file;
perl; perl;
use Env; open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
Env::import('TRUNCATE_FILE');
open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file";
close FILE; close FILE;
EOF EOF
...@@ -84,7 +84,7 @@ sub is_child { ...@@ -84,7 +84,7 @@ sub is_child {
} }
my @safe_process_cmd; our @safe_process_cmd;
my $safe_kill; my $safe_kill;
my $bindir; my $bindir;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment