Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2042

Hang with multistatment queries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.12
    • Fix Version/s: 2.2.14
    • Component/s: Protocol
    • Labels:
      None

      Description

      Run following sql in a multistatment manner, sometimes it will hang

      select name from t1 where id = 1; select name from t1 where id = 3; select name from t1 where id = 2
      

      We found the problem is here, mysql_backend.c:826

       if (collecting_resultset(proto, capabilities))
                  {
                      if (expecting_resultset(proto))
                      {
                          if (mxs_mysql_is_result_set(read_buffer))
                          {
                              bool more = false;
                              if (modutil_count_signal_packets(read_buffer, 0, &more, NULL) != 2)
                              {
                                  dcb_readq_prepend(dcb, read_buffer);
                                  return 0;
                              }
                          }
       
                          // Collected the complete result
                          proto->collect_result = false;
                          result_collected = true;
                      }
      

      If all results returned in one gwbuf, then modutil_count_signal_packets will return 6 not 2, it is not easy to reproduce it;

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            dapeng dapeng 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.