diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-04 08:24:06 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-04 08:24:06 +0300 |
commit | 2c1067166d7e8a9541578220b408f1e553e23916 (patch) | |
tree | 2ba0932f92d88e01d51393de63dda842f6daf320 /vio | |
parent | 2cf3e2ea2fca3d3613309de94d55c88dedb3831a (diff) | |
parent | 61b2618d3aae78950f1b8dbe8d4482573c77875d (diff) | |
download | mariadb-git-2c1067166d7e8a9541578220b408f1e553e23916.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio.c | 6 | ||||
-rw-r--r-- | vio/viosocket.c | 22 | ||||
-rw-r--r-- | vio/viossl.c | 16 | ||||
-rw-r--r-- | vio/viosslfactories.c | 4 |
4 files changed, 24 insertions, 24 deletions
diff --git a/vio/vio.c b/vio/vio.c index 2c5f37a75a4..34ca9ed872d 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -80,7 +80,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type, my_socket sd, uint flags) { DBUG_ENTER("vio_init"); - DBUG_PRINT("enter", ("type: %d sd: %d flags: %d", type, sd, flags)); + DBUG_PRINT("enter", ("type: %d sd: %d flags: %d", type, (int)sd, flags)); #ifndef HAVE_VIO_READ_BUFF flags&= ~VIO_BUFFERED_READ; @@ -249,7 +249,7 @@ Vio *mysql_socket_vio_new(MYSQL_SOCKET mysql_socket, enum enum_vio_type type, ui Vio *vio; my_socket sd= mysql_socket_getfd(mysql_socket); DBUG_ENTER("mysql_socket_vio_new"); - DBUG_PRINT("enter", ("sd: %d", sd)); + DBUG_PRINT("enter", ("sd: %d", (int)sd)); if ((vio = (Vio*) my_malloc(sizeof(*vio),MYF(MY_WME)))) { vio_init(vio, type, sd, flags); @@ -266,7 +266,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags) Vio *vio; MYSQL_SOCKET mysql_socket= MYSQL_INVALID_SOCKET; DBUG_ENTER("vio_new"); - DBUG_PRINT("enter", ("sd: %d", sd)); + DBUG_PRINT("enter", ("sd: %d", (int)sd)); mysql_socket_setfd(&mysql_socket, sd); vio = mysql_socket_vio_new(mysql_socket, type, flags); diff --git a/vio/viosocket.c b/vio/viosocket.c index cc16c3698c0..f983fe20fe7 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -145,9 +145,9 @@ size_t vio_read(Vio *vio, uchar *buf, size_t size) ssize_t ret; int flags= 0; DBUG_ENTER("vio_read"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d", - mysql_socket_getfd(vio->mysql_socket), buf, - (int) size)); + DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu", + (int)mysql_socket_getfd(vio->mysql_socket), buf, + size)); /* Ensure nobody uses vio_read_buff and vio_read simultaneously. */ DBUG_ASSERT(vio->read_end == vio->read_pos); @@ -212,9 +212,9 @@ size_t vio_read_buff(Vio *vio, uchar* buf, size_t size) size_t rc; #define VIO_UNBUFFERED_READ_MIN_SIZE 2048 DBUG_ENTER("vio_read_buff"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d", - mysql_socket_getfd(vio->mysql_socket), - buf, (int) size)); + DBUG_PRINT("enter", ("sd: %d buf: %p size:%zu", + (int)mysql_socket_getfd(vio->mysql_socket), + buf, size)); if (vio->read_pos < vio->read_end) { @@ -259,9 +259,9 @@ size_t vio_write(Vio *vio, const uchar* buf, size_t size) ssize_t ret; int flags= 0; DBUG_ENTER("vio_write"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d", - mysql_socket_getfd(vio->mysql_socket), buf, - (int) size)); + DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu", + (int)mysql_socket_getfd(vio->mysql_socket), buf, + size)); /* If timeout is enabled, do not block. */ if (vio->write_timeout >= 0) @@ -509,7 +509,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive) uint opt = 0; DBUG_ENTER("vio_keepalive"); DBUG_PRINT("enter", ("sd: %d set_keep_alive: %d", - mysql_socket_getfd(vio->mysql_socket), + (int)mysql_socket_getfd(vio->mysql_socket), (int)set_keep_alive)); if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY) @@ -563,7 +563,7 @@ int vio_close(Vio *vio) { int r=0; DBUG_ENTER("vio_close"); - DBUG_PRINT("enter", ("sd: %d", mysql_socket_getfd(vio->mysql_socket))); + DBUG_PRINT("enter", ("sd: %d", (int)mysql_socket_getfd(vio->mysql_socket))); if (vio->type != VIO_CLOSED) { diff --git a/vio/viossl.c b/vio/viossl.c index 0bc2c263336..e7cc85ea539 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -136,8 +136,8 @@ size_t vio_ssl_read(Vio *vio, uchar *buf, size_t size) int ret; SSL *ssl= vio->ssl_arg; DBUG_ENTER("vio_ssl_read"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d ssl: %p", - mysql_socket_getfd(vio->mysql_socket), buf, (int) size, + DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu ssl: %p", + (int)mysql_socket_getfd(vio->mysql_socket), buf, size, vio->ssl_arg)); if (vio->async_context && vio->async_context->active) @@ -168,9 +168,9 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size) int ret; SSL *ssl= vio->ssl_arg; DBUG_ENTER("vio_ssl_write"); - DBUG_PRINT("enter", ("sd: %d buf: %p size: %d", - mysql_socket_getfd(vio->mysql_socket), - buf, (int) size)); + DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu", + (int)mysql_socket_getfd(vio->mysql_socket), + buf, size)); if (vio->async_context && vio->async_context->active) ret= my_ssl_write_async(vio->async_context, (SSL *)vio->ssl_arg, buf, @@ -319,8 +319,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, my_bool was_blocking; my_socket sd= mysql_socket_getfd(vio->mysql_socket); DBUG_ENTER("ssl_do"); - DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx", - (long) ptr, sd, (long) ptr->ssl_context)); + DBUG_PRINT("enter", ("ptr: %p, sd: %d ctx: %p", + ptr, (int)sd, ptr->ssl_context)); /* Set socket to blocking if not already set */ vio_blocking(vio, 1, &was_blocking); @@ -332,7 +332,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, vio_blocking(vio, was_blocking, &unused); DBUG_RETURN(1); } - DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout)); + DBUG_PRINT("info", ("ssl: %p timeout: %ld", ssl, timeout)); SSL_clear(ssl); SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout); SSL_set_fd(ssl, sd); diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 71ef2879464..6358b976e16 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -100,8 +100,8 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file, enum enum_ssl_init_error* error) { DBUG_ENTER("vio_set_cert_stuff"); - DBUG_PRINT("enter", ("ctx: 0x%lx cert_file: %s key_file: %s", - (long) ctx, cert_file, key_file)); + DBUG_PRINT("enter", ("ctx: %p cert_file: %s key_file: %s", + ctx, cert_file, key_file)); if (!cert_file && key_file) cert_file= key_file; |