summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-08-26 13:23:32 +0500
committerunknown <ramil@mysql.com>2005-08-26 13:23:32 +0500
commita8dbdbe9278d9bc128e3e8357d951301ec676132 (patch)
tree802cafaae67dc1c6f065a1c3ae608901f2c751fd /sql/set_var.cc
parent7b8ab0e1cff25108f3b044189db879fd39073290 (diff)
downloadmariadb-git-a8dbdbe9278d9bc128e3e8357d951301ec676132.tar.gz
workaround (bug #9613: Some read-only variables are selectable, others are not).
sql/set_var.cc: workaround (bug #9613: Some read-only variables are selectable, others are not). sys_have_innodb variable added.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 1b66b68b349..be99a402dc7 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -118,6 +118,7 @@ static KEY_CACHE *create_key_cache(const char *name, uint length);
void fix_sql_mode_var(THD *thd, enum_var_type type);
static byte *get_error_count(THD *thd);
static byte *get_warning_count(THD *thd);
+static byte *get_have_innodb(THD *thd);
/*
Variable definition list
@@ -484,6 +485,8 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
/* Read only variables */
sys_var_const_str sys_os("version_compile_os", SYSTEM_TYPE);
+sys_var_readonly sys_have_innodb("have_innodb", OPT_GLOBAL,
+ SHOW_CHAR, get_have_innodb);
/* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
@@ -529,6 +532,7 @@ sys_var *sys_variables[]=
&sys_ft_boolean_syntax,
&sys_foreign_key_checks,
&sys_group_concat_max_len,
+ &sys_have_innodb,
&sys_identity,
&sys_init_connect,
&sys_init_slave,
@@ -2614,6 +2618,12 @@ static byte *get_error_count(THD *thd)
}
+static byte *get_have_innodb(THD *thd)
+{
+ return (byte*) show_comp_option_name[have_innodb];
+}
+
+
/****************************************************************************
Main handling of variables:
- Initialisation