[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 08:12:00 UTC 2010


The following issue has been UPDATED. 
====================================================================== 
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 02:12 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.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-24 02:12 makoto         Summary                  ast_update2_realtime
fails to update multiple columns with MySQL driver => [patch]
ast_update2_realtime fails to update multiple columns with MySQL driver
======================================================================




More information about the asterisk-bugs mailing list