Skip to content

Commit 8d6a25a

Browse files
Bjorn MunchBjorn Munch
Bjorn Munch
authored and
Bjorn Munch
committed
Bug #43005 main.init_connect fais on Windows in PB2
Server args containing spaces do not work on Windows Fixed my_safe_rprocess-win to re-apply "" around such args
1 parent c63b8f4 commit 8d6a25a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

mysql-test/lib/My/SafeProcess/safe_process_win.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,14 @@ int main(int argc, const char** argv )
188188
die("No real args -> nothing to do");
189189
/* Copy the remaining args to child_arg */
190190
for (int j= i+1; j < argc; j++) {
191-
to+= _snprintf(to, child_args + sizeof(child_args) - to, "%s ", argv[j]);
191+
if (strchr (argv[j], ' ')) {
192+
/* Protect with "" if this arg contains a space */
193+
to+= _snprintf(to, child_args + sizeof(child_args) - to,
194+
"\"%s\" ", argv[j]);
195+
} else {
196+
to+= _snprintf(to, child_args + sizeof(child_args) - to,
197+
"%s ", argv[j]);
198+
}
192199
}
193200
break;
194201
} else {

mysql-test/suite/rpl/t/disabled.def

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@
1111
##############################################################################
1212

1313
rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx
14-
rpl_init_slave : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows

mysql-test/t/disabled.def

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
1313
innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently"
1414
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
15-
init_connect : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows

0 commit comments

Comments
 (0)