Commit 0e7242d8 authored by Davi Arnaut's avatar Davi Arnaut

Bug#45498: Socket variable not available on Windows

The "socket" variable is not available on Windows even though
the --socket option can be used to specify the pipe name for
local connections that use a named pipe.

The solution is to ensure that the variable is always defined.
parent 1014e5a2
...@@ -53,3 +53,10 @@ ERROR HY000: No paths allowed for shared library ...@@ -53,3 +53,10 @@ ERROR HY000: No paths allowed for shared library
execute abc; execute abc;
ERROR HY000: No paths allowed for shared library ERROR HY000: No paths allowed for shared library
deallocate prepare abc; deallocate prepare abc;
#
# Bug#45498: Socket variable not available on Windows
#
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME = 'socket';
VARIABLE_NAME
SOCKET
...@@ -92,3 +92,9 @@ execute abc; ...@@ -92,3 +92,9 @@ execute abc;
execute abc; execute abc;
deallocate prepare abc; deallocate prepare abc;
--echo #
--echo # Bug#45498: Socket variable not available on Windows
--echo #
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME = 'socket';
...@@ -529,11 +529,11 @@ static sys_var_const sys_skip_networking(&vars, "skip_networking", ...@@ -529,11 +529,11 @@ static sys_var_const sys_skip_networking(&vars, "skip_networking",
static sys_var_const sys_skip_show_database(&vars, "skip_show_database", static sys_var_const sys_skip_show_database(&vars, "skip_show_database",
OPT_GLOBAL, SHOW_BOOL, OPT_GLOBAL, SHOW_BOOL,
(uchar*) &opt_skip_show_db); (uchar*) &opt_skip_show_db);
#ifdef HAVE_SYS_UN_H
static sys_var_const sys_socket(&vars, "socket", static sys_var_const sys_socket(&vars, "socket",
OPT_GLOBAL, SHOW_CHAR_PTR, OPT_GLOBAL, SHOW_CHAR_PTR,
(uchar*) &mysqld_unix_port); (uchar*) &mysqld_unix_port);
#endif
#ifdef HAVE_THR_SETCONCURRENCY #ifdef HAVE_THR_SETCONCURRENCY
/* purecov: begin tested */ /* purecov: begin tested */
static sys_var_const sys_thread_concurrency(&vars, "thread_concurrency", static sys_var_const sys_thread_concurrency(&vars, "thread_concurrency",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment