diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-03-15 15:03:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-03-15 21:00:50 +0100 |
commit | f1134d567695990dc7d62b6c25e4b9aa8de439e0 (patch) | |
tree | 10b60521eb410aeb5139b89248d76acf4dff86cc /sql/sql_string.h | |
parent | 0508d327aef520d3131ff8a85ed610337149fffc (diff) | |
download | mariadb-git-f1134d567695990dc7d62b6c25e4b9aa8de439e0.tar.gz |
post-merge: gcc 8 warnings
note: Inherit String from Sql_alloc,
to get operators new and new[] in sync
in rocksdb gcc was complaining that non-lvalue was cast to const.
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index ea810f15f80..0065b1424ce 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; @@ -129,7 +130,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; @@ -179,16 +180,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, (uint) 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 */ } ~String() { free(); } /* Mark variable thread specific it it's not allocated already */ |