mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge commit '43882e764d6867c6855b1ff057758a3f08b25c55' into 10.4
This commit is contained in:
@ -3714,6 +3714,17 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
my_error(ER_WRONG_NAME_FOR_INDEX, MYF(0), key->name.str);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
if (key->type == Key::PRIMARY && key->name.str &&
|
||||
my_strcasecmp(system_charset_info, key->name.str, primary_key_name) != 0)
|
||||
{
|
||||
bool sav_abort_on_warning= thd->abort_on_warning;
|
||||
thd->abort_on_warning= FALSE; /* Don't make an error out of this. */
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_WRONG_NAME_FOR_INDEX,
|
||||
"Name '%-.100s' ignored for PRIMARY key.",
|
||||
key->name.str);
|
||||
thd->abort_on_warning= sav_abort_on_warning;
|
||||
}
|
||||
}
|
||||
tmp=file->max_keys();
|
||||
if (*key_count > tmp)
|
||||
|
Reference in New Issue
Block a user