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

CONNECT engine cannot handle varchar fields containing newline

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.0.10
    • 10.4, 10.5, 10.6
    • None
    • windows 7 64 bit (actually v10.0.10 without galera)

    Description

      Given a CSV file with a varchar field containing a newline:

      f1,f2
      1,"simple ""text"" field"
      2,"includes newline
      in field"
      3,"simple"

      I can create a CONNECT CSV table:

      CREATE TABLE `simple` (
        `f1` int(1) NOT NULL,
        `f2` varchar(200) NOT NULL
      ) ENGINE=CONNECT DEFAULT CHARSET=utf8 `TABLE_TYPE`='csv' `FILE_NAME`='c:/Program Files/MariaDB 10.0/data/mw/simple.csv' `SEP_CHAR`=',' `QCHAR`='"' `HEADER`=1;

      But selecting from the table fails:

      MariaDB [mw]> select * from simple;
      ERROR 1296 (HY000): Got error 122 'Missing ending quote in simple field 2 line 2' from CONNECT

      This makes the CONNECT CSV table unusable for my application.

      Attachments

        Activity

          People

            TheLinuxJedi Andrew Hutchings
            martinwaite Martin WaIte
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.