v.25.11New Feature
Add setting into_outfile_create_parent_directories to automatically create parent
Add settinginto_outfile_create_parent_directoriesto automatically create parent directories forINTO OUTFILE, preventing errors when output paths do not exist. This simplifies workflows where queries write results to nested directories. Resolves #88610. #88795 (Saksham).
Why it matters
This feature solves the problem ofINTO OUTFILE commands failing due to missing parent directories. It simplifies workflows where query results are written to nested or non-existing directory paths by automatically creating the necessary directories, improving usability and reliability.How to use it
Enable the feature by settinginto_outfile_create_parent_directories to 1 before running SELECT ... INTO OUTFILE 'path/to/file' queries. For example:SET into_outfile_create_parent_directories = 1;
SELECT * FROM table INTO OUTFILE '/nested/dir/result.csv';