1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge tag 'mariadb-10.0.22' into 10.0-galera

This commit is contained in:
Nirbhay Choubey
2015-10-31 18:07:02 -04:00
362 changed files with 9489 additions and 3214 deletions

View File

@@ -5909,6 +5909,16 @@ drop_create_field:
{
if (!key->create_if_not_exists)
continue;
/* Check if the table already has a PRIMARY KEY */
if (key->type == Key::PRIMARY &&
table->s->primary_key != MAX_KEY)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_DUP_KEYNAME, ER(ER_MULTIPLE_PRI_KEY));
goto remove_key_no_warn;
}
/* If the name of the key is not specified, */
/* let us check the name of the first key part. */
if ((keyname= key->name.str) == NULL)
@@ -5975,6 +5985,7 @@ drop_create_field:
remove_key:
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_DUP_KEYNAME, ER(ER_DUP_KEYNAME), keyname);
remove_key_no_warn:
key_it.remove();
if (key->type == Key::FOREIGN_KEY)
{