[Home]

Summary:ASTERISK-07678: FUNC_ODBC returns mixed up query results
Reporter:hristo (hristo)Labels:
Date Opened:2006-09-05 10:14:54Date Closed:2006-09-05 12:24:22
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/func_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cli-output.txt
Description:If you try the example posted below the values that get assigned to Result1 and Result2 are mixed up. It appears that the result from ODBC_TEST1() was somehow inserted in the result from ODBC_TEST2().
On top of that each time the functions are re-run all previous results get inserted in between the new result. This also happens if I use only one ODBC function or even if I make repeaded calls myself instead of using the Goto line.

See the attached CLI output - it should be much clear than the explanation here.

I have also noticed (with another more complex dialplan) that I get information in the returned result that is not even present in the database - like for example a multi-line SIP message sometimes gets returned within the ODBC result.

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

extensions.conf
================
exten => 1234,1,Set(Result1=${ODBC_TEST1()})
exten => 1234,n,Set(Result2=${ODBC_TEST2()})
exten => 1234,n,Wait(2)
exten => 1234,n,Goto(1)

func_odbc.conf
===============
[TEST1]
dsn=test
read=select 'test 123',11111,22222,33333

[TEST2]
dsn=test
read=select 'test 456',44444,55555,66666
Comments:By: Tilghman Lesher (tilghman) 2006-09-05 12:24:22

Fixed as of 42034.