Commit 2915288a authored by unknown's avatar unknown

Added compilation comment to 'show variables'

This makes it possible to check origin of binary from the output of 'show variables'


include/mysql_version.h.in:
  Added MYSQL_COMPILATION_COMMENT
sql/mysqld.cc:
  Added compilation comment to mysqld --version
sql/set_var.cc:
  Added compilation comment to 'show variables'
parent 6da14dae
......@@ -19,6 +19,7 @@
#define MYSQL_PORT @MYSQL_TCP_PORT@
#define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@"
#define MYSQL_CONFIG_NAME "my"
#define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@"
/* mysqld compile time options */
#ifndef MYSQL_CHARSET
......
......@@ -4278,8 +4278,8 @@ struct show_var_st status_vars[]= {
static void print_version(void)
{
printf("%s Ver %s for %s on %s\n",my_progname,
server_version,SYSTEM_TYPE,MACHINE_TYPE);
printf("%s Ver %s for %s on %s (%s)\n",my_progname,
server_version,SYSTEM_TYPE,MACHINE_TYPE, MYSQL_COMPILATION_COMMENT);
}
static void use_help(void)
......
......@@ -593,6 +593,7 @@ struct show_var_st init_vars[]= {
SHOW_SYS},
{sys_trans_prealloc_size.name, (char*) &sys_trans_prealloc_size, SHOW_SYS},
{"version", server_version, SHOW_CHAR},
{"version_comment", (char*) MYSQL_COMPILATION_COMMENT, SHOW_CHAR},
{sys_net_wait_timeout.name, (char*) &sys_net_wait_timeout, SHOW_SYS},
{NullS, NullS, SHOW_LONG}
};
......
Markdown is supported
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