Changed back the first part of gw_MySQLWrite_backend so that it is protected by dcb->authlock which must wait until authentication phase is complete. If authentication fails, the error is handled before next query starts its execution.
This commit is contained in:
@ -528,7 +528,7 @@ gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue)
|
||||
/*<
|
||||
* Don't write to backend if backend_dcb is not in poll set anymore.
|
||||
*/
|
||||
spinlock_acquire(&dcb->dcb_initlock);
|
||||
spinlock_acquire(&dcb->authlock);
|
||||
if (dcb->state != DCB_STATE_POLLING) {
|
||||
/*< vraa : errorHandle */
|
||||
/*< Free buffer memory */
|
||||
@ -543,12 +543,10 @@ gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue)
|
||||
dcb->fd,
|
||||
STRDCBSTATE(dcb->state))));
|
||||
|
||||
spinlock_release(&dcb->dcb_initlock);
|
||||
spinlock_release(&dcb->authlock);
|
||||
return 0;
|
||||
}
|
||||
spinlock_release(&dcb->dcb_initlock);
|
||||
|
||||
spinlock_acquire(&dcb->authlock);
|
||||
/*<
|
||||
* Now put the incoming data to the delay queue unless backend is
|
||||
* connected with auth ok
|
||||
|
Reference in New Issue
Block a user