firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Support for partial indices

Open dyemanov opened this issue 3 years ago • 4 comments

As requested in #3750. Also supported by MS SQL, PostgreSQL, SQLite, MongoDB. Brief description can be found in Wikipedia.

dyemanov avatar Aug 12 '22 12:08 dyemanov

Thank you for implementing this. Next step partial Foreign Key like in #7260

livius2 avatar Aug 12 '22 16:08 livius2

I suppose that if v4 opens an ODS 13.1 database with partial index, it may not work properly, trying to find entries in index without considering its condition, correct?

Do we consider these cases as valid for minor ODS upgrade?

asfernandes avatar Aug 13 '22 01:08 asfernandes

I suppose that if v4 opens an ODS 13.1 database with partial index, it may not work properly, trying to find entries in index without considering its condition, correct?

Do we consider these cases as valid for minor ODS upgrade?

v4 cannot attach an ODS 13.1 database.

dyemanov avatar Aug 13 '22 05:08 dyemanov

:white_check_mark: Build firebird 1.0.4757 completed (commit https://github.com/FirebirdSQL/firebird/commit/91eb884b4f by @hvlad)

AppVeyorBot avatar Oct 11 '22 20:10 AppVeyorBot

Following script causes FB crash (checked on 5.0.0.938; problem in line marked as "[ ! ]"):

set bail on;
shell del c:\temp\tmp4test.fdb 2>nul;
create database 'localhost:c:\temp\tmp4test.fdb';
show version;
set list on;
set echo on;
recreate table test(
    id int primary key
    ,f01 int
    ,f02 int
);
create index test_f01 on test computed by (f01)
where f01 = 1 --------------------------------- [ ! ]
;

pavel-zotov avatar Feb 17 '23 15:02 pavel-zotov

@pavel-zotov Should be fixed now.

dyemanov avatar Feb 17 '23 16:02 dyemanov

@@@ QA issue @@@ Currently this test contains only trivial cases for check. More complex examples, including test of backup/restore, validation, using of misc datatypes (non-ascii, decfloat and int128), will be added later.

pavel-zotov avatar Feb 18 '23 11:02 pavel-zotov