[asterisk-bugs] [Asterisk 0018473]: [patch] Schema selection support

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Dec 15 20:45:42 UTC 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18473 
====================================================================== 
Reported By:                avf
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18473
Category:                   CDR/cdr_adaptive_odbc
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.0 
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-14 11:14 CST
Last Modified:              2010-12-15 14:45 CST
====================================================================== 
Summary:                    [patch] Schema selection support
Description: 
We use CDR with an Oracle backend, via ODBC.  The CDR table exists inside a
schema (called ASTERISKDBA), and there is a synonym (also called CDR) in
the PUBLIC schema.

When cdr_adaptive_odbc.c calls SQLColumns() to get a list of column names,
the result set contains each column twice --- once for the ASTERISKDBA
schema, and once for the PUBLIC schema.  Obviously, this causes INSERTs to
error.

This patch adds a "schema" configuration parameter which, when set, passes
the schema name into SQLColumns().

Setting "schema => ASTERISKDBA" (or, for that matter, "schema => PUBLIC")
fixes this problem in our environment.


<patch deleted from description>
====================================================================== 

---------------------------------------------------------------------- 
 (0129630) tilghman (manager) - 2010-12-15 14:45
 https://issues.asterisk.org/view.php?id=18473#c129630 
---------------------------------------------------------------------- 
Does the schema not need to be prefixed to the table name on insert/update?
 Or does it assume a default schema, if none is specified?  Might a default
schema ever have a permissions conflict on INSERT? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-15 14:45 tilghman       Note Added: 0129630                          
======================================================================




More information about the asterisk-bugs mailing list