summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-15 15:09:22 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-15 15:09:22 +0200
commita9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254 (patch)
treea9df7341e91623f62fe37cd47fce139d8888fc95 /vio
parent3a1c91d87d69ef243b3e78be6089102cafef0a8e (diff)
parentf57ecb7786177e0af3b1e3ec94302720b2e0f967 (diff)
downloadmariadb-git-a9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254.tar.gz
10.0-base merge
Diffstat (limited to 'vio')
-rw-r--r--vio/vio.c5
-rw-r--r--vio/viosocket.c6
2 files changed, 3 insertions, 8 deletions
diff --git a/vio/vio.c b/vio/vio.c
index a18482f3dfd..56dff377105 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -249,6 +249,7 @@ Vio *mysql_socket_vio_new(MYSQL_SOCKET mysql_socket, enum enum_vio_type type, ui
if ((vio = (Vio*) my_malloc(sizeof(*vio),MYF(MY_WME))))
{
vio_init(vio, type, sd, flags);
+ vio->desc= (vio->type == VIO_TYPE_SOCKET ? "socket" : "TCP/IP");
vio->mysql_socket= mysql_socket;
}
DBUG_RETURN(vio);
@@ -278,6 +279,7 @@ Vio *vio_new_win32pipe(HANDLE hPipe)
if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME))))
{
vio_init(vio, VIO_TYPE_NAMEDPIPE, 0, VIO_LOCALHOST);
+ vio->desc= "named pipe";
/* Create an object for event notification. */
vio->overlapped.hEvent= CreateEvent(NULL, FALSE, FALSE, NULL);
if (vio->overlapped.hEvent == NULL)
@@ -286,7 +288,6 @@ Vio *vio_new_win32pipe(HANDLE hPipe)
DBUG_RETURN(NULL);
}
vio->hPipe= hPipe;
- strmov(vio->desc, "named pipe");
}
DBUG_RETURN(vio);
}
@@ -302,6 +303,7 @@ Vio *vio_new_win32shared_memory(HANDLE handle_file_map, HANDLE handle_map,
if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME))))
{
vio_init(vio, VIO_TYPE_SHARED_MEMORY, 0, VIO_LOCALHOST);
+ vio->desc= "shared memory";
vio->handle_file_map= handle_file_map;
vio->handle_map= handle_map;
vio->event_server_wrote= event_server_wrote;
@@ -311,7 +313,6 @@ Vio *vio_new_win32shared_memory(HANDLE handle_file_map, HANDLE handle_map,
vio->event_conn_closed= event_conn_closed;
vio->shared_memory_remain= 0;
vio->shared_memory_pos= handle_map;
- strmov(vio->desc, "shared memory");
}
DBUG_RETURN(vio);
}
diff --git a/vio/viosocket.c b/vio/viosocket.c
index e1319843e48..f84d7e802be 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -616,12 +616,6 @@ int vio_close(Vio *vio)
const char *vio_description(Vio * vio)
{
- if (!vio->desc[0])
- {
- my_snprintf(vio->desc, VIO_DESCRIPTION_SIZE,
- (vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
- mysql_socket_getfd(vio->mysql_socket));
- }
return vio->desc;
}