Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-848

Errors in mysql_real_connect() can close sockets / change fd without notifying the calling application

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.3, 3.4
    • None
    • Non blocking API
    • None

    Description

      When using mysql_real_connect_start() / mysql_real_connect_cont(), the calling application will use mysql_get_socket() to establish which fd to register events for.

      However, when errors occur, mysql_real_connect() can close the socket and potentially open a new one without informing the calling application, so that the calling application potentially has events registered on the wrong fd.

      The attached patch (against v3.4) adds the ability to register a callback to run whenever the library opens or closes a socket, allowing the calling application to be notified of these events, so it can correctly amend its registered events.

      Attachments

        Activity

          People

            georg Georg Richter
            ndp Nick Porter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.