<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unable to deselect 'Visible' flags in Base query, if field is set for "sorting""
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=126468#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unable to deselect 'Visible' flags in Base query, if field is set for "sorting""
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=126468">bug 126468</a>
              from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
        <pre>It works for hsqldb and not for Mariadb because for last one,
"supportsOrderByUnrelated" method returns false.

Here are details about this method:
    420     /** Can an "ORDER BY" clause use columns not in the SELECT
statement?
    421         @returns
    422             `TRUE` if so
    423         @throws SQLException
    424             if a database access error occurs.
    425      */
    426     boolean supportsOrderByUnrelated() raises (SQLException);

So if you take the code pointer from my previous comment:
   1816                 if ( !m_bOrderByUnRelated )
   1817                     pEntry->SetVisible();
it'll put the field visible because "m_bOrderByUnRelated" = false

(see
<a href="https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl?r=157420e4#426">https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl?r=157420e4#426</a>)

However, I tested on MariaDB via <a href="http://localhost/adminer.php">http://localhost/adminer.php</a>, the following
request is ok and works:
"select test1 from Table1 order by test2"
so fields in order part don't need to be also present in select part.</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>