[Dovecot] quota dict mysql not working (2.0.beta4)

Timo Sirainen tss at iki.fi
Wed May 26 17:32:27 EEST 2010


On Mon, 2010-05-24 at 00:47 +0400, Andrey Melnikov wrote:

> after mysql_query() - mysql return right data (affected rows = 1), but
> there is no result to store (this is UPDATE/DELETE query),
> next unconditional call to mysql_store_result() return nothing (right,
> there no result) and reset affected_rows to -1ULL.
> 
> You should modify driver_mysql_query_s() to call mysql_field_count()
> first, to ensure - there is any data to read or no.

But the whole point of the code is to get number of affected rows for
previous UPDATE, so that if there is no quota row for user, the quota
gets recalculated.

This fixed it for my tests:
http://hg.dovecot.org/dovecot-2.0/rev/0c15a760dab8




More information about the dovecot mailing list