[CONJ-854] LOAD XML INFILE breaks when using LOCAL Created: 2021-02-04  Updated: 2021-05-11  Resolved: 2021-05-11

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: 2.7.3

Type: Bug Priority: Major
Reporter: Kyle Wood Assignee: Diego Dupin
Resolution: Fixed Votes: 0
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


Generated at Thu Feb 08 03:18:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.