This commit is contained in:
Jan Lindström
2013-08-19 08:48:33 +03:00
4 changed files with 110 additions and 0 deletions

View File

@ -488,6 +488,7 @@ int gw_read_client_event(DCB* dcb) {
ROUTER_OBJECT *router = NULL;
ROUTER *router_instance = NULL;
void *rsession = NULL;
<<<<<<< TREE
MySQLProtocol *protocol = NULL;
int b = -1;
@ -500,12 +501,17 @@ int gw_read_client_event(DCB* dcb) {
spinlock_release(&dcb->writeqlock);
return 1;
}
=======
MySQLProtocol *protocol = NULL;
int b = -1;
>>>>>>> MERGE-SOURCE
if (dcb) {
protocol = DCB_PROTOCOL(dcb, MySQLProtocol);
}
if (ioctl(dcb->fd, FIONREAD, &b)) {
<<<<<<< TREE
int eno = errno;
errno = 0;
skygw_log_write(
@ -520,6 +526,27 @@ int gw_read_client_event(DCB* dcb) {
spinlock_release(&dcb->writeqlock);
return 1;
=======
int eno = errno;
errno = 0;
skygw_log_write(
LOGFILE_ERROR,
"%lu [gw_read_client_event] Setting FIONREAD for %d failed. "
"errno %d, %s",
pthread_self(),
dcb->fd,
eno ,
strerror(eno));
skygw_log_write(
LOGFILE_TRACE,
"%lu [gw_read_client_event] Setting FIONREAD for %d failed. "
"errno %d, %s",
pthread_self(),
dcb->fd,
eno ,
strerror(eno));
return 1;
>>>>>>> MERGE-SOURCE
} else {
//fprintf(stderr, "Client IOCTL FIONREAD bytes to read = %i\n", b);
}