diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 09:39:45 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 09:39:45 +0300 |
commit | 4cd7979c56130194cc3742e1037998d11f98c047 (patch) | |
tree | 70131981da1d874d68b9e8cc8e7bf293e405907e /sql/sql_plugin.cc | |
parent | 619dc2b24f26aea29345dc3f3289bed406738025 (diff) | |
parent | 9c34a4124d67d9e3f70837eaeb11290f35e8f8d0 (diff) | |
download | mariadb-git-4cd7979c56130194cc3742e1037998d11f98c047.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index adf6fa4f936..4c258acd487 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2005, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB Corporation. + Copyright (c) 2005, 2018, Oracle and/or its affiliates. + Copyright (c) 2010, 2018, MariaDB Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2283,6 +2283,16 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name, if (! (table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT))) DBUG_RETURN(TRUE); + if (!table->key_info) + { + my_printf_error(ER_UNKNOWN_ERROR, + "The table %s.%s has no primary key. " + "Please check the table definition and " + "create the primary key accordingly.", MYF(0), + table->s->db.str, table->s->table_name.str); + DBUG_RETURN(TRUE); + } + /* Pre-acquire audit plugins for events that may potentially occur during [UN]INSTALL PLUGIN. |