Details
-
Suggestion
-
Resolution: Fixed
-
P4: Low
-
4.3.4
-
None
-
b73574c4a (dev)
Description
MySQL can establish a connection to a server on the localhost via shared memory:
http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html
"If host is NULL or the string "localhost", a connection to the local host is assumed. For Windows, the client connects using a shared-memory connection, if the server has shared-memory connections enabled. Otherwise, TCP/IP is used. For Unix, the client connects using a Unix socket file. For local connections, you can also influence the type of connection to use with the MYSQL_OPT_PROTOCOL or MYSQL_OPT_NAMED_PIPE options to mysql_options(). The type of connection must be supported by the server. For a host value of "." on Windows, the client connects using a named pipe, if the server has named-pipe connections enabled. If named-pipe connections are not enabled, an error occurs. "
However, the required connection options are not supported, and calling mysql_options explicity to set them is not possible as this function has to "be called after mysql_init() and before mysql_connect() or mysql_real_connect()" which the current code structure in the driver does not allow:
if ((d->mysql = mysql_init((MYSQL*) 0)) &&
mysql_real_connect(d->mysql,
...