[MDEV-10029] UNION + OUTFILE is confusing Created: 2016-05-05 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
If I run this query:
It correctly creates a file 'test.txt' with two lines:
Now if I do "rm test.txt" and execute another query (with parentheses):
it still puts the same two lines from both UNION parts. This looks confusing, as parentheses a kind of assume that only the right UNION part is to be exported. We could introduce a less confusing syntax to export UNION queries, for example:
But " Note, one can write something like this:
But it looks longer. Sergei thinks that even if we add a less confusing syntax, we should not disallow the confusing syntax not to break existing applications. But at least just sending a warning suggesting a better syntax would probably be fine. |