Database corruption with V4MD 2.4.3
Pierre Rossel
prossel2 at myrealbox.com
Tue Nov 7 23:03:12 CST 2006
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of
> Ruslan Zasukhin
> Sent: Tuesday, November 07, 2006 5:00 PM
> To: valentina at lists.macserve.net
> Subject: Re: Database corruption with V4MD 2.4.3
>
>
> On 11/7/06 5:25 PM, "Pierre Rossel" <prossel2 at myrealbox.com> wrote:
>
> > Hello,
> >
> > I get my database corrupted by doing simple updateRecord on
> all records of a
> > cursor.
> >
> > The table has 800 records and Vstudio 2.4.3 diagnoses no
> problem. I build a
> > cursor with:
> >
> > SELECT mediaData FROM MediaItem WHERE collectionCode='TEST'
> >
> > Then for each record, I eventually modify the mediaData
> field (remove some
> > trailing white spaces) and updateRecord(). In total I have
> about 100 records
> > updated.
> >
> > Then going back to Vstudio, diagnose show errors on table
> MediaItem. Here is
> > the extract of the full details story:
> >
> > ==========> Field: mediaData , type Text
> > ==========> IndexFile
> > PAGE (0, 0) Inventory pages have wrong physical page
> number.Inventory pages
> > have wrong sum of physical page numbers.Index Inventory
> pages CORRUPTED.
> > Some big page is not marked as first.
> >
> >
> > Problems found! ( IndexFile )
> >
> > First Segment 6619219 of record with RecID = 1 is bigger of
> the last segment
> > 9965
> >
> > Problems found! ( Field: mediaData , type Text )
> >
> >
> > Problems found! ( Table: MediaItem )
> >
> >
> > Here is the code:
> >
> > sSql = "SELECT mediaData FROM MediaItem WHERE
> collectionCode='JEM'"
> > cur = db.Query(sSql, #DefaultSave) -- returns a Valentina cursor
> > if not voidP(cur) then
> > bFound = cur.firstRecord()
> > repeat while bFound
> > bModified = false
> > sData = cur.field("mediaData").value & ""
> > repeat while [" ", RETURN,
> TAB].getPos(sData.char[sData.length])
> > bModified = true
> > delete the last char of sData
> > end repeat
> > if bModified then
> > cur.field("mediaData").value = sData
> > cur.updateRecord()
> > --cur.updateRecord([#mediaData: sData])
> >
> > db.HandleError()
> > if db.getError() then
> > alert "Error updating record"
> > exit repeat
> > end if
> > end if
> > bFound = cur.nextRecord()
> > end repeat
> > end if
> >
> >
> > I tried with 2.5b11, but I had other problems (Director
> crashes) that made
> > me rollback to 2.4.3.
>
> The question is -- if b11 have this problem with Update ?
Just tried another thing:
Starting from a database that diagnoses no problem.
- cloned it
- same test as above
- run Vstudio to diagnose: Vstudio 2.4.3 win crashes when starting diagnose
!
How is it possible ? Clone is supposed to clean things, not making them
worse !!!
Pierre Rossel
More information about the Valentina
mailing list