Bug #75088 Remove redundant field auto_gen_clust_index
Submitted: 3 Dec 2014 11:58 Modified: 3 Dec 2014 18:13
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[3 Dec 2014 11:58] Marko Mäkelä
Description:
When InnoDB creates a GEN_CLUST_INDEX(DB_ROW_ID), it will set index->type=DICT_CLUSTERED. In all other cases, the clustered index will carry index->type=DICT_CLUSTERED|DICT_UNIQUE.

The field dict_index_t::auto_gen_clust_index is redundant, and it is being set inconsistently. It is not set in handler0alter.cc when a table is rebuilt.

How to repeat:
Read the code.

This might not affect any users, because the redundant flag was only being checked for intrinsic tables, and ALTER TABLE...ALGORITHM=INPLACE is not supported on intrinsic tables.

Suggested fix:
Remove the flag, and check index->type==DICT_CLUSTERED instead.
[3 Dec 2014 18:13] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.6 release, and here's the changelog entry:

Removed the "dict_index_t::auto_gen_clust_index" flag, which was
redundant and used inconsistently.