TIP, how to fight with corrupted indexing

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Feb 4 11:06:37 CST 2003


on 2/4/03 10:39 AM, Totte Alm at totte at code66.se wrote:

Hi Totte,
> 
> lördagen den 1 februari 2003 kl 09.21 skrev Ruslan Zasukhin:
> 
>> For now you can try reduce risk of this, ifyou self add in your prefs
>> The flag "DbClosed". So on next open you can REINDEX db if it is FALSE.
> 
> This only works for "one db" solutions.

But if to think more?  :-)

If store in X property list

    dbName      Yes
    dbName2     No

Another hack...you can self write into .vdb header some byte.
This will work for 1.x versions of course.

Header is 1KB.
But Valentina use only first hubdreds of bytes.,
So you can store YOUR flag in to e.g. 500 byte offset.

> My problem is that I use  Valentina DBs as documents. The user can have
> hundred or even thousands  databases on their drive, and I've seen that even
> with 4-file set, if  teh app crashes before correct database close, it
> corrupts the index  and when I try to read a Picturedata from the database, I
> get garbage  pictureadata back that crashes DrawPicture(). If I rebuild the
> index,  it works.

But how index can affect BLOB data?
I see only one way why it crashes. Record was deleted before crash. Yes?

Totte, may be you need add more Flushes after Updates()?

> PS, I have the database for you if you like.

But I need app to debug also,
Otherwise how I see graphic file? VAPP can not do this.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list