Subject Re: [firebird-support] Ambiguous field names in selection statement errors on 2.5.1
Author Mark Rotteveel
On 5-2-2013 20:22, Paul R. Gardner wrote:
> Hi all,
>
> I have two tables that have some duplicated column names by design. The server is a Win2008 server. I have numerous clients, running Win XP and Win 7. SOME of the clients have the following problem and some do NOT. I cannot figure out the difference between the two types of client though. The Firebird version is 2.5.1 64 bit, and all clients have the same client dll file. Firebird 1.5, 2.0, and 2.5.1 32 bit do not have this issue.
>
> The issue I have is that when I run the following statement from some clients, I get an error saying "Unable to complete network request to host [Server's IP]. Error writing data to the connection. An existing connection was forcibly closed by the remote host.":
>
> select *
> from first_table f
> left join ambiguous_fields_table1 a1 on f.foo = a1.bar
> left join ambiguous_fields_table2 a2 on f.foo = a2.bar
>
> Just for fun, I removed the "select *" and manually typed all fields in both tables. (e.g. select a1.foo, a2.foo, ). This gave the same error. I then found that if I remove any of these ambiguous fields, the error goes away. It only happens if I have all of them typed in. Any field removed causes the query to start working. Have I found some sort of bug? There are around 20 fields in each table with around 5 being ambiguous.
>
> I'm not a fan of the (select *) syntax, but it's unfortunately needed for this query. Any ideas anyone?

A number of issues was fixed with Firebird 2.5.2, but nothing
immediately jumps out as causing this kind of behavior. You might want
to try upgrade to 2.5.2.

See
http://www.firebirdsql.org/file/documentation/release_notes/html/rlsnotes252.html#bug-252
for bugs fixed in 2.5.2

Marl
--
Mark Rotteveel