summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mysql.h1
-rw-r--r--mysql-test/r/plugin.result2
-rw-r--r--mysql-test/t/plugin.test7
-rw-r--r--sql/share/errmsg-utf8.txt2
-rw-r--r--sql/sql_plugin.cc4
5 files changed, 12 insertions, 4 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 74914006758..090abf46377 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -135,6 +135,7 @@ typedef unsigned long long my_ulonglong;
/* backward compatibility define - to be removed eventually */
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
+#define WARN_PLUGIN_DELETE_BUILTIN ER_PLUGIN_DELETE_BUILTIN
typedef struct st_mysql_rows {
struct st_mysql_rows *next; /* list of rows */
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 62864d0f16d..3b706817285 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -171,3 +171,5 @@ select 1;
1
1
UNINSTALL PLUGIN example;
+UNINSTALL PLUGIN MyISAM;
+ERROR HY000: Built-in plugins cannot be deleted
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 4412383f837..02df863f52d 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -148,3 +148,10 @@ SET @@SQL_MODE=@OLD_SQL_MODE;
#
select 1;
UNINSTALL PLUGIN example;
+
+#
+# MDEV-4573 UNINSTALL PLUGIN misleading error message for non-dynamic plugins
+#
+--error ER_PLUGIN_DELETE_BUILTIN
+UNINSTALL PLUGIN MyISAM;
+
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 656402f1d04..4162297b33c 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -6161,7 +6161,7 @@ WARN_NO_MASTER_INFO
WARN_OPTION_IGNORED
eng "<%-.64s> option ignored"
ger "Option <%-.64s> ignoriert"
-WARN_PLUGIN_DELETE_BUILTIN
+ER_PLUGIN_DELETE_BUILTIN
eng "Built-in plugins cannot be deleted"
ger "Eingebaute Plugins können nicht gelöscht werden"
WARN_PLUGIN_BUSY
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index f540431b4e9..55047a6da61 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -2174,9 +2174,7 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_STRING *name)
}
if (!plugin->plugin_dl)
{
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- WARN_PLUGIN_DELETE_BUILTIN, ER(WARN_PLUGIN_DELETE_BUILTIN));
- my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str);
+ my_error(ER_PLUGIN_DELETE_BUILTIN, MYF(0));
return 1;
}
if (plugin->load_option == PLUGIN_FORCE_PLUS_PERMANENT)