Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.8.3, 12.0(EOL)
-
None
-
Can result in unexpected behaviour
Description
Consider a small dataset. An apparently incorrect histogram is generated for it.
create table t1 ( |
col1 varchar(10) |
);
|
|
|
insert into t1 values |
('"а'),('"b'),('"c'),('"d'),('"e'),('"f'),('"g'),('"h'),('"i'),('"j'); |
select sin(0); |
analyze table t1 persistent for all; |
select * from mysql.column_stats; |
|
|
drop table t1; |
gives:
"histogram_hb": [ |
{
|
"start": "\"b", |
"size": 0.1, |
"ndv": 1 |
},
|
{
|
"start": "\"c", |
"size": 0.1, |
"ndv": 1 |
},
|
{
|
"start": "\"d", |
"size": 0.1, |
"ndv": 1 |
},
|
{
|
"start": "\"а", |
"size": 0.1, |
"ndv": 1 |
},
|
{
|
"start": "\"e", |
"size": 0.1, |
"ndv": 1 |
},
|
note the bucket between "d and "e. It looks like garbage data. Some character that's not present in the table.