diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-05-09 12:35:11 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-05-09 12:35:11 +0200 |
commit | d3e2e1243bb0dae95ce35b0380dd4f8f476b254d (patch) | |
tree | 8779ad6b2059f181770cc07e2437925d7d5d5d04 /storage/example | |
parent | 229dad1f9b12f8e9f64b6a605bdf8e31c339d018 (diff) | |
parent | 124428a9e28e59f98b25d8ee07b57d264f63cbe4 (diff) | |
download | mariadb-git-d3e2e1243bb0dae95ce35b0380dd4f8f476b254d.tar.gz |
5.5 merge
Diffstat (limited to 'storage/example')
-rw-r--r-- | storage/example/ha_example.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 930c4f38633..a671dfb1f89 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -1015,6 +1015,9 @@ static MYSQL_SYSVAR_ENUM( 0, // def &enum_var_typelib); // typelib +static MYSQL_THDVAR_INT(int_var, PLUGIN_VAR_RQCMDARG, "-1..1", + NULL, NULL, 0, -1, 1, 0); + static MYSQL_SYSVAR_ULONG( ulong_var, srv_ulong_var, @@ -1053,6 +1056,7 @@ static MYSQL_THDVAR_DOUBLE( static struct st_mysql_sys_var* example_system_variables[]= { MYSQL_SYSVAR(enum_var), MYSQL_SYSVAR(ulong_var), + MYSQL_SYSVAR(int_var), MYSQL_SYSVAR(double_var), MYSQL_SYSVAR(double_thdvar), MYSQL_SYSVAR(varopt_default), @@ -1067,9 +1071,10 @@ static int show_func_example(MYSQL_THD thd, struct st_mysql_show_var *var, var->type= SHOW_CHAR; var->value= buf; // it's of SHOW_VAR_FUNC_BUFF_SIZE bytes my_snprintf(buf, SHOW_VAR_FUNC_BUFF_SIZE, - "enum_var is %lu, ulong_var is %lu, " + "enum_var is %lu, ulong_var is %lu, int_var is %d, " "double_var is %f, %.6b", // %b is a MySQL extension - srv_enum_var, srv_ulong_var, srv_double_var, "really"); + srv_enum_var, srv_ulong_var, THDVAR(thd, int_var), + srv_double_var, "really"); return 0; } |