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

<MYSQL_OPT_RECONNECT>, <mariadb_reconnect> and <CR_SERVER_LOST>

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 2.3.2, 3.0.2
    • None
    • None
    • Linux - MySQL Server 5.5.53
      Windows 7 - MySQL Server 5.5.48

    Description

      <MYSQL_OPT_RECONNECT> is not working when the server is sending a CR_SERVER_LOST (error 2013). This happens when the 'low' wait-timeout on the server has been reached.

      How to repeat:
      -------------------

      [mysqld]
      wait-timeout = 30

      MYSQL * m_MySql = mysql_init( NULL );
      mysql_optionsv( m_MySql, MYSQL_OPT_RECONNECT, (void *)"1" );
      m_MySql = mysql_real_connect
      (
      m_MySql,
      Host,
      User,
      Pass,
      Db,
      Port,
      NULL,
      CLIENT_REMEMBER_OPTIONS
      );
      sleep(31); // 31 seconds
      mysql_query( m_MySql, "SELECT 1;" );

      The <mysql_query> fails since the wait_timeout on the MySQL-server has been exceeded,
      and the server has closed the connection and sent error 2013.

      Attachments

        Activity

          People

            georg Georg Richter
            kerentchev Ivan Kerentchev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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