Bugs Found

Client-side use of databases.conf doesn't support modern URLs as value of an alias

GitHub Issue: 8302 Affected versions: 5.0.1, 6.0 Initial

Client-side, it is possible to specify aliases that have a legacy connection URL as its value:

testdb = localhost:E:\DB\FB5\FB5TESTDATABASE.FDB
{
    AuthClient = Legacy_Auth
}

When connecting with testdb, it will connect to localhost:E:DBFB5FB5TESTDATABASE.FDB (using the specified config). If you specify localhost:E:DBFB5FB5TESTDATABASE.FDB, it will also use the specified config.

However, the value of the alias can not be a modern url:

testdb2 = inet://localhost/E:\DB\FB5\FB5TESTDATABASE.FDB
{
    AuthClient = Legacy_Auth
}

With this config, attempts to connect with testdb2 will fail with error:

Statement failed, SQLSTATE = 08006
Unable to complete network request to host "inet".
-Failed to locate host machine.
-The specified name was not found in the hosts file or Domain Name Services.

And attempts to connect with inet://localhost/E:DBFB5FB5TESTDATABASE.FDB will not apply the specified configuration.

Expected behaviour would be for it to work the same as when the alias value is a legacy URL.

CREATE DOMAIN and ALTER DOMAIN do not validate the default value

GitHub Issue: 8303 Affected versions: 5.0.1, 6.0 Initial

CREATE DOMAIN does not evaluate the default value for validity, which makes it possible to create a domain with an invalid default. Same happens for ALTER DOMAIN if the domain is not yet used for a NOT NULL column.

Bugs Fixed

Database access error when nbackup is starting

GitHub Issue: 8237 Affected versions: 3.0.12, 4.0.5, 5.0.1, 6.0 Initial Fixed for: 3.0.13, 4.0.6, 5.0.2, 6.0 Alpha 1

In rare cases (hard to reproduce because caused by races) engine returns error about invalid (zero) page type when switching database to nbak mode.

wrong results using minvalue/maxvalue in join condition

GitHub Issue: 8304 Affected versions: 4.0.5, 5.0.1, 6.0 Initial Fixed for: 4.0.6, 5.0.2, 6.0 Alpha 1

Using minvalue in a join condition can cause the effect that records are not in the result set although they should be. Affects Firebird 5 and up, Firebird 4 and lower are not affected.

Crash at database restore due to failed system call

GitHub Issue: 8315 Affected versions: 5.0.1, 6.0 Initial Fixed for: 5.0.2, 6.0 Alpha 1

New features/improvements

NULLs should be skipped during index navigation...

GitHub Issue: 8291 apply to: 5.0.2, 6.0 Alpha 1

Since v2.0 we have an optimization that skips NULL keys in the beginning of the ASC index if the retrieval is known to ignore NULL values, i.e. it does not involve IS [NOT] NULL and IS [NOT] DISTINCT FROM conditions matched with an index. However, it was disabled for index navigation (i.e. ORDER BY mapped to an index). This is correct for a full index scan (no conditions matched), but it should be enabled if the navigational retrieval has also upper bound key(s) defined and these matches are known to treat NULLs as FALSE. Currently it returns every NULL key found inside the index to be evaluated at the record level and then ignored, just wasting CPU cycles.

Example:

create table t (id int);

insert into t
select case when mod(val, 2) = 0 then null else val end from (
  select row_number() over() as val
  from rdb$types, rdb$types, rdb$types
  rows 1000000
);

commit;
create index it on t(id);

set stat on;
set explain on;

SELECT count(*) FROM T WHERE ID < 3;

Select Expression
    -> Aggregate
        -> Filter
            -> Table "T" Access By ID
                -> Bitmap
                    -> Index "IT" Range Scan (upper bound: 1/1)

                COUNT
=====================
                    1

-- Fetches = 4

SELECT count(*) from (SELECT ID FROM T WHERE ID < 3 ORDER BY ID);

Select Expression
    -> Aggregate
        -> Filter
            -> Table "T" Access By ID
                -> Index "IT" Range Scan (upper bound: 1/1)

                COUNT
=====================
                    1

-- Fetches = 1007094 (1775 when NULLs are skipped)

Note

The current NULLs skipping code is still sub-optimal, number of page fetches shows that (still more than expected). But this is to be addressed separately and only in the master branch.

UNION ALL optimization with constant false condition

GitHub Issue: 8113 apply to: 6.0 Alpha 1

SQL standard FORMAT clause for CAST between string types and datetime types

GitHub Issue: 2388 apply to: 6.0 Alpha 1

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

IBPhoenix

Published

Category

News

Tags