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
52d51e5e
Commit
52d51e5e
authored
Mar 02, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the "system" command become executed in a bash shell in cygwin.
parent
ece00d93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
client/mysqltest.c
client/mysqltest.c
+12
-1
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+2
-2
No files found.
client/mysqltest.c
View file @
52d51e5e
...
@@ -1367,7 +1367,9 @@ int do_modify_var(struct st_query *query, const char *name,
...
@@ -1367,7 +1367,9 @@ int do_modify_var(struct st_query *query, const char *name,
NOTE
NOTE
If mysqltest is executed from cygwin shell, the command will be
If mysqltest is executed from cygwin shell, the command will be
executed in cygwin shell. Thus commands like "rm" etc can be used.
executed in the "windows command interpreter" cmd.exe and we prepend "sh"
to make it be executed by cygwins "bash". Thus commands like "rm",
"mkdir" as well as shellscripts can executed by "system" in Windows.
*/
*/
int
do_system
(
struct
st_query
*
command
)
int
do_system
(
struct
st_query
*
command
)
...
@@ -1379,9 +1381,18 @@ int do_system(struct st_query *command)
...
@@ -1379,9 +1381,18 @@ int do_system(struct st_query *command)
init_dynamic_string
(
&
ds_cmd
,
0
,
strlen
(
command
->
first_argument
)
+
64
,
256
);
init_dynamic_string
(
&
ds_cmd
,
0
,
strlen
(
command
->
first_argument
)
+
64
,
256
);
#ifdef __WIN__
/* Execute the command in "bash", ie. sh -c "<command>" */
dynstr_append
(
&
ds_cmd
,
"sh -c
\"
"
);
#endif
/* Eval the system command, thus replacing all environment variables */
/* Eval the system command, thus replacing all environment variables */
do_eval
(
&
ds_cmd
,
command
->
first_argument
,
TRUE
);
do_eval
(
&
ds_cmd
,
command
->
first_argument
,
TRUE
);
#ifdef __WIN__
dynstr_append
(
&
ds_cmd
,
"
\"
"
);
#endif
DBUG_PRINT
(
"info"
,
(
"running system command '%s' as '%s'"
,
DBUG_PRINT
(
"info"
,
(
"running system command '%s' as '%s'"
,
command
->
first_argument
,
ds_cmd
.
str
));
command
->
first_argument
,
ds_cmd
.
str
));
if
(
system
(
ds_cmd
.
str
))
if
(
system
(
ds_cmd
.
str
))
...
...
mysql-test/t/mysqldump.test
View file @
52d51e5e
...
@@ -830,8 +830,8 @@ DROP TABLE t1, t2;
...
@@ -830,8 +830,8 @@ DROP TABLE t1, t2;
# Bugs #9136, #12917: problems with --defaults-extra-file option
# Bugs #9136, #12917: problems with --defaults-extra-file option
#
#
--
system
echo
"[mysqltest1]"
>
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
--
system
echo
'[mysqltest1]'
>
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
--
system
echo
"port=1234"
>>
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
--
system
echo
'port=1234'
>>
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
--
exec
$MYSQL_MY_PRINT_DEFAULTS
-
c
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
mysqltest1
--
exec
$MYSQL_MY_PRINT_DEFAULTS
-
c
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
mysqltest1
--
exec
$MYSQL_MY_PRINT_DEFAULTS
-
e
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
mysqltest1
mysqltest1
--
exec
$MYSQL_MY_PRINT_DEFAULTS
-
e
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
mysqltest1
mysqltest1
--
system
rm
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
--
system
rm
$MYSQLTEST_VARDIR
/
tmp
/
tmp
.
cnf
...
...
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