[asterisk-bugs] [Asterisk 0015963]: [patch] SQLColumns Error When Using Postgresql Schema

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 28 09:24:31 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15963 
====================================================================== 
Reported By:                hindmasj
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15963
Category:                   Resources/res_odbc
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.1.6 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-25 04:35 CDT
Last Modified:              2009-09-28 09:24 CDT
====================================================================== 
Summary:                    [patch] SQLColumns Error When Using Postgresql
Schema
Description: 
The call to SQLColumns in function ast_odbc_find_table in res_odbc.c does
not properly use the catalog and schema fields and so database tables that
use these are not properly described by the function.

This was tested using Asterisk 1.6.1.6 on Fedora Core 10. Database
packages used were

postgresql-8.3.8-1.fc10.x86_64
postgresql-odbc-08.03.0200-1.fc10.x86_64
unixODBC-2.2.12-9.fc10.x86_64

Test was repeated on a server running OEL 5 with 

postgresql-8.1.11-1.el5_1.1
postgresql-odbc-08.01.0200-3.1
unixODBC-2.2.11-7.1

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

---------------------------------------------------------------------- 
 (0111429) hindmasj (reporter) - 2009-09-28 09:24
 https://issues.asterisk.org/view.php?id=15963#c111429 
---------------------------------------------------------------------- 
I have tried the 1.6.1 patch and the part that splits the schema out of the
name works but still the structure of the table is not described. It
appears that the result set returned is empty. The result of the first
SQLFetch is SQL_NO_DATA and the loop is not entered. When the same test is
applied without a schema name all of the table columns are properly
described.

Selecting data from the tables succeeds whether or not a schema name is
used. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-28 09:24 hindmasj       Note Added: 0111429                          
======================================================================




More information about the asterisk-bugs mailing list