v.25.3Improvement

Support atomic rename when TRUNCATE is used

Support atomic rename when TRUNCATE is used with INTO OUTFILE. Resolves #70323. #77181 (Onkar Deshpande).
Added support for atomic rename operations when using the TRUNCATE command with INTO OUTFILE.

Why it matters

This feature ensures that when data is truncated and exported using INTO OUTFILE, the output file is renamed atomically. It prevents incomplete or partial data files from appearing if the operation is interrupted, improving data consistency and reliability.

How to use it

Use the TRUNCATE statement together with the INTO OUTFILE clause as before. The atomic rename operation is now handled internally without any change in syntax.