[Libreoffice-bugs] [Bug 143656] Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 3 15:30:35 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=143656
--- Comment #8 from Julien Nabet <serval2412 at yahoo.fr> ---
At least for Tools/SQL the escape processing is done here:
dbaccess/source/core/api/statement.cxx:480
Here's a part of gdb session.
OStatement::execute (this=0x8661500, _rSQL="SELECT * FROM \"Person\" WHERE
\"Name\" LIKE '%*'") at dbaccess/source/core/api/statement.cxx:480
480 MutexGuard aGuard(m_aMutex);
(gdb) n
481
::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed);
(gdb) n
483 disposeResultSet();
(gdb) n
485 OUString sSQL( impl_doEscapeProcessing_nothrow( _rSQL ) );
(gdb) p _rSQL
$4 = "SELECT * FROM \"Person\" WHERE \"Name\" LIKE '%*'"
(gdb) n
486 return m_xAggregateStatement->execute( sSQL );
(gdb) p sSQL
$5 = "SELECT * FROM \"Person\" WHERE \"Name\" LIKE '%%'"
--
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/20210803/59914515/attachment.htm>
More information about the Libreoffice-bugs
mailing list