aboutsummaryrefslogtreecommitdiffstats
path: root/addons/cdr_mysql.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-04 00:13:23 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-04 00:13:23 +0000
commitbe5d7cfa825f284c9f830d5d0a5cb85c3851fd58 (patch)
tree92e3a4a03c86c2165db2ae6fe8bc5ef0af9b4213 /addons/cdr_mysql.c
parentac631c1be1cbfebfbdb2cf1c214d936f139cd57a (diff)
Merged revisions 316429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316429 | tilghman | 2011-05-03 19:12:25 -0500 (Tue, 03 May 2011) | 7 lines Escape column names in case they contain illegal characters ('-') or reserved words. (closes issue #19063) Reported by: festr Patches: patch uploaded by festr (license 443) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@316430 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons/cdr_mysql.c')
-rw-r--r--addons/cdr_mysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 167a5af58..60abae2d9 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -325,7 +325,7 @@ db_reconnect:
ast_str_make_space(&escape, (valsz = strlen(value)) * 2 + 1);
mysql_real_escape_string(&mysql, ast_str_buffer(escape), value, valsz);
- ast_str_append(&sql1, 0, "%s", entry->name);
+ ast_str_append(&sql1, 0, "`%s`", entry->name);
ast_str_append(&sql2, 0, "'%s'", ast_str_buffer(escape));
}
}