Issue Details (XML | Word | Printable)

Key: CORE-5800
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Polesov
Votes: 0
Watchers: 4
Operations

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

After backup/restore the indexes by expression on computed field are not working properly.

Created: 19/Apr/18 07:33 AM   Updated: 06/Mar/19 08:07 AM
Component/s: None
Affects Version/s: 2.5.8
Fix Version/s: 4.0 Beta 1, 2.5.9, 3.0.5

Issue Links:
Duplicate
 

QA Status: Covered by another test(s)
Test Details: See test for CORE-5118. Bug was fixed, this ticket (5800) can be closed.


 Description  « Hide
Firebird version WI-V6.3.7.27050

Create the table:
create table T (
    A char(1),
    B char(1),
    C computed by (A || ' ' || B)
);

Create an index by expression on the calculated field:
create index IDX_T_C on T computed by (lower( C ));

Insert data into table:

insert into T ( A, B ) values ( 'A', 'B' );
insert into T ( A, B ) values ( 'C', 'D' );
insert into T ( A, B ) values ( 'E', 'F' );
commit;


Execute the query:
select * from T where lower( C ) = 'a b';

Result:
A B C
====== ====== ======
A B A B
plan (T index (IDX_T_C))


After backup/restore, the query does not return data:
select * from T where lower( C ) = 'a b';

No have results:
plan (T index (IDX_T_C))

Change the query without using the index:
select * from T where lower( C ) || '' = 'a b';

Result:
A B C
====== ====== ======
A B A B
plan (T natural)

After rebuilding the index, the indexes working properly:
alter index IDX_T_C active;


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.