Bug#21610

"Loaded engine does not load after restart."
  Junk characters caused plugin load to fail silently.
This commit is contained in:
acurtis/antony@xiphis.org/ltamd64.xiphis.org 2006-09-25 10:59:49 -07:00
parent 2da8058cd4
commit 6414330377

View File

@ -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);