Bug #95776 About FUNCTION STDDEV_SAMP:Data only in different order
Submitted: 13 Jun 2019 2:34 Modified: 13 Jun 2019 5:35
Reporter: hummer jeff Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.7.15-log MySQL Community Server (GPL), 5.6.44, 5.7.26, 8.0.16 OS:CentOS
Assigned to: CPU Architecture:Any

[13 Jun 2019 2:34] hummer jeff
Description:
select STDDEV_SAMP(A1) from (
select 23540000  A1 union all
select 6000000   A1 union all
select 1260000   A1 union all
select 120000    A1 union all
select 220000    A1 union all
select 60000     A1 union all
select 50000     A1 union all
select 0         A1 union all
select 0         A1 union all
select 0         A1 union all
select 0         A1
) tt;

7092317.610690394

select STDDEV_SAMP(A1) from (
select 0         A1 union all
select 0         A1 union all
select 0         A1 union all
select 0         A1 union all
select 23540000  A1 union all
select 6000000   A1 union all
select 1260000   A1 union all
select 220000    A1 union all
select 120000    A1 union all
select 60000     A1 union all
select 50000     A1 
) tt;

7092317.6106903935

How to repeat:
execute the two sql
[13 Jun 2019 5:35] MySQL Verification Team
Hello hummer jeff,

Thank you for the report.

regards,
Umesh