dcb.c:dcb_write accept also dcb state DCB_STATE_NOPOLLING since it only means that dcb has been removed from epoll set but it is still possible to write to it.

Bug #384 http://bugs.skysql.com/show_bug.cgi?id=384
session.h:added new state for SESSION, SESSION_STATE_ROUTER_READY which follows SESSION_STATE_READY. The difference is that ROUTER_READY is set only after router session is successfully created while READY means that session still lacks router.
session.c:set SESSION_STATE_ROUTER_READY when router is created.
mysql_backend.c:gw_read_backend_event, added SESSION_STATE_ROUTER_READY check before router session is closed. Changed chec kso that it doesn't block in infinite loop (although it shouldn't be possible anyway).
mysql_backend.c:gw_error_backend_event, added similar check before session is closed.
This commit is contained in:
VilhoRaatikka
2014-01-27 22:56:33 +02:00
parent ef90f648a2
commit c444bf454b
6 changed files with 55 additions and 36 deletions

View File

@ -585,9 +585,10 @@ static skygw_query_type_t resolve_query_type(
LOGIF(LD, (skygw_log_write(
LOGFILE_DEBUG,
"%lu [resolve_query_type] "
"Unknown functype. Something "
"Unknown functype %d. Something "
"has gone wrong.",
pthread_self())));
pthread_self(),
ftype)));
break;
} /**< switch */
/**< Set new query type */