Created attachment 65898 [details] reproduction DB 1. Register attached file as a data source 2. Launch Calc. 3. Hit F4 to open the Data Sources panel. 4. Select a table from your data source. 5. Click on the "Standard Filter" icon on the Data Sources toolbar. 6. Enter search criteria: comments = * 7. Hit OK. Expected result: the line AssetID=0, where Comments='*', is displayed. Actual result: the line AssetID=1, where Comments='%', is displayed. That's because the * gets replaced by a %, as if it were the clause in a LIKE. SHOULD NOT HAPPEN. Culprit: Replace_OS_PlaceHolder in dbaccess/source/ui/dlg/queryfilter.cxx Queries (in Base, new query) do not have this bug. Even queries like: SELECT * FROM "Assets" WHERE "Comments" LIKE 'e*' ESCAPE 'e' SELECT * FROM "Assets" WHERE "Comments" LIKE 'e%' ESCAPE 'e' are handled correctly, while SELECT * FROM "Assets" WHERE "Comments" LIKE '*' is sent to the database as SELECT * FROM "Assets" WHERE "Comments" LIKE '%' correctly implementing the "* is a pattern". However, doubling the escape character is not handled correctly: SELECT * FROM "Assets" WHERE "Comments" LIKE 'ee*' ESCAPE 'e' is not handled correctly. Note that SELECT * FROM "Assets" WHERE "Comments" LIKE 'ee%' ESCAPE 'e' works as expected.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e8409cbd7227849fe446661011c8bc73acdca319 fdo#53887 ConvertLikeToken(): make escape character properly escape itself
(In reply to comment #1) > Lionel Elie Mamane committed a patch related to this issue. > It has been pushed to "master": > > http://cgit.freedesktop.org/libreoffice/core/commit/?id=e8409cbd7227849fe446661011c8bc73acdca319 > > fdo#53887 ConvertLikeToken(): make escape character properly escape itself Note that this is *only* for the LIKE 'ee*' ESCAPE 'e' problem in queries. It is *not* related to the problem in "Standard Filter".
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c90db23996c0580e9cd45db0230062a586fb8a53&g=libreoffice-3-6 fdo#53887 ConvertLikeToken(): make escape character properly escape itself It will be available in LibreOffice 3.6.2.
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c556c5bbd2627aafeb895cb1eb3fb7281d67357d fdo#53887 convert filter value as LIKE pattern only on (NOT) LIKE
Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5b43272845878243ce94c1170776ec87c19ad6fd&g=libreoffice-3-6 fdo#53887 convert filter value as LIKE pattern only on (NOT) LIKE It will be available in LibreOffice 3.6.2.