Replace gwbuf_clone_all with gwbuf_clone
gwbuf_clone cloned only the first buffer of a chain of buffers, which never can be the desired outcome, while gwbuf_clone_all cloned all buffers. Now, gwbuf_clone behaves the way gwbuf_clone_all used to behave and gwbuf_clone_all has been removed.
This commit is contained in:
@ -916,7 +916,7 @@ GWBUF* clone_query(TEE_INSTANCE* my_instance, TEE_SESSION* my_session, GWBUF* bu
|
||||
|
||||
if ((!my_instance->match && !my_instance->nomatch) || packet_is_required(buffer))
|
||||
{
|
||||
clone = gwbuf_clone_all(buffer);
|
||||
clone = gwbuf_clone(buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -927,7 +927,7 @@ GWBUF* clone_query(TEE_INSTANCE* my_instance, TEE_SESSION* my_session, GWBUF* bu
|
||||
if ((my_instance->match && regexec(&my_instance->re, ptr, 0, NULL, 0) == 0) ||
|
||||
(my_instance->nomatch && regexec(&my_instance->nore, ptr, 0, NULL, 0) != 0))
|
||||
{
|
||||
clone = gwbuf_clone_all(buffer);
|
||||
clone = gwbuf_clone(buffer);
|
||||
}
|
||||
MXS_FREE(ptr);
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ GWBUF *sescmd_cursor_clone_querybuf(sescmd_cursor_t *scur)
|
||||
}
|
||||
ss_dassert(scur->scmd_cur_cmd != NULL);
|
||||
|
||||
buf = gwbuf_clone_all(scur->scmd_cur_cmd->my_sescmd_buf);
|
||||
buf = gwbuf_clone(scur->scmd_cur_cmd->my_sescmd_buf);
|
||||
|
||||
CHK_GWBUF(buf);
|
||||
return buf;
|
||||
|
Reference in New Issue
Block a user