mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@ -1226,7 +1226,7 @@ void Session_tracker::store(THD *thd, String *buf)
|
||||
|
||||
if ((size= net_length_size(length)) != 1)
|
||||
{
|
||||
if (buf->reserve(size - 1, EXTRA_ALLOC))
|
||||
if (buf->reserve(size - 1, 0))
|
||||
{
|
||||
buf->length(start); // it is safer to have 0-length block in case of error
|
||||
return;
|
||||
@ -1236,6 +1236,7 @@ void Session_tracker::store(THD *thd, String *buf)
|
||||
The 'buf->reserve()' can change the buf->ptr() so we cannot
|
||||
calculate the 'data' earlier.
|
||||
*/
|
||||
buf->length(buf->length() + (size - 1));
|
||||
data= (uchar *)(buf->ptr() + start);
|
||||
memmove(data + (size - 1), data, length);
|
||||
}
|
||||
|
Reference in New Issue
Block a user