Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1075

LOAD DATA INFILE is broken on windows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0, 2.7.11
    • Other
    • None
    • Windows

    Description

      File path is concatenated to regexp without any escaping, causing invalid syntax with windows slashes.

      https://github.com/mariadb-corporation/mariadb-connector-j/blob/745ef7b287363745ae4b11d44df2713d3c9b3d8d/src/main/java/org/mariadb/jdbc/message/ClientMessage.java#L304

      Reported to DataGrip tracker https://youtrack.jetbrains.com/issue/DBE-16600

      Example from there
      ```
      LOAD DATA LOCAL INFILE
      "z:\\EDEDE
      ede.csv"
      IGNORE INTO TABLE schama.table
      FIELDS TERMINATED BY ','
      OPTIONALLY ENCLOSED BY '"'
      IGNORE 1 LINES
      (@col1, @col2, @col3, @col4, @col5,@date_str,@col7,@col8,@val)
      set val= @val, date = STR_TO_DATE(@date_str, '%Y%m%d'), id = 12345;
      ```

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            kassak ak
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.