summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-11-06 17:20:27 +0300
committerAlexander Nozdrin <alik@sun.com>2009-11-06 17:20:27 +0300
commit7cd11f45beeb162db84dea423a040a296ac2856e (patch)
tree3fcae3d99a56ba99d825ae4457901d49e4b474e3 /sql/sql_plugin.cc
parent5462a6dbcc68d51a89356255fb4f398be7d62c27 (diff)
parent3e2c9aac11a95d8cbb61e1937e4ebe18c7e86698 (diff)
downloadmariadb-git-7cd11f45beeb162db84dea423a040a296ac2856e.tar.gz
Manual merge from mysql-trunk-merge.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index b328de40c10..a4da72c0948 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -2065,7 +2065,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var,
const char *strvalue= "NULL", *str;
TYPELIB *typelib;
ulonglong result;
- uint error_len;
+ uint error_len= 0; // init as only set on error
bool not_used;
int length;
@@ -2664,7 +2664,9 @@ uchar* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type,
{
if (!(value & mask))
continue;
- str.append(typelib->type_names[i], typelib->type_lengths[i]);
+ str.append(typelib->type_names[i], typelib->type_lengths
+ ? typelib->type_lengths[i]
+ : strlen(typelib->type_names[i]));
str.append(',');
}