Fix misleading error message when uninstalling built-in plugins
Related: #966645
This commit is contained in:
parent
62be2289a3
commit
e8e5360777
74
community-mysql-pluginerrmsg.patch
Normal file
74
community-mysql-pluginerrmsg.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
In MySQL 5.5, the InnoDB Plugin is the default version and it's compiled in.
|
||||||
|
In this case, the plugin cannot be uninstalled and we get error when trying
|
||||||
|
to do so:
|
||||||
|
|
||||||
|
mysql> uninstall plugin innodb;
|
||||||
|
ERROR 1305 (42000): PLUGIN innodb does not exist
|
||||||
|
|
||||||
|
But the error message is misleading. The plugin does exist, it just cannot
|
||||||
|
be installed because it's not dynamically loaded.
|
||||||
|
|
||||||
|
MySQL bug report: http://bugs.mysql.com/bug.php?id=51771
|
||||||
|
MariaDB bug report: https://mariadb.atlassian.net/browse/MDEV-4573
|
||||||
|
MariaDB fix: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3802
|
||||||
|
|
||||||
|
diff -up mysql-5.5.32/include/mysql.h.pluginerrmsg mysql-5.5.32/include/mysql.h
|
||||||
|
--- mysql-5.5.32/include/mysql.h.pluginerrmsg 2013-05-16 17:47:15.000000000 +0200
|
||||||
|
+++ mysql-5.5.32/include/mysql.h 2013-07-01 16:07:29.175690210 +0200
|
||||||
|
@@ -134,6 +134,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 -up mysql-5.5.32/mysql-test/r/plugin.result.pluginerrmsg mysql-5.5.32/mysql-test/r/plugin.result
|
||||||
|
--- mysql-5.5.32/mysql-test/r/plugin.result.pluginerrmsg 2013-05-16 17:47:14.000000000 +0200
|
||||||
|
+++ mysql-5.5.32/mysql-test/r/plugin.result 2013-07-01 16:07:29.176690210 +0200
|
||||||
|
@@ -63,3 +63,5 @@ set session sql_mode=@old_sql_mode;
|
||||||
|
set session old=bla;
|
||||||
|
ERROR HY000: Variable 'old' is a read only variable
|
||||||
|
UNINSTALL PLUGIN example;
|
||||||
|
+UNINSTALL PLUGIN MyISAM;
|
||||||
|
+ERROR HY000: Built-in plugins cannot be deleted
|
||||||
|
diff -up mysql-5.5.32/mysql-test/t/plugin.test.pluginerrmsg mysql-5.5.32/mysql-test/t/plugin.test
|
||||||
|
--- mysql-5.5.32/mysql-test/t/plugin.test.pluginerrmsg 2013-05-16 17:47:14.000000000 +0200
|
||||||
|
+++ mysql-5.5.32/mysql-test/t/plugin.test 2013-07-01 16:07:29.199690210 +0200
|
||||||
|
@@ -85,3 +85,10 @@ set session sql_mode=@old_sql_mode;
|
||||||
|
set session old=bla;
|
||||||
|
|
||||||
|
UNINSTALL PLUGIN example;
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# MDEV-4573 UNINSTALL PLUGIN misleading error message for non-dynamic plugins
|
||||||
|
+#
|
||||||
|
+--error ER_PLUGIN_DELETE_BUILTIN
|
||||||
|
+UNINSTALL PLUGIN MyISAM;
|
||||||
|
+
|
||||||
|
diff -up mysql-5.5.32/sql/share/errmsg-utf8.txt.pluginerrmsg mysql-5.5.32/sql/share/errmsg-utf8.txt
|
||||||
|
--- mysql-5.5.32/sql/share/errmsg-utf8.txt.pluginerrmsg 2013-05-16 17:47:15.000000000 +0200
|
||||||
|
+++ mysql-5.5.32/sql/share/errmsg-utf8.txt 2013-07-01 16:07:29.203690210 +0200
|
||||||
|
@@ -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 -up mysql-5.5.32/sql/sql_plugin.cc.pluginerrmsg mysql-5.5.32/sql/sql_plugin.cc
|
||||||
|
--- mysql-5.5.32/sql/sql_plugin.cc.pluginerrmsg 2013-07-01 16:07:29.205690210 +0200
|
||||||
|
+++ mysql-5.5.32/sql/sql_plugin.cc 2013-07-01 16:07:54.721689764 +0200
|
||||||
|
@@ -1909,9 +1909,7 @@ bool mysql_uninstall_plugin(THD *thd, co
|
||||||
|
}
|
||||||
|
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));
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
if (plugin->load_option == PLUGIN_FORCE_PLUS_PERMANENT)
|
@ -1,6 +1,6 @@
|
|||||||
Name: community-mysql
|
Name: community-mysql
|
||||||
Version: 5.5.32
|
Version: 5.5.32
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
Summary: MySQL client programs and shared libraries
|
Summary: MySQL client programs and shared libraries
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
@ -65,6 +65,7 @@ Patch26: community-mysql-cve-2013-1861.patch
|
|||||||
Patch27: community-mysql-innodbwarn.patch
|
Patch27: community-mysql-innodbwarn.patch
|
||||||
Patch28: community-mysql-covscan-signexpr.patch
|
Patch28: community-mysql-covscan-signexpr.patch
|
||||||
Patch29: community-mysql-covscan-stroverflow.patch
|
Patch29: community-mysql-covscan-stroverflow.patch
|
||||||
|
Patch30: community-mysql-pluginerrmsg.patch
|
||||||
|
|
||||||
BuildRequires: perl, readline-devel, openssl-devel
|
BuildRequires: perl, readline-devel, openssl-devel
|
||||||
BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel
|
BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel
|
||||||
@ -252,6 +253,7 @@ the MySQL sources.
|
|||||||
%patch27 -p1
|
%patch27 -p1
|
||||||
%patch28 -p1
|
%patch28 -p1
|
||||||
%patch29 -p1
|
%patch29 -p1
|
||||||
|
%patch30 -p1
|
||||||
|
|
||||||
# workaround for upstream bug #56342
|
# workaround for upstream bug #56342
|
||||||
rm -f mysql-test/t/ssl_8k_key-master.opt
|
rm -f mysql-test/t/ssl_8k_key-master.opt
|
||||||
@ -715,6 +717,10 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/solaris/postinstall-solaris
|
|||||||
%{_mandir}/man1/mysql_client_test.1*
|
%{_mandir}/man1/mysql_client_test.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 1 2013 Honza Horak <hhorak@redhat.com> 5.5.32-5
|
||||||
|
- Fix misleading error message when uninstalling built-in plugins
|
||||||
|
Related: #966645
|
||||||
|
|
||||||
* Thu Jun 27 2013 Honza Horak <hhorak@redhat.com> 5.5.32-4
|
* Thu Jun 27 2013 Honza Horak <hhorak@redhat.com> 5.5.32-4
|
||||||
- Remove external man pages, upstream fixed man pages license
|
- Remove external man pages, upstream fixed man pages license
|
||||||
- Apply fixes found by Coverity static analysis tool
|
- Apply fixes found by Coverity static analysis tool
|
||||||
|
Loading…
Reference in New Issue
Block a user