According to this post at Stack Overflow, MariaDB 10.1.10 gives wrong results (duplicate rows) for UNION DISTINCT while the UNION version gives correct ones.
The query in question is very simple:
SELECT a AS result FROM tableX
UNION DISTINCT
SELECT b FROM tableX ;
I couldn't find a related bug in the MDEV.
Is this a known (or fixed) issue or should I go and add a bug report/
Pantelis Theodosiou