Fix to bugs #664 and #665

http://bugs.skysql.com/show_bug.cgi?id=664
http://bugs.skysql.com/show_bug.cgi?id=665

Cloned session was freeing the shared 'data' dcb->data/session->data. Now only session_free for the non-clone session is allowed to free the data.
This commit is contained in:
VilhoRaatikka
2014-12-30 13:35:59 +02:00
parent 77bd279a01
commit 6b68136377
2 changed files with 5 additions and 2 deletions

View File

@ -96,6 +96,10 @@ session_alloc(SERVICE *service, DCB *client_dcb)
session->ses_chk_top = CHK_NUM_SESSION;
session->ses_chk_tail = CHK_NUM_SESSION;
#endif
if (DCB_IS_CLONE(client_dcb))
{
session->ses_is_child = true;
}
spinlock_init(&session->ses_lock);
/*<
* Prevent backend threads from accessing before session is completely