SQL: hide system fields from PK [#361]

This commit is contained in:
Aleksey Midenkov 2017-11-27 21:40:42 +03:00
parent f9d875d212
commit 86b590c064

View file

@ -2256,6 +2256,14 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
for (uint j=0 ; j < key_info->user_defined_key_parts ; j++,key_part++) for (uint j=0 ; j < key_info->user_defined_key_parts ; j++,key_part++)
{ {
Field *field= key_part->field;
if (field && field->vers_sys_field())
{
if (vers_hide == VERS_HIDE_FULL /*|| ((field->flags & HIDDEN_FLAG) &&
vers_hide != VERS_HIDE_NEVER)*/)
continue;
}
if (j) if (j)
packet->append(','); packet->append(',');