diff options
| author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 09:26:40 +0300 |
|---|---|---|
| committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 09:26:40 +0300 |
| commit | 9c34a4124d67d9e3f70837eaeb11290f35e8f8d0 (patch) | |
| tree | 1adb4d44b9b7e7cf20e63e3ebc95ba05f7dc47e9 /sql/sql_plugin.cc | |
| parent | 5b79303b40e31d77f616c2b797f58de41973e6a3 (diff) | |
| parent | c7bb33724826dab53831b74bc0cf7ec311eb13f0 (diff) | |
| download | mariadb-git-9c34a4124d67d9e3f70837eaeb11290f35e8f8d0.tar.gz | |
Merge 10.0 into 10.1
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 d57137b30f6..46ffc074ca7 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 @@ -2270,6 +2270,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. |
