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

multi_loaddata command connection closed by mxs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.3.0
    • readwritesplit
    • None
    • linux + make debug + mysql 5.6.16
    • MXS-SPRINT-57, MXS-SPRINT-58

    Description

      case like:

          rc = mysql_query(myconn, "DROP TABLE IF EXISTS test_loaddata");
          myquery(rc);
          rc = mysql_query(myconn, "CREATE TABLE test_loaddata (id int(11) AUTO_INCREMENT, names varchar(256), PRIMARY KEY (id))");
          myquery(rc);
       
          strxmov(tmp, "load data local infile '", data_file, "' into table test_loaddata");
          strxmov(cmd, tmp, ";", tmp, NullS);
          while (i < 5)
          {
              int status = 0;
              rc = mysql_query(myconn, cmd);
              myquery(rc);
       
              do {
                  if(result = mysql_store_result(myconn)) {
                      while((result_row = mysql_fetch_row(result)) != NULL)
                      {
                          fields_num = mysql_num_fields(result);
                          for(j = 0; j < fields_num; j++)
                              printf("field[%d] : %s\t", (j+1), result_row[j]);
                          printf("\n");
                      }
                      mysql_free_result(result);
                  }
                  else {
                      printf("no result set or error\n");
                  }
                  /* more results? -1 = no, >0 = error, 0 = yes (keep looping) */
                  status = mysql_next_result(myconn);
                  DIE_IF(status > 0);
                  if (status > 0)
                      fprintf(stdout, "error is: %s\n", mysql_error(myconn));
              } while (status == 0);
              i++;
          }
      

      loadfile: load_data.txt content
      errreeeeee
      ttttttttdsss
      qqqqqqqqqqqqqqqqqqqqq

      by dump traffic between mxs and mysql, we find mxs not send completed packet to db:

      2018-04-26 16:49:08.661064 IP 10.101.161.10.35879 > 10.125.198.61.3009: Flags [P.], seq 416:466, ack 211, win 2048, options [nop,nop,TS val 9041746 ecr 1663536599], length 50
              0x0000:  200b c738 a50c 448a 5b33 cdd0 0800 4500  ...8..D.[3....E.
              0x0010:  0066 a2d9 4000 4006 1b8f 0a65 a10a 0a7d  .f..@.@....e...}
              0x0020:  c63d 8c27 0bc1 358c 4efc fa51 afd6 8018  .=.'..5.N..Q....
              0x0030:  0800 7c82 0000 0101 080a 0089 f752 6327  ..|..........Rc'
              0x0040:  8dd7 2e00 0006 6572 7272 6565 6565 6565  ......errreeeeee
              0x0050:  0a74 7474 7474 7474 7464 7373 730a 7171  .ttttttttdsss.qq
              0x0060:  7171 7171 7171 7171 7171 7171 7171 7171  qqqqqqqqqqqqqqqq
              0x0070:  7171 710a                                qqq.
      

      there client actual send more a empty packet at end, but mxs drop this empty packet. and send quit packet to db a little while.

      2018-04-26 16:49:39.004077 IP 10.101.161.10.35879 > 10.125.198.61.3009: Flags [P.], seq 466:471, ack 212, win 2048, options [nop,nop,TS val 9072089 ecr 1663566942], length 5
              0x0000:  200b c738 a50c 448a 5b33 cdd0 0800 4500  ...8..D.[3....E.
              0x0010:  0039 a2da 4000 4006 1bbb 0a65 a10a 0a7d  .9..@.@....e...}
              0x0020:  c63d 8c27 0bc1 358c 4f2e fa51 afd7 8018  .=.'..5.O..Q....
              0x0030:  0800 7c55 0000 0101 080a 008a 6dd9 6328  ..|U........m.c(
              0x0040:  045e 0100 0000 01                        .^.....
      

      client not send this packet.

      Attachments

        Activity

          People

            markus makela markus makela
            xzh xiangzhong
            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.