[asterisk-bugs] [Asterisk 0018525]: [patch] ast_update2_realtime fails to update multiple columns with MySQL driver
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Dec 24 17:56:39 UTC 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18525
======================================================================
Reported By: makoto
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18525
Category: Addons/res_config_mysql
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: Addons-1.6.2.1
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2010-12-24 02:10 CST
Last Modified: 2010-12-24 11:56 CST
======================================================================
Summary: [patch] ast_update2_realtime fails to update
multiple columns with MySQL driver
Description:
For example, the following code fails with MySQL driver.
ast_update2_realtime("table", "id", "1234", SENTINEL, "foo", "yes",
"bar", "no", SENTINEL);
This doesn't happens when updating single column.
update2_mysql function in res_config_mysql.c generates an incorrect
SQL sentence when updating multiple columns because variable first
is not cleared in the second while loop.
Attached patch will fix the problem.
PostgreSQL driver seems to have the same problem.
======================================================================
----------------------------------------------------------------------
(0129949) svnbot (reporter) - 2010-12-24 11:56
https://issues.asterisk.org/view.php?id=18525#c129949
----------------------------------------------------------------------
Repository: asterisk-addons
Revision: 1138
U branches/1.6.2/res/res_config_mysql.c
------------------------------------------------------------------------
r1138 | tilghman | 2010-12-24 11:56:38 -0600 (Fri, 24 Dec 2010) | 7 lines
Reset 'first' variable after first usage.
(closes issue https://issues.asterisk.org/view.php?id=18525)
Reported by: makoto
Patches:
res-config-mysql-update2.patch uploaded by makoto (license 38)
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk-addons?view=rev&revision=1138
Issue History
Date Modified Username Field Change
======================================================================
2010-12-24 11:56 svnbot Checkin
2010-12-24 11:56 svnbot Note Added: 0129949
======================================================================
More information about the asterisk-bugs
mailing list