Skip to content

Commit c2d5523

Browse files
committed
Merge 10.9 into 10.10
2 parents 135e976 + 35de832 commit c2d5523

30 files changed

+226
-416
lines changed

client/mysql.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,8 +2048,15 @@ get_one_option(const struct my_option *opt, const char *argument,
20482048
case 'S':
20492049
if (filename[0] == '\0')
20502050
{
2051-
/* Socket given on command line, switch protocol to use SOCKETSt */
2052-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
2051+
/*
2052+
Socket given on command line, switch protocol to use SOCKETSt
2053+
Except on Windows if 'protocol= pipe' has been provided in
2054+
the config file or command line.
2055+
*/
2056+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
2057+
{
2058+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
2059+
}
20532060
}
20542061
break;
20552062
case 'I':

client/mysqladmin.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,15 @@ get_one_option(const struct my_option *opt, const char *argument,
321321
case 'S':
322322
if (filename[0] == '\0')
323323
{
324-
/* Socket given on command line, switch protocol to use SOCKETSt */
325-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
324+
/*
325+
Socket given on command line, switch protocol to use SOCKETSt
326+
Except on Windows if 'protocol= pipe' has been provided in
327+
the config file or command line.
328+
*/
329+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
330+
{
331+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
332+
}
326333
}
327334
break;
328335
}

client/mysqlbinlog.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,8 +2447,15 @@ get_one_option(const struct my_option *opt, const char *argument,
24472447
case 'S':
24482448
if (filename[0] == '\0')
24492449
{
2450-
/* Socket given on command line, switch protocol to use SOCKETSt */
2451-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
2450+
/*
2451+
Socket given on command line, switch protocol to use SOCKETSt
2452+
Except on Windows if 'protocol= pipe' has been provided in
2453+
the config file or command line.
2454+
*/
2455+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
2456+
{
2457+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
2458+
}
24522459
}
24532460
break;
24542461
case 'v':

client/mysqlcheck.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,15 @@ get_one_option(const struct my_option *opt,
387387
case 'S':
388388
if (filename[0] == '\0')
389389
{
390-
/* Socket given on command line, switch protocol to use SOCKETSt */
391-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
390+
/*
391+
Socket given on command line, switch protocol to use SOCKETSt
392+
Except on Windows if 'protocol= pipe' has been provided in
393+
the config file or command line.
394+
*/
395+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
396+
{
397+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
398+
}
392399
}
393400
break;
394401
}

client/mysqldump.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,15 @@ get_one_option(const struct my_option *opt,
10741074
case 'S':
10751075
if (filename[0] == '\0')
10761076
{
1077-
/* Socket given on command line, switch protocol to use SOCKETSt */
1078-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
1077+
/*
1078+
Socket given on command line, switch protocol to use SOCKETSt
1079+
Except on Windows if 'protocol= pipe' has been provided in
1080+
the config file or command line.
1081+
*/
1082+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
1083+
{
1084+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
1085+
}
10791086
}
10801087
break;
10811088
}

client/mysqlimport.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,15 @@ get_one_option(const struct my_option *opt, const char *argument,
271271
case 'S':
272272
if (filename[0] == '\0')
273273
{
274-
/* Socket given on command line, switch protocol to use SOCKETSt */
275-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
274+
/*
275+
Socket given on command line, switch protocol to use SOCKETSt
276+
Except on Windows if 'protocol= pipe' has been provided in
277+
the config file or command line.
278+
*/
279+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
280+
{
281+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
282+
}
276283
}
277284
break;
278285
case '#':

client/mysqlshow.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,15 @@ get_one_option(const struct my_option *opt, const char *argument,
346346
case 'S':
347347
if (filename[0] == '\0')
348348
{
349-
/* Socket given on command line, switch protocol to use SOCKETSt */
350-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
349+
/*
350+
Socket given on command line, switch protocol to use SOCKETSt
351+
Except on Windows if 'protocol= pipe' has been provided in
352+
the config file or command line.
353+
*/
354+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
355+
{
356+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
357+
}
351358
}
352359
break;
353360
break;

client/mysqlslap.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,15 @@ get_one_option(const struct my_option *opt, const char *argument,
784784
case 'S':
785785
if (filename[0] == '\0')
786786
{
787-
/* Socket given on command line, switch protocol to use SOCKETSt */
788-
opt_protocol= MYSQL_PROTOCOL_SOCKET;
787+
/*
788+
Socket given on command line, switch protocol to use SOCKETSt
789+
Except on Windows if 'protocol= pipe' has been provided in
790+
the config file or command line.
791+
*/
792+
if (opt_protocol != MYSQL_PROTOCOL_PIPE)
793+
{
794+
opt_protocol= MYSQL_PROTOCOL_SOCKET;
795+
}
789796
}
790797
break;
791798
case '#':

mysql-test/main/cli_options_force_protocol_win.result

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ Connection: localhost via named pipe
1212
# exec MYSQL --host=localhost -W -e "status" 2>&1 | findstr /c:"Connection:"
1313
Connection: localhost via named pipe
1414
# exec MYSQL --host=localhost -W --socket=MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"
15-
Connection: localhost via TCP/IP
15+
Connection: localhost via named pipe
1616
# exec MYSQL --host=localhost --socket=MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"
1717
Connection: localhost via TCP/IP
18+
#
19+
# MDEV-30639: Upgrade to 10.8 and later does not work on Windows
20+
# due to connection protocol overwrite
21+
#
22+
# exec MYSQL --host=localhost --protocol=pipe --socket=MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"
23+
Connection: localhost via named pipe

mysql-test/main/cli_options_force_protocol_win.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@
2525

2626
--echo # exec MYSQL --host=localhost --socket=MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"
2727
--exec $MYSQL --host=localhost --socket=$MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"
28+
29+
--echo #
30+
--echo # MDEV-30639: Upgrade to 10.8 and later does not work on Windows
31+
--echo # due to connection protocol overwrite
32+
--echo #
33+
--echo # exec MYSQL --host=localhost --protocol=pipe --socket=MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"
34+
--exec $MYSQL --host=localhost --protocol=pipe --socket=$MASTER_MYSOCK -e "status" 2>&1 | findstr /c:"Connection:"

0 commit comments

Comments
 (0)