Bug #86794 Histogram statistics have misnamed charset-id key
Submitted: 22 Jun 2017 13:23 Modified: 1 Sep 2017 1:10
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.0.2 OS:Any
Assigned to: CPU Architecture:Any

[22 Jun 2017 13:23] Paul DuBois
Description:
MySQL 8.0.2 introduces a column_statistics data dictionary table with a HISTOGRAM column. Column values are JSON values that have a number of keys. One of these keys is named charset-id, the values for which correspond to ID column values in the INFORMATION_SCHEMA.COLLATIONS table.

However, COLLATIONS values are collation IDs, not character set IDs.

The charset-id key should be renamed to collation-id.

How to repeat:
Select from INFORMATION_SCHEMA.COLUMN_STATISTICS, the view that provides access to the column_statistics data dictionary table, and examine HISTOGRAM values.

Suggested fix:
The charset-id key should be renamed to collation-id.
[1 Sep 2017 1:10] Paul DuBois
Posted by developer:
 
Fixed in 8.0.4.

The HISTOGRAM column in the column_statistics data dictionary table
used a key named charset-id to indicate collation numbers. This key
has been renamed to collation-id.