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
0214115c
Commit
0214115c
authored
Aug 01, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial cleanup
parent
03dec1aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
sql/sys_vars.cc
sql/sys_vars.cc
+6
-4
No files found.
sql/sys_vars.cc
View file @
0214115c
...
@@ -3025,14 +3025,16 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
...
@@ -3025,14 +3025,16 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
if
(
!
var
->
save_result
.
string_value
.
str
)
if
(
!
var
->
save_result
.
string_value
.
str
)
return
true
;
return
true
;
if
(
var
->
save_result
.
string_value
.
length
>
FN_REFLEN
)
LEX_STRING
*
val
=
&
var
->
save_result
.
string_value
;
if
(
val
->
length
>
FN_REFLEN
)
{
// path is too long
{
// path is too long
my_error
(
ER_PATH_LENGTH
,
MYF
(
0
),
self
->
name
.
str
);
my_error
(
ER_PATH_LENGTH
,
MYF
(
0
),
self
->
name
.
str
);
return
true
;
return
true
;
}
}
char
path
[
FN_REFLEN
];
char
path
[
FN_REFLEN
];
size_t
path_length
=
unpack_filename
(
path
,
va
r
->
save_result
.
string_value
.
str
);
size_t
path_length
=
unpack_filename
(
path
,
va
l
->
str
);
if
(
!
path_length
)
if
(
!
path_length
)
return
true
;
return
true
;
...
@@ -3046,9 +3048,9 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
...
@@ -3046,9 +3048,9 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
return
false
;
return
false
;
}
}
(
void
)
dirname_part
(
path
,
va
r
->
save_result
.
string_value
.
str
,
&
path_length
);
(
void
)
dirname_part
(
path
,
va
l
->
str
,
&
path_length
);
if
(
va
r
->
save_result
.
string_value
.
length
-
path_length
>=
FN_LEN
)
if
(
va
l
->
length
-
path_length
>=
FN_LEN
)
{
// filename is too long
{
// filename is too long
my_error
(
ER_PATH_LENGTH
,
MYF
(
0
),
self
->
name
.
str
);
my_error
(
ER_PATH_LENGTH
,
MYF
(
0
),
self
->
name
.
str
);
return
true
;
return
true
;
...
...
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