Bug #32902 plugin variables don't know their names
Submitted: 1 Dec 2007 23:57 Modified: 8 Feb 15:36
Reporter: Sergei Golubchik
Status: In progress
Category:Server: UDF Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Target Version:6.0
Triage: Triaged: D4 (Minor)

[1 Dec 2007 23:57] Sergei Golubchik
Description:
There's no way given a plugin variable (MYSQL_SYSVAR_*, MYSQL_THDVAR_*) to find its full
name, only the short name (without plugin name prefix) is available.

as check and update functions only get access to the plugin variable (st_mysql_sys_var),
they cannot print the error message correctly.

How to repeat:
See check_func_bool(), check_func_enum(), check_func_set(), and after a fix for bug#31177
other check_func_XXX() functions.

Suggested fix:
when a sys_var_pluginvar() is created out of st_mysql_sys_var, set st_mysql_sys_var::name
to point to sys_var_pluginvar::name.

Alternatively, add a pointer to st_mysql_sys_var and (on install) set it to point to
sys_var_pluginvar or st_plugin_int.
[18 Dec 2007 21:03] Antony Curtis
Patch is in cset for WL#3771
[27 Jan 0:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/41285

ChangeSet@1.2661, 2008-01-26 15:36:22-08:00, acurtis@xiphis.org +4 -0
  Bug#32902
    "plugin variables don't know their names"
    Implemented new plugin support function thd_plugin_var_name() to return the logical
    name of the plugin variable.