Removed states MYSQL_WAITING_RESULT and MYSQL_ROUTING
This commit is contained in:
@ -345,8 +345,7 @@ static int gw_read_backend_event(DCB *dcb) {
|
|||||||
if (client_protocol != NULL) {
|
if (client_protocol != NULL) {
|
||||||
CHK_PROTOCOL(client_protocol);
|
CHK_PROTOCOL(client_protocol);
|
||||||
|
|
||||||
if (client_protocol->state == MYSQL_WAITING_RESULT ||
|
if (client_protocol->state == MYSQL_IDLE)
|
||||||
client_protocol->state == MYSQL_IDLE)
|
|
||||||
{
|
{
|
||||||
router->clientReply(router_instance,
|
router->clientReply(router_instance,
|
||||||
rsession,
|
rsession,
|
||||||
|
|||||||
@ -609,7 +609,6 @@ int gw_read_client_event(DCB* dcb) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MYSQL_IDLE:
|
case MYSQL_IDLE:
|
||||||
case MYSQL_WAITING_RESULT:
|
|
||||||
/*
|
/*
|
||||||
* Read all the data that is available into a chain of buffers
|
* Read all the data that is available into a chain of buffers
|
||||||
*/
|
*/
|
||||||
@ -695,11 +694,9 @@ int gw_read_client_event(DCB* dcb) {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/** Route other commands to backend */
|
/** Route other commands to backend */
|
||||||
protocol->state = MYSQL_ROUTING;
|
|
||||||
rc = router->routeQuery(router_instance, rsession, queue);
|
rc = router->routeQuery(router_instance, rsession, queue);
|
||||||
/** succeed */
|
/** succeed */
|
||||||
if (rc == 1) {
|
if (rc == 1) {
|
||||||
protocol->state = MYSQL_WAITING_RESULT;
|
|
||||||
rc = 0; /**< here '0' means success */
|
rc = 0; /**< here '0' means success */
|
||||||
} else {
|
} else {
|
||||||
mysql_send_custom_error(dcb,
|
mysql_send_custom_error(dcb,
|
||||||
@ -712,7 +709,7 @@ int gw_read_client_event(DCB* dcb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
goto return_rc;
|
goto return_rc;
|
||||||
} /* MYSQL_IDLE, MYSQL_WAITING_RESULT */
|
} /* MYSQL_IDLE */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -772,8 +769,7 @@ int gw_write_client_event(DCB *dcb)
|
|||||||
protocol = (MySQLProtocol *)dcb->protocol;
|
protocol = (MySQLProtocol *)dcb->protocol;
|
||||||
CHK_PROTOCOL(protocol);
|
CHK_PROTOCOL(protocol);
|
||||||
|
|
||||||
if (protocol->state == MYSQL_IDLE ||
|
if (protocol->state == MYSQL_IDLE)
|
||||||
protocol->state == MYSQL_WAITING_RESULT)
|
|
||||||
{
|
{
|
||||||
dcb_drain_writeq(dcb);
|
dcb_drain_writeq(dcb);
|
||||||
goto return_1;
|
goto return_1;
|
||||||
|
|||||||
Reference in New Issue
Block a user