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'
This commit is contained in:
unknown 2003-11-26 03:30:00 +02:00
parent c61d96d5ba
commit fa9047e280
3 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -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}
};