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

                 Key: CORE-5800
                 URL: http://tracker.firebirdsql.org/browse/CORE-5800
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 2.5.8
            Reporter: Polesov


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;


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

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to