Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
118669b4
Commit
118669b4
authored
Sep 14, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.4815
parents
481f8d5b
7ec92d57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
15 deletions
+29
-15
mysys/mf_format.c
mysys/mf_format.c
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+11
-3
sql/sql_class.cc
sql/sql_class.cc
+8
-3
sql/sql_load.cc
sql/sql_load.cc
+6
-7
sql/sql_table.cc
sql/sql_table.cc
+3
-1
No files found.
mysys/mf_format.c
View file @
118669b4
...
@@ -42,7 +42,7 @@ my_string fn_format(my_string to, const char *name, const char *dir,
...
@@ -42,7 +42,7 @@ my_string fn_format(my_string to, const char *name, const char *dir,
/* Use given directory */
/* Use given directory */
convert_dirname
(
dev
,
dir
,
NullS
);
/* Fix to this OS */
convert_dirname
(
dev
,
dir
,
NullS
);
/* Fix to this OS */
}
}
else
if
((
flag
&
MY_RELATIVE_PATH
)
&&
!
test_if_hard_path
(
name
))
else
if
((
flag
&
MY_RELATIVE_PATH
)
&&
!
test_if_hard_path
(
dev
))
{
{
/* Put 'dir' before the given path */
/* Put 'dir' before the given path */
strmake
(
buff
,
dev
,
sizeof
(
buff
)
-
1
);
strmake
(
buff
,
dev
,
sizeof
(
buff
)
-
1
);
...
...
sql/item_strfunc.cc
View file @
118669b4
...
@@ -2412,14 +2412,22 @@ String *Item_load_file::val_str(String *str)
...
@@ -2412,14 +2412,22 @@ String *Item_load_file::val_str(String *str)
String
*
file_name
;
String
*
file_name
;
File
file
;
File
file
;
MY_STAT
stat_info
;
MY_STAT
stat_info
;
char
path
[
FN_REFLEN
];
DBUG_ENTER
(
"load_file"
);
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
#ifndef NO_EMBEDDED_ACCESS_CHECKS
!
(
current_thd
->
master_access
&
FILE_ACL
)
||
||
!
(
current_thd
->
master_access
&
FILE_ACL
)
#endif
#endif
!
my_stat
(
file_name
->
c_ptr
(),
&
stat_info
,
MYF
(
MY_WME
))
)
)
goto
err
;
goto
err
;
(
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
)))
goto
err
;
if
(
!
(
stat_info
.
st_mode
&
S_IROTH
))
if
(
!
(
stat_info
.
st_mode
&
S_IROTH
))
{
{
/* my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), file_name->c_ptr()); */
/* my_error(ER_TEXTFILE_NOT_READABLE, MYF(0), file_name->c_ptr()); */
...
...
sql/sql_class.cc
View file @
118669b4
...
@@ -892,9 +892,14 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
...
@@ -892,9 +892,14 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
option
|=
MY_REPLACE_DIR
;
// Force use of db directory
option
|=
MY_REPLACE_DIR
;
// Force use of db directory
#endif
#endif
strxnmov
(
path
,
FN_REFLEN
,
mysql_real_data_home
,
thd
->
db
?
thd
->
db
:
""
,
if
(
!
dirname_length
(
exchange
->
file_name
))
NullS
);
{
(
void
)
fn_format
(
path
,
exchange
->
file_name
,
path
,
""
,
option
);
strxnmov
(
path
,
FN_REFLEN
,
mysql_real_data_home
,
thd
->
db
?
thd
->
db
:
""
,
NullS
);
(
void
)
fn_format
(
path
,
exchange
->
file_name
,
path
,
""
,
option
);
}
else
(
void
)
fn_format
(
path
,
exchange
->
file_name
,
mysql_real_data_home
,
""
,
option
);
if
(
!
access
(
path
,
F_OK
))
if
(
!
access
(
path
,
F_OK
))
{
{
my_error
(
ER_FILE_EXISTS_ERROR
,
MYF
(
0
),
exchange
->
file_name
);
my_error
(
ER_FILE_EXISTS_ERROR
,
MYF
(
0
),
exchange
->
file_name
);
...
...
sql/sql_load.cc
View file @
118669b4
...
@@ -179,17 +179,16 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -179,17 +179,16 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
ex
->
file_name
+=
dirname_length
(
ex
->
file_name
);
ex
->
file_name
+=
dirname_length
(
ex
->
file_name
);
#endif
#endif
if
(
!
dirname_length
(
ex
->
file_name
)
&&
if
(
!
dirname_length
(
ex
->
file_name
))
strlen
(
ex
->
file_name
)
+
strlen
(
mysql_real_data_home
)
+
strlen
(
tdb
)
+
3
<
FN_REFLEN
)
{
{
(
void
)
sprintf
(
name
,
"%s%s/%s"
,
mysql_real_data_home
,
tdb
,
ex
->
file_name
);
strxnmov
(
name
,
FN_REFLEN
,
mysql_real_data_home
,
tdb
,
NullS
);
unpack_filename
(
name
,
name
);
/* Convert to system format */
(
void
)
fn_format
(
name
,
ex
->
file_name
,
name
,
""
,
MY_RELATIVE_PATH
|
MY_UNPACK_FILENAME
);
}
}
else
else
{
{
my_load_path
(
name
,
ex
->
file_name
,
mysql_real_data_home
);
(
void
)
fn_format
(
name
,
ex
->
file_name
,
mysql_real_data_home
,
""
,
unpack_filename
(
name
,
name
);
MY_RELATIVE_PATH
|
MY_UNPACK_FILENAME
);
#if !defined(__WIN__) && !defined(OS2) && ! defined(__NETWARE__)
#if !defined(__WIN__) && !defined(OS2) && ! defined(__NETWARE__)
MY_STAT
stat_info
;
MY_STAT
stat_info
;
if
(
!
my_stat
(
name
,
&
stat_info
,
MYF
(
MY_WME
)))
if
(
!
my_stat
(
name
,
&
stat_info
,
MYF
(
MY_WME
)))
...
...
sql/sql_table.cc
View file @
118669b4
...
@@ -2610,7 +2610,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
...
@@ -2610,7 +2610,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
}
else
else
{
{
if
(
!
access
(
fn_format
(
new_name_buff
,
new_name_buff
,
new_db
,
reg_ext
,
0
),
char
dir_buff
[
FN_REFLEN
];
strxnmov
(
dir_buff
,
FN_REFLEN
,
mysql_real_data_home
,
new_db
,
NullS
);
if
(
!
access
(
fn_format
(
new_name_buff
,
new_name_buff
,
dir_buff
,
reg_ext
,
0
),
F_OK
))
F_OK
))
{
{
/* Table will be closed in do_command() */
/* Table will be closed in do_command() */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment