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
c67f50f3
Commit
c67f50f3
authored
Jul 23, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for service issue with paths having spaces (bug #687)
parent
9dce7500
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
include/my_sys.h
include/my_sys.h
+1
-0
mysys/mf_format.c
mysys/mf_format.c
+8
-0
sql/mysqld.cc
sql/mysqld.cc
+5
-2
No files found.
include/my_sys.h
View file @
c67f50f3
...
...
@@ -100,6 +100,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_RETURN_REAL_PATH 32
/* return full path for file */
#define MY_SAFE_PATH 64
/* Return NULL if too long path */
#define MY_RELATIVE_PATH 128
/* name is relative to 'dir' */
#define MY_QUOTE_SPACES 256
/* quote when the path has spaces */
/* My seek flags */
#define MY_SEEK_SET 0
...
...
mysys/mf_format.c
View file @
c67f50f3
...
...
@@ -111,6 +111,14 @@ my_string fn_format(my_string to, const char *name, const char *dir,
strmov
(
buff
,
to
);
(
void
)
my_readlink
(
to
,
buff
,
MYF
(
0
));
}
if
(
flag
&
MY_QUOTE_SPACES
)
if
(
strchr
(
to
,
' '
))
{
char
tmp_buff
[
FN_REFLEN
];
tmp_buff
[
0
]
=
'"'
;
strxmov
(
tmp_buff
+
1
,
to
,
"
\"
"
,
NullS
);
strmov
(
to
,
tmp_buff
);
}
DBUG_RETURN
(
to
);
}
/* fn_format */
...
...
sql/mysqld.cc
View file @
c67f50f3
...
...
@@ -2559,7 +2559,8 @@ int main(int argc, char **argv)
{
char
file_path
[
FN_REFLEN
];
my_path
(
file_path
,
argv
[
0
],
""
);
/* Find name in path */
fn_format
(
file_path
,
argv
[
0
],
file_path
,
""
,
1
+
4
+
16
);
/* Force full path */
fn_format
(
file_path
,
argv
[
0
],
file_path
,
""
,
MY_REPLACE_DIR
+
MY_UNPACK_FILENAME
+
MY_RESOLVE_SYMLINKS
+
MY_QUOTE_SPACES
);
if
(
argc
==
2
)
{
...
...
@@ -2605,8 +2606,10 @@ int main(int argc, char **argv)
mysqld --install-manual mysqldopt --defaults-file=c:\miguel\my.ini
*/
uint
length
=
strlen
(
file_path
);
char
tmp_path
[
FN_REFLEN
];
fn_format
(
tmp_path
,
argv
[
3
],
tmp_path
,
""
,
MY_QUOTE_SPACES
);
*
strxnmov
(
file_path
+
length
,
sizeof
(
file_path
)
-
length
-
2
,
" "
,
argv
[
3
]
,
" "
,
argv
[
2
],
NullS
)
=
'\0'
;
tmp_path
,
" "
,
argv
[
2
],
NullS
)
=
'\0'
;
if
(
!
default_service_handling
(
argv
,
argv
[
2
],
argv
[
2
],
file_path
))
return
0
;
}
...
...
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