count query causes error
------------------------
Key: CORE-3654
URL: http://tracker.firebirdsql.org/browse/CORE-3654
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.5.1
Environment: Ubuntu Linux, but I doubt this is a OS related bug.
Reporter: Pieter Libin
Consider we have a new database containing the following tables:
create table "table_b" (
"id" bigint primary key,
"name" varchar(50) not null
);
create table "table_a" (
"id" bigint primary key,
"date" date,
"b_id" bigint,
constraint "fk_table_a_b" foreign key ("b_id") references "table_b" ("id") on
update cascade on delete cascade
);
When we try to execute a count query, which appears to me to be valid SQL:
select count(1) from ( select B."id", B."name", A."id", A."date", A."b_id" from
"table_b" B join "table_a" A on A."b_id" = B."id");
an error is reported
column id was specified multiple times for derived table <unnamed>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel