Hi

Dne Mon, 9 Feb 2009 11:32:22 +0100
Gerfried Fuchs <rho...@deb.at> napsal(a):

>  That's fine, but: The lines are moved over from outbox to the
> sentitems. If the IDs are created autoincrement in the outbox there
> won't be any conflict in the sentitems box. Currently you even have a
> runtime problem in the code with looking for the last ID in the outbox
> and later depending on that no line was inserted in between by adding a
> line with that ID+1.

You're probably right. When I first spot the code I was afraid of
switching to auto increment logic because of sentitems table, but it
should be probably safe. I will change it for next testing release
(after releasing one today).

>  Most of the time though the behavior that led to our annoyance happens:
> The outbox is empty and the code loops over the IDs in sentitems, one by
> one until it finds one that doesn't exist. ... in a table without any
> index. :/

Ah, I did not notice that SQL for MySQL does not have any indexes. It's
time to change it :-).

> > I know the code is really bad. Thats why I started with new backend
> > using DBI to support more SQL databases.
> 
>  Just switching the interface won't improve the code, unfortunately.

I know, thats why I'm not only switching the interface. Anyway one
of reasons to go with something what supports more backends was to
have  option to perform test cases through sqlite without requiring
real SQL server.

-- 
        Michal Čihař | http://cihar.com | http://blog.cihar.com

Attachment: signature.asc
Description: PGP signature

Reply via email to