The GitHub Actions job "Tests" on airflow.git/fix/issue-62506-mysql-bulk-load-parameterization has failed. Run started by GitHub user majiayu000 (triggered by potiuk).
Head commit for run: e693ccdd32ff3ff59d42185057cef2265106ce7c / majiayu000 <[email protected]> fix: prevent SQL keyword parameterization in MySQL bulk_load_custom The bulk_load_custom method was incorrectly passing duplicate_key_handling and extra_options as parameterized values to cursor.execute(). MySQL drivers treat parameterized values as data and quote them as string literals, producing invalid SQL like: LOAD DATA LOCAL INFILE '/tmp/file' 'IGNORE' INTO TABLE `table` 'FIELDS...' This was introduced in PR #33328 which changed from string concatenation to parameterization. However, duplicate_key_handling (IGNORE/REPLACE) and extra_options are SQL syntax keywords, not data values. Fixed by interpolating these keywords directly into the SQL statement via f-string while keeping tmp_file as the sole parameterized value: LOAD DATA LOCAL INFILE %s IGNORE INTO TABLE `table` FIELDS... Updated existing tests and added parametrized test to verify both IGNORE and REPLACE keywords appear literally in SQL without being parameterized. Closes: #62506 Signed-off-by: majiayu000 <[email protected]> Report URL: https://github.com/apache/airflow/actions/runs/23058319440 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
