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.

(notice the comment: http://dba.stackexchange.com/questions/141799/select-distinct-values-of-two-columns-as-single#comment268612_141800 )

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