diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-04-15 20:40:25 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-08-31 17:17:46 +0200 |
commit | e7608a78ef45cc46f4e4d5abbda788ad54e80e71 (patch) | |
tree | 72d74018fbb72dcb417875399b2a3bd7bdbe7791 /sql/sql_string.h | |
parent | 468a6ad722778768eb4ee5003dd818945b363261 (diff) | |
download | mariadb-git-e7608a78ef45cc46f4e4d5abbda788ad54e80e71.tar.gz |
MDEV-8931: (server part of) session state tracking
initial commit to test
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 51a11c7a4ff..10f3c4aee43 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -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); }; |