Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-382

Connect timeout is not working

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 3.1.15
    • N/A
    • General
    • None

    Description

      In function MADB_DbcConnectDB, it tries to set MYSQL_OPT_CONNECT_TIMEOUT as Dsn->ConnectionTimeout, but ConnectionTimeout is never set in function MADB_DbcSetAttr.

        if (Dsn->ConnectionTimeout)
          mysql_optionsv(Connection->mariadb, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&Dsn->ConnectionTimeout);
      

      This is how it's done in mysql-connector-odbc. It's using the login_timeout instead since it's one that's actually set in SQLSetConnectAttr.

        if (login_timeout)
          mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&login_timeout);
      

      https://github.com/mysql/mysql-connector-odbc/blob/8.0.29/driver/connect.cc

      Attachments

        Issue Links

          Activity

            People

              Lawrin Lawrin Novitsky
              mailtohx@gmail.com Xiao Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.