Invalid DB_KEY based retrievals when concatenation is involved
--------------------------------------------------------------

                 Key: CORE-4534
                 URL: http://tracker.firebirdsql.org/browse/CORE-4534
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.3, 2.1.6, 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 
2.1.5 Update 1, 2.5.2, 2.1.5
            Reporter: Dmitry Yemanov
            Priority: Minor


Trivial demonstration:

set plan;

select * from rdb$database where rdb$db_key = x'0000000000000000';
PLAN (RDB$DATABASE INDEX ()) -- OK

select * from rdb$database where rdb$db_key || '' = x'0000000000000000';
PLAN (RDB$DATABASE INDEX ()) -- unexpected, but it does not hurt

select * from rdb$database where rdb$db_key || x'FFFFFFFFFFFFFFFF' = 
x'0000000000000000';
PLAN (RDB$DATABASE INDEX ()) -- wrong

select * from rdb$database where rdb$db_key || rdb$db_key = x'0000000000000000';
PLAN (RDB$DATABASE INDEX ()) -- wrong

Concatenation of DBKEYs is a special operation (used to combine individual 
DBKEYs for multi-table views) but the engine doesn't assume that user can also 
concatenate DBKEYs. Lack of proper checks may lead to invalid retrievals as 
shown above.

-- 
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

        

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to