Switching between sql and design view don't handle distinct as expected. Steps to reproduce the bug: 1. Create a non-empty query in design view 2. Push distinct button on toolbar 3. Switch to sql view 4. Delete distinct from select statment 5. Switch back to design view Recent bevahiour: Distinct button is still active. If we switch to sql view again, then distinct will appear in select. Expected behaviour: Distinct button would be inactive and in case of switching to sql view, distinct would not be put back into select.
Zolnai Tamas committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f82a20777b6d16b2ea541619c3ad270e08e258c fdo#58842 Handle case of non-distinct statment The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.