summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2014-04-16 12:13:43 +0300
committerJan Lindström <jplindst@mariadb.org>2014-04-16 12:13:43 +0300
commit150e88e8c9b85e3e6ce500a91fd215d231e99881 (patch)
treee029a8c9beae4cf67edc5239694c68f8b4de28c0 /sql/sql_plugin.cc
parent983366e0eef50b95329bcba154ee4fb38b85df3c (diff)
parent142c20eda9d287f7f898dd8d89821f0e809dafc6 (diff)
downloadmariadb-git-150e88e8c9b85e3e6ce500a91fd215d231e99881.tar.gz
Merge from lp:maria/5.5 to maria-5.5.37 release revision 4154.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 17c21118868..60e7b0b0d44 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -2900,6 +2900,7 @@ static uchar *intern_sys_var_ptr(THD* thd, int offset, bool global_lock)
DBUG_ENTER("intern_sys_var_ptr");
DBUG_ASSERT(offset >= 0);
DBUG_ASSERT((uint)offset <= global_system_variables.dynamic_variables_head);
+ mysql_mutex_assert_not_owner(&LOCK_open);
if (!thd)
DBUG_RETURN((uchar*) global_system_variables.dynamic_variables_ptr + offset);
@@ -3170,15 +3171,21 @@ static void plugin_vars_free_values(sys_var *vars)
static SHOW_TYPE pluginvar_show_type(st_mysql_sys_var *plugin_var)
{
- switch (plugin_var->flags & PLUGIN_VAR_TYPEMASK) {
+ switch (plugin_var->flags & (PLUGIN_VAR_TYPEMASK | PLUGIN_VAR_UNSIGNED)) {
case PLUGIN_VAR_BOOL:
return SHOW_MY_BOOL;
case PLUGIN_VAR_INT:
- return SHOW_INT;
+ return SHOW_SINT;
+ case PLUGIN_VAR_INT | PLUGIN_VAR_UNSIGNED:
+ return SHOW_UINT;
case PLUGIN_VAR_LONG:
- return SHOW_LONG;
+ return SHOW_SLONG;
+ case PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED:
+ return SHOW_ULONG;
case PLUGIN_VAR_LONGLONG:
- return SHOW_LONGLONG;
+ return SHOW_SLONGLONG;
+ case PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED:
+ return SHOW_ULONGLONG;
case PLUGIN_VAR_STR:
return SHOW_CHAR_PTR;
case PLUGIN_VAR_ENUM: