Bug #115842 | The count distinct aggregation funciton of UUID returned an error value | ||
---|---|---|---|
Submitted: | 15 Aug 8:21 | Modified: | 15 Aug 11:05 |
Reporter: | GONGTUI FU | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 8.0.39, 8.4.2, 9.0.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | regression, UUID COUNT |
[15 Aug 8:21]
GONGTUI FU
[15 Aug 11:05]
MySQL Verification Team
Hello GONGTUI FU, Thank you for the report and feedback. Verified as described. regards, Umesh
[20 Aug 7:37]
huahua xu
Add a helpful test case: mysql> set optimizer_switch = 'derived_merge=on'; Query OK, 0 rows affected (0.00 sec) mysql> select count(distinct guid) from( select uuid() guid from (select 1 union select 2) s) ss; +----------------------+ | count(distinct guid) | +----------------------+ | 1 | +----------------------+ 1 row in set (0.00 sec) mysql> set optimizer_switch = 'derived_merge=off'; Query OK, 0 rows affected (0.00 sec) mysql> select count(distinct guid) from( select uuid() guid from (select 1 union select 2) s) ss; +----------------------+ | count(distinct guid) | +----------------------+ | 2 | +----------------------+ 1 row in set (0.00 sec)