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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f60eeee9
Commit
f60eeee9
authored
Nov 21, 2019
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21062 Do not use popen() in text mode for mysql_upgrade.
parent
9d4da685
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
client/mysql_upgrade.c
client/mysql_upgrade.c
+10
-1
No files found.
client/mysql_upgrade.c
View file @
f60eeee9
...
@@ -383,11 +383,20 @@ static int run_command(char* cmd,
...
@@ -383,11 +383,20 @@ static int run_command(char* cmd,
if
(
opt_verbose
>=
4
)
if
(
opt_verbose
>=
4
)
puts
(
cmd
);
puts
(
cmd
);
if
(
!
(
res_file
=
my_popen
(
cmd
,
IF_WIN
(
"rt"
,
"r"
)
)))
if
(
!
(
res_file
=
my_popen
(
cmd
,
"r"
)))
die
(
"popen(
\"
%s
\"
,
\"
r
\"
) failed"
,
cmd
);
die
(
"popen(
\"
%s
\"
,
\"
r
\"
) failed"
,
cmd
);
while
(
fgets
(
buf
,
sizeof
(
buf
),
res_file
))
while
(
fgets
(
buf
,
sizeof
(
buf
),
res_file
))
{
{
#ifdef _WIN32
/* Strip '\r' off newlines. */
size_t
len
=
strlen
(
buf
);
if
(
len
>
1
&&
buf
[
len
-
2
]
==
'\r'
&&
buf
[
len
-
1
]
==
'\n'
)
{
buf
[
len
-
2
]
=
'\n'
;
buf
[
len
-
1
]
=
0
;
}
#endif
DBUG_PRINT
(
"info"
,
(
"buf: %s"
,
buf
));
DBUG_PRINT
(
"info"
,
(
"buf: %s"
,
buf
));
if
(
ds_res
)
if
(
ds_res
)
{
{
...
...
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