mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user