db.flush required?
jda
jda at his.com
Thu Nov 20 19:05:31 CST 2003
>
> >
>> I thought db.close automatically flushed if needed? No?
>
>Yes, John.
>
>Close() must flush the whole db at first.
>
That's what I thought. And it turns out the bug is more complicated
(db.flush doesn't always work).
Basically, the problem is that sorting isn't working under certain
circumstances when the field being sorted is EMPTY.
The SQL query is
select id,hit,authors,date,title from references where hit>0 ORDER by
authorsSortMethod
where
authorsSortMethod = new VText("authorsSortMethod", 128, "English",
kV_Indexed)
authorsSortMethod.SetMethod("Upper(authors)")
If I create some records with an empty authors field it initially
sorts fine. BUT, if I close and reopen the database, the sort order
is wrong (seems random, with records without authors intermixed with
those that do). Reindexing the database usually fixes this, but it
reappears as soon as the database is closed and reopened.
I can reproduce this with a fresh database (1.9.8, RB 4.5.3 or 5.2.3fc3).
Jon
More information about the Valentina
mailing list