[asterisk-bugs] [JIRA] (ASTERISK-24808) Error in res_config_odbc.so
Javier Acosta (JIRA)
noreply at issues.asterisk.org
Wed Feb 18 12:33:34 CST 2015
Javier Acosta created ASTERISK-24808:
----------------------------------------
Summary: Error in res_config_odbc.so
Key: ASTERISK-24808
URL: https://issues.asterisk.org/jira/browse/ASTERISK-24808
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Resources/res_config_odbc
Affects Versions: 13.2.0
Environment: Debian 7.5 64bit, Asterisk 13.2.0, MySQL 5.1 configure with unixODBC and linmyodbc
Reporter: Javier Acosta
In "sip reload" we found the next error in logs.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\' ORDER BY name' at line 1 (215)
We found the solution changing in res_config_odbc this lines
line 363- strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\'" : "");
line 363+ strcasestr(field->name, "LIKE") &&
line 367- strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\'" : "");
line 367+ strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\\\'" : "");
line 201- strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\'" : "");
line 201+ strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\\\'" : "");
line 205- strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\'" : "");
line 205+ strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\\\'" : "");
With this changes in res/res_config_odbc.c all it's working OK now
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list