diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/CMakeLists.txt | 2 | ||||
-rw-r--r-- | extra/innochecksum.cc | 16 | ||||
-rw-r--r-- | extra/mariabackup/CMakeLists.txt | 4 | ||||
-rw-r--r-- | extra/mariabackup/fil_cur.cc | 6 | ||||
-rw-r--r-- | extra/mariabackup/xbstream.cc | 11 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 45 | ||||
-rw-r--r-- | extra/my_print_defaults.c | 13 | ||||
-rw-r--r-- | extra/mysql_waitpid.c | 9 | ||||
-rw-r--r-- | extra/perror.c | 9 | ||||
-rw-r--r-- | extra/replace.c | 6 | ||||
-rw-r--r-- | extra/resolve_stack_dump.c | 10 | ||||
-rw-r--r-- | extra/resolveip.c | 10 |
12 files changed, 41 insertions, 100 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index 5021128ed35..34a83d19e32 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -91,7 +91,7 @@ MYSQL_ADD_EXECUTABLE(replace replace.c COMPONENT Client) TARGET_LINK_LIBRARIES(replace mysys) IF(UNIX) - MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c) + MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c COMPONENT Client) TARGET_LINK_LIBRARIES(resolve_stack_dump mysys) MYSQL_ADD_EXECUTABLE(mariadb-waitpid mysql_waitpid.c COMPONENT Client) diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index cc8f8d14094..eaaeb0c36a5 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -26,6 +26,8 @@ Published with a permission. */ +#define VER "1.0" + #include <my_global.h> #include <stdio.h> #include <stdlib.h> @@ -1205,20 +1207,6 @@ static struct my_option innochecksum_options[] = { {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; -/** Print out the version and build information. */ -static void print_version() -{ -#ifdef DBUG_OFF - printf("%s Ver %s, for %s (%s)\n", - my_progname, PACKAGE_VERSION, - SYSTEM_TYPE, MACHINE_TYPE); -#else - printf("%s-debug Ver %s, for %s (%s)\n", - my_progname, PACKAGE_VERSION, - SYSTEM_TYPE, MACHINE_TYPE); -#endif /* DBUG_OFF */ -} - static void usage(void) { print_version(); diff --git a/extra/mariabackup/CMakeLists.txt b/extra/mariabackup/CMakeLists.txt index 66293dac31b..1ee2261f878 100644 --- a/extra/mariabackup/CMakeLists.txt +++ b/extra/mariabackup/CMakeLists.txt @@ -76,7 +76,7 @@ MYSQL_ADD_EXECUTABLE(mariadb-backup ${PROJECT_BINARY_DIR}/sql/sql_builtin.cc ${PROJECT_SOURCE_DIR}/sql/net_serv.cc ${PROJECT_SOURCE_DIR}/libmysqld/libmysql.c - COMPONENT backup + COMPONENT Backup ) # Export all symbols on Unix, for better crash callstacks @@ -99,7 +99,7 @@ MYSQL_ADD_EXECUTABLE(mbstream xbstream.cc xbstream_read.cc xbstream_write.cc - COMPONENT backup + COMPONENT Backup ) diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc index e0a4711a2aa..2932fa6d5a6 100644 --- a/extra/mariabackup/fil_cur.cc +++ b/extra/mariabackup/fil_cur.cc @@ -199,12 +199,6 @@ xb_fil_cur_open( return(XB_FIL_CUR_SKIP); } - if (srv_file_flush_method == SRV_O_DIRECT - || srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC) { - - os_file_set_nocache(cursor->file, node->name, "OPEN"); - } - posix_fadvise(cursor->file, 0, 0, POSIX_FADV_SEQUENTIAL); cursor->page_size = node->space->physical_size(); diff --git a/extra/mariabackup/xbstream.cc b/extra/mariabackup/xbstream.cc index 6306806b867..3a3ba55b8b2 100644 --- a/extra/mariabackup/xbstream.cc +++ b/extra/mariabackup/xbstream.cc @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA *******************************************************/ +#define VER "1.0" #include <my_global.h> #include <my_base.h> #include <my_getopt.h> @@ -26,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA #include "common.h" #include "xbstream.h" #include "datasink.h" +#include <welcome_copyright_notice.h> -#define XBSTREAM_VERSION "1.0" #define XBSTREAM_BUFFER_SIZE (10 * 1024 * 1024UL) #define START_FILE_HASH_SIZE 16 @@ -148,14 +149,6 @@ get_options(int *argc, char ***argv) static void -print_version(void) -{ - printf("%s Ver %s for %s (%s)\n", my_progname, XBSTREAM_VERSION, - SYSTEM_TYPE, MACHINE_TYPE); -} - -static -void usage(void) { print_version(); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index be5bffe8920..05168d35a21 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -311,6 +311,8 @@ extern const char *innodb_checksum_algorithm_names[]; extern TYPELIB innodb_checksum_algorithm_typelib; extern const char *innodb_flush_method_names[]; extern TYPELIB innodb_flush_method_typelib; +/** Ignored option */ +static ulong innodb_flush_method; static const char *binlog_info_values[] = {"off", "lockless", "on", "auto", NullS}; @@ -1032,6 +1034,8 @@ enum options_xtrabackup #if defined __linux__ || defined _WIN32 OPT_INNODB_LOG_FILE_BUFFERING, #endif + OPT_INNODB_DATA_FILE_BUFFERING, + OPT_INNODB_DATA_FILE_WRITE_THROUGH, OPT_INNODB_LOG_FILE_SIZE, OPT_INNODB_OPEN_FILES, OPT_XTRA_DEBUG_SYNC, @@ -1583,10 +1587,10 @@ struct my_option xb_server_options[] = FALSE, 0, 0, 0, 0, 0}, {"innodb_flush_method", OPT_INNODB_FLUSH_METHOD, - "With which method to flush data.", - &srv_file_flush_method, &srv_file_flush_method, + "Ignored parameter with no effect", + &innodb_flush_method, &innodb_flush_method, &innodb_flush_method_typelib, GET_ENUM, REQUIRED_ARG, - IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT), 0, 0, 0, 0, 0}, + 4/* O_DIRECT */, 0, 0, 0, 0, 0}, {"innodb_log_buffer_size", OPT_INNODB_LOG_BUFFER_SIZE, "Redo log buffer size in bytes.", @@ -1600,6 +1604,16 @@ struct my_option xb_server_options[] = (G_PTR*) &log_sys.log_buffered, 0, GET_BOOL, NO_ARG, TRUE, 0, 0, 0, 0, 0}, #endif + {"innodb_data_file_buffering", OPT_INNODB_DATA_FILE_BUFFERING, + "Whether the file system cache for data files is enabled during --backup", + (G_PTR*) &fil_system.buffered, + (G_PTR*) &fil_system.buffered, 0, GET_BOOL, NO_ARG, + FALSE, 0, 0, 0, 0, 0}, + {"innodb_data_file_write_through", OPT_INNODB_DATA_FILE_WRITE_THROUGH, + "Whether each write to data files writes through", + (G_PTR*) &fil_system.write_through, + (G_PTR*) &fil_system.write_through, 0, GET_BOOL, NO_ARG, + FALSE, 0, 0, 0, 0, 0}, {"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE, "Ignored for mysqld option compatibility", (G_PTR*) &srv_log_file_size, (G_PTR*) &srv_log_file_size, 0, @@ -1653,7 +1667,7 @@ struct my_option xb_server_options[] = {"innodb_undo_tablespaces", OPT_INNODB_UNDO_TABLESPACES, "Number of undo tablespaces to use.", (G_PTR*)&srv_undo_tablespaces, (G_PTR*)&srv_undo_tablespaces, - 0, GET_UINT, REQUIRED_ARG, 0, 0, 126, 0, 1, 0}, + 0, GET_UINT, REQUIRED_ARG, 3, 0, 126, 0, 1, 0}, {"innodb_compression_level", OPT_INNODB_COMPRESSION_LEVEL, "Compression level used for zlib compression.", @@ -1917,23 +1931,6 @@ xb_get_one_option(const struct my_option *opt, ADD_PRINT_PARAM_OPT(srv_log_group_home_dir); break; - case OPT_INNODB_FLUSH_METHOD: -#ifdef _WIN32 - /* From: storage/innobase/handler/ha_innodb.cc:innodb_init_params */ - switch (srv_file_flush_method) { - case SRV_ALL_O_DIRECT_FSYNC + 1 /* "async_unbuffered"="unbuffered" */: - srv_file_flush_method= SRV_ALL_O_DIRECT_FSYNC; - break; - case SRV_ALL_O_DIRECT_FSYNC + 2 /* "normal"="fsync" */: - srv_file_flush_method= SRV_FSYNC; - break; - } -#endif - ut_a(srv_file_flush_method - <= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC)); - ADD_PRINT_PARAM_OPT(innodb_flush_method_names[srv_file_flush_method]); - break; - case OPT_INNODB_PAGE_SIZE: ADD_PRINT_PARAM_OPT(innobase_page_size); @@ -2172,12 +2169,6 @@ static bool innodb_init_param() srv_print_verbose_log = verbose ? 2 : 1; - /* Store the default charset-collation number of this MySQL - installation */ - - /* We cannot treat characterset here for now!! */ - data_mysql_default_charset_coll = (ulint)default_charset_info->number; - ut_ad(DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number); #ifdef _WIN32 diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 115eb8e7084..6fc9f3f4d9b 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -21,13 +21,14 @@ ** ** Written by Monty */ - +#define VER "1.7" #include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <my_getopt.h> #include <my_default.h> #include <mysql_version.h> +#include <welcome_copyright_notice.h> #define load_default_groups mysqld_groups #include <mysqld_default_groups.h> @@ -70,16 +71,10 @@ static void cleanup_and_exit(int exit_code) exit(exit_code); } -static void version() -{ - printf("%s Ver 1.8 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); -} - - static void usage() __attribute__ ((noreturn)); static void usage() { - version(); + print_version(); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Displays the options from option groups of option files, which is useful to see which options a particular tool will use"); printf("Usage: %s [OPTIONS] [groups]\n", my_progname); @@ -106,7 +101,7 @@ get_one_option(const struct my_option *opt __attribute__((unused)), verbose++; break; case 'V': - version(); + print_version(); /* fall through */ case '#': DBUG_PUSH(argument ? argument : default_dbug_option); diff --git a/extra/mysql_waitpid.c b/extra/mysql_waitpid.c index 8f2a5c99395..7409e8f1c69 100644 --- a/extra/mysql_waitpid.c +++ b/extra/mysql_waitpid.c @@ -24,7 +24,6 @@ #include <errno.h> static const char *VER= "1.1"; -static char *progname; static my_bool verbose; void usage(void); @@ -50,7 +49,7 @@ get_one_option(const struct my_option *opt, { switch(opt->id) { case 'V': - printf("%s version %s by Jani Tolonen\n", progname, VER); + printf("%s version %s by Jani Tolonen\n", my_progname, VER); exit(0); case 'I': case '?': @@ -65,7 +64,7 @@ int main(int argc, char *argv[]) { int pid= 0, t= 0, sig= 0; - progname= argv[0]; + MY_INIT(argv[0]); if (handle_options(&argc, &argv, my_long_options, get_one_option)) exit(-1); @@ -96,8 +95,8 @@ int main(int argc, char *argv[]) void usage(void) { - printf("%s version %s by Jani Tolonen\n\n", progname, VER); - printf("usage: %s [options] #pid #time\n\n", progname); + printf("%s version %s by Jani Tolonen\n\n", my_progname, VER); + printf("usage: %s [options] #pid #time\n\n", my_progname); printf("Description: Waits for a program, which program id is #pid, to\n"); printf("terminate within #time seconds. If the program terminates within\n"); printf("this time, or if the #pid no longer exists, value 0 is returned.\n"); diff --git a/extra/perror.c b/extra/perror.c index ee6e362e06b..c9e9ae6e334 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -16,7 +16,7 @@ /* Return error-text for system error messages and handler messages */ -#define PERROR_VERSION "2.11" +#define VER "2.11" #include <my_global.h> #include <my_sys.h> @@ -76,13 +76,6 @@ static HA_ERRORS ha_errlist[]= }; -static void print_version(void) -{ - printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION, - SYSTEM_TYPE,MACHINE_TYPE); -} - - static void usage(void) { print_version(); diff --git a/extra/replace.c b/extra/replace.c index 8b20f812be0..81c7f484bdf 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -41,12 +41,13 @@ Written by Monty. fill_buffer_retaining() is taken from gnu-grep and modified. */ - +#define VER "1.4" #include <my_global.h> #include <m_ctype.h> #include <my_sys.h> #include <m_string.h> #include <errno.h> +#include <welcome_copyright_notice.h> #define PC_MALLOC 256 /* Bytes for pointers */ #define PS_MALLOC 512 /* Bytes for data */ @@ -176,8 +177,7 @@ static int static_get_options(int *argc, char***argv) case 'I': case '?': help=1; /* Help text written */ - printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE, - MACHINE_TYPE); + print_version(); if (version) break; puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c index fe2f297fd33..2b09f5bf1fb 100644 --- a/extra/resolve_stack_dump.c +++ b/extra/resolve_stack_dump.c @@ -18,6 +18,7 @@ versions into symbolic names. By Sasha Pachev <sasha@mysql.com> */ +#define VER "1.4" #include <my_global.h> #include <m_ctype.h> #include <my_sys.h> @@ -25,11 +26,11 @@ #include <mysql_version.h> #include <errno.h> #include <my_getopt.h> +#include <welcome_copyright_notice.h> #define INIT_SYM_TABLE 4096 #define INC_SYM_TABLE 4096 #define MAX_SYM_SIZE 128 -#define DUMP_VERSION "1.4" #define HEX_INVALID (uchar)255 typedef ulong my_long_addr_t ; /* at some point, we need to fix configure @@ -65,13 +66,6 @@ static struct my_option my_long_options[] = static void verify_sort(); static void clean_up(); -static void print_version(void) -{ - printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION, - MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); -} - - static void usage() { print_version(); diff --git a/extra/resolveip.c b/extra/resolveip.c index 890912d9850..d964802d3b3 100644 --- a/extra/resolveip.c +++ b/extra/resolveip.c @@ -16,7 +16,7 @@ /* Resolves IP's to hostname and hostnames to IP's */ -#define RESOLVE_VERSION "2.3" +#define VER "2.3" #include <my_global.h> #include <m_ctype.h> @@ -31,6 +31,7 @@ #endif #include <my_net.h> #include <my_getopt.h> +#include <welcome_copyright_notice.h> #if !defined(_AIX) && !defined(h_errno) extern int h_errno; @@ -52,13 +53,6 @@ static struct my_option my_long_options[] = }; -static void print_version(void) -{ - printf("%s Ver %s, for %s (%s)\n",my_progname,RESOLVE_VERSION, - SYSTEM_TYPE,MACHINE_TYPE); -} - - static void usage(void) { print_version(); |