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

LOAD XML INFILE breaks when using LOCAL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.3
    • Component/s: Other
    • Labels:
      None

      Description

      When using a query with LOAD DATA LOCAL INFILE the MariaDB driver validates the file path has not changed before sending the data for the file to the database. The driver does the same thing for LOAD XML LOCAL INFILE as well, but always checks specifically for the word DATA, which causes this validation to fail any time LOAD XML LOCAL INFILE is used.

      Links to offending code:
      The query is checked to verify the filename: https://github.com/mariadb-corporation/mariadb-connector-j/blob/9536ba7afbb29226be7f89724178f4e548ad01be/src/main/java/org/mariadb/jdbc/internal/protocol/AbstractQueryProtocol.java#L1738
      The incorrect regex which only checks for DATA: https://github.com/mariadb-corporation/mariadb-connector-j/blob/9536ba7afbb29226be7f89724178f4e548ad01be/src/main/java/org/mariadb/jdbc/internal/util/Utils.java#L1007

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            kwood Kyle Wood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration