<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143656#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=143656">bug 143656</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>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 '%%'"</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>