[Koha-bugs] [Bug 11974] New: 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:35:44 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11974
Bug ID: 11974
Summary: Enable unix socket connections for database
connections.
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: gmcharlt at gmail.com
Reporter: olli-antti.kivilahti at jns.fi
QA Contact: testopia at bugs.koha-community.org
-----------------
- 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