Issue Details (XML | Word | Printable)

Key: CORE-4492
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Pavel Zotov
Votes: 0
Watchers: 4

If you were logged in you would be able to see more operations.
Firebird Core

OR/IN predicates for RDB$DBKEY lead to NATURAL plan

Created: 12/Jul/14 09:53 PM   Updated: 26/Dec/17 09:36 PM
Component/s: None
Affects Version/s: 2.5.0, 2.5.1, 2.5.2, 2.5.2 Update 1, 2.5.3, 2.5.3 Update 1, 2.5.4, 2.5.5, 4.0 Initial, 3.0.0, 2.5.6, 3.0.1, 2.5.7, 3.0.2, 4.0 Alpha 1
Fix Version/s: 3.0.3, 4.0 Beta 1

QA Status: Done with caveats
Test Details:
Following query will not compile:
       select 1 from rdb$relations a join rdb$relations b using ( rdb$db_key );
       Statement failed, SQLSTATE = 42000 / -Token unknown / -rdb$db_key

See also CORE-4038, CORE-4530

 Description  « Hide
SQL> set plan only;

SQL> select count(*) from rdb$database where rdb$db_key = 1;


SQL> select count(*) from rdb$database where rdb$db_key in (1,2);


SQL> quit;

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 13/Jul/14 07:17 AM - edited
Please: use one problem per ticket, do not put multiple problems into one even if they are related to the same feature.

Dmitry Yemanov added a comment - 13/Jul/14 10:54 AM - edited
Wiped out the second issue, especially given that it wasn't a bug.

Dmitry Yemanov added a comment - 23/Nov/17 09:04 AM
Fixing it for v4 at the moment, to be backported after successful QA pass.