1
0
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:
Oleksandr Byelkin
2016-04-15 20:40:25 +02:00
parent 468a6ad722
commit e7608a78ef
28 changed files with 928 additions and 46 deletions

View File

@ -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);
};