mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
branches/zip:
Add InnoDB version in these places: * In INFORMATION_SCHEMA.PLUGINS.PLUGIN_VERSION, only 1.2 out of 1.2.3 because MySQL supports only one dot there * At startup: "080501 12:28:06 InnoDB Plugin 1.0.1 started; log sequence number 46509" * In a server variable innodb_version; mysql> select @@innodb_version; +------------------+ | @@innodb_version | +------------------+ | 1.0.1 | +------------------+ Approved by: Sunny
This commit is contained in:
parent
2daf8121c0
commit
3bad6e2511
4 changed files with 40 additions and 10 deletions
|
@ -182,6 +182,8 @@ static my_bool innobase_adaptive_hash_index = TRUE;
|
|||
|
||||
static char* internal_innobase_data_file_path = NULL;
|
||||
|
||||
static char* innodb_version_str = (char*) INNODB_VERSION_STR;
|
||||
|
||||
/* The following counter is used to convey information to InnoDB
|
||||
about server activity: in selects it is not sensible to call
|
||||
srv_active_wake_master_thread after each fetch or search, we only do
|
||||
|
@ -9077,6 +9079,10 @@ static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
|
|||
AUTOINC_OLD_STYLE_LOCKING, /* Minimum value */
|
||||
AUTOINC_NO_LOCKING, 0); /* Maximum value */
|
||||
|
||||
static MYSQL_SYSVAR_STR(version, innodb_version_str,
|
||||
PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
|
||||
"InnoDB version", NULL, NULL, INNODB_VERSION_STR);
|
||||
|
||||
static struct st_mysql_sys_var* innobase_system_variables[]= {
|
||||
MYSQL_SYSVAR(additional_mem_pool_size),
|
||||
MYSQL_SYSVAR(autoextend_increment),
|
||||
|
@ -9120,6 +9126,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
|
|||
MYSQL_SYSVAR(thread_concurrency),
|
||||
MYSQL_SYSVAR(thread_sleep_delay),
|
||||
MYSQL_SYSVAR(autoinc_lock_mode),
|
||||
MYSQL_SYSVAR(version),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -9255,7 +9262,7 @@ mysql_declare_plugin(innobase)
|
|||
PLUGIN_LICENSE_GPL,
|
||||
innobase_init, /* Plugin Init */
|
||||
NULL, /* Plugin Deinit */
|
||||
0x0100 /* 1.0 */,
|
||||
INNODB_VERSION_SHORT,
|
||||
innodb_status_variables_export,/* status variables */
|
||||
innobase_system_variables, /* system variables */
|
||||
NULL /* reserved */
|
||||
|
|
|
@ -423,7 +423,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_trx =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
@ -698,7 +698,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_locks =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
@ -881,7 +881,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_lock_waits =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
@ -1213,7 +1213,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
@ -1263,7 +1263,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_reset =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
@ -1479,7 +1479,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
@ -1529,7 +1529,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem_reset =
|
|||
|
||||
/* plugin version (for SHOW PLUGINS) */
|
||||
/* unsigned int */
|
||||
STRUCT_FLD(version, 0x0100 /* 1.0 */),
|
||||
STRUCT_FLD(version, INNODB_VERSION_SHORT),
|
||||
|
||||
/* struct st_mysql_show_var* */
|
||||
STRUCT_FLD(status_vars, NULL),
|
||||
|
|
|
@ -9,6 +9,28 @@ Created 1/20/1994 Heikki Tuuri
|
|||
#ifndef univ_i
|
||||
#define univ_i
|
||||
|
||||
#define INNODB_VERSION_MAJOR 1
|
||||
#define INNODB_VERSION_MINOR 0
|
||||
#define INNODB_VERSION_BUGFIX 1
|
||||
|
||||
/* The following is the InnoDB version as shown in
|
||||
SELECT plugin_version FROM information_schema.plugins;
|
||||
calculated in in make_version_string() in sql/sql_show.cc like this:
|
||||
"version >> 8" . "version & 0xff"
|
||||
because the version is shown with only one dot, we skip the last
|
||||
component, i.e. we show M.N.P as M.N */
|
||||
#define INNODB_VERSION_SHORT \
|
||||
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
|
||||
|
||||
/* auxiliary macros to help creating the version as string */
|
||||
#define __INNODB_VERSION(a, b, c) (#a "." #b "." #c)
|
||||
#define _INNODB_VERSION(a, b, c) __INNODB_VERSION(a, b, c)
|
||||
|
||||
#define INNODB_VERSION_STR \
|
||||
_INNODB_VERSION(INNODB_VERSION_MAJOR, \
|
||||
INNODB_VERSION_MINOR, \
|
||||
INNODB_VERSION_BUGFIX)
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
/* In the dynamic plugin, redefine some externally visible symbols
|
||||
in order not to conflict with the symbols of a builtin InnoDB. */
|
||||
|
|
|
@ -1662,8 +1662,9 @@ innobase_start_or_create_for_mysql(void)
|
|||
if (srv_print_verbose_log) {
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" InnoDB: Started; log sequence number %llu\n",
|
||||
srv_start_lsn);
|
||||
" InnoDB Plugin %s started; "
|
||||
"log sequence number %llu\n",
|
||||
INNODB_VERSION_STR, srv_start_lsn);
|
||||
}
|
||||
|
||||
if (srv_force_recovery > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue