FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.26k stars 216 forks source link

Incorrect error position if query has an error within derived table [CORE1659] #2084

Open firebird-automations opened 16 years ago

firebird-automations commented 16 years ago

Submitted by: Kuznetsov Eugene (eugene)

SQL> select * CON> from rdb$relations r left join CON> (select first 1 * from rdb$relation_fields rf CON> where err_identifier = rf.rdb$relation_name CON> order by rdb$field_name) r1 CON> on r.rdb$relation_name = r1.rdb$relation_name;

returns error

Statement failed, SQLCODE = -206 Dynamic SQL Error -SQL error code = -206 -Column unknown -ERR_IDENTIFIER -At line 6, column 29

Error position is incorrect, as it points to "r1.rdb$relation_name" in "on r.rdb$relation_name = r1.rdb$relation_name" condition

It should be "At line 4, column 8", as in 2.0.x branch

Best regards, Eugene

firebird-automations commented 16 years ago
Modified by: Kuznetsov Eugene (eugene) description: SQL\> select \* CON\> from rdb$relations r left join CON\> \(select first 1 \* from rdb$relation\_fields rf CON\> where err\_identifier = rf\.rdb$relation\_name CON\> order by rdb$field\_name\) rf CON\> on r\.rdb$relation\_name = rf\.rdb$relation\_name; returns error Statement failed, SQLCODE = \-206 Dynamic SQL Error \-SQL error code = \-206 \-Column unknown \-ERR\_IDENTIFIER \-At line 6, column 29 Error position is incorrect, as it points to "r1\.rdb$relation\_name" in "on r\.rdb$relation\_name = r1\.rdb$relation\_name" condition It should be "At line 4, column 8", as in 2\.0\.x branch Best regards, Eugene =\> SQL\> select \* CON\> from rdb$relations r left join CON\> \(select first 1 \* from rdb$relation\_fields rf CON\> where err\_identifier = rf\.rdb$relation\_name CON\> order by rdb$field\_name\) r1 CON\> on r\.rdb$relation\_name = r1\.rdb$relation\_name; returns error Statement failed, SQLCODE = \-206 Dynamic SQL Error \-SQL error code = \-206 \-Column unknown \-ERR\_IDENTIFIER \-At line 6, column 29 Error position is incorrect, as it points to "r1\.rdb$relation\_name" in "on r\.rdb$relation\_name = r1\.rdb$relation\_name" condition It should be "At line 4, column 8", as in 2\.0\.x branch Best regards, Eugene
firebird-automations commented 16 years ago
Modified by: @pcisar Workflow: jira \[ 13702 \] =\> Firebird \[ 14018 \]