[Dovecot] my.cnf reading support in MySQL backend
I hope this ml is the right place to send this... Anyway, I'd very much like for the MySQL backend to call mysql_options, so that it'll read the settings defined in MySQL's my.cnf under the [client] section. This allows to set a whole slew of MySQL specific settings for the MySQL connection, for example to enable the compressed protocol, set charsets, enable SSL client verification, and much more. A patch is attached that implements this. See http://dev.mysql.com/doc/refman/5.0/en/mysql-options.html for more info.
Best regards, Luca Longinotti aka CHTEKK
LongiTEKK Networks Admin: chtekk@longitekk.com Gentoo Dev: chtekk@gentoo.org SysCP Dev: chtekk@syscp.org TILUG Supporter: chtekk@tilug.ch
Timo Sirainen wrote:
On 31.12.2007, at 15.23, Luca Longinotti wrote:
- mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client");
Is "client" always the correct group to read? Would there be any point in making this configurable?
Well, "client" is the default group. It can of course be made configurable, which might be interesting... In that case I'd also make the location of the configuration file configurable, for maximum flexibility. Attached is a patch to do just that, and use "client" if nothing is set.
Best regards, Luca Longinotti aka CHTEKK
LongiTEKK Networks Admin: chtekk@longitekk.com Gentoo Dev: chtekk@gentoo.org SysCP Dev: chtekk@syscp.org TILUG Supporter: chtekk@tilug.ch
On Tue, 2008-01-01 at 18:23 +0100, Luca Longinotti wrote:
Timo Sirainen wrote:
On 31.12.2007, at 15.23, Luca Longinotti wrote:
- mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client");
Is "client" always the correct group to read? Would there be any point in making this configurable?
Well, "client" is the default group. It can of course be made configurable, which might be interesting... In that case I'd also make the location of the configuration file configurable, for maximum flexibility. Attached is a patch to do just that, and use "client" if nothing is set.
I added it to v1.1, but I don't know if I should add it to v1.0. At least it shouldn't do it by default to make sure that no existing installations break accidentally..
On Tue, 2008-01-01 at 19:39 +0200, Timo Sirainen wrote:
On Tue, 2008-01-01 at 18:23 +0100, Luca Longinotti wrote:
Timo Sirainen wrote:
On 31.12.2007, at 15.23, Luca Longinotti wrote:
- mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client");
Is "client" always the correct group to read? Would there be any point in making this configurable?
Well, "client" is the default group. It can of course be made configurable, which might be interesting... In that case I'd also make the location of the configuration file configurable, for maximum flexibility. Attached is a patch to do just that, and use "client" if nothing is set.
I added it to v1.1, but I don't know if I should add it to v1.0. At least it shouldn't do it by default to make sure that no existing installations break accidentally..
Hmm. And I think I'll change the settings to option_file and option_group. They make more sense than default_*.
Timo Sirainen wrote:
I added it to v1.1, but I don't know if I should add it to v1.0. At least it shouldn't do it by default to make sure that no existing installations break accidentally..
Hmm. And I think I'll change the settings to option_file and option_group. They make more sense than default_*.
Great! :) Of course option_file/group work too, and having it only in 1.1 is no problem for me. Thanks and happy new year!
Best regards, Luca Longinotti aka CHTEKK
LongiTEKK Networks Admin: chtekk@longitekk.com Gentoo Dev: chtekk@gentoo.org SysCP Dev: chtekk@syscp.org TILUG Supporter: chtekk@tilug.ch
participants (2)
-
Luca Longinotti
-
Timo Sirainen