Subject Re: [firebird-support] Unknown value after insert
Author Jacek Borowski
Hi,

Thank you very much Helen and Set.
In our case, records are inserted and visible to other transactions, but some selects returns wrong results. In two cases there was corrupted index (fld5), in others there was corrupted PK. It is very dangerous for us. We have about 100 instalations with databases from 1-25GB and all works exccelent, except this one and only from 2 months :( .

Regards,
Jacek Borowski

----- Original Message -----
From: Helen Borrie
To: firebird-support@yahoogroups.com
Sent: Saturday, May 24, 2008 12:55 AM
Subject: Re: [firebird-support] Unknown value after insert


At 01:38 AM 24/05/2008, Jacek Borowski wrote:
> -----Original Message-----
> From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Jacek Borowski
> Sent: 23. mai 2008 14:32
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Unknown value after insert
>
> Hi,
>
> From about 2 months ago, from time to time (10-15 times) We have wrong field value after insert.
>
> Server: Firebird CS 1.5.5.4926
> Database ~18GB working from 7 years, backed up regullary
> Linux RedHat Exterprise, kernel 2.6.18
> TABLE ~20k records
>
> First example:
>
> TABLE (fld1 varchar(2),fld2 integer,fld3 integer,fld4 varchar(1),fld5 integer)
>
> insert into TABLE (fld1, fld2, fld3) values ('AA',2,1) ;
> Table, has no triggers.
>
> select * from TABLE where fld4 is null - no results
> select * from TABLE where fld4 is not null - no results
> select strlen(fld4) from TABLE where fld1='AA' and fld2=2 and fld3=1 - result 0
> select Ascii_val(fld4) from TABLE where fld1='AA' and fld2=2 and fld3=1 - result 32 (space ???)
>
> after backup/restore
>
> select * from TABLE where fld4 is null - correct result
>
> Second example:
>
> insert into TABLE (fld1, fld2, fld3, fld5) values ('AA',2,1,1) ;
> select * from TABLE - I see in grid | AA | 2 | 1 | null | 1 |
> select * from TABLE where fld5=1 - no results
> select * from TABLE where fld5>1 - no results
> select * from TABLE where fld5<1 - no results
>
> backup/restore - selects are OK
>
> After few days we have new records with problem as shown above.
>
> Whats wrong ?

Possibly stating the obvious....but are you trying to do these selects from the table from a different transaction while the new inserts remain uncommitted? One transaction cannot see the uncommitted work of another - even if the two transactions are running within the same connection...and you will see the same kind of behaviour if you are using COMMIT RETAINING with snapshot transactions.

./heLen





------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.24.0/1461 - Release Date: 2008-05-22 16:44


[Non-text portions of this message have been removed]