[asterisk-bugs] [Asterisk 0014317]: [patch] Latest cdr_addon_mysql queries borked

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jan 26 17:32:04 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14317 
====================================================================== 
Reported By:                cheesegrits
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   14317
Category:                   Addons/cdr_addon_mysql
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 730 
Request Review:              
====================================================================== 
Date Submitted:             2009-01-22 20:40 CST
Last Modified:              2009-01-26 17:32 CST
====================================================================== 
Summary:                    [patch] Latest cdr_addon_mysql queries borked
Description: 
After updating to the latest asterisk-addons SVN, my MySQL log queries are
broken:

[Jan 22 19:55:17] DEBUG[8359] cdr_addon_mysql.c: SQL command as follows:
INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,,uniqueid,)
VALUES ('2009-01-22 19:55:13','\"Hugh Poly\"
<301>','301','300','from-internal','SIP/301-0a2304a8','SIP/300-0a387ba0','Dial','SIP/300,,tr','4','2','ANSWERED','3',,'1232675713.0',')

Note the missing fields / values (coresponding to userfield and
accountcode) and the extra ' on the end of values.

I'll attempt to attach a diff for the changes I had to make to get it
working.

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

---------------------------------------------------------------------- 
 (0098808) svnbot (reporter) - 2009-01-26 17:32
 http://bugs.digium.com/view.php?id=14317#c98808 
---------------------------------------------------------------------- 
Repository: asterisk-addons
Revision: 749

U   trunk/cdr/cdr_addon_mysql.c

------------------------------------------------------------------------
r749 | tilghman | 2009-01-26 17:32:04 -0600 (Mon, 26 Jan 2009) | 6 lines

When fields are missing, the resulting SQL is wrong.
(closes issue http://bugs.digium.com/view.php?id=14317)
 Reported by: cheesegrits
 Patches: 
       cdr_mysql.diff uploaded by cheesegrits (license 672)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk-addons?view=rev&revision=749 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-26 17:32 svnbot         Checkin                                      
2009-01-26 17:32 svnbot         Note Added: 0098808                          
======================================================================




More information about the asterisk-bugs mailing list