diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-03-17 13:06:41 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-03-17 13:06:41 +0100 |
commit | b64fde8f38515dc39e019de26db7624cc0ea7046 (patch) | |
tree | 0478ea4c3ddeee290f6d381a47efa4f9aded9c0b /sql/sql_string.h | |
parent | a89ee3cd154a67df2231f034fd8339f9225dbe64 (diff) | |
parent | 1f020299f816263e347c852eb2a494b5ef1cbf0d (diff) | |
download | mariadb-git-b64fde8f38515dc39e019de26db7624cc0ea7046.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 23783405b19..7c920cafc4f 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -27,6 +27,7 @@ #include "m_ctype.h" /* my_charset_bin */ #include <my_sys.h> /* alloc_root, my_free, my_realloc */ #include "m_string.h" /* TRASH */ +#include "sql_list.h" class String; typedef struct st_io_cache IO_CACHE; @@ -126,7 +127,7 @@ uint convert_to_printable(char *to, size_t to_len, const char *from, size_t from_len, CHARSET_INFO *from_cs, size_t nbytes= 0); -class String +class String : public Sql_alloc { char *Ptr; uint32 str_length,Alloced_length, extra_alloc; @@ -176,23 +177,6 @@ public: alloced= thread_specific= 0; str_charset=str.str_charset; } - static void *operator new(size_t size, MEM_ROOT *mem_root) throw () - { return (void*) alloc_root(mem_root, size); } - static void *operator new[](size_t size, MEM_ROOT *mem_root) throw () - { return alloc_root(mem_root, size); } - static void operator delete(void *ptr_arg, size_t size) - { - (void) ptr_arg; - (void) size; - TRASH_FREE(ptr_arg, size); - } - static void operator delete(void *, MEM_ROOT *) - { /* never called */ } - static void operator delete[](void *ptr, size_t size) - { TRASH_FREE(ptr, size); } - static void operator delete[](void *, MEM_ROOT *) - { /* never called */ } - ~String() { free(); } /* Mark variable thread specific it it's not allocated already */ |