summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 595c371f515..a43b8c7484a 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -738,7 +738,7 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
plugin directory are used (to make this even remotely secure).
*/
if (check_valid_path(dl->str, dl->length) ||
- check_string_char_length((LEX_STRING *) dl, "", NAME_CHAR_LEN,
+ check_string_char_length((LEX_STRING *) dl, 0, NAME_CHAR_LEN,
system_charset_info, 1) ||
plugin_dir_len + dl->length + 1 >= FN_REFLEN)
{
@@ -1818,7 +1818,8 @@ static void plugin_load(MEM_ROOT *tmp_root)
mysql_mutex_unlock(&LOCK_plugin);
}
if (error > 0)
- sql_print_error(ER(ER_GET_ERRNO), my_errno, table->file->table_type());
+ sql_print_error(ER_THD(new_thd, ER_GET_ERRNO), my_errno,
+ table->file->table_type());
end_read_record(&read_record_info);
table->m_needs_reopen= TRUE; // Force close to free memory
close_mysql_tables(new_thd);
@@ -2069,7 +2070,8 @@ static bool finalize_install(THD *thd, TABLE *table, const LEX_STRING *name,
{
if (global_system_variables.log_warnings)
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
- ER_CANT_INITIALIZE_UDF, ER(ER_CANT_INITIALIZE_UDF),
+ ER_CANT_INITIALIZE_UDF,
+ ER_THD(thd, ER_CANT_INITIALIZE_UDF),
name->str, "Plugin is disabled");
}
@@ -2202,7 +2204,7 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_STRING *name)
plugin->state= PLUGIN_IS_DELETED;
if (plugin->ref_count)
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- WARN_PLUGIN_BUSY, ER(WARN_PLUGIN_BUSY));
+ WARN_PLUGIN_BUSY, ER_THD(thd, WARN_PLUGIN_BUSY));
else
reap_needed= true;