diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-01-06 12:43:18 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-01-06 12:43:18 +0100 |
commit | 17940b652d0a078f5a28b089aa0f5362756d438e (patch) | |
tree | 0c198251f33fd1b19ae2bb443a732496a3bf5ee3 /vio | |
parent | a5b881594da4258257b18cc42f5ce7be3524e02c (diff) | |
download | mariadb-git-17940b652d0a078f5a28b089aa0f5362756d438e.tar.gz |
MWL#192: non-blocking client API, after-review fixes.
Main change is that non-blocking operation is now an option that must be
explicitly enabled with mysql_option(mysql, MYSQL_OPT_NONBLOCK, ...)
before any non-blocing operation can be used.
Also the CLIENT_REMEMBER_OPTIONS flag is now always enabled and thus
effectively ignored (it was not really useful anyway, and this simplifies
things when non-blocking mysql_real_connect() fails).
Diffstat (limited to 'vio')
-rw-r--r-- | vio/viosocket.c | 8 | ||||
-rw-r--r-- | vio/viossl.c | 5 |
2 files changed, 2 insertions, 11 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c index 878378bb837..63e3d4558a4 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -22,6 +22,7 @@ #include "vio_priv.h" #include "my_context.h" +#include <mysql_async.h> int vio_errno(Vio *vio __attribute__((unused))) { @@ -32,8 +33,6 @@ int vio_errno(Vio *vio __attribute__((unused))) size_t vio_read(Vio * vio, uchar* buf, size_t size) { size_t r; - extern ssize_t my_recv_async(struct mysql_async_context *b, int fd, - unsigned char *buf, size_t size, uint timeout); DBUG_ENTER("vio_read"); DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %u", vio->sd, (long) buf, (uint) size)); @@ -119,9 +118,6 @@ size_t vio_read_buff(Vio *vio, uchar* buf, size_t size) size_t vio_write(Vio * vio, const uchar* buf, size_t size) { size_t r; - extern ssize_t my_send_async(struct mysql_async_context *b, int fd, - const unsigned char *buf, size_t size, - uint timeout); DBUG_ENTER("vio_write"); DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %u", vio->sd, (long) buf, (uint) size)); @@ -394,8 +390,6 @@ void vio_in_addr(Vio *vio, struct in_addr *in) my_bool vio_poll_read(Vio *vio,uint timeout) { - extern my_bool my_poll_read_async(struct mysql_async_context *b, - uint timeout); #ifndef HAVE_POLL #if __WIN__ int res; diff --git a/vio/viossl.c b/vio/viossl.c index 58e4089fcd8..efc41ee5f67 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -22,6 +22,7 @@ #include "vio_priv.h" #include "my_context.h" +#include <mysql_async.h> #ifdef HAVE_OPENSSL @@ -91,8 +92,6 @@ report_errors(SSL* ssl) size_t vio_ssl_read(Vio *vio, uchar* buf, size_t size) { size_t r; - extern int my_ssl_read_async(struct mysql_async_context *b, SSL *ssl, - void *buf, int size); DBUG_ENTER("vio_ssl_read"); DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %u ssl: 0x%lx", vio->sd, (long) buf, (uint) size, (long) vio->ssl_arg)); @@ -113,8 +112,6 @@ size_t vio_ssl_read(Vio *vio, uchar* buf, size_t size) size_t vio_ssl_write(Vio *vio, const uchar* buf, size_t size) { size_t r; - extern int my_ssl_write_async(struct mysql_async_context *b, SSL *ssl, - const void *buf, int size); DBUG_ENTER("vio_ssl_write"); DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %u", vio->sd, (long) buf, (uint) size)); |