1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge branch '10.1' into 10.2

This commit is contained in:
Sergei Golubchik
2018-06-21 23:47:39 +02:00
185 changed files with 2884 additions and 1966 deletions

View File

@@ -6027,8 +6027,11 @@ drop_create_field:
continue;
/* Check if the table already has a PRIMARY KEY */
bool dup_primary_key= key->type == Key::PRIMARY &&
table->s->primary_key != MAX_KEY;
bool dup_primary_key=
key->type == Key::PRIMARY &&
table->s->primary_key != MAX_KEY &&
(keyname= table->s->key_info[table->s->primary_key].name) &&
my_strcasecmp(system_charset_info, keyname, primary_key_name) == 0;
if (dup_primary_key)
goto remove_key;
@@ -6128,7 +6131,6 @@ remove_key:
}
#ifdef WITH_PARTITION_STORAGE_ENGINE
DBUG_ASSERT(thd->work_part_info == 0);
partition_info *tab_part_info= table->part_info;
thd->work_part_info= thd->lex->part_info;
if (tab_part_info)
@@ -8730,10 +8732,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
DBUG_ENTER("mysql_alter_table");
#ifdef WITH_PARTITION_STORAGE_ENGINE
thd->work_part_info= 0; // Used by partitioning
#endif
/*
Check if we attempt to alter mysql.slow_log or
mysql.general_log table and return an error if