Commit 153c9173 authored by Monty's avatar Monty Committed by Sergei Golubchik

Print more information when thread loops in read/write in net_serv.cc

parent 201e28fa
...@@ -702,8 +702,9 @@ net_real_write(NET *net,const uchar *packet, size_t len) ...@@ -702,8 +702,9 @@ net_real_write(NET *net,const uchar *packet, size_t len)
if (retry_count++ < net->retry_count) if (retry_count++ < net->retry_count)
continue; continue;
} }
EXTRA_DEBUG_fprintf(stderr, "%s: write looped, aborting thread\n", EXTRA_DEBUG_fprintf(stderr,
my_progname); "%s: write looped on vio with state %d, aborting thread\n",
my_progname, (int) net->vio->type);
net->error= 2; /* Close socket */ net->error= 2; /* Close socket */
net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED : net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED :
ER_NET_ERROR_ON_WRITE); ER_NET_ERROR_ON_WRITE);
...@@ -857,8 +858,9 @@ static ulong my_real_read(NET *net, size_t *complen, ...@@ -857,8 +858,9 @@ static ulong my_real_read(NET *net, size_t *complen,
if (vio_should_retry(net->vio) && retry_count++ < net->retry_count) if (vio_should_retry(net->vio) && retry_count++ < net->retry_count)
continue; continue;
EXTRA_DEBUG_fprintf(stderr, EXTRA_DEBUG_fprintf(stderr,
"%s: read looped with error %d, aborting thread\n", "%s: read looped with error %d on vio with state %d, "
my_progname, vio_errno(net->vio)); "aborting thread\n",
my_progname, vio_errno(net->vio), (int) net->vio->type);
DBUG_PRINT("error", DBUG_PRINT("error",
("Couldn't read packet: remain: %u errno: %d length: %ld", ("Couldn't read packet: remain: %u errno: %d length: %ld",
remain, vio_errno(net->vio), (long) length)); remain, vio_errno(net->vio), (long) length));
......
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