summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-05-04 14:29:23 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-05-04 14:29:23 +0300
commitb22fdf1cbabd8a69edab0caa476b6f7f468e4496 (patch)
treef6203178a6b0af093ece4a5d76b06c6c00754ec4 /sql/sql_load.cc
parent4d95c794d6a920fc34dd1df3bd874ebf308c911f (diff)
parent4c5dfc00f7a2ea3cf9475455e2749a96bfc38344 (diff)
downloadmariadb-git-b22fdf1cbabd8a69edab0caa476b6f7f468e4496.tar.gz
Merged 5.0-security->5.1-security
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index c227fe69b62..a3796f71ea7 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -348,21 +348,21 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
#if !defined(__WIN__) && ! defined(__NETWARE__)
MY_STAT stat_info;
- if (!my_stat(name,&stat_info,MYF(MY_WME)))
- DBUG_RETURN(TRUE);
+ if (!my_stat(name, &stat_info, MYF(MY_WME)))
+ DBUG_RETURN(TRUE);
// if we are not in slave thread, the file must be:
if (!thd->slave_thread &&
- !((stat_info.st_mode & S_IROTH) == S_IROTH && // readable by others
- (stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink
- ((stat_info.st_mode & S_IFREG) == S_IFREG ||
- (stat_info.st_mode & S_IFIFO) == S_IFIFO)))
+ !((stat_info.st_mode & S_IROTH) == S_IROTH && // readable by others
+ (stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink
+ ((stat_info.st_mode & S_IFREG) == S_IFREG || // and a regular file
+ (stat_info.st_mode & S_IFIFO) == S_IFIFO))) // or FIFO
{
- my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), name);
- DBUG_RETURN(TRUE);
+ my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), name);
+ DBUG_RETURN(TRUE);
}
if ((stat_info.st_mode & S_IFIFO) == S_IFIFO)
- is_fifo = 1;
+ is_fifo= 1;
#endif
if ((file=my_open(name,O_RDONLY,MYF(MY_WME))) < 0)