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

async api (connect) kill thread silently if connect failed.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 2.3.1
    • None
    • None
    • None
    • windows x64

    Description

      below code from libmariadb.c, 2095 line, mthd_my_real_connect

      error:
        reset_sigpipe(mysql);
        DBUG_PRINT("error",("message: %u (%s)",net->last_errno,net->last_error));
        {
          /* Free alloced memory */
          end_server(mysql);
          /* only free the allocated memory, user needs to call mysql_close */
          mysql_close_memory(mysql);
          if (!(((ulong) client_flag) & CLIENT_REMEMBER_OPTIONS))
            mysql_close_options(mysql);
        }
        DBUG_RETURN(0);
      

      if this function fails, if you don't set CLIENT_REMEMBER_OPTIONS,
      mysql_close_options called.
      in mysql_close_options, my_context_destroy called, and DestroyFiber called on windows.
      if fails occured on mysql_real_connect_cont (on coroutine) ... current thread will be gone.

      resolve:
      1. use CLIENT_REMEMBER_OPTIONS flag.
      2. do not call mysql_close_options on mthd_my_real_connect. cleanup should be outside of coroutine.

      Attachments

        Activity

          People

            georg Georg Richter
            sphawk Sewon Park
            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.