Bug #82547 COUNT DISTINCT failure in 5.7
| Submitted: | 11 Aug 2016 16:58 | Modified: | 11 Aug 2016 21:57 |
|---|---|---|---|
| Reporter: | Matthew Boehm | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S2 (Serious) |
| Version: | 5.7.10 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | aggregate, DML | ||
[11 Aug 2016 16:58]
Matthew Boehm
[11 Aug 2016 16:59]
Matthew Boehm
Possibly related bug: http://bugs.mysql.com/bug.php?id=80310
[11 Aug 2016 21:02]
MySQL Verification Team
Thank you for the bug report. I couldn't repeat with most recent source: C:\dbs>c:\dbs\5.6\bin\mysql -uroot --port=3560 -p --prompt="mysql 5.6 > " Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.33 Source distribution 2016-JUL-09 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.6 > use title Database changed mysql 5.6 > SELECT COUNT(DISTINCT(title)), COUNT(DISTINCT LEFT(title, 100)) FROM title; +------------------------+----------------------------------+ | COUNT(DISTINCT(title)) | COUNT(DISTINCT LEFT(title, 100)) | +------------------------+----------------------------------+ | 998335 | 998320 | +------------------------+----------------------------------+ 1 row in set (37.22 sec) *************************************************************************************** C:\dbs>c:\dbs\5.7\bin\mysql -uroot -p --port=3570 --prompt="mysql 5.7 > " Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.15 Source distribution 2016-JUL-09 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.7 > use title Database changed mysql 5.7 > SELECT COUNT(DISTINCT(title)), COUNT(DISTINCT LEFT(title, 100)) FROM title; +------------------------+----------------------------------+ | COUNT(DISTINCT(title)) | COUNT(DISTINCT LEFT(title, 100)) | +------------------------+----------------------------------+ | 998335 | 998320 | +------------------------+----------------------------------+ 1 row in set (33.74 sec)
[11 Aug 2016 21:57]
Matthew Boehm
I upgraded to 5.7.13 and do not see this issue any longer. Didn't realize I wasn't on the latest version of 5.7. Thanks.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.