mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 06:05:32 +02:00
Bug#10418: LOAD_FILE does not behave like in manual if file does not exist
load_file() string-function should return NULL rather than throw an error if the file doesn't exist, as per the manual. mysql-test/t/outfile.test: expect NULL rather than error if file given to load_file() doesn't exist mysql-test/t/func_str.test: show that load_file() will return NULL rather than throw an error if file doesn't exist mysql-test/r/outfile.result: expect NULL rather than error if file given to load_file() doesn't exist mysql-test/r/func_str.result: expect NULL rather than error if file given to load_file() doesn't exist sql/item_strfunc.cc: load_file() should return NULL as per the docs if file not found, rather than throw an error
This commit is contained in:
parent
e4e67d587e
commit
dd934da915
5 changed files with 16 additions and 3 deletions
|
|
@ -2489,7 +2489,7 @@ String *Item_load_file::val_str(String *str)
|
|||
(void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
|
||||
MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
|
||||
|
||||
if (!my_stat(path, &stat_info, MYF(MY_WME)))
|
||||
if (!my_stat(path, &stat_info, MYF(0)))
|
||||
goto err;
|
||||
|
||||
if (!(stat_info.st_mode & S_IROTH))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue