Bug #90291 | load_file() will not raise an error if secure_file_priv option was not set | ||
---|---|---|---|
Submitted: | 3 Apr 2018 15:35 | Modified: | 4 Apr 2018 10:00 |
Reporter: | Shahriyar Rzayev | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S4 (Feature request) |
Version: | 5.7.20, 5.7.21, 5.6.39, 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[3 Apr 2018 15:35]
Shahriyar Rzayev
[3 Apr 2018 15:35]
Shahriyar Rzayev
Changed severity to Serious
[4 Apr 2018 10:00]
MySQL Verification Team
Hello Shahriyar, Thank you for the report. Thanks, Umesh
[30 May 2018 12:45]
Georgi Kodinov
Technically this is a feature request since the current behavior is documented. https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_load-file says: LOAD_FILE(file_name) Reads the file and returns the file contents as a string. To use this function, the file must be located on the server host, you must specify the full path name to the file, and you must have the FILE privilege. The file must be readable by all and its size less than max_allowed_packet bytes. If the secure_file_priv system variable is set to a nonempty directory name, the file to be loaded must be located in that directory. If the file does not exist or cannot be read because one of the preceding conditions is not satisfied, the function returns NULL.