[MDEV-16579] Wrong result of query using DISTINCT COUNT(*) OVER (*) Created: 2018-06-25 Updated: 2019-12-24 Resolved: 2019-12-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.31, 10.3.22, 10.4.12, 10.5.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alice Sherepa | Assignee: | Varun Gupta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
in Mysql 8.0.11
|
| Comments |
| Comment by Varun Gupta (Inactive) [ 2019-12-05 ] | ||||||||||||||||||||||
|
| ||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2019-12-05 ] | ||||||||||||||||||||||
|
| ||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2019-12-05 ] | ||||||||||||||||||||||
|
Patch | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2019-12-12 ] | ||||||||||||||||||||||
|
Followup to the optimizer call discussion: I wasn't able to find any evidence that SELECT DISTINCT window_function()" is not allowed by the SQL Standard. I was able to find this evidence that others expect it to be allowed: http://www.mysqltutorial.org/mysql-window-functions/ says
| ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2019-12-12 ] | ||||||||||||||||||||||
|
SQL Standard or not, Sybase Manual here http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sqlanywhere.12.0.1/dbusage/ug-olap-s-3858836.html has examples like
| ||||||||||||||||||||||
| Comment by Igor Babaev [ 2019-12-12 ] | ||||||||||||||||||||||
|
I can confirm that SQL Standard says: | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2019-12-17 ] | ||||||||||||||||||||||
|
The patch is ok to push. |