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

The MariaDB Server never returns to client after a read error

    XMLWordPrintable

Details

    Description

      Having the CSV file foo.csv (attached):

      26,Hello world!,foo
      45,abcdefghijklmnopqrstuvwxyz,bar
      

      The table:

      create table t1 (
      n int not null,
      m char(20),
      t char(20))
      engine=connect table_type=CSV file_name='foo.csv';
      

      When doing:

      select * from t1;
      

      The server does not return or is interrupted after a long timeout.

      This because of a read error on the second record, field 2 being too long for the column m.

      However, working on bar.csv (attached):

      45,abcdefghijklmnopqrstuvwxyz,bar
      26,Hello world!,foo
      

      with the table:

      create table t2 (
      n int not null,
      m char(20),
      t char(20))
      engine=connect table_type=CSV file_name='C:/Data/FMT/bar.csv';
      

      when executing:

      select * from t2;
      

      The proper error message is returned:

      1296: Got error 122 'Field 2 too long for m line 1 of bar.csv' from CONNECT
      

      Attachments

        1. bar.csv
          0.1 kB
          Olivier Bertrand
        2. foo.csv
          0.1 kB
          Olivier Bertrand

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bertrandop Olivier Bertrand
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.