[Home]

Summary:ASTERISK-14072: [patch] Function ODBC_FETCH returns more than one row
Reporter:James P Taylor (jims)Labels:
Date Opened:2009-05-06 01:35:07Date Closed:2009-05-07 12:53:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/func_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090506__issue15039.diff.txt
Description:ODBC_FETCH is used in multi row queries to fetch one row at a time. In 1.6.0.9 this works correctly.

In 1.6.1.0 it is no longer working correctly. I have also tested the latest trunk version (Revision: 192632) and the problem is also there.

ODBC_FETCH returns the first row correctly. eg "row1"

However on subsequent requests it returns all previous requested rows and the current one in a string. eg "row1row2" then "row1row2row3"

****** ADDITIONAL INFORMATION ******

I'm using a realtime dial plan and the switch statement in extension.conf

I have looked over the source code of the SVN, but can't identify the problem with a causal glance as I'm not a highly experienced C programmer.
Comments:By: James P Taylor (jims) 2009-05-06 17:37:04

The patch worked perfectly. I tested it on 1.6.1.0.

By: Digium Subversion (svnbot) 2009-05-07 12:51:14

Repository: asterisk
Revision: 193006

U   trunk/funcs/func_odbc.c

------------------------------------------------------------------------
r193006 | tilghman | 2009-05-07 12:51:14 -0500 (Thu, 07 May 2009) | 7 lines

Second result should not contain data from the first result.
(closes issue ASTERISK-14072)
Reported by: jims
Patches:
      20090506__issue15039.diff.txt uploaded by tilghman (license 14)
Tested by: jims

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

http://svn.digium.com/view/asterisk?view=rev&revision=193006

By: Digium Subversion (svnbot) 2009-05-07 12:52:02

Repository: asterisk
Revision: 193007

_U  branches/1.6.1/
U   branches/1.6.1/funcs/func_odbc.c

------------------------------------------------------------------------
r193007 | tilghman | 2009-05-07 12:52:01 -0500 (Thu, 07 May 2009) | 14 lines

Merged revisions 193006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r193006 | tilghman | 2009-05-07 12:51:13 -0500 (Thu, 07 May 2009) | 7 lines
 
 Second result should not contain data from the first result.
 (closes issue ASTERISK-14072)
  Reported by: jims
  Patches:
        20090506__issue15039.diff.txt uploaded by tilghman (license 14)
  Tested by: jims
........

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

http://svn.digium.com/view/asterisk?view=rev&revision=193007

By: Digium Subversion (svnbot) 2009-05-07 12:53:01

Repository: asterisk
Revision: 193008

_U  branches/1.6.2/
U   branches/1.6.2/funcs/func_odbc.c

------------------------------------------------------------------------
r193008 | tilghman | 2009-05-07 12:53:01 -0500 (Thu, 07 May 2009) | 14 lines

Merged revisions 193006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r193006 | tilghman | 2009-05-07 12:51:13 -0500 (Thu, 07 May 2009) | 7 lines
 
 Second result should not contain data from the first result.
 (closes issue ASTERISK-14072)
  Reported by: jims
  Patches:
        20090506__issue15039.diff.txt uploaded by tilghman (license 14)
  Tested by: jims
........

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

http://svn.digium.com/view/asterisk?view=rev&revision=193008