1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2020-05-13 11:45:05 +03:00
39 changed files with 189 additions and 262 deletions

View File

@ -772,31 +772,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
(table->table->s->table_category == TABLE_CATEGORY_USER &&
(get_use_stat_tables_mode(thd) > NEVER ||
lex->with_persistent_for_clause));
if (!lex->index_list)
{
tab->keys_in_use_for_query.init(tab->s->keys);
}
else
{
int pos;
LEX_STRING *index_name;
List_iterator_fast<LEX_STRING> it(*lex->index_list);
tab->keys_in_use_for_query.clear_all();
while ((index_name= it++))
{
if (tab->s->keynames.type_names == 0 ||
(pos= find_type(&tab->s->keynames, index_name->str,
index_name->length, 1)) <= 0)
{
compl_result_code= result_code= HA_ADMIN_INVALID;
break;
}
tab->keys_in_use_for_query.set_bit(--pos);
}
}
}
if (result_code == HA_ADMIN_OK)
@ -881,6 +856,27 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
tab->file->column_bitmaps_signal();
}
if (!lex->index_list)
tab->keys_in_use_for_query.init(tab->s->keys);
else
{
int pos;
LEX_STRING *index_name;
List_iterator_fast<LEX_STRING> it(*lex->index_list);
tab->keys_in_use_for_query.clear_all();
while ((index_name= it++))
{
if (tab->s->keynames.type_names == 0 ||
(pos= find_type(&tab->s->keynames, index_name->str,
index_name->length, 1)) <= 0)
{
compl_result_code= result_code= HA_ADMIN_INVALID;
break;
}
tab->keys_in_use_for_query.set_bit(--pos);
}
}
if (!(compl_result_code=
alloc_statistics_for_table(thd, table->table)) &&
!(compl_result_code=