[asterisk-bugs] [Asterisk 0011364]: ESCAPE clause in first parameter not escaped properly
noreply at bugs.digium.com
noreply at bugs.digium.com
Sat Nov 24 10:48:45 CST 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=11364
======================================================================
Reported By: elguero
Assigned To: Corydon76
======================================================================
Project: Asterisk
Issue ID: 11364
Category: Resources/res_config_odbc
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 89535
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 11-24-2007 09:58 CST
Last Modified: 11-24-2007 10:48 CST
======================================================================
Summary: ESCAPE clause in first parameter not escaped
properly
Description:
Recent change to Trunk Revision 89535 causes queries sent to MySQL to fail
due to the ESCAPE clause not having the appropriate syntax when the ESCAPE
clause is used in the middle of a query statement.
Change line 292 to the following fixes it (at least for MySQL):
snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s ?%s", table,
newparam, op, strcasestr(newparam, "LIKE") ? " ESCAPE '\\\\'" : "");
======================================================================
----------------------------------------------------------------------
Corydon76 - 11-24-07 10:48
----------------------------------------------------------------------
Can't do that, as it's incompatible with MS SQL Server. Please try the
attached patch, instead (for 1.4).
Issue History
Date Modified Username Field Change
======================================================================
11-24-07 10:48 Corydon76 Note Added: 0074264
======================================================================
More information about the asterisk-bugs
mailing list