<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Unable to deselect 'Visible' flags in Base query"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=126468">126468</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unable to deselect 'Visible' flags in Base query
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.1.3.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Base
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>harvey@nimmo.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Problem was discovered with LibreOffice (version 6.1.2.3) Base as client to a
backend Mariadb10 via MySQL(JDBC) connector. 

Using the GUI query editor, an entire table as <tablename>.* was entered into
into the query fields. Two of the table fields were added to the query and
selected 'ascending' for sorting for each of these 2
fields. It was however, not possible to deselect the 'Visible' flags
for these 2 sort fields. The behaviour means that the 2 fields will each now
appear twice when running the query. A Base Form based on this query did not
transfer the data from those fields back to the table, presumably because of
the above ambiguity.   

On inspecting the SQL text of the query, a query of the
kind: SELECT * FROM <tablename> ORDER BY <Field1> ASC, <Field2> ASC was
expected.

The actual text in the SQL editor was, however:
SELECT * <tablename>.*, <tablename>.<Field1>, <tablename>.<Field2> FROM
<schema>.<tablename> <tablename> ORDER BY <Field1> ASC, <Field2> ASC

After deleting the text ', <tablename>.<Field1>, <tablename>.<Field2>'
from the SQL query, the query ran successfully, i.e. the extra fields were not
displayed in the query result. But on saving the query from the GUI again, the
deleted text was added again.

The source of the problem seems to be that the 'visible' flags in the extra 
fields (i.e. duplicates of fields from <tablename>.*) could not be deselected.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>