[Koha-bugs] [Bug 11974] Enable unix socket connections for database connections.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 20 13:56:19 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11974

--- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 26484
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26484&action=edit
Bug 11974 - Enable unix socket connections for database connections.

-----------------
- BUSINESS CASE -
-----------------
Currently Koha doesn't support using a non-default unix socket for database
connections.
Using unix sockets is generally ~30-40% faster compared to using TCP packets.
Because Koha abuses the database a lot, this will make a difference.

------------
- SOLUTION -
------------
Mysql uses unix sockets for localhost connections only, but DBI::Mysql cannot
automatically find the non-default socket path, thus it needs to be explicitly
given.

This patch modifies the C4::Context->dbh() routine to check for the presence of
mysql_socket in koha-conf.xml and prioritize the socket connection.
If making the socket connection fails, dbh() defaults to the TCP-connection if
available.

This patch works on MariaDB and Mysql, hence the configuration variable name
mysql_socket.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list