Make a deep copy of queued queries
If a shallow copy of the buffer is made, any modifications that are made to the data after it has been queued will affect the queued query of the LocalClient. A copy-on-write mechanism would save the relatively expensive process of copying the data but since the LocalClient is not often used, it is not the most critical performance problem.
This commit is contained in:
@ -53,7 +53,7 @@ bool LocalClient::queue_query(GWBUF* buffer)
|
||||
{
|
||||
GWBUF* my_buf = NULL;
|
||||
|
||||
if (m_state != VC_ERROR && (my_buf = gwbuf_clone(buffer)))
|
||||
if (m_state != VC_ERROR && (my_buf = gwbuf_deep_clone(buffer)))
|
||||
{
|
||||
m_queue.push_back(my_buf);
|
||||
|
||||
|
Reference in New Issue
Block a user