[Dovecot] quota dict with mysql 4.0

Andre Hübner andre.huebner at gmx.de
Fri Mar 26 14:32:41 EET 2010


>> i use successfully mysql-quotasystem with dovecot 1.2.11 on different 
>> servers except for mysql 4.0 servers
>> dovecot internally uses sql: "ON DUPLICATE KEY UPDATE" which was 
>> introduced in mysql 4.1

>The original code supported dict-sql only if ON DUPLICATE KEY UPDATE was 
>supported by the server. Later I added support for PostgreSQL and SQLite by 
>having them use INSERT triggers that >update the data if it already exists. 
>I suppose MySQL 4.0 doesn't support these kind of triggers either?

>Writing code manually to first try to UPDATE and if it fails then INSERT 
>would be possible.. But too much trouble for me to spend time on.
its a pity :(

i did now a other way. not really clean...
i removed code for ON DUPLICATE KEY UPDATE from C-Code and splitted quota 
table into two tables.
This seems to work because the second insert stays away.
not very clean but seems to work...


More information about the dovecot mailing list