Bug#21610

  "Loaded engine does not load after restart."
  Junk characters caused plugin load to fail silently.
parent 2da8058c
...@@ -759,14 +759,16 @@ void plugin_load(void) ...@@ -759,14 +759,16 @@ void plugin_load(void)
while (!(error= read_record_info.read_record(&read_record_info))) while (!(error= read_record_info.read_record(&read_record_info)))
{ {
DBUG_PRINT("info", ("init plugin record")); DBUG_PRINT("info", ("init plugin record"));
LEX_STRING name, dl; String str_name, str_dl;
name.str= get_field(&mem, table->field[0]); get_field(&mem, table->field[0], &str_name);
name.length= strlen(name.str); get_field(&mem, table->field[1], &str_dl);
dl.str= get_field(&mem, table->field[1]);
dl.length= strlen(dl.str); LEX_STRING name= {(char *)str_name.ptr(), str_name.length()};
LEX_STRING dl= {(char *)str_dl.ptr(), str_dl.length()};
if (plugin_add(&name, &dl, REPORT_TO_LOG)) if (plugin_add(&name, &dl, REPORT_TO_LOG))
DBUG_PRINT("warning", ("Couldn't load plugin named '%s' with soname '%s'.", sql_print_warning("Couldn't load plugin named '%s' with soname '%s'.",
name.str, dl.str)); str_name.c_ptr(), str_dl.c_ptr());
} }
if (error > 0) if (error > 0)
sql_print_error(ER(ER_GET_ERRNO), my_errno); sql_print_error(ER(ER_GET_ERRNO), my_errno);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment