[MXS-2470] gwbuf_clone does not update the pointer 'tail' of GWBUF object Created: 2019-05-07  Updated: 2019-05-17  Resolved: 2019-05-17

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 2.3.6
Fix Version/s: 2.3.7

Type: Bug Priority: Major
Reporter: Wu Xiang Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None

Sprint: MXS-SPRINT-82

 Description   

server/core/buffer.cc
In the method 'GWBUF* gwbuf_clone(GWBUF* buf)'. The pointer 'rval->tail' should be updated if there are more than one GWBUF objects need to be cloned, but it is not.
The problem is, while the job of method 'gwbuf_clone' is done, the pointer 'rval->tail' does not point to the last GWBUF object in GWBUF object list, but 'rval' itself.

Maybe we should add a line 'rval->tail = clonebuf;' after the line 'clonebuf = clonebuf->next;'?


Generated at Thu Feb 08 04:14:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.