[MDEV-10237] Subquery with Empty Set in result returns incorrect result Created: 2016-06-15 Updated: 2022-01-25 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.1.10, 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Dylan Su | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Description:
Problem: How to repeat:
Suggested fix: |
| Comments |
| Comment by Elena Stepanova [ 2016-06-15 ] | ||||||||||||||||||||||||||||||||||||||
|
Surprisingly, all of MariaDB, MySQL, PostgreSQL and Oracle return exactly the same number of rows – empty result for the first query and 1 for the other two. This doesn't usually happen even with much less questionable cases. Although, PostgreSQL returns '' for the 2nd query and FALSE for the 3rd query:
While others return 1.
I'll leave it to an expert to decide what would be the correct result here. |