mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 10:57:54 +02:00
A set of mysql_home_path-related fixes
mysys/mf_format.c: I think here i fixed a bug sql/item_strfunc.cc: mysql_real_data_home added sql/sql_class.cc: it's more closer to what manual says sql/sql_load.cc: code rewritten to be similar sql/sql_table.cc: mysql_real_data_home added to the path
This commit is contained in:
parent
3c3db07321
commit
89ee639541
5 changed files with 31 additions and 14 deletions
|
|
@ -2412,14 +2412,23 @@ String *Item_load_file::val_str(String *str)
|
|||
String *file_name;
|
||||
File file;
|
||||
MY_STAT stat_info;
|
||||
char path[FN_REFLEN];
|
||||
DBUG_ENTER("load_file");
|
||||
|
||||
if (!(file_name= args[0]->val_str(str)) ||
|
||||
if (!(file_name= args[0]->val_str(str))
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
!(current_thd->master_access & FILE_ACL) ||
|
||||
|| !(current_thd->master_access & FILE_ACL)
|
||||
#endif
|
||||
!my_stat(file_name->c_ptr(), &stat_info, MYF(MY_WME)))
|
||||
)
|
||||
goto err;
|
||||
|
||||
(void) fn_format(path, file_name->c_ptr(),
|
||||
mysql_real_data_home, "", MY_RELATIVE_PATH);
|
||||
unpack_filename(path, path); /* Convert to system format */
|
||||
|
||||
if (!my_stat(path, &stat_info, MYF(MY_WME)))
|
||||
goto err;
|
||||
|
||||
if (!(stat_info.st_mode & S_IROTH))
|
||||
{
|
||||
/* my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), file_name->c_ptr()); */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue