mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-8931: (server part of) session state tracking
initial commit to test
This commit is contained in:
@ -495,6 +495,11 @@ public:
|
||||
{
|
||||
Ptr[str_length++] = c;
|
||||
}
|
||||
void q_append2b(const uint32 n)
|
||||
{
|
||||
int2store(Ptr + str_length, n);
|
||||
str_length += 2;
|
||||
}
|
||||
void q_append(const uint32 n)
|
||||
{
|
||||
int4store(Ptr + str_length, n);
|
||||
@ -559,6 +564,17 @@ public:
|
||||
return Ptr+ old_length; /* Area to use */
|
||||
}
|
||||
|
||||
inline bool prep_alloc(uint32 arg_length, uint32 step_alloc)
|
||||
{
|
||||
uint32 new_length= arg_length + str_length;
|
||||
if (new_length > Alloced_length)
|
||||
{
|
||||
if (realloc(new_length + step_alloc))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool append(const char *s, uint32 arg_length, uint32 step_alloc)
|
||||
{
|
||||
uint32 new_length= arg_length + str_length;
|
||||
@ -623,6 +639,8 @@ public:
|
||||
{
|
||||
return !sortcmp(this, other, cs);
|
||||
}
|
||||
void q_net_store_length(ulonglong length);
|
||||
void q_net_store_data(const uchar *from, size_t length);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user