[Libreoffice-bugs] [Bug 126468] Unable to deselect 'Visible' flags in Base query, if field is set for "sorting"

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun May 10 18:44:17 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=126468

--- Comment #7 from Julien Nabet <serval2412 at yahoo.fr> ---
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
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl?r=157420e4#426)

However, I tested on MariaDB via http://localhost/adminer.php, 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200510/f4873c77/attachment.htm>


More information about the Libreoffice-bugs mailing list