dcb_write, if write failed, gwbuf wasn't freed.
mysql_backend.c 
	gw_MySQLWrite_backend, if dcb wasn'r in POLLING state then write was skpiped but gwbuf wasn't freed.
mysql_client.c
	gw_MySQLWrite_client, disabled the use of dcb_write because it returns different values than the code it replaced. Also removed erroneous call of gwbuf_consume.
mysql_common.c
	mysql_send_custom_error, removed erroneous call of gwbuf_free.
This commit is contained in:
vraatikka
2013-10-14 15:12:30 +03:00
parent 0f2eeff243
commit 66dbb8ec23
4 changed files with 5 additions and 4 deletions

View File

@ -433,7 +433,7 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
int
gw_MySQLWrite_client(DCB *dcb, GWBUF *queue)
{
#if 1
#if 0
return dcb_write(dcb, queue);
#else
int w, saved_errno = 0;
@ -762,8 +762,6 @@ int gw_read_client_event(DCB* dcb) {
protocol->state = MYSQL_IDLE;
}
}
/** Free buffer */
queue = gwbuf_consume(queue, len);
goto return_rc;
} /* MYSQL_IDLE */
break;