Values disappearing from index
------------------------------

                 Key: CORE-3839
                 URL: http://tracker.firebirdsql.org/browse/CORE-3839
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.1, 2.5.0, 2.5.2
         Environment: Windows/64, Linux/32
            Reporter: prenosil


We have poblems with indexes on FB2.5, basically records sometimes disappear 
from index,
i.e. select using index will not find the record
  SELECT * FROM Tab WHERE ID = 123;
while select not using the index will return correct result:
  SELECT * FROM Tab WHERE ID+0 = 123;

* All 2.5.x versions have that problem, i.e. 2.5.0, 2.5.1, 2.5.2, Linux/32, 
windows/64
  Last version I am 100% sure is affected is WI-V2.5.1.26351 Firebird 2.5
  (it also happend on WI-V2.5.2.26469 Firebird 2.5, although there was 1 or 2 
days
  gap between checking that indexes are o.k. and upgrading to that version)

* Just during last two months, errors occured on approx 50 production databases 
out of 200.
(Usual number of concurrent connections is between 1 - 10.)

* databases have more than 300 tables, but 95% of errors are on 4 indexes on 2 
tables.
(All are sigle-column indexes on not null integer field.)
One of the tables is Master table which could be sometimes several times 
updated by triggers on Detail.
The other is log table which is insert-only.

* validation of databases never show any errors, no unusual entries in fb log.
All databases have forced-write-ON.
I am not aware of any PC/FB crashes (but they are customers' PCs...).

* errors can occur even on old records that nobody should touch recently

* quite interesting is test that compares number of values in the table and in 
the index, i.e.

  SELECT Count(DISTINCT Id) FROM Tab;

vs.

  SET STATISTICS INDEX MyIndex;
  SELECT CAST(1/RDB$STATISTICS AS BIGINT) FROM RDB$INDICES WHERE 
rdb$index_name='...';

For normal databases, I get the same values,
for corrupted databases, the value obtained using 1/rdb$statistics is HIGHER.


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

        

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to