1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#46586: When using the plugin interface the type "set" for options caused a crash.

"What do you mean, there's a bug? There isn't even code!"

There was some token code for plug-in variables of the SET type,
but clearly this never worked, or was subject to massive bit rot
since. Bug-fixes ... fail-safes ... tests -- fais au mieux, mon chou!
This commit is contained in:
Tatiana A. Nurnberg
2009-10-27 06:16:02 -07:00
parent 842039a1fb
commit 2f069a2c9b
3 changed files with 11 additions and 4 deletions

View File

@ -2066,7 +2066,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;
@ -2665,7 +2665,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(',');
}