unify client/tool version string

it should now always be

/path/to/exe Ver <tool version> Distrib <server version> for <OS> (<ARCH>)

in all tools and clients
This commit is contained in:
Sergei Golubchik 2022-12-11 00:11:43 +01:00
parent 314e50b464
commit eb26bf6e09
32 changed files with 69 additions and 205 deletions

View file

@ -20,13 +20,12 @@
Character set conversion utility Character set conversion utility
*/ */
#define VER "1.0"
#include "mariadb.h" #include "mariadb.h"
#include "client_priv.h" #include "client_priv.h"
#include "sql_string.h" #include "sql_string.h"
#include "my_dir.h" #include "my_dir.h"
#include <welcome_copyright_notice.h>
#define CONV_VERSION "1.0"
class CmdOpt class CmdOpt
{ {
@ -415,8 +414,7 @@ public:
} }
void usage(void) void usage(void)
{ {
printf("%s Ver %s Distrib %s for %s on %s\n", my_progname, CONV_VERSION, print_version();
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
puts("Character set conversion utility for MariaDB"); puts("Character set conversion utility for MariaDB");
puts("Usage:"); puts("Usage:");
printf("%s [OPTION...] [FILE...]\n", my_progname); printf("%s [OPTION...] [FILE...]\n", my_progname);

View file

@ -1850,11 +1850,11 @@ static void usage(int version)
#else #else
const char* readline= "readline"; const char* readline= "readline";
#endif #endif
printf("%s Ver %s Distrib %s, for %s (%s) using %s %s\n", printf("%s Ver %s Distrib %s for %s (%s) using %s %s\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE, my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,
readline, rl_library_version); readline, rl_library_version);
#else #else
printf("%s Ver %s Distrib %s, for %s (%s), source revision %s\n", my_progname, VER, printf("%s Ver %s Distrib %s for %s (%s), source revision %s\n", my_progname, VER,
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,SOURCE_REVISION); MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,SOURCE_REVISION);
#endif #endif

View file

@ -15,17 +15,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
*/ */
#define VER "1.0"
#include <my_global.h> #include <my_global.h>
#include <m_string.h> #include <m_string.h>
#include <mysql.h> #include <mysql.h>
#include <my_getopt.h> #include <my_getopt.h>
#include <my_dir.h> #include <my_dir.h>
#include <mysql_version.h> #include <mysql_version.h>
#include <welcome_copyright_notice.h>
#define SHOW_VERSION "1.0.0"
#define PRINT_VERSION do { printf("%s Ver %s Distrib %s\n", \
my_progname, SHOW_VERSION, MYSQL_SERVER_VERSION); \
} while(0)
/* Global variables. */ /* Global variables. */
static uint my_end_arg= 0; static uint my_end_arg= 0;
@ -418,7 +415,7 @@ exit:
static void usage(void) static void usage(void)
{ {
PRINT_VERSION; print_version();
puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. " puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. "
"All rights reserved.\n"); "All rights reserved.\n");
puts("Enable or disable plugins."); puts("Enable or disable plugins.");
@ -504,7 +501,7 @@ get_one_option(const struct my_option *opt,
opt_verbose++; opt_verbose++;
break; break;
case 'V': case 'V':
PRINT_VERSION; print_version();
exit(0); exit(0);
break; break;
case '?': case '?':

View file

@ -20,9 +20,8 @@
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include <../scripts/mysql_fix_privilege_tables_sql.c> #include <../scripts/mysql_fix_privilege_tables_sql.c>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#define VER "2.0" #define VER "2.0"
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> #include <sys/wait.h>
@ -296,8 +295,7 @@ get_one_option(const struct my_option *opt, const char *argument,
switch (opt->id) { switch (opt->id) {
case '?': case '?':
printf("%s Ver %s Distrib %s, for %s (%s)\n", print_version();
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("MariaDB utility for upgrading databases to new MariaDB versions."); puts("MariaDB utility for upgrading databases to new MariaDB versions.");
print_defaults("my", load_default_groups); print_defaults("my", load_default_groups);

View file

@ -17,6 +17,7 @@
/* maintenance of mysql databases */ /* maintenance of mysql databases */
#define VER "9.1"
#include "client_priv.h" #include "client_priv.h"
#include <signal.h> #include <signal.h>
#include <my_pthread.h> /* because of signal() */ #include <my_pthread.h> /* because of signal() */
@ -28,7 +29,6 @@
#include <password.h> #include <password.h>
#include <my_sys.h> #include <my_sys.h>
#define ADMIN_VERSION "9.1"
#define MAX_MYSQL_VAR 512 #define MAX_MYSQL_VAR 512
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */ #define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3 #define MAX_TRUNC_LENGTH 3
@ -1389,13 +1389,6 @@ static char **mask_password(int argc, char ***argv)
return(temp_argv); return(temp_argv);
} }
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s on %s\n",my_progname,ADMIN_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -29,6 +29,7 @@
Format_desc_of_slave, Rotate_of_master, Format_desc_of_master. Format_desc_of_slave, Rotate_of_master, Format_desc_of_master.
*/ */
#define VER "3.5"
#define MYSQL_CLIENT #define MYSQL_CLIENT
#undef MYSQL_SERVER #undef MYSQL_SERVER
#define TABLE TABLE_CLIENT #define TABLE TABLE_CLIENT
@ -2154,12 +2155,6 @@ static void die()
} }
static void print_version()
{
printf("%s Ver 3.5 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage() static void usage()
{ {
print_version(); print_version();

View file

@ -18,7 +18,7 @@
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */ /* By Jani Tolonen, 2001-04-20, MySQL Development Team */
#define CHECK_VERSION "2.7.4-MariaDB" #define VER "2.8"
#include "client_priv.h" #include "client_priv.h"
#include <m_ctype.h> #include <m_ctype.h>
@ -228,7 +228,6 @@ static const char *load_default_groups[]=
0 }; 0 };
static void print_version(void);
static void usage(void); static void usage(void);
static int get_options(int *argc, char ***argv); static int get_options(int *argc, char ***argv);
static int process_all_databases(); static int process_all_databases();
@ -248,13 +247,6 @@ static char *fix_table_name(char *dest, char *src);
int what_to_do = 0; int what_to_do = 0;
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, CHECK_VERSION,
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
} /* print_version */
static void usage(void) static void usage(void)
{ {
DBUG_ENTER("usage"); DBUG_ENTER("usage");

View file

@ -40,7 +40,7 @@
*/ */
/* on merge conflict, bump to a higher version again */ /* on merge conflict, bump to a higher version again */
#define DUMP_VERSION "10.19" #define VER "10.19"
/** /**
First mysql version supporting sequences. First mysql version supporting sequences.
@ -696,13 +696,6 @@ void check_io(FILE *file)
die(EX_EOF, "Got errno %d on write", errno); die(EX_EOF, "Got errno %d on write", errno);
} }
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname_short,DUMP_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
} /* print_version */
static void short_usage_sub(FILE *f) static void short_usage_sub(FILE *f)
{ {
fprintf(f, "Usage: %s [OPTIONS] database [tables]\n", my_progname_short); fprintf(f, "Usage: %s [OPTIONS] database [tables]\n", my_progname_short);
@ -775,8 +768,8 @@ static void write_header(FILE *sql_file, const char *db_name)
else if (!opt_compact) else if (!opt_compact)
{ {
print_comment(sql_file, 0, print_comment(sql_file, 0,
"-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", "-- MariaDB dump %s-%s, for %s (%s)\n--\n",
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
MACHINE_TYPE); MACHINE_TYPE);
print_comment(sql_file, 0, "-- Host: %s ", print_comment(sql_file, 0, "-- Host: %s ",
fix_for_comment(current_host ? current_host : "localhost")); fix_for_comment(current_host ? current_host : "localhost"));

View file

@ -27,7 +27,7 @@
** * * ** * *
** ************************* ** *************************
*/ */
#define IMPORT_VERSION "3.7" #define VER "3.7"
#include "client_priv.h" #include "client_priv.h"
#include <my_sys.h> #include <my_sys.h>
@ -194,13 +194,6 @@ static const char *load_default_groups[]=
0 }; 0 };
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n" ,my_progname,
IMPORT_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");

View file

@ -18,7 +18,7 @@
/* Show databases, tables or columns */ /* Show databases, tables or columns */
#define SHOW_VERSION "9.10" #define VER "9.10"
#include "client_priv.h" #include "client_priv.h"
#include <my_sys.h> #include <my_sys.h>
@ -276,13 +276,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -67,7 +67,7 @@ TODO:
*/ */
#define SLAP_VERSION "1.0" #define VER "1.0"
#define HUGE_STRING_LENGTH 8196 #define HUGE_STRING_LENGTH 8196
#define RAND_STRING_SIZE 126 #define RAND_STRING_SIZE 126
@ -720,13 +720,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, SLAP_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -33,7 +33,7 @@
And many others And many others
*/ */
#define MTEST_VERSION "3.5" #define VER "3.5"
#include "client_priv.h" #include "client_priv.h"
#include <mysql_version.h> #include <mysql_version.h>
@ -7192,12 +7192,6 @@ static struct my_option my_long_options[] =
}; };
void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
void usage() void usage()
{ {
print_version(); print_version();

View file

@ -26,6 +26,8 @@
Published with a permission. Published with a permission.
*/ */
#define VER "1.0"
#include <my_global.h> #include <my_global.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -1209,20 +1211,6 @@ static struct my_option innochecksum_options[] = {
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {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) static void usage(void)
{ {
print_version(); print_version();

View file

@ -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_global.h>
#include <my_base.h> #include <my_base.h>
#include <my_getopt.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 "common.h"
#include "xbstream.h" #include "xbstream.h"
#include "datasink.h" #include "datasink.h"
#include <welcome_copyright_notice.h>
#define XBSTREAM_VERSION "1.0"
#define XBSTREAM_BUFFER_SIZE (10 * 1024 * 1024UL) #define XBSTREAM_BUFFER_SIZE (10 * 1024 * 1024UL)
#define START_FILE_HASH_SIZE 16 #define START_FILE_HASH_SIZE 16
@ -146,14 +147,6 @@ get_options(int *argc, char ***argv)
return 0; return 0;
} }
static
void
print_version(void)
{
printf("%s Ver %s for %s (%s)\n", my_progname, XBSTREAM_VERSION,
SYSTEM_TYPE, MACHINE_TYPE);
}
static static
void void
usage(void) usage(void)

View file

@ -21,13 +21,14 @@
** **
** Written by Monty ** Written by Monty
*/ */
#define VER "1.7"
#include <my_global.h> #include <my_global.h>
#include <my_sys.h> #include <my_sys.h>
#include <m_string.h> #include <m_string.h>
#include <my_getopt.h> #include <my_getopt.h>
#include <my_default.h> #include <my_default.h>
#include <mysql_version.h> #include <mysql_version.h>
#include <welcome_copyright_notice.h>
#define load_default_groups mysqld_groups #define load_default_groups mysqld_groups
#include <mysqld_default_groups.h> #include <mysqld_default_groups.h>
@ -68,16 +69,10 @@ static void cleanup_and_exit(int exit_code)
exit(exit_code); exit(exit_code);
} }
static void version()
{
printf("%s Ver 1.7 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage() __attribute__ ((noreturn)); static void usage() __attribute__ ((noreturn));
static void usage() 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("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"); 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); printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
@ -104,7 +99,7 @@ get_one_option(const struct my_option *opt __attribute__((unused)),
verbose++; verbose++;
break; break;
case 'V': case 'V':
version(); print_version();
/* fall through */ /* fall through */
case '#': case '#':
DBUG_PUSH(argument ? argument : default_dbug_option); DBUG_PUSH(argument ? argument : default_dbug_option);

View file

@ -16,7 +16,7 @@
/* Return error-text for system error messages and handler messages */ /* 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_global.h>
#include <my_sys.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) static void usage(void)
{ {
print_version(); print_version();

View file

@ -41,12 +41,13 @@
Written by Monty. Written by Monty.
fill_buffer_retaining() is taken from gnu-grep and modified. fill_buffer_retaining() is taken from gnu-grep and modified.
*/ */
#define VER "1.4"
#include <my_global.h> #include <my_global.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <my_sys.h> #include <my_sys.h>
#include <m_string.h> #include <m_string.h>
#include <errno.h> #include <errno.h>
#include <welcome_copyright_notice.h>
#define PC_MALLOC 256 /* Bytes for pointers */ #define PC_MALLOC 256 /* Bytes for pointers */
#define PS_MALLOC 512 /* Bytes for data */ #define PS_MALLOC 512 /* Bytes for data */
@ -176,8 +177,7 @@ static int static_get_options(int *argc, char***argv)
case 'I': case 'I':
case '?': case '?':
help=1; /* Help text written */ help=1; /* Help text written */
printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE, print_version();
MACHINE_TYPE);
if (version) if (version)
break; 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"); 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");

View file

@ -18,6 +18,7 @@
versions into symbolic names. By Sasha Pachev <sasha@mysql.com> versions into symbolic names. By Sasha Pachev <sasha@mysql.com>
*/ */
#define VER "1.4"
#include <my_global.h> #include <my_global.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <my_sys.h> #include <my_sys.h>
@ -25,11 +26,11 @@
#include <mysql_version.h> #include <mysql_version.h>
#include <errno.h> #include <errno.h>
#include <my_getopt.h> #include <my_getopt.h>
#include <welcome_copyright_notice.h>
#define INIT_SYM_TABLE 4096 #define INIT_SYM_TABLE 4096
#define INC_SYM_TABLE 4096 #define INC_SYM_TABLE 4096
#define MAX_SYM_SIZE 128 #define MAX_SYM_SIZE 128
#define DUMP_VERSION "1.4"
#define HEX_INVALID (uchar)255 #define HEX_INVALID (uchar)255
typedef ulong my_long_addr_t ; /* at some point, we need to fix configure 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 verify_sort();
static void clean_up(); 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() static void usage()
{ {
print_version(); print_version();

View file

@ -16,7 +16,7 @@
/* Resolves IP's to hostname and hostnames to IP's */ /* Resolves IP's to hostname and hostnames to IP's */
#define RESOLVE_VERSION "2.3" #define VER "2.3"
#include <my_global.h> #include <my_global.h>
#include <m_ctype.h> #include <m_ctype.h>
@ -31,6 +31,7 @@
#endif #endif
#include <my_net.h> #include <my_net.h>
#include <my_getopt.h> #include <my_getopt.h>
#include <welcome_copyright_notice.h>
#if !defined(_AIX) && !defined(h_errno) #if !defined(_AIX) && !defined(h_errno)
extern int 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) static void usage(void)
{ {
print_version(); print_version();

View file

@ -27,4 +27,12 @@
"Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR \ "Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR \
", Oracle, MariaDB Corporation Ab and others.\n" ", Oracle, MariaDB Corporation Ab and others.\n"
#ifdef VER
static inline void print_version()
{
/* NOTE mysql.cc is not using this function! */
printf("%s Ver %s Distrib %s for %s (%s)\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
}
#endif
#endif /* _welcome_copyright_notice_h_ */ #endif /* _welcome_copyright_notice_h_ */

View file

@ -1269,7 +1269,7 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
mariadb-binlog Ver VER for OS at ARCH mariadb-binlog Ver VER Distrib DISTRIB for OS (ARCH)
# #
# Test --rewrite-db # Test --rewrite-db
# #

View file

@ -608,7 +608,7 @@ eval SET GLOBAL SERVER_ID = $old_server_id;
# #
# MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version # MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version
# #
replace_regex /.*mariadb-binlog(\.exe)? Ver .* for .* at [-_a-zA-Z0-9]+/mariadb-binlog Ver VER for OS at ARCH/; replace_regex /.*mariadb-binlog(\.exe)? Ver .* Distrib .* for .* \([-_a-zA-Z0-9]+\)/mariadb-binlog Ver VER Distrib DISTRIB for OS (ARCH)/;
exec $MYSQL_BINLOG --version; exec $MYSQL_BINLOG --version;
--echo # --echo #

View file

@ -29,6 +29,7 @@
#pragma implementation // gcc: Class implementation #pragma implementation // gcc: Class implementation
#endif #endif
#define VER "1.1"
#include "mariadb.h" #include "mariadb.h"
#if !defined(TZINFO2SQL) && !defined(TESTTIME) #if !defined(TZINFO2SQL) && !defined(TESTTIME)
#include "sql_priv.h" #include "sql_priv.h"
@ -43,6 +44,7 @@
#include <my_getopt.h> #include <my_getopt.h>
#endif #endif
#include <welcome_copyright_notice.h>
#include "tztime.h" #include "tztime.h"
#include "tzfile.h" #include "tzfile.h"
#include <m_string.h> #include <m_string.h>
@ -64,8 +66,6 @@
#endif /* !defined(DBUG_OFF) */ #endif /* !defined(DBUG_OFF) */
#endif /* defined(TZINFO2SQL) || defined(TESTTIME) */ #endif /* defined(TZINFO2SQL) || defined(TESTTIME) */
#define PROGRAM_VERSION "1.1"
/* Structure describing local time type (e.g. Moscow summer time (MSD)) */ /* Structure describing local time type (e.g. Moscow summer time (MSD)) */
typedef struct ttinfo typedef struct ttinfo
{ {
@ -2666,12 +2666,6 @@ static my_bool get_one_option(const struct my_option *, const char *,
const char *); const char *);
C_MODE_END C_MODE_END
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, PROGRAM_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
static const char *default_timezone_dir= "/usr/share/zoneinfo/"; static const char *default_timezone_dir= "/usr/share/zoneinfo/";

View file

@ -26,7 +26,7 @@
#define BUFFER_LEN 1024 #define BUFFER_LEN 1024
#define ARCHIVE_ROW_HEADER_SIZE 4 #define ARCHIVE_ROW_HEADER_SIZE 4
#define SHOW_VERSION "0.1" #define VER "0.1"
static void get_options(int *argc,char * * *argv); static void get_options(int *argc,char * * *argv);
static void print_version(void); static void print_version(void);
@ -400,12 +400,6 @@ static void usage(void)
my_print_help(my_long_options); my_print_help(my_long_options);
} }
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, SHOW_VERSION,
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
}
static void get_options(int *argc, char ***argv) static void get_options(int *argc, char ***argv)
{ {
load_defaults_or_exit("my", load_default_groups, argc, argv); load_defaults_or_exit("my", load_default_groups, argc, argv);

View file

@ -15,6 +15,7 @@
/* Describe, check and repair of MARIA tables */ /* Describe, check and repair of MARIA tables */
#define VER "1.3"
#include "ma_fulltext.h" #include "ma_fulltext.h"
#include <myisamchk.h> #include <myisamchk.h>
#include <my_bit.h> #include <my_bit.h>
@ -25,6 +26,7 @@
/* Remove next line if you want aria_chk to produce a stack trace */ /* Remove next line if you want aria_chk to produce a stack trace */
#undef HAVE_BACKTRACE #undef HAVE_BACKTRACE
#include <my_stacktrace.h> #include <my_stacktrace.h>
#include <welcome_copyright_notice.h>
static uint decode_bits; static uint decode_bits;
static char **default_argv; static char **default_argv;
@ -79,7 +81,6 @@ static char default_open_errmsg[]= "%d when opening Aria table '%s'";
static char default_close_errmsg[]= "%d when closing Aria table '%s'"; static char default_close_errmsg[]= "%d when closing Aria table '%s'";
static void get_options(int *argc,char * * *argv); static void get_options(int *argc,char * * *argv);
static void print_version(void);
static void usage(void); static void usage(void);
static int maria_chk(HA_CHECK *param, char *filename); static int maria_chk(HA_CHECK *param, char *filename);
static void descript(HA_CHECK *param, register MARIA_HA *info, char *name); static void descript(HA_CHECK *param, register MARIA_HA *info, char *name);
@ -471,13 +472,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver 1.3 for %s on %s\n", my_progname, SYSTEM_TYPE,
MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -13,8 +13,11 @@
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 02110-1335 USA */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#define VER "1.1"
#include "maria_def.h" #include "maria_def.h"
#include <my_getopt.h> #include <my_getopt.h>
#include <welcome_copyright_notice.h>
extern void translog_example_table_init(); extern void translog_example_table_init();
static const char *load_default_groups[]= { "aria_dump_log",0 }; static const char *load_default_groups[]= { "aria_dump_log",0 };
static void get_options(int *argc,char * * *argv); static void get_options(int *argc,char * * *argv);
@ -64,13 +67,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver 1.1 for %s on %s\n",
my_progname_short, SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -19,6 +19,7 @@
#define USE_MY_FUNC /* We need at least my_malloc */ #define USE_MY_FUNC /* We need at least my_malloc */
#endif #endif
#define VER "1.0"
#include "maria_def.h" #include "maria_def.h"
#include "trnman_public.h" #include "trnman_public.h"
#include "trnman.h" #include "trnman.h"
@ -33,6 +34,7 @@
#endif #endif
#include <my_getopt.h> #include <my_getopt.h>
#include <my_handler_errors.h> #include <my_handler_errors.h>
#include <welcome_copyright_notice.h>
#if SIZEOF_LONG_LONG > 4 #if SIZEOF_LONG_LONG > 4
#define BITS_SAVED 64 #define BITS_SAVED 64
@ -353,12 +355,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver 1.0 for %s on %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -17,6 +17,7 @@
Allow copying of Aria tables to and from S3 and also delete them from S3 Allow copying of Aria tables to and from S3 and also delete them from S3
*/ */
#define VER "1.0"
#include <my_global.h> #include <my_global.h>
#include <m_string.h> #include <m_string.h>
#include "maria_def.h" #include "maria_def.h"
@ -28,6 +29,7 @@
#include <zlib.h> #include <zlib.h>
#include <libmarias3/marias3.h> #include <libmarias3/marias3.h>
#include "s3_func.h" #include "s3_func.h"
#include <welcome_copyright_notice.h>
static const char *op_types[]= {"to_s3", "from_s3", "delete_from_s3", NullS}; static const char *op_types[]= {"to_s3", "from_s3", "delete_from_s3", NullS};
static TYPELIB op_typelib= {array_elements(op_types)-1,"", op_types, NULL}; static TYPELIB op_typelib= {array_elements(op_types)-1,"", op_types, NULL};
@ -109,12 +111,6 @@ static struct my_option my_long_options[] =
static bool get_database_from_path(char *to, size_t to_length, const char *path); static bool get_database_from_path(char *to, size_t to_length, const char *path);
static void print_version(void)
{
printf("%s Ver 1.0 for %s on %s\n", my_progname, SYSTEM_TYPE,
MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -15,12 +15,14 @@
/* Describe, check and repair of MyISAM tables */ /* Describe, check and repair of MyISAM tables */
#define VER "2.7"
#include "fulltext.h" #include "fulltext.h"
#include "my_default.h" #include "my_default.h"
#include <m_ctype.h> #include <m_ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include <my_getopt.h> #include <my_getopt.h>
#include <my_bit.h> #include <my_bit.h>
#include <welcome_copyright_notice.h>
static uint decode_bits; static uint decode_bits;
static char **default_argv; static char **default_argv;
@ -53,7 +55,6 @@ static const char *field_pack[]=
static const char *myisam_stats_method_str="nulls_unequal"; static const char *myisam_stats_method_str="nulls_unequal";
static void get_options(int *argc,char * * *argv); static void get_options(int *argc,char * * *argv);
static void print_version(void);
static void usage(void); static void usage(void);
static int myisamchk(HA_CHECK *param, char *filename); static int myisamchk(HA_CHECK *param, char *filename);
static void descript(HA_CHECK *param, register MI_INFO *info, char * name); static void descript(HA_CHECK *param, register MI_INFO *info, char * name);
@ -331,13 +332,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver 2.7 for %s at %s\n", my_progname, SYSTEM_TYPE,
MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -20,12 +20,14 @@
#define USE_MY_FUNC #define USE_MY_FUNC
#endif #endif
#define VER "1.4"
#include "myisamdef.h" #include "myisamdef.h"
#include <my_tree.h> #include <my_tree.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef HAVE_GETRUSAGE #ifdef HAVE_GETRUSAGE
#include <sys/resource.h> #include <sys/resource.h>
#endif #endif
#include <welcome_copyright_notice.h>
#define FILENAME(A) (A ? A->show_name : "Unknown") #define FILENAME(A) (A ? A->show_name : "Unknown")
@ -249,8 +251,7 @@ static void get_options(register int *argc, register char ***argv)
/* Fall through */ /* Fall through */
case 'I': case 'I':
case '?': case '?':
printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE, print_version();
MACHINE_TYPE);
puts("By Monty, for your professional use\n"); puts("By Monty, for your professional use\n");
if (version) if (version)
break; break;

View file

@ -20,6 +20,7 @@
#define USE_MY_FUNC /* We need at least my_malloc */ #define USE_MY_FUNC /* We need at least my_malloc */
#endif #endif
#define VER "1.23"
#include "myisamdef.h" #include "myisamdef.h"
#include "my_default.h" #include "my_default.h"
#include <queues.h> #include <queues.h>
@ -30,6 +31,7 @@
#endif #endif
#include <my_getopt.h> #include <my_getopt.h>
#include <assert.h> #include <assert.h>
#include <welcome_copyright_notice.h>
#if SIZEOF_LONG_LONG > 4 #if SIZEOF_LONG_LONG > 4
#define BITS_SAVED 64 #define BITS_SAVED 64
@ -289,13 +291,6 @@ static struct my_option my_long_options[] =
}; };
static void print_version(void)
{
printf("%s Ver 1.23 for %s on %s\n",
my_progname, SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage(void) static void usage(void)
{ {
print_version(); print_version();

View file

@ -13,6 +13,7 @@
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 02110-1335 USA */ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
#define VER "2.1"
#include <my_global.h> #include <my_global.h>
#include <my_sys.h> #include <my_sys.h>
#include <mysql.h> #include <mysql.h>
@ -24,6 +25,7 @@
#include <mysql_version.h> #include <mysql_version.h>
#include <sql_common.h> #include <sql_common.h>
#include <mysql/client_plugin.h> #include <mysql/client_plugin.h>
#include <welcome_copyright_notice.h>
/* /*
If non_blocking_api_enabled is true, we will re-define all the blocking If non_blocking_api_enabled is true, we will re-define all the blocking
@ -37,7 +39,6 @@ static my_bool non_blocking_api_enabled= 0;
#include "nonblock-wrappers.h" #include "nonblock-wrappers.h"
#endif #endif
#define VER "2.1"
#define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */ #define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */
#define MAX_KEY MAX_INDEXES #define MAX_KEY MAX_INDEXES
#define MAX_SERVER_ARGS 64 #define MAX_SERVER_ARGS 64
@ -1256,8 +1257,7 @@ static void usage(void)
{ {
/* show the usage string when the user asks for this */ /* show the usage string when the user asks for this */
putc('\n', stdout); putc('\n', stdout);
printf("%s Ver %s Distrib %s, for %s (%s)\n", print_version();
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
puts("By Monty, Venu, Kent and others\n"); puts("By Monty, Venu, Kent and others\n");
printf("\ printf("\
Copyright (C) 2002-2004 MySQL AB\n\ Copyright (C) 2002-2004 MySQL AB\n\