Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2551

Support shared-memory connections with MySQL

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P4: Low
    • 6.6.0 FF, 6.6.0
    • 4.3.4
    • SQL Support
    • 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,
      ...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes