Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16323

wrong packet sequence number when using compression and load local infile

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2.15, 10.3.7
    • 10.4
    • Server
    • None

    Description

      When using compression, LOAD LOCAL INFILE server send wrong sequence number.

      example :

      ==> conn:10 Query(0,155) (compress)
      94 00 00 00 00 00 00 90  00 00 00 03 4C 4F 41 44     ............LOAD
      20 44 41 54 41 20 4C 4F  43 41 4C 20 49 4E 46 49      DATA LOCAL INFI
      4C 45 20 27 43 3A 2F 55  73 65 72 73 2F 64 69 65     LE 'C:/Users/die
      67 6F 2F 41 70 70 44 61  74 61 2F 4C 6F 63 61 6C     go/AppData/Local
      2F 54 65 6D 70 2F 73 6D  61 6C 6C 4C 6F 63 61 6C     /Temp/smallLocal
      49 6E 66 69 6C 65 2E 74  78 74 27 20 49 4E 54 4F     Infile.txt' INTO
      20 54 41 42 4C 45 20 73  6D 61 6C 6C 4C 6F 63 61      TABLE smallLoca
      6C 49 6E 66 69 6C 65 20  46 49 45 4C 44 53 20 54     lInfile FIELDS T
      45 52 4D 49 4E 41 54 45  44 20 42 59 20 27 2C 27     ERMINATED BY ','
      20 28 69 64 2C 20 74 65  73 74 29                     (id, test)
       
      <== conn:10 Query.readResponsePacket (compress)
      0B 00 00 01 00 00 00 07  00 00 01 00 00 00 02 00     ................
      00 00                                                ..
       
      <== conn:10 Query.readResponsePacket (compress)
      3B 00 00 01 00 00 00 37  00 00 01 FB 43 3A 2F 55     ;......7....C:/U
      73 65 72 73 2F 64 69 65  67 6F 2F 41 70 70 44 61     sers/diego/AppDa
      74 61 2F 4C 6F 63 61 6C  2F 54 65 6D 70 2F 73 6D     ta/Local/Temp/sm
      61 6C 6C 4C 6F 63 61 6C  49 6E 66 69 6C 65 2E 74     allLocalInfile.t
      78 74                                                xt
       
      ==> conn:10 Query.readResponsePacket(0,31) (compress)
      18 00 00 02 00 00 00 10  00 00 02 31 2C 68 65 6C     ...........1,hel
      6C 6F 0A 32 2C 77 6F 72  6C 64 0A 00 00 00 03        lo.2,world.....
       
      <== conn:10 Query.readResponsePacket (compress)
      3B 00 00 03 00 00 00 37  00 00 03 00 02 00 02 00     ;......7........
      00 00 2F 52 65 63 6F 72  64 73 3A 20 32 20 20 44     ../Records: 2  D
      65 6C 65 74 65 64 3A 20  30 20 20 53 6B 69 70 70     eleted: 0  Skipp
      65 64 3A 20 30 20 20 57  61 72 6E 69 6E 67 73 3A     ed: 0  Warnings:
      20 30                                              
      

      In this example, in last packet
      3B 00 00 03 00 00 00 37 00 00 03 00 02 00 02 00
      correct packet value would be
      3B 00 00 03 00 00 00 37 00 00 04 00 02 00 02 00
      since connector has send an empty packet with sequence number of 0x03

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.