------------------------------------------------------------ revno: 8778 committer: Laurynas Biveinis branch nick: mysql-5.7-percona-patches timestamp: Mon 2014-11-24 17:48:27 +0200 message: Fix http://bugs.mysql.com/bug.php?id=68713 (create_duplicate_weedout_tmp_table() leaves key_part_flag uninitialized). Replace the custom key_part_info initialization code with a key_part_info->init_from_field call that initializes key_part_flag too. diff: === modified file 'sql/sql_tmp_table.cc' --- sql/sql_tmp_table.cc 2014-08-21 10:07:55 +0000 +++ sql/sql_tmp_table.cc 2014-11-24 15:48:27 +0000 @@ -1740,12 +1740,7 @@ keyinfo->actual_flags= keyinfo->flags= HA_NOSAME; keyinfo->key_length=0; { - key_part_info->null_bit=0; - key_part_info->field= field; - key_part_info->offset= field->offset(table->record[0]); - key_part_info->length= (uint16) field->key_length(); - key_part_info->type= (uint8) field->key_type(); - key_part_info->key_type = FIELDFLAG_BINARY; + key_part_info->init_from_field(field); key_field= field->new_key_field(thd->mem_root, table, group_buff); if (!key_field) goto err;