summaryrefslogtreecommitdiff
path: root/vio/vio.c
diff options
context:
space:
mode:
authorMats Kindahl <mats.kindahl@oracle.com>2010-08-16 14:50:27 +0200
committerMats Kindahl <mats.kindahl@oracle.com>2010-08-16 14:50:27 +0200
commitcd347705585b99c242efaf63550ace6819610795 (patch)
tree60ab98cb19a6a71445b167b4cbc5308f59767cc9 /vio/vio.c
parent5cb0ccebf3115d752a04b0eb4d2e153e3ac102f6 (diff)
parent71553c2c9db3c4c27973f12461b986c59e1dabfb (diff)
downloadmariadb-git-cd347705585b99c242efaf63550ace6819610795.tar.gz
Merging with mysql-5.5-stage.
Diffstat (limited to 'vio/vio.c')
-rw-r--r--vio/vio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vio/vio.c b/vio/vio.c
index 67704a56b22..48f103c33e8 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -44,6 +44,11 @@ static my_bool no_poll_read(Vio *vio __attribute__((unused)),
#endif
+static my_bool has_no_data(Vio *vio __attribute__((unused)))
+{
+ return FALSE;
+}
+
/*
* Helper to fill most of the Vio* with defaults.
*/
@@ -83,6 +88,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
vio->poll_read =no_poll_read;
vio->is_connected =vio_is_connected_pipe;
+ vio->has_data =has_no_data;
vio->timeout=vio_win32_timeout;
/* Set default timeout */
@@ -110,6 +116,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
vio->poll_read =no_poll_read;
vio->is_connected =vio_is_connected_shared_memory;
+ vio->has_data =has_no_data;
/* Currently, shared memory is on Windows only, hence the below is ok*/
vio->timeout= vio_win32_timeout;
@@ -137,6 +144,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
vio->timeout =vio_timeout;
vio->poll_read =vio_poll_read;
vio->is_connected =vio_is_connected;
+ vio->has_data =vio_ssl_has_data;
DBUG_VOID_RETURN;
}
#endif /* HAVE_OPENSSL */
@@ -155,6 +163,8 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
vio->timeout =vio_timeout;
vio->poll_read =vio_poll_read;
vio->is_connected =vio_is_connected;
+ vio->has_data= (flags & VIO_BUFFERED_READ) ?
+ vio_buff_has_data : has_no_data;
DBUG_VOID_RETURN;
}