PC Review


Reply
Thread Tools Rate Thread

Bug in System.Data.OracleClient w/Public Synonyms + FIX

 
 
Matt Mastracci
Guest
Posts: n/a
 
      17th Jul 2003
There's a bug in the System.Data.OracleClient when another tablespace
contains a public synonym with the same name as a table in the current
user's tablespace. Any ideas who I should contact to sent my problem & fix?

When grabbing the schema information for the table in the *current*
tablespace, you end up with the schema information for the table in the
*other* tablespace.

For instance: I create a table in another tablespace named "B" with no
public keys and create a public synonym named "B" to it. I then go to
my tablespace "TABLESPACE" and create a table "B" with the primary key
of "X".

When I run GetSchemaTable on a CommandReader() with the SQL "select *
from B", it returns that there are no public keys! This is because it's
picked up the other table's columns.

The query run to get the schema information looks like this:

SELECT * FROM ALL_SYNONYMS WHERE owner IN ('PUBLIC',USER) AND
synonym_name='PLC_FILTER'

It should look like this to pick up the local table before the public
synonym.

SELECT owner,table_name FROM ALL_TABLES WHERE TABLE_NAME='B' AND owner
IN ('PUBLIC',USER)
UNION ALL
SELECT table_owner, table_name FROM ALL_SYNONYMS WHERE owner IN
('PUBLIC',USER) AND synonym_name='B'

 
Reply With Quote
 
 
 
 
Matt Mastracci
Guest
Posts: n/a
 
      23rd Jul 2003
Where should I report this bug? It's a pretty obscure but serious one
if encountered.

Matt Mastracci wrote:
> There's a bug in the System.Data.OracleClient when another tablespace
> contains a public synonym with the same name as a table in the current
> user's tablespace. Any ideas who I should contact to sent my problem &
> fix?
>
> When grabbing the schema information for the table in the *current*
> tablespace, you end up with the schema information for the table in the
> *other* tablespace.
>
> For instance: I create a table in another tablespace named "B" with no
> public keys and create a public synonym named "B" to it. I then go to
> my tablespace "TABLESPACE" and create a table "B" with the primary key
> of "X".
>
> When I run GetSchemaTable on a CommandReader() with the SQL "select *
> from B", it returns that there are no public keys! This is because it's
> picked up the other table's columns.
>
> The query run to get the schema information looks like this:
>
> SELECT * FROM ALL_SYNONYMS WHERE owner IN ('PUBLIC',USER) AND
> synonym_name='PLC_FILTER'
>
> It should look like this to pick up the local table before the public
> synonym.
>
> SELECT owner,table_name FROM ALL_TABLES WHERE TABLE_NAME='B' AND owner
> IN ('PUBLIC',USER)
> UNION ALL
> SELECT table_owner, table_name FROM ALL_SYNONYMS WHERE owner IN
> ('PUBLIC',USER) AND synonym_name='B'
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Data.OracleClient =?Utf-8?B?Sko=?= Microsoft Dot NET 2 11th Jan 2005 12:40 AM
Re: How to get the hot fix for System.Data.OracleClient? Paul Clement Microsoft ADO .NET 0 29th Jul 2004 07:55 PM
System.Data.OracleClient =?Utf-8?B?R21taQ==?= Microsoft ADO .NET 4 1st Mar 2004 08:26 PM
System.Data.OracleClient =?Utf-8?B?R2Vuc2FSb2I=?= Microsoft ADO .NET 3 27th Feb 2004 07:11 PM
System.Data.OracleClient bug Sergey Microsoft ADO .NET 2 17th Sep 2003 05:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:17 AM.