Mercurial > dovecot > core-2.2
changeset 11553:7a7bfdd708ff HEAD
dict quota: Quota recalculation always doubled the quota with pgsql.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 16 Jun 2010 16:17:52 +0100 |
parents | a74f743e2c56 |
children | dec8986d33ea |
files | src/plugins/quota/quota-dict.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/quota/quota-dict.c Tue Jun 15 17:54:12 2010 +0100 +++ b/src/plugins/quota/quota-dict.c Wed Jun 16 16:17:52 2010 +0100 @@ -115,6 +115,10 @@ T_BEGIN { dt = dict_transaction_begin(root->dict); + /* these unsets are mainly necessary for pgsql, because its + trigger otherwise increases quota without deleting it */ + dict_unset(dt, DICT_QUOTA_CURRENT_BYTES_PATH); + dict_unset(dt, DICT_QUOTA_CURRENT_COUNT_PATH); dict_set(dt, DICT_QUOTA_CURRENT_BYTES_PATH, dec2str(bytes)); dict_set(dt, DICT_QUOTA_CURRENT_COUNT_PATH, dec2str(count)); } T_END;