mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
Merge branch '10.2' into 10.3
This commit is contained in:
commit
7fb73ed143
130 changed files with 3685 additions and 3334 deletions
|
|
@ -1221,7 +1221,7 @@ void Session_tracker::store(THD *thd, String *buf)
|
|||
}
|
||||
|
||||
size_t length= buf->length() - start;
|
||||
uchar *data= (uchar *)(buf->ptr() + start);
|
||||
uchar *data;
|
||||
uint size;
|
||||
|
||||
if ((size= net_length_size(length)) != 1)
|
||||
|
|
@ -1231,8 +1231,16 @@ void Session_tracker::store(THD *thd, String *buf)
|
|||
buf->length(start); // it is safer to have 0-length block in case of error
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
The 'buf->reserve()' can change the buf->ptr() so we cannot
|
||||
calculate the 'data' earlier.
|
||||
*/
|
||||
data= (uchar *)(buf->ptr() + start);
|
||||
memmove(data + (size - 1), data, length);
|
||||
}
|
||||
else
|
||||
data= (uchar *)(buf->ptr() + start);
|
||||
|
||||
net_store_length(data - 1, length);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue