[Dovecot] Quota transaction bug? (was: Re: Quota plugin, Maildir, dict backend loop problem)

Jasper Bryant-Greene jasper at albumltd.co.nz
Wed Jul 25 00:23:34 EEST 2007


On Tue, Jul 24, 2007 at 02:09:23PM -0700, David Jonas wrote:
> < SELECT current FROM quota WHERE ...
> > 513965019
> < BEGIN
> < INSERT INTO quota (current, ...
> < COMMIT
> > ??  (error_r appears to be (null))

Unrelated to the original post, but the above would appear to be a bug to me.

Because the SELECT is done before the transaction starts, the value in the
INSERT which is based on the SELECT may no longer be consistent with the
actual value in that table.

I had a look through the code as I wanted to include a patch to move the SELECT
into the transaction with this email, but I'm not familiar enough with the
Dovecot codebase to find the code that performs the above SQL. If anyone can
point me in the right direction I'd be happy to submit a patch.

Jasper


More information about the dovecot mailing list