Apply clang-tidy to remove empty constructors / destructors

This patch is the result of running
run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' .

Code style changes have been done on top. The result of this change
leads to the following improvements:

1. Binary size reduction.
* For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by
  ~400kb.
* A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb.

2. Compiler can better understand the intent of the code, thus it leads
   to more optimization possibilities. Additionally it enabled detecting
   unused variables that had an empty default constructor but not marked
   so explicitly.

   Particular change required following this patch in sql/opt_range.cc

   result_keys, an unused template class Bitmap now correctly issues
   unused variable warnings.

   Setting Bitmap template class constructor to default allows the compiler
   to identify that there are no side-effects when instantiating the class.
   Previously the compiler could not issue the warning as it assumed Bitmap
   class (being a template) would not be performing a NO-OP for its default
   constructor. This prevented the "unused variable warning".
This commit is contained in:
Vicențiu Ciorbaru 2023-02-07 13:57:20 +02:00
parent 8dab661416
commit 08c852026d
242 changed files with 1101 additions and 1341 deletions

View file

@ -303,8 +303,8 @@ class Load_log_processor
} }
public: public:
Load_log_processor() {} Load_log_processor() = default;
~Load_log_processor() {} ~Load_log_processor() = default;
int init() int init()
{ {

View file

@ -27,12 +27,11 @@
// Derive your class from this struct to insert to a linked list. // Derive your class from this struct to insert to a linked list.
template <class Tag= void> struct ilist_node template <class Tag= void> struct ilist_node
{ {
ilist_node() noexcept
#ifndef DBUG_OFF #ifndef DBUG_OFF
: next(NULL), prev(NULL) ilist_node() noexcept : next(NULL), prev(NULL) {}
#else
ilist_node() = default;
#endif #endif
{
}
ilist_node(ilist_node *next, ilist_node *prev) noexcept ilist_node(ilist_node *next, ilist_node *prev) noexcept
: next(next), prev(prev) : next(next), prev(prev)

View file

@ -39,7 +39,7 @@ public:
Atomic_relaxed(const Atomic_relaxed<Type> &rhs) Atomic_relaxed(const Atomic_relaxed<Type> &rhs)
{ m.store(rhs, std::memory_order_relaxed); } { m.store(rhs, std::memory_order_relaxed); }
Atomic_relaxed(Type val) : m(val) {} Atomic_relaxed(Type val) : m(val) {}
Atomic_relaxed() {} Atomic_relaxed() = default;
operator Type() const { return m.load(std::memory_order_relaxed); } operator Type() const { return m.load(std::memory_order_relaxed); }
Type operator=(const Type val) Type operator=(const Type val)

View file

@ -31,7 +31,7 @@ public:
Atomic_counter(const Atomic_counter<Type> &rhs) Atomic_counter(const Atomic_counter<Type> &rhs)
{ m_counter.store(rhs, std::memory_order_relaxed); } { m_counter.store(rhs, std::memory_order_relaxed); }
Atomic_counter(Type val): m_counter(val) {} Atomic_counter(Type val): m_counter(val) {}
Atomic_counter() {} Atomic_counter() = default;
Type operator++(int) { return add(1); } Type operator++(int) { return add(1); }
Type operator--(int) { return sub(1); } Type operator--(int) { return sub(1); }

View file

@ -81,7 +81,7 @@ public:
span(const span &other) : data_(other.data_), size_(other.size_) {} span(const span &other) : data_(other.data_), size_(other.size_) {}
~span(){}; ~span() = default;
span &operator=(const span &other) span &operator=(const span &other)
{ {

View file

@ -104,7 +104,7 @@ public:
uchar oiv[MY_AES_BLOCK_SIZE]; uchar oiv[MY_AES_BLOCK_SIZE];
MyCTX_nopad() : MyCTX() { } MyCTX_nopad() : MyCTX() { }
~MyCTX_nopad() { } ~MyCTX_nopad() = default;
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
const uchar *iv, uint ivlen) const uchar *iv, uint ivlen)

View file

@ -189,9 +189,7 @@ database::database(const config& c)
{ {
} }
database::~database() database::~database() = default;
{
}
dbcontext_ptr dbcontext_ptr
database::create_context(bool for_write) volatile database::create_context(bool for_write) volatile
@ -226,9 +224,7 @@ dbcontext::dbcontext(volatile database *d, bool for_write)
user_level_lock_timeout = d->get_conf().get_int("wrlock_timeout", 12); user_level_lock_timeout = d->get_conf().get_int("wrlock_timeout", 12);
} }
dbcontext::~dbcontext() dbcontext::~dbcontext() = default;
{
}
namespace { namespace {

View file

@ -27,7 +27,7 @@ struct dbcontext_i;
typedef std::auto_ptr<dbcontext_i> dbcontext_ptr; typedef std::auto_ptr<dbcontext_i> dbcontext_ptr;
struct database_i { struct database_i {
virtual ~database_i() { } virtual ~database_i() = default;
virtual dbcontext_ptr create_context(bool for_write) volatile = 0; virtual dbcontext_ptr create_context(bool for_write) volatile = 0;
virtual void stop() volatile = 0; virtual void stop() volatile = 0;
virtual const config& get_conf() const volatile = 0; virtual const config& get_conf() const volatile = 0;
@ -57,7 +57,7 @@ struct prep_stmt {
}; };
struct dbcallback_i { struct dbcallback_i {
virtual ~dbcallback_i () { } virtual ~dbcallback_i() = default;
virtual void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v) = 0; virtual void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v) = 0;
virtual const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const = 0; virtual const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const = 0;
virtual void dbcb_resp_short(uint32_t code, const char *msg) = 0; virtual void dbcb_resp_short(uint32_t code, const char *msg) = 0;
@ -111,7 +111,7 @@ struct cmd_exec_args {
}; };
struct dbcontext_i { struct dbcontext_i {
virtual ~dbcontext_i() { } virtual ~dbcontext_i() = default;
virtual void init_thread(const void *stack_bottom, virtual void init_thread(const void *stack_bottom,
volatile int& shutdown_flag) = 0; volatile int& shutdown_flag) = 0;
virtual void term_thread() = 0; virtual void term_thread() = 0;

View file

@ -47,7 +47,7 @@ struct hstcpsvr_i;
typedef std::auto_ptr<hstcpsvr_i> hstcpsvr_ptr; typedef std::auto_ptr<hstcpsvr_i> hstcpsvr_ptr;
struct hstcpsvr_i { struct hstcpsvr_i {
virtual ~hstcpsvr_i() { } virtual ~hstcpsvr_i() = default;
virtual std::string start_listen() = 0; virtual std::string start_listen() = 0;
static hstcpsvr_ptr create(const config& conf); static hstcpsvr_ptr create(const config& conf);
}; };

View file

@ -24,7 +24,7 @@ struct hstcpsvr_worker_arg {
}; };
struct hstcpsvr_worker_i { struct hstcpsvr_worker_i {
virtual ~hstcpsvr_worker_i() { } virtual ~hstcpsvr_worker_i() = default;
virtual void run() = 0; virtual void run() = 0;
static hstcpsvr_worker_ptr create(const hstcpsvr_worker_arg& arg); static hstcpsvr_worker_ptr create(const hstcpsvr_worker_arg& arg);
}; };

View file

@ -33,7 +33,7 @@ struct hstcpcli_i;
typedef std::auto_ptr<hstcpcli_i> hstcpcli_ptr; typedef std::auto_ptr<hstcpcli_i> hstcpcli_ptr;
struct hstcpcli_i { struct hstcpcli_i {
virtual ~hstcpcli_i() { } virtual ~hstcpcli_i() = default;
virtual void close() = 0; virtual void close() = 0;
virtual int reconnect() = 0; virtual int reconnect() = 0;
virtual bool stable_point() = 0; virtual bool stable_point() = 0;

View file

@ -13,7 +13,7 @@ namespace dena {
/* boost::noncopyable */ /* boost::noncopyable */
struct noncopyable { struct noncopyable {
noncopyable() { } noncopyable() = default;
private: private:
noncopyable(const noncopyable&); noncopyable(const noncopyable&);
noncopyable& operator =(const noncopyable&); noncopyable& operator =(const noncopyable&);

View file

@ -153,7 +153,7 @@ class time_collector
public: public:
time_collector(utility& u): m_utility(&u) { flush(); } time_collector(utility& u): m_utility(&u) { flush(); }
~time_collector() { } ~time_collector() = default;
uint32_t count(uint index) { return m_count[index]; } uint32_t count(uint index) { return m_count[index]; }
uint64_t total(uint index) { return m_total[index]; } uint64_t total(uint index) { return m_total[index]; }
void flush() void flush()

View file

@ -35,8 +35,8 @@ public:
static Create_func_trt<TRT_FIELD> s_singleton; static Create_func_trt<TRT_FIELD> s_singleton;
protected: protected:
Create_func_trt<TRT_FIELD>() {} Create_func_trt<TRT_FIELD>() = default;
virtual ~Create_func_trt<TRT_FIELD>() {} virtual ~Create_func_trt<TRT_FIELD>() = default;
}; };
template<TR_table::field_id_t TRT_FIELD> template<TR_table::field_id_t TRT_FIELD>
@ -131,8 +131,8 @@ public:
static Create_func_trt_trx_sees<Item_func_trt_trx_seesX> s_singleton; static Create_func_trt_trx_sees<Item_func_trt_trx_seesX> s_singleton;
protected: protected:
Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() {} Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() = default;
virtual ~Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() {} virtual ~Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() = default;
}; };
template<class X> template<class X>

View file

@ -56,7 +56,7 @@ public:
derived_handler(THD *thd_arg, handlerton *ht_arg) derived_handler(THD *thd_arg, handlerton *ht_arg)
: thd(thd_arg), ht(ht_arg), derived(0),table(0), tmp_table_param(0), : thd(thd_arg), ht(ht_arg), derived(0),table(0), tmp_table_param(0),
unit(0), select(0) {} unit(0), select(0) {}
virtual ~derived_handler() {} virtual ~derived_handler() = default;
/* /*
Functions to scan data. All these returns 0 if ok, error code in case Functions to scan data. All these returns 0 if ok, error code in case

View file

@ -314,9 +314,7 @@ Event_queue_element::Event_queue_element():
SYNOPSIS SYNOPSIS
Event_queue_element::Event_queue_element() Event_queue_element::Event_queue_element()
*/ */
Event_queue_element::~Event_queue_element() Event_queue_element::~Event_queue_element() = default;
{
}
/* /*
@ -342,9 +340,7 @@ Event_timed::Event_timed():
Event_timed::~Event_timed() Event_timed::~Event_timed()
*/ */
Event_timed::~Event_timed() Event_timed::~Event_timed() = default;
{
}
/* /*

View file

@ -71,7 +71,7 @@ class Event_parse_data;
class Event_db_repository class Event_db_repository
{ {
public: public:
Event_db_repository(){} Event_db_repository() = default;
bool bool
create_event(THD *thd, Event_parse_data *parse_data, create_event(THD *thd, Event_parse_data *parse_data,

View file

@ -562,7 +562,7 @@ public:
name.length= 0; name.length= 0;
}; };
Virtual_column_info* clone(THD *thd); Virtual_column_info* clone(THD *thd);
~Virtual_column_info() {}; ~Virtual_column_info() = default;
enum_vcol_info_type get_vcol_type() const enum_vcol_info_type get_vcol_type() const
{ {
return vcol_type; return vcol_type;
@ -761,7 +761,7 @@ public:
Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg, Field(uchar *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
uchar null_bit_arg, utype unireg_check_arg, uchar null_bit_arg, utype unireg_check_arg,
const LEX_CSTRING *field_name_arg); const LEX_CSTRING *field_name_arg);
virtual ~Field() {} virtual ~Field() = default;
DTCollation dtcollation() const DTCollation dtcollation() const
{ {
@ -5215,7 +5215,7 @@ public:
LEX_CSTRING col_name, org_col_name; LEX_CSTRING col_name, org_col_name;
ulong length; ulong length;
uint flags, decimals; uint flags, decimals;
Send_field() {} Send_field() = default;
Send_field(Field *field) Send_field(Field *field)
{ {
field->make_send_field(this); field->make_send_field(this);
@ -5320,8 +5320,8 @@ public:
Field *from_field,*to_field; Field *from_field,*to_field;
String tmp; // For items String tmp; // For items
Copy_field() {} Copy_field() = default;
~Copy_field() {} ~Copy_field() = default;
void set(Field *to,Field *from,bool save); // Field to field void set(Field *to,Field *from,bool save); // Field to field
void set(uchar *to,Field *from); // Field to string void set(uchar *to,Field *from); // Field to string
void (*do_copy)(Copy_field *); void (*do_copy)(Copy_field *);

View file

@ -112,17 +112,11 @@ public:
/** /**
We need an assignment operator, see filesort(). We need an assignment operator, see filesort().
This happens to have the same semantics as the one that would be This happens to have the same semantics as the one that would be
generated by the compiler. We still implement it here, to show shallow generated by the compiler.
assignment explicitly: we have two objects sharing the same array. Note that this is a shallow copy. We have two objects sharing the same
array.
*/ */
Filesort_buffer &operator=(const Filesort_buffer &rhs) Filesort_buffer &operator=(const Filesort_buffer &rhs) = default;
{
m_idx_array= rhs.m_idx_array;
m_record_length= rhs.m_record_length;
m_start_of_data= rhs.m_start_of_data;
allocated_size= rhs.allocated_size;
return *this;
}
private: private:
typedef Bounds_checked_array<uchar*> Idx_array; typedef Bounds_checked_array<uchar*> Idx_array;

View file

@ -344,7 +344,7 @@ public:
{ {
return complete_ring() || complete_poly(); return complete_ring() || complete_poly();
} }
virtual ~Gcalc_shape_transporter() {} virtual ~Gcalc_shape_transporter() = default;
}; };

View file

@ -72,7 +72,7 @@ public:
group_by_handler(THD *thd_arg, handlerton *ht_arg) group_by_handler(THD *thd_arg, handlerton *ht_arg)
: thd(thd_arg), ht(ht_arg), table(0) {} : thd(thd_arg), ht(ht_arg), table(0) {}
virtual ~group_by_handler() {} virtual ~group_by_handler() = default;
/* /*
Functions to scan data. All these returns 0 if ok, error code in case Functions to scan data. All these returns 0 if ok, error code in case

View file

@ -842,7 +842,7 @@ struct xid_t {
long bqual_length; long bqual_length;
char data[XIDDATASIZE]; // not \0-terminated ! char data[XIDDATASIZE]; // not \0-terminated !
xid_t() {} /* Remove gcc warning */ xid_t() = default; /* Remove gcc warning */
bool eq(struct xid_t *xid) const bool eq(struct xid_t *xid) const
{ return !xid->is_null() && eq(xid->gtrid_length, xid->bqual_length, xid->data); } { return !xid->is_null() && eq(xid->gtrid_length, xid->bqual_length, xid->data); }
bool eq(long g, long b, const char *d) const bool eq(long g, long b, const char *d) const
@ -1529,7 +1529,7 @@ struct handlerton
public: public:
virtual bool add_table(const char *tname, size_t tlen) = 0; virtual bool add_table(const char *tname, size_t tlen) = 0;
virtual bool add_file(const char *fname) = 0; virtual bool add_file(const char *fname) = 0;
protected: virtual ~discovered_list() {} protected: virtual ~discovered_list() = default;
}; };
/* /*
@ -1710,7 +1710,7 @@ struct THD_TRANS
m_unsafe_rollback_flags= 0; m_unsafe_rollback_flags= 0;
} }
bool is_empty() const { return ha_list == NULL; } bool is_empty() const { return ha_list == NULL; }
THD_TRANS() {} /* Remove gcc warning */ THD_TRANS() = default; /* Remove gcc warning */
unsigned int m_unsafe_rollback_flags; unsigned int m_unsafe_rollback_flags;
/* /*
@ -1954,7 +1954,7 @@ struct Table_period_info: Sql_alloc
struct start_end_t struct start_end_t
{ {
start_end_t() {}; start_end_t() = default;
start_end_t(const LEX_CSTRING& _start, const LEX_CSTRING& _end) : start_end_t(const LEX_CSTRING& _start, const LEX_CSTRING& _end) :
start(_start), start(_start),
end(_end) {} end(_end) {}
@ -2262,9 +2262,9 @@ struct Table_specification_st: public HA_CREATE_INFO,
class inplace_alter_handler_ctx : public Sql_alloc class inplace_alter_handler_ctx : public Sql_alloc
{ {
public: public:
inplace_alter_handler_ctx() {} inplace_alter_handler_ctx() = default;
virtual ~inplace_alter_handler_ctx() {} virtual ~inplace_alter_handler_ctx() = default;
virtual void set_shared_data(const inplace_alter_handler_ctx& ctx) {} virtual void set_shared_data(const inplace_alter_handler_ctx& ctx) {}
}; };
@ -2490,8 +2490,8 @@ typedef struct st_key_create_information
class TABLEOP_HOOKS class TABLEOP_HOOKS
{ {
public: public:
TABLEOP_HOOKS() {} TABLEOP_HOOKS() = default;
virtual ~TABLEOP_HOOKS() {} virtual ~TABLEOP_HOOKS() = default;
inline void prelock(TABLE **tables, uint count) inline void prelock(TABLE **tables, uint count)
{ {
@ -2532,7 +2532,7 @@ typedef class Item COND;
typedef struct st_ha_check_opt typedef struct st_ha_check_opt
{ {
st_ha_check_opt() {} /* Remove gcc warning */ st_ha_check_opt() = default; /* Remove gcc warning */
uint flags; /* isam layer flags (e.g. for myisamchk) */ uint flags; /* isam layer flags (e.g. for myisamchk) */
uint sql_flags; /* sql layer flags - for something myisamchk cannot do */ uint sql_flags; /* sql layer flags - for something myisamchk cannot do */
time_t start_time; /* When check/repair starts */ time_t start_time; /* When check/repair starts */
@ -2911,8 +2911,8 @@ uint calculate_key_len(TABLE *, uint, const uchar *, key_part_map);
class Handler_share class Handler_share
{ {
public: public:
Handler_share() {} Handler_share() = default;
virtual ~Handler_share() {} virtual ~Handler_share() = default;
}; };
enum class Compare_keys : uint32_t enum class Compare_keys : uint32_t
@ -4969,7 +4969,7 @@ public:
const LEX_CSTRING *wild_arg); const LEX_CSTRING *wild_arg);
Discovered_table_list(THD *thd_arg, Dynamic_array<LEX_CSTRING*> *tables_arg) Discovered_table_list(THD *thd_arg, Dynamic_array<LEX_CSTRING*> *tables_arg)
: thd(thd_arg), wild(NULL), with_temps(true), tables(tables_arg) {} : thd(thd_arg), wild(NULL), with_temps(true), tables(tables_arg) {}
~Discovered_table_list() {} ~Discovered_table_list() = default;
bool add_table(const char *tname, size_t tlen); bool add_table(const char *tname, size_t tlen);
bool add_file(const char *fname); bool add_file(const char *fname);

View file

@ -35,7 +35,7 @@ class hash_filo_element
private: private:
hash_filo_element *next_used,*prev_used; hash_filo_element *next_used,*prev_used;
public: public:
hash_filo_element() {} hash_filo_element() = default;
hash_filo_element *next() hash_filo_element *next()
{ return next_used; } { return next_used; }
hash_filo_element *prev() hash_filo_element *prev()

View file

@ -74,8 +74,7 @@ Host_errors::Host_errors()
m_local(0) m_local(0)
{} {}
Host_errors::~Host_errors() Host_errors::~Host_errors() = default;
{}
void Host_errors::reset() void Host_errors::reset()
{ {

View file

@ -287,7 +287,7 @@ private:
TABLE_LIST *save_next_local; TABLE_LIST *save_next_local;
public: public:
Name_resolution_context_state() {} /* Remove gcc warning */ Name_resolution_context_state() = default; /* Remove gcc warning */
public: public:
/* Save the state of a name resolution context. */ /* Save the state of a name resolution context. */
@ -388,7 +388,7 @@ class sp_rcontext;
class Sp_rcontext_handler class Sp_rcontext_handler
{ {
public: public:
virtual ~Sp_rcontext_handler() {} virtual ~Sp_rcontext_handler() = default;
/** /**
A prefix used for SP variable names in queries: A prefix used for SP variable names in queries:
- EXPLAIN EXTENDED - EXPLAIN EXTENDED
@ -461,8 +461,8 @@ public:
required, otherwise we only reading it and SELECT required, otherwise we only reading it and SELECT
privilege might be required. privilege might be required.
*/ */
Settable_routine_parameter() {} Settable_routine_parameter() = default;
virtual ~Settable_routine_parameter() {} virtual ~Settable_routine_parameter() = default;
virtual void set_required_privilege(bool rw) {}; virtual void set_required_privilege(bool rw) {};
/* /*
@ -544,7 +544,7 @@ class Rewritable_query_parameter
limit_clause_param(false) limit_clause_param(false)
{ } { }
virtual ~Rewritable_query_parameter() { } virtual ~Rewritable_query_parameter() = default;
virtual bool append_for_log(THD *thd, String *str) = 0; virtual bool append_for_log(THD *thd, String *str) = 0;
}; };
@ -704,7 +704,7 @@ public:
class Item_const class Item_const
{ {
public: public:
virtual ~Item_const() {} virtual ~Item_const() = default;
virtual const Type_all_attributes *get_type_all_attributes_from_const() const= 0; virtual const Type_all_attributes *get_type_all_attributes_from_const() const= 0;
virtual bool const_is_null() const { return false; } virtual bool const_is_null() const { return false; }
virtual const longlong *const_ptr_longlong() const { return NULL; } virtual const longlong *const_ptr_longlong() const { return NULL; }
@ -2741,8 +2741,8 @@ class Field_enumerator
{ {
public: public:
virtual void visit_field(Item_field *field)= 0; virtual void visit_field(Item_field *field)= 0;
virtual ~Field_enumerator() {}; /* purecov: inspected */ virtual ~Field_enumerator() = default;; /* purecov: inspected */
Field_enumerator() {} /* Remove gcc warning */ Field_enumerator() = default; /* Remove gcc warning */
}; };
class Item_string; class Item_string;
@ -3265,7 +3265,7 @@ public:
Item_result_field(THD *thd, Item_result_field *item): Item_result_field(THD *thd, Item_result_field *item):
Item_fixed_hybrid(thd, item), result_field(item->result_field) Item_fixed_hybrid(thd, item), result_field(item->result_field)
{} {}
~Item_result_field() {} /* Required with gcc 2.95 */ ~Item_result_field() = default; /* Required with gcc 2.95 */
Field *get_tmp_table_field() { return result_field; } Field *get_tmp_table_field() { return result_field; }
Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src, Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src,
const Tmp_field_param *param); const Tmp_field_param *param);
@ -7540,7 +7540,7 @@ public:
*/ */
virtual void close()= 0; virtual void close()= 0;
virtual ~Item_iterator() {} virtual ~Item_iterator() = default;
}; };

View file

@ -61,7 +61,7 @@ Cached_item *new_Cached_item(THD *thd, Item *item, bool pass_through_ref)
} }
} }
Cached_item::~Cached_item() {} Cached_item::~Cached_item() = default;
/** /**
Compare with old value and replace value with new value. Compare with old value and replace value with new value.

View file

@ -251,8 +251,7 @@ protected:
Item_bool_func(thd, a), value(a_value), affirmative(a_affirmative) Item_bool_func(thd, a), value(a_value), affirmative(a_affirmative)
{} {}
~Item_func_truth() ~Item_func_truth() = default;
{}
private: private:
/** /**
True for <code>X IS [NOT] TRUE</code>, True for <code>X IS [NOT] TRUE</code>,
@ -274,7 +273,7 @@ class Item_func_istrue : public Item_func_truth
{ {
public: public:
Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {} Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {}
~Item_func_istrue() {} ~Item_func_istrue() = default;
virtual const char* func_name() const { return "istrue"; } virtual const char* func_name() const { return "istrue"; }
Item *get_copy(THD *thd) Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_istrue>(thd, this); } { return get_item_copy<Item_func_istrue>(thd, this); }
@ -290,7 +289,7 @@ class Item_func_isnottrue : public Item_func_truth
public: public:
Item_func_isnottrue(THD *thd, Item *a): Item_func_isnottrue(THD *thd, Item *a):
Item_func_truth(thd, a, true, false) {} Item_func_truth(thd, a, true, false) {}
~Item_func_isnottrue() {} ~Item_func_isnottrue() = default;
virtual const char* func_name() const { return "isnottrue"; } virtual const char* func_name() const { return "isnottrue"; }
Item *get_copy(THD *thd) Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_isnottrue>(thd, this); } { return get_item_copy<Item_func_isnottrue>(thd, this); }
@ -306,7 +305,7 @@ class Item_func_isfalse : public Item_func_truth
{ {
public: public:
Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {} Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {}
~Item_func_isfalse() {} ~Item_func_isfalse() = default;
virtual const char* func_name() const { return "isfalse"; } virtual const char* func_name() const { return "isfalse"; }
Item *get_copy(THD *thd) Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_isfalse>(thd, this); } { return get_item_copy<Item_func_isfalse>(thd, this); }
@ -322,7 +321,7 @@ class Item_func_isnotfalse : public Item_func_truth
public: public:
Item_func_isnotfalse(THD *thd, Item *a): Item_func_isnotfalse(THD *thd, Item *a):
Item_func_truth(thd, a, false, false) {} Item_func_truth(thd, a, false, false) {}
~Item_func_isnotfalse() {} ~Item_func_isnotfalse() = default;
virtual const char* func_name() const { return "isnotfalse"; } virtual const char* func_name() const { return "isnotfalse"; }
Item *get_copy(THD *thd) Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_isnotfalse>(thd, this); } { return get_item_copy<Item_func_isnotfalse>(thd, this); }
@ -1325,13 +1324,13 @@ public:
CHARSET_INFO *collation; CHARSET_INFO *collation;
uint count; uint count;
uint used_count; uint used_count;
in_vector() {} in_vector() = default;
in_vector(THD *thd, uint elements, uint element_length, qsort2_cmp cmp_func, in_vector(THD *thd, uint elements, uint element_length, qsort2_cmp cmp_func,
CHARSET_INFO *cmp_coll) CHARSET_INFO *cmp_coll)
:base((char*) thd_calloc(thd, elements * element_length)), :base((char*) thd_calloc(thd, elements * element_length)),
size(element_length), compare(cmp_func), collation(cmp_coll), size(element_length), compare(cmp_func), collation(cmp_coll),
count(elements), used_count(elements) {} count(elements), used_count(elements) {}
virtual ~in_vector() {} virtual ~in_vector() = default;
virtual void set(uint pos,Item *item)=0; virtual void set(uint pos,Item *item)=0;
virtual uchar *get_value(Item *item)=0; virtual uchar *get_value(Item *item)=0;
void sort() void sort()
@ -1530,7 +1529,7 @@ class cmp_item :public Sql_alloc
public: public:
CHARSET_INFO *cmp_charset; CHARSET_INFO *cmp_charset;
cmp_item() { cmp_charset= &my_charset_bin; } cmp_item() { cmp_charset= &my_charset_bin; }
virtual ~cmp_item() {} virtual ~cmp_item() = default;
virtual void store_value(Item *item)= 0; virtual void store_value(Item *item)= 0;
/** /**
@returns result (TRUE, FALSE or UNKNOWN) of @returns result (TRUE, FALSE or UNKNOWN) of
@ -1559,7 +1558,7 @@ class cmp_item_string : public cmp_item_scalar
protected: protected:
String *value_res; String *value_res;
public: public:
cmp_item_string () {} cmp_item_string () = default;
cmp_item_string (CHARSET_INFO *cs) { cmp_charset= cs; } cmp_item_string (CHARSET_INFO *cs) { cmp_charset= cs; }
void set_charset(CHARSET_INFO *cs) { cmp_charset= cs; } void set_charset(CHARSET_INFO *cs) { cmp_charset= cs; }
friend class cmp_item_sort_string; friend class cmp_item_sort_string;
@ -1625,7 +1624,7 @@ class cmp_item_int : public cmp_item_scalar
{ {
longlong value; longlong value;
public: public:
cmp_item_int() {} /* Remove gcc warning */ cmp_item_int() = default; /* Remove gcc warning */
void store_value(Item *item) void store_value(Item *item)
{ {
value= item->val_int(); value= item->val_int();
@ -1658,7 +1657,7 @@ class cmp_item_temporal: public cmp_item_scalar
protected: protected:
longlong value; longlong value;
public: public:
cmp_item_temporal() {} cmp_item_temporal() = default;
int compare(cmp_item *ci); int compare(cmp_item *ci);
}; };
@ -1714,7 +1713,7 @@ class cmp_item_real : public cmp_item_scalar
{ {
double value; double value;
public: public:
cmp_item_real() {} /* Remove gcc warning */ cmp_item_real() = default; /* Remove gcc warning */
void store_value(Item *item) void store_value(Item *item)
{ {
value= item->val_real(); value= item->val_real();
@ -1744,7 +1743,7 @@ class cmp_item_decimal : public cmp_item_scalar
{ {
my_decimal value; my_decimal value;
public: public:
cmp_item_decimal() {} /* Remove gcc warning */ cmp_item_decimal() = default; /* Remove gcc warning */
void store_value(Item *item); void store_value(Item *item);
int cmp(Item *arg); int cmp(Item *arg);
int cmp_not_null(const Value *val); int cmp_not_null(const Value *val);
@ -3509,8 +3508,8 @@ Item *and_expressions(Item *a, Item *b, Item **org_item);
class Comp_creator class Comp_creator
{ {
public: public:
Comp_creator() {} /* Remove gcc warning */ Comp_creator() = default; /* Remove gcc warning */
virtual ~Comp_creator() {} /* Remove gcc warning */ virtual ~Comp_creator() = default; /* Remove gcc warning */
/** /**
Create operation with given arguments. Create operation with given arguments.
*/ */
@ -3529,8 +3528,8 @@ public:
class Eq_creator :public Comp_creator class Eq_creator :public Comp_creator
{ {
public: public:
Eq_creator() {} /* Remove gcc warning */ Eq_creator() = default; /* Remove gcc warning */
virtual ~Eq_creator() {} /* Remove gcc warning */ virtual ~Eq_creator() = default; /* Remove gcc warning */
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
const char* symbol(bool invert) const { return invert? "<>" : "="; } const char* symbol(bool invert) const { return invert? "<>" : "="; }
@ -3541,8 +3540,8 @@ public:
class Ne_creator :public Comp_creator class Ne_creator :public Comp_creator
{ {
public: public:
Ne_creator() {} /* Remove gcc warning */ Ne_creator() = default; /* Remove gcc warning */
virtual ~Ne_creator() {} /* Remove gcc warning */ virtual ~Ne_creator() = default; /* Remove gcc warning */
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
const char* symbol(bool invert) const { return invert? "=" : "<>"; } const char* symbol(bool invert) const { return invert? "=" : "<>"; }
@ -3553,8 +3552,8 @@ public:
class Gt_creator :public Comp_creator class Gt_creator :public Comp_creator
{ {
public: public:
Gt_creator() {} /* Remove gcc warning */ Gt_creator() = default; /* Remove gcc warning */
virtual ~Gt_creator() {} /* Remove gcc warning */ virtual ~Gt_creator() = default; /* Remove gcc warning */
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
const char* symbol(bool invert) const { return invert? "<=" : ">"; } const char* symbol(bool invert) const { return invert? "<=" : ">"; }
@ -3565,8 +3564,8 @@ public:
class Lt_creator :public Comp_creator class Lt_creator :public Comp_creator
{ {
public: public:
Lt_creator() {} /* Remove gcc warning */ Lt_creator() = default; /* Remove gcc warning */
virtual ~Lt_creator() {} /* Remove gcc warning */ virtual ~Lt_creator() = default; /* Remove gcc warning */
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
const char* symbol(bool invert) const { return invert? ">=" : "<"; } const char* symbol(bool invert) const { return invert? ">=" : "<"; }
@ -3577,8 +3576,8 @@ public:
class Ge_creator :public Comp_creator class Ge_creator :public Comp_creator
{ {
public: public:
Ge_creator() {} /* Remove gcc warning */ Ge_creator() = default; /* Remove gcc warning */
virtual ~Ge_creator() {} /* Remove gcc warning */ virtual ~Ge_creator() = default; /* Remove gcc warning */
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
const char* symbol(bool invert) const { return invert? "<" : ">="; } const char* symbol(bool invert) const { return invert? "<" : ">="; }
@ -3589,8 +3588,8 @@ public:
class Le_creator :public Comp_creator class Le_creator :public Comp_creator
{ {
public: public:
Le_creator() {} /* Remove gcc warning */ Le_creator() = default; /* Remove gcc warning */
virtual ~Le_creator() {} /* Remove gcc warning */ virtual ~Le_creator() = default; /* Remove gcc warning */
Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create(THD *thd, Item *a, Item *b) const;
Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const; Item_bool_rowready_func2* create_swap(THD *thd, Item *a, Item *b) const;
const char* symbol(bool invert) const { return invert? ">" : "<="; } const char* symbol(bool invert) const { return invert? ">" : "<="; }

File diff suppressed because it is too large Load diff

View file

@ -63,9 +63,9 @@ public:
protected: protected:
/** Constructor */ /** Constructor */
Create_func() {} Create_func() = default;
/** Destructor */ /** Destructor */
virtual ~Create_func() {} virtual ~Create_func() = default;
}; };
@ -95,9 +95,9 @@ public:
protected: protected:
/** Constructor. */ /** Constructor. */
Create_native_func() {} Create_native_func() = default;
/** Destructor. */ /** Destructor. */
virtual ~Create_native_func() {} virtual ~Create_native_func() = default;
}; };
@ -138,9 +138,9 @@ public:
protected: protected:
/** Constructor. */ /** Constructor. */
Create_qfunc() {} Create_qfunc() = default;
/** Destructor. */ /** Destructor. */
virtual ~Create_qfunc() {} virtual ~Create_qfunc() = default;
}; };
@ -187,9 +187,9 @@ public:
protected: protected:
/** Constructor. */ /** Constructor. */
Create_udf_func() {} Create_udf_func() = default;
/** Destructor. */ /** Destructor. */
virtual ~Create_udf_func() {} virtual ~Create_udf_func() = default;
}; };
#endif #endif

View file

@ -3919,7 +3919,7 @@ class Interruptible_wait
Interruptible_wait(THD *thd) Interruptible_wait(THD *thd)
: m_thd(thd) {} : m_thd(thd) {}
~Interruptible_wait() {} ~Interruptible_wait() = default;
public: public:
/** /**

View file

@ -490,7 +490,7 @@ public:
class Handler class Handler
{ {
public: public:
virtual ~Handler() { } virtual ~Handler() = default;
virtual String *val_str(Item_handled_func *, String *) const= 0; virtual String *val_str(Item_handled_func *, String *) const= 0;
virtual String *val_str_ascii(Item_handled_func *, String *) const= 0; virtual String *val_str_ascii(Item_handled_func *, String *) const= 0;
virtual double val_real(Item_handled_func *) const= 0; virtual double val_real(Item_handled_func *) const= 0;
@ -3267,8 +3267,7 @@ public:
Item_func_sp(THD *thd, Name_resolution_context *context_arg, Item_func_sp(THD *thd, Name_resolution_context *context_arg,
sp_name *name, const Sp_handler *sph, List<Item> &list); sp_name *name, const Sp_handler *sph, List<Item> &list);
virtual ~Item_func_sp() virtual ~Item_func_sp() = default;
{}
void update_used_tables(); void update_used_tables();

View file

@ -1541,9 +1541,7 @@ exit:
} }
Item_func_spatial_operation::~Item_func_spatial_operation() Item_func_spatial_operation::~Item_func_spatial_operation() = default;
{
}
String *Item_func_spatial_operation::val_str(String *str_value) String *Item_func_spatial_operation::val_str(String *str_value)

View file

@ -174,7 +174,7 @@ protected:
return false; return false;
} }
// Non-initializing constructor // Non-initializing constructor
Inet4() { } Inet4() = default;
public: public:
void to_binary(char *dst, size_t dstsize) const void to_binary(char *dst, size_t dstsize) const
{ {
@ -266,7 +266,7 @@ protected:
return false; return false;
} }
// Non-initializing constructor // Non-initializing constructor
Inet6() { } Inet6() = default;
public: public:
bool to_binary(String *to) const bool to_binary(String *to) const
{ {

View file

@ -824,7 +824,7 @@ public:
item= si; item= si;
maybe_null= 0; maybe_null= 0;
} }
virtual ~subselect_engine() {}; // to satisfy compiler virtual ~subselect_engine() = default;; // to satisfy compiler
virtual void cleanup()= 0; virtual void cleanup()= 0;
/* /*

View file

@ -59,7 +59,7 @@ protected:
public: public:
Aggregator (Item_sum *arg): item_sum(arg) {} Aggregator (Item_sum *arg): item_sum(arg) {}
virtual ~Aggregator () {} /* Keep gcc happy */ virtual ~Aggregator () = default; /* Keep gcc happy */
enum Aggregator_type { SIMPLE_AGGREGATOR, DISTINCT_AGGREGATOR }; enum Aggregator_type { SIMPLE_AGGREGATOR, DISTINCT_AGGREGATOR };
virtual Aggregator_type Aggrtype() = 0; virtual Aggregator_type Aggrtype() = 0;

View file

@ -205,7 +205,7 @@ public:
m_message[0]= '\0'; m_message[0]= '\0';
} }
virtual ~Silence_log_table_errors() {} virtual ~Silence_log_table_errors() = default;
virtual bool handle_condition(THD *thd, virtual bool handle_condition(THD *thd,
uint sql_errno, uint sql_errno,
@ -632,14 +632,10 @@ end:
} }
Log_to_csv_event_handler::Log_to_csv_event_handler() Log_to_csv_event_handler::Log_to_csv_event_handler() = default;
{
}
Log_to_csv_event_handler::~Log_to_csv_event_handler() Log_to_csv_event_handler::~Log_to_csv_event_handler() = default;
{
}
void Log_to_csv_event_handler::cleanup() void Log_to_csv_event_handler::cleanup()

View file

@ -42,8 +42,8 @@ class TC_LOG
{ {
public: public:
int using_heuristic_recover(); int using_heuristic_recover();
TC_LOG() {} TC_LOG() = default;
virtual ~TC_LOG() {} virtual ~TC_LOG() = default;
virtual int open(const char *opt_name)=0; virtual int open(const char *opt_name)=0;
virtual void close()=0; virtual void close()=0;
@ -99,7 +99,7 @@ extern PSI_cond_key key_COND_prepare_ordered;
class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging
{ {
public: public:
TC_LOG_DUMMY() {} TC_LOG_DUMMY() = default;
int open(const char *opt_name) { return 0; } int open(const char *opt_name) { return 0; }
void close() { } void close() { }
/* /*
@ -293,7 +293,7 @@ class MYSQL_LOG
{ {
public: public:
MYSQL_LOG(); MYSQL_LOG();
virtual ~MYSQL_LOG() {} virtual ~MYSQL_LOG() = default;
void init_pthread_objects(); void init_pthread_objects();
void cleanup(); void cleanup();
bool open( bool open(
@ -970,7 +970,7 @@ public:
class Log_event_handler class Log_event_handler
{ {
public: public:
Log_event_handler() {} Log_event_handler() = default;
virtual bool init()= 0; virtual bool init()= 0;
virtual void cleanup()= 0; virtual void cleanup()= 0;
@ -984,7 +984,7 @@ public:
const char *command_type, size_t command_type_len, const char *command_type, size_t command_type_len,
const char *sql_text, size_t sql_text_len, const char *sql_text, size_t sql_text_len,
CHARSET_INFO *client_cs)= 0; CHARSET_INFO *client_cs)= 0;
virtual ~Log_event_handler() {} virtual ~Log_event_handler() = default;
}; };

View file

@ -324,7 +324,7 @@ public:
reinit_io_cache(m_cache, WRITE_CACHE, 0L, FALSE, TRUE); reinit_io_cache(m_cache, WRITE_CACHE, 0L, FALSE, TRUE);
} }
~Write_on_release_cache() {} ~Write_on_release_cache() = default;
bool flush_data() bool flush_data()
{ {
@ -15046,9 +15046,7 @@ Ignorable_log_event::Ignorable_log_event(const char *buf,
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
Ignorable_log_event::~Ignorable_log_event() Ignorable_log_event::~Ignorable_log_event() = default;
{
}
#ifndef MYSQL_CLIENT #ifndef MYSQL_CLIENT
/* Pack info for its unrecognized ignorable event */ /* Pack info for its unrecognized ignorable event */

View file

@ -2558,8 +2558,7 @@ public:
*/ */
Load_log_event(const char* buf, uint event_len, Load_log_event(const char* buf, uint event_len,
const Format_description_log_event* description_event); const Format_description_log_event* description_event);
~Load_log_event() ~Load_log_event() = default;
{}
Log_event_type get_type_code() Log_event_type get_type_code()
{ {
return sql_ex.new_format() ? NEW_LOAD_EVENT: LOAD_EVENT; return sql_ex.new_format() ? NEW_LOAD_EVENT: LOAD_EVENT;
@ -2643,13 +2642,13 @@ public:
void pack_info(Protocol* protocol); void pack_info(Protocol* protocol);
#endif /* HAVE_REPLICATION */ #endif /* HAVE_REPLICATION */
#else #else
Start_log_event_v3() {} Start_log_event_v3() = default;
bool print(FILE* file, PRINT_EVENT_INFO* print_event_info); bool print(FILE* file, PRINT_EVENT_INFO* print_event_info);
#endif #endif
Start_log_event_v3(const char* buf, uint event_len, Start_log_event_v3(const char* buf, uint event_len,
const Format_description_log_event* description_event); const Format_description_log_event* description_event);
~Start_log_event_v3() {} ~Start_log_event_v3() = default;
Log_event_type get_type_code() { return START_EVENT_V3;} Log_event_type get_type_code() { return START_EVENT_V3;}
my_off_t get_header_len(my_off_t l __attribute__((unused))) my_off_t get_header_len(my_off_t l __attribute__((unused)))
{ return LOG_EVENT_MINIMAL_HEADER_LEN; } { return LOG_EVENT_MINIMAL_HEADER_LEN; }
@ -2937,7 +2936,7 @@ Intvar_log_event(THD* thd_arg,uchar type_arg, ulonglong val_arg,
Intvar_log_event(const char* buf, Intvar_log_event(const char* buf,
const Format_description_log_event *description_event); const Format_description_log_event *description_event);
~Intvar_log_event() {} ~Intvar_log_event() = default;
Log_event_type get_type_code() { return INTVAR_EVENT;} Log_event_type get_type_code() { return INTVAR_EVENT;}
const char* get_var_type_name(); const char* get_var_type_name();
int get_data_size() { return 9; /* sizeof(type) + sizeof(val) */;} int get_data_size() { return 9; /* sizeof(type) + sizeof(val) */;}
@ -3018,7 +3017,7 @@ class Rand_log_event: public Log_event
Rand_log_event(const char* buf, Rand_log_event(const char* buf,
const Format_description_log_event *description_event); const Format_description_log_event *description_event);
~Rand_log_event() {} ~Rand_log_event() = default;
Log_event_type get_type_code() { return RAND_EVENT;} Log_event_type get_type_code() { return RAND_EVENT;}
int get_data_size() { return 16; /* sizeof(ulonglong) * 2*/ } int get_data_size() { return 16; /* sizeof(ulonglong) * 2*/ }
#ifdef MYSQL_SERVER #ifdef MYSQL_SERVER
@ -3068,7 +3067,7 @@ class Xid_log_event: public Log_event
Xid_log_event(const char* buf, Xid_log_event(const char* buf,
const Format_description_log_event *description_event); const Format_description_log_event *description_event);
~Xid_log_event() {} ~Xid_log_event() = default;
Log_event_type get_type_code() { return XID_EVENT;} Log_event_type get_type_code() { return XID_EVENT;}
int get_data_size() { return sizeof(xid); } int get_data_size() { return sizeof(xid); }
#ifdef MYSQL_SERVER #ifdef MYSQL_SERVER
@ -3130,7 +3129,7 @@ public:
User_var_log_event(const char* buf, uint event_len, User_var_log_event(const char* buf, uint event_len,
const Format_description_log_event *description_event); const Format_description_log_event *description_event);
~User_var_log_event() {} ~User_var_log_event() = default;
Log_event_type get_type_code() { return USER_VAR_EVENT;} Log_event_type get_type_code() { return USER_VAR_EVENT;}
#ifdef MYSQL_SERVER #ifdef MYSQL_SERVER
bool write(); bool write();
@ -3180,7 +3179,7 @@ public:
const Format_description_log_event *description_event): const Format_description_log_event *description_event):
Log_event(buf, description_event) Log_event(buf, description_event)
{} {}
~Stop_log_event() {} ~Stop_log_event() = default;
Log_event_type get_type_code() { return STOP_EVENT;} Log_event_type get_type_code() { return STOP_EVENT;}
bool is_valid() const { return 1; } bool is_valid() const { return 1; }
@ -3438,7 +3437,7 @@ public:
#endif #endif
Gtid_log_event(const char *buf, uint event_len, Gtid_log_event(const char *buf, uint event_len,
const Format_description_log_event *description_event); const Format_description_log_event *description_event);
~Gtid_log_event() { } ~Gtid_log_event() = default;
Log_event_type get_type_code() { return GTID_EVENT; } Log_event_type get_type_code() { return GTID_EVENT; }
enum_logged_status logged_status() { return LOGGED_NO_DATA; } enum_logged_status logged_status() { return LOGGED_NO_DATA; }
int get_data_size() int get_data_size()
@ -3691,7 +3690,7 @@ public:
Append_block_log_event(const char* buf, uint event_len, Append_block_log_event(const char* buf, uint event_len,
const Format_description_log_event const Format_description_log_event
*description_event); *description_event);
~Append_block_log_event() {} ~Append_block_log_event() = default;
Log_event_type get_type_code() { return APPEND_BLOCK_EVENT;} Log_event_type get_type_code() { return APPEND_BLOCK_EVENT;}
int get_data_size() { return block_len + APPEND_BLOCK_HEADER_LEN ;} int get_data_size() { return block_len + APPEND_BLOCK_HEADER_LEN ;}
bool is_valid() const { return block != 0; } bool is_valid() const { return block != 0; }
@ -3732,7 +3731,7 @@ public:
Delete_file_log_event(const char* buf, uint event_len, Delete_file_log_event(const char* buf, uint event_len,
const Format_description_log_event* description_event); const Format_description_log_event* description_event);
~Delete_file_log_event() {} ~Delete_file_log_event() = default;
Log_event_type get_type_code() { return DELETE_FILE_EVENT;} Log_event_type get_type_code() { return DELETE_FILE_EVENT;}
int get_data_size() { return DELETE_FILE_HEADER_LEN ;} int get_data_size() { return DELETE_FILE_HEADER_LEN ;}
bool is_valid() const { return file_id != 0; } bool is_valid() const { return file_id != 0; }
@ -3772,7 +3771,7 @@ public:
Execute_load_log_event(const char* buf, uint event_len, Execute_load_log_event(const char* buf, uint event_len,
const Format_description_log_event const Format_description_log_event
*description_event); *description_event);
~Execute_load_log_event() {} ~Execute_load_log_event() = default;
Log_event_type get_type_code() { return EXEC_LOAD_EVENT;} Log_event_type get_type_code() { return EXEC_LOAD_EVENT;}
int get_data_size() { return EXEC_LOAD_HEADER_LEN ;} int get_data_size() { return EXEC_LOAD_HEADER_LEN ;}
bool is_valid() const { return file_id != 0; } bool is_valid() const { return file_id != 0; }
@ -3812,7 +3811,7 @@ public:
Begin_load_query_log_event(const char* buf, uint event_len, Begin_load_query_log_event(const char* buf, uint event_len,
const Format_description_log_event const Format_description_log_event
*description_event); *description_event);
~Begin_load_query_log_event() {} ~Begin_load_query_log_event() = default;
Log_event_type get_type_code() { return BEGIN_LOAD_QUERY_EVENT; } Log_event_type get_type_code() { return BEGIN_LOAD_QUERY_EVENT; }
private: private:
#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION) #if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
@ -3870,7 +3869,7 @@ public:
Execute_load_query_log_event(const char* buf, uint event_len, Execute_load_query_log_event(const char* buf, uint event_len,
const Format_description_log_event const Format_description_log_event
*description_event); *description_event);
~Execute_load_query_log_event() {} ~Execute_load_query_log_event() = default;
Log_event_type get_type_code() { return EXECUTE_LOAD_QUERY_EVENT; } Log_event_type get_type_code() { return EXECUTE_LOAD_QUERY_EVENT; }
bool is_valid() const { return Query_log_event::is_valid() && file_id != 0; } bool is_valid() const { return Query_log_event::is_valid() && file_id != 0; }
@ -3908,7 +3907,7 @@ public:
{} {}
/* constructor for hopelessly corrupted events */ /* constructor for hopelessly corrupted events */
Unknown_log_event(): Log_event(), what(ENCRYPTED) {} Unknown_log_event(): Log_event(), what(ENCRYPTED) {}
~Unknown_log_event() {} ~Unknown_log_event() = default;
bool print(FILE* file, PRINT_EVENT_INFO* print_event_info); bool print(FILE* file, PRINT_EVENT_INFO* print_event_info);
Log_event_type get_type_code() { return UNKNOWN_EVENT;} Log_event_type get_type_code() { return UNKNOWN_EVENT;}
bool is_valid() const { return 1; } bool is_valid() const { return 1; }

View file

@ -406,7 +406,7 @@ public:
virtual bool needs_notification(const MDL_ticket *ticket) const = 0; virtual bool needs_notification(const MDL_ticket *ticket) const = 0;
virtual bool conflicting_locks(const MDL_ticket *ticket) const = 0; virtual bool conflicting_locks(const MDL_ticket *ticket) const = 0;
virtual bitmap_t hog_lock_types_bitmap() const = 0; virtual bitmap_t hog_lock_types_bitmap() const = 0;
virtual ~MDL_lock_strategy() {} virtual ~MDL_lock_strategy() = default;
}; };
@ -417,7 +417,7 @@ public:
*/ */
struct MDL_scoped_lock : public MDL_lock_strategy struct MDL_scoped_lock : public MDL_lock_strategy
{ {
MDL_scoped_lock() {} MDL_scoped_lock() = default;
virtual const bitmap_t *incompatible_granted_types_bitmap() const virtual const bitmap_t *incompatible_granted_types_bitmap() const
{ return m_granted_incompatible; } { return m_granted_incompatible; }
virtual const bitmap_t *incompatible_waiting_types_bitmap() const virtual const bitmap_t *incompatible_waiting_types_bitmap() const
@ -454,7 +454,7 @@ public:
*/ */
struct MDL_object_lock : public MDL_lock_strategy struct MDL_object_lock : public MDL_lock_strategy
{ {
MDL_object_lock() {} MDL_object_lock() = default;
virtual const bitmap_t *incompatible_granted_types_bitmap() const virtual const bitmap_t *incompatible_granted_types_bitmap() const
{ return m_granted_incompatible; } { return m_granted_incompatible; }
virtual const bitmap_t *incompatible_waiting_types_bitmap() const virtual const bitmap_t *incompatible_waiting_types_bitmap() const
@ -498,7 +498,7 @@ public:
struct MDL_backup_lock: public MDL_lock_strategy struct MDL_backup_lock: public MDL_lock_strategy
{ {
MDL_backup_lock() {} MDL_backup_lock() = default;
virtual const bitmap_t *incompatible_granted_types_bitmap() const virtual const bitmap_t *incompatible_granted_types_bitmap() const
{ return m_granted_incompatible; } { return m_granted_incompatible; }
virtual const bitmap_t *incompatible_waiting_types_bitmap() const virtual const bitmap_t *incompatible_waiting_types_bitmap() const
@ -1895,13 +1895,11 @@ bool MDL_lock::has_pending_conflicting_lock(enum_mdl_type type)
MDL_wait_for_graph_visitor::~MDL_wait_for_graph_visitor() MDL_wait_for_graph_visitor::~MDL_wait_for_graph_visitor()
{ = default;
}
MDL_wait_for_subgraph::~MDL_wait_for_subgraph() MDL_wait_for_subgraph::~MDL_wait_for_subgraph()
{ = default;
}
/** /**
Check if ticket represents metadata lock of "stronger" or equal type Check if ticket represents metadata lock of "stronger" or equal type

View file

@ -58,7 +58,7 @@ typedef unsigned short mdl_bitmap_t;
class MDL_context_owner class MDL_context_owner
{ {
public: public:
virtual ~MDL_context_owner() {} virtual ~MDL_context_owner() = default;
/** /**
Enter a condition wait. Enter a condition wait.
@ -469,7 +469,7 @@ public:
{ {
mdl_key_init(namespace_arg, db_arg, name_arg); mdl_key_init(namespace_arg, db_arg, name_arg);
} }
MDL_key() {} /* To use when part of MDL_request. */ MDL_key() = default; /* To use when part of MDL_request. */
/** /**
Get thread state name to be used in case when we have to Get thread state name to be used in case when we have to
@ -627,7 +627,7 @@ public:
virtual bool inspect_edge(MDL_context *dest) = 0; virtual bool inspect_edge(MDL_context *dest) = 0;
virtual ~MDL_wait_for_graph_visitor(); virtual ~MDL_wait_for_graph_visitor();
MDL_wait_for_graph_visitor() {} MDL_wait_for_graph_visitor() = default;
}; };
/** /**
@ -779,7 +779,7 @@ private:
class MDL_savepoint class MDL_savepoint
{ {
public: public:
MDL_savepoint() {}; MDL_savepoint() = default;;
private: private:
MDL_savepoint(MDL_ticket *stmt_ticket, MDL_ticket *trans_ticket) MDL_savepoint(MDL_ticket *stmt_ticket, MDL_ticket *trans_ticket)

View file

@ -204,7 +204,7 @@ class Mrr_reader
public: public:
virtual int get_next(range_id_t *range_info) = 0; virtual int get_next(range_id_t *range_info) = 0;
virtual int refill_buffer(bool initial) = 0; virtual int refill_buffer(bool initial) = 0;
virtual ~Mrr_reader() {}; /* just to remove compiler warning */ virtual ~Mrr_reader() = default; /* just to remove compiler warning */
}; };

View file

@ -92,7 +92,7 @@ public:
public: public:
/* This function will be called in the target thread */ /* This function will be called in the target thread */
virtual void call_in_target_thread()= 0; virtual void call_in_target_thread()= 0;
virtual ~Apc_call() {} virtual ~Apc_call() = default;
}; };
/* Make a call in the target thread (see function definition for details) */ /* Make a call in the target thread (see function definition for details) */

View file

@ -385,9 +385,7 @@ protected:
public: public:
virtual ~Json_writer_struct() virtual ~Json_writer_struct() = default;
{
}
bool trace_started() const bool trace_started() const
{ {

View file

@ -1217,8 +1217,7 @@ class Buffered_log : public Sql_alloc
public: public:
Buffered_log(enum loglevel level, const char *message); Buffered_log(enum loglevel level, const char *message);
~Buffered_log() ~Buffered_log() = default;
{}
void print(void); void print(void);
@ -1278,11 +1277,9 @@ void Buffered_log::print()
class Buffered_logs class Buffered_logs
{ {
public: public:
Buffered_logs() Buffered_logs() = default;
{}
~Buffered_logs() ~Buffered_logs() = default;
{}
void init(); void init();
void cleanup(); void cleanup();

View file

@ -2212,7 +2212,7 @@ public:
{ return (void*) alloc_root(mem_root, (uint) size); } { return (void*) alloc_root(mem_root, (uint) size); }
static void operator delete(void *ptr,size_t size) { TRASH_FREE(ptr, size); } static void operator delete(void *ptr,size_t size) { TRASH_FREE(ptr, size); }
static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ } static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ }
virtual ~TABLE_READ_PLAN() {} /* Remove gcc warning */ virtual ~TABLE_READ_PLAN() = default; /* Remove gcc warning */
/** /**
Add basic info for this TABLE_READ_PLAN to the optimizer trace. Add basic info for this TABLE_READ_PLAN to the optimizer trace.
@ -2247,7 +2247,7 @@ public:
TRP_RANGE(SEL_ARG *key_arg, uint idx_arg, uint mrr_flags_arg) TRP_RANGE(SEL_ARG *key_arg, uint idx_arg, uint mrr_flags_arg)
: key(key_arg), key_idx(idx_arg), mrr_flags(mrr_flags_arg) : key(key_arg), key_idx(idx_arg), mrr_flags(mrr_flags_arg)
{} {}
virtual ~TRP_RANGE() {} /* Remove gcc warning */ virtual ~TRP_RANGE() = default; /* Remove gcc warning */
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc) MEM_ROOT *parent_alloc)
@ -2294,8 +2294,8 @@ void TRP_RANGE::trace_basic_info(PARAM *param,
class TRP_ROR_INTERSECT : public TABLE_READ_PLAN class TRP_ROR_INTERSECT : public TABLE_READ_PLAN
{ {
public: public:
TRP_ROR_INTERSECT() {} /* Remove gcc warning */ TRP_ROR_INTERSECT() = default; /* Remove gcc warning */
virtual ~TRP_ROR_INTERSECT() {} /* Remove gcc warning */ virtual ~TRP_ROR_INTERSECT() = default; /* Remove gcc warning */
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc); MEM_ROOT *parent_alloc);
@ -2320,8 +2320,8 @@ public:
class TRP_ROR_UNION : public TABLE_READ_PLAN class TRP_ROR_UNION : public TABLE_READ_PLAN
{ {
public: public:
TRP_ROR_UNION() {} /* Remove gcc warning */ TRP_ROR_UNION() = default; /* Remove gcc warning */
virtual ~TRP_ROR_UNION() {} /* Remove gcc warning */ virtual ~TRP_ROR_UNION() = default; /* Remove gcc warning */
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc); MEM_ROOT *parent_alloc);
TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */ TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */
@ -2353,8 +2353,8 @@ void TRP_ROR_UNION::trace_basic_info(PARAM *param,
class TRP_INDEX_INTERSECT : public TABLE_READ_PLAN class TRP_INDEX_INTERSECT : public TABLE_READ_PLAN
{ {
public: public:
TRP_INDEX_INTERSECT() {} /* Remove gcc warning */ TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */
virtual ~TRP_INDEX_INTERSECT() {} /* Remove gcc warning */ virtual ~TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc); MEM_ROOT *parent_alloc);
TRP_RANGE **range_scans; /* array of ptrs to plans of intersected scans */ TRP_RANGE **range_scans; /* array of ptrs to plans of intersected scans */
@ -2390,8 +2390,8 @@ void TRP_INDEX_INTERSECT::trace_basic_info(PARAM *param,
class TRP_INDEX_MERGE : public TABLE_READ_PLAN class TRP_INDEX_MERGE : public TABLE_READ_PLAN
{ {
public: public:
TRP_INDEX_MERGE() {} /* Remove gcc warning */ TRP_INDEX_MERGE() = default; /* Remove gcc warning */
virtual ~TRP_INDEX_MERGE() {} /* Remove gcc warning */ virtual ~TRP_INDEX_MERGE() = default; /* Remove gcc warning */
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc); MEM_ROOT *parent_alloc);
TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */ TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */
@ -2459,7 +2459,7 @@ public:
if (key_infix_len) if (key_infix_len)
memcpy(this->key_infix, key_infix_arg, key_infix_len); memcpy(this->key_infix, key_infix_arg, key_infix_len);
} }
virtual ~TRP_GROUP_MIN_MAX() {} /* Remove gcc warning */ virtual ~TRP_GROUP_MIN_MAX() = default; /* Remove gcc warning */
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows, QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
MEM_ROOT *parent_alloc); MEM_ROOT *parent_alloc);
@ -9664,7 +9664,6 @@ tree_or(RANGE_OPT_PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2)
DBUG_RETURN(tree2); DBUG_RETURN(tree2);
SEL_TREE *result= NULL; SEL_TREE *result= NULL;
key_map result_keys;
key_map ored_keys; key_map ored_keys;
SEL_TREE *rtree[2]= {NULL,NULL}; SEL_TREE *rtree[2]= {NULL,NULL};
SEL_IMERGE *imerge[2]= {NULL, NULL}; SEL_IMERGE *imerge[2]= {NULL, NULL};

View file

@ -265,7 +265,7 @@ public:
enum { MAX_SEL_ARGS = 16000 }; enum { MAX_SEL_ARGS = 16000 };
SEL_ARG() {} SEL_ARG() = default;
SEL_ARG(SEL_ARG &); SEL_ARG(SEL_ARG &);
SEL_ARG(Field *,const uchar *, const uchar *); SEL_ARG(Field *,const uchar *, const uchar *);
SEL_ARG(Field *field, uint8 part, uchar *min_value, uchar *max_value, SEL_ARG(Field *field, uint8 part, uchar *min_value, uchar *max_value,
@ -871,7 +871,7 @@ public:
uint used_key_parts; uint used_key_parts;
QUICK_SELECT_I(); QUICK_SELECT_I();
virtual ~QUICK_SELECT_I(){}; virtual ~QUICK_SELECT_I() = default;;
/* /*
Do post-constructor initialization. Do post-constructor initialization.

View file

@ -218,7 +218,7 @@ class Dep_value : public Sql_alloc
{ {
public: public:
Dep_value(): bound(FALSE) {} Dep_value(): bound(FALSE) {}
virtual ~Dep_value(){} /* purecov: inspected */ /* stop compiler warnings */ virtual ~Dep_value() = default; /* purecov: inspected */
bool is_bound() { return bound; } bool is_bound() { return bound; }
void make_bound() { bound= TRUE; } void make_bound() { bound= TRUE; }
@ -342,7 +342,7 @@ const size_t Dep_value::iterator_size=
class Dep_module : public Sql_alloc class Dep_module : public Sql_alloc
{ {
public: public:
virtual ~Dep_module(){} /* purecov: inspected */ /* stop compiler warnings */ virtual ~Dep_module() = default; /* purecov: inspected */
/* Mark as bound. Currently is non-virtual and does nothing */ /* Mark as bound. Currently is non-virtual and does nothing */
void make_bound() {}; void make_bound() {};

View file

@ -55,8 +55,8 @@ struct File_option
class Unknown_key_hook class Unknown_key_hook
{ {
public: public:
Unknown_key_hook() {} /* Remove gcc warning */ Unknown_key_hook() = default; /* Remove gcc warning */
virtual ~Unknown_key_hook() {} /* Remove gcc warning */ virtual ~Unknown_key_hook() = default; /* Remove gcc warning */
virtual bool process_unknown_string(const char *&unknown_key, uchar* base, virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
MEM_ROOT *mem_root, const char *end)= 0; MEM_ROOT *mem_root, const char *end)= 0;
}; };
@ -67,7 +67,7 @@ public:
class File_parser_dummy_hook: public Unknown_key_hook class File_parser_dummy_hook: public Unknown_key_hook
{ {
public: public:
File_parser_dummy_hook() {} /* Remove gcc warning */ File_parser_dummy_hook() = default; /* Remove gcc warning */
virtual bool process_unknown_string(const char *&unknown_key, uchar* base, virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
MEM_ROOT *mem_root, const char *end); MEM_ROOT *mem_root, const char *end);
}; };

View file

@ -159,7 +159,7 @@ public:
empty(part_elem->empty), empty(part_elem->empty),
type(CONVENTIONAL) type(CONVENTIONAL)
{} {}
~partition_element() {} ~partition_element() = default;
part_column_list_val& get_col_val(uint idx) part_column_list_val& get_col_val(uint idx)
{ {

View file

@ -325,7 +325,7 @@ public:
part_field_list.empty(); part_field_list.empty();
subpart_field_list.empty(); subpart_field_list.empty();
} }
~partition_info() {} ~partition_info() = default;
partition_info *get_clone(THD *thd, bool empty_data_and_index_file= FALSE); partition_info *get_clone(THD *thd, bool empty_data_and_index_file= FALSE);
bool set_named_partition_bitmap(const char *part_name, size_t length); bool set_named_partition_bitmap(const char *part_name, size_t length);

View file

@ -80,7 +80,7 @@ protected:
public: public:
THD *thd; THD *thd;
Protocol(THD *thd_arg) { init(thd_arg); } Protocol(THD *thd_arg) { init(thd_arg); }
virtual ~Protocol() {} virtual ~Protocol() = default;
void init(THD* thd_arg); void init(THD* thd_arg);
enum { SEND_NUM_ROWS= 1, SEND_EOF= 2 }; enum { SEND_NUM_ROWS= 1, SEND_EOF= 2 };

View file

@ -195,7 +195,7 @@ public:
/* True if the container does not contain any element */ /* True if the container does not contain any element */
virtual bool is_empty() = 0; virtual bool is_empty() = 0;
virtual ~Rowid_filter_container() {} virtual ~Rowid_filter_container() = default;
}; };
@ -232,7 +232,7 @@ public:
*/ */
virtual bool check(char *elem) = 0; virtual bool check(char *elem) = 0;
virtual ~Rowid_filter() {} virtual ~Rowid_filter() = default;
bool is_empty() { return container->is_empty(); } bool is_empty() { return container->is_empty(); }

View file

@ -129,9 +129,7 @@ injector::transaction::binlog_pos injector::transaction::start_pos() const
*/ */
/* This constructor is called below */ /* This constructor is called below */
inline injector::injector() inline injector::injector() = default;
{
}
static injector *s_injector= 0; static injector *s_injector= 0;
injector *injector::instance() injector *injector::instance()

View file

@ -306,7 +306,7 @@ public:
private: private:
explicit injector(); explicit injector();
~injector() { } /* Nothing needs to be done */ ~injector() = default; /* Nothing needs to be done */
injector(injector const&); /* You're not allowed to copy injector injector(injector const&); /* You're not allowed to copy injector
instances. instances.
*/ */

View file

@ -45,7 +45,7 @@ class select_handler
select_handler(THD *thd_arg, handlerton *ht_arg) select_handler(THD *thd_arg, handlerton *ht_arg)
: thd(thd_arg), ht(ht_arg), table(0) {} : thd(thd_arg), ht(ht_arg), table(0) {}
virtual ~select_handler() {} virtual ~select_handler() = default;
/* /*
Functions to scan the select result set. Functions to scan the select result set.

View file

@ -454,7 +454,7 @@ class Repl_semi_sync_master
public: public:
Repl_semi_sync_master(); Repl_semi_sync_master();
~Repl_semi_sync_master() {} ~Repl_semi_sync_master() = default;
void cleanup(); void cleanup();

View file

@ -50,7 +50,7 @@ class Ack_receiver : public Repl_semi_sync_base
{ {
public: public:
Ack_receiver(); Ack_receiver();
~Ack_receiver() {} ~Ack_receiver() = default;
void cleanup(); void cleanup();
/** /**
Notify ack receiver to receive acks on the dump session. Notify ack receiver to receive acks on the dump session.

View file

@ -34,7 +34,7 @@ class Repl_semi_sync_slave
:public Repl_semi_sync_base { :public Repl_semi_sync_base {
public: public:
Repl_semi_sync_slave() :m_slave_enabled(false) {} Repl_semi_sync_slave() :m_slave_enabled(false) {}
~Repl_semi_sync_slave() {} ~Repl_semi_sync_slave() = default;
void set_trace_level(unsigned long trace_level) { void set_trace_level(unsigned long trace_level) {
m_trace_level = trace_level; m_trace_level = trace_level;

View file

@ -71,7 +71,7 @@ private:
bool m_changed; bool m_changed;
public: public:
virtual ~State_tracker() {} virtual ~State_tracker() = default;
/** Getters */ /** Getters */
bool is_enabled() const bool is_enabled() const

View file

@ -99,7 +99,7 @@ public:
on_check_function on_check_func, on_update_function on_update_func, on_check_function on_check_func, on_update_function on_update_func,
const char *substitute); const char *substitute);
virtual ~sys_var() {} virtual ~sys_var() = default;
/** /**
All the cleanup procedures should be performed here All the cleanup procedures should be performed here
@ -269,8 +269,8 @@ protected:
class set_var_base :public Sql_alloc class set_var_base :public Sql_alloc
{ {
public: public:
set_var_base() {} set_var_base() = default;
virtual ~set_var_base() {} virtual ~set_var_base() = default;
virtual int check(THD *thd)=0; /* To check privileges etc. */ virtual int check(THD *thd)=0; /* To check privileges etc. */
virtual int update(THD *thd)=0; /* To set the value */ virtual int update(THD *thd)=0; /* To set the value */
virtual int light_check(THD *thd) { return check(thd); } /* for PS */ virtual int light_check(THD *thd) { return check(thd); } /* for PS */

View file

@ -118,7 +118,7 @@ public: // TODO: make it private or protected
const; const;
public: public:
virtual ~Sp_handler() {} virtual ~Sp_handler() = default;
static const Sp_handler *handler(enum enum_sql_command cmd); static const Sp_handler *handler(enum enum_sql_command cmd);
static const Sp_handler *handler(stored_procedure_type type); static const Sp_handler *handler(stored_procedure_type type);
static const Sp_handler *handler(MDL_key::enum_mdl_namespace ns); static const Sp_handler *handler(MDL_key::enum_mdl_namespace ns);

View file

@ -116,8 +116,7 @@ public:
/** Create temporary sp_name object from MDL key. Store in qname_buff */ /** Create temporary sp_name object from MDL key. Store in qname_buff */
sp_name(const MDL_key *key, char *qname_buff); sp_name(const MDL_key *key, char *qname_buff);
~sp_name() ~sp_name() = default;
{}
}; };
@ -1286,8 +1285,7 @@ public:
m_query.length= 0; m_query.length= 0;
} }
virtual ~sp_instr_stmt() virtual ~sp_instr_stmt() = default;
{};
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1318,8 +1316,7 @@ public:
m_lex_keeper(lex, lex_resp) m_lex_keeper(lex, lex_resp)
{} {}
virtual ~sp_instr_set() virtual ~sp_instr_set() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1358,8 +1355,7 @@ public:
m_field_offset(field_offset) m_field_offset(field_offset)
{} {}
virtual ~sp_instr_set_row_field() virtual ~sp_instr_set_row_field() = default;
{}
virtual int exec_core(THD *thd, uint *nextp); virtual int exec_core(THD *thd, uint *nextp);
@ -1401,8 +1397,7 @@ public:
m_field_name(field_name) m_field_name(field_name)
{} {}
virtual ~sp_instr_set_row_field_by_name() virtual ~sp_instr_set_row_field_by_name() = default;
{}
virtual int exec_core(THD *thd, uint *nextp); virtual int exec_core(THD *thd, uint *nextp);
@ -1428,8 +1423,7 @@ public:
value(val), m_lex_keeper(lex, TRUE) value(val), m_lex_keeper(lex, TRUE)
{} {}
virtual ~sp_instr_set_trigger_field() virtual ~sp_instr_set_trigger_field() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1468,8 +1462,7 @@ public:
m_dest(dest), m_cont_dest(0), m_optdest(0), m_cont_optdest(0) m_dest(dest), m_cont_dest(0), m_optdest(0), m_cont_optdest(0)
{} {}
virtual ~sp_instr_opt_meta() virtual ~sp_instr_opt_meta() = default;
{}
virtual void set_destination(uint old_dest, uint new_dest) virtual void set_destination(uint old_dest, uint new_dest)
= 0; = 0;
@ -1498,8 +1491,7 @@ public:
: sp_instr_opt_meta(ip, ctx, dest) : sp_instr_opt_meta(ip, ctx, dest)
{} {}
virtual ~sp_instr_jump() virtual ~sp_instr_jump() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1547,8 +1539,7 @@ public:
m_lex_keeper(lex, TRUE) m_lex_keeper(lex, TRUE)
{} {}
virtual ~sp_instr_jump_if_not() virtual ~sp_instr_jump_if_not() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1592,8 +1583,7 @@ public:
: sp_instr(ip, ctx) : sp_instr(ip, ctx)
{} {}
virtual ~sp_instr_preturn() virtual ~sp_instr_preturn() = default;
{}
virtual int execute(THD *thd, uint *nextp) virtual int execute(THD *thd, uint *nextp)
{ {
@ -1629,8 +1619,7 @@ public:
m_lex_keeper(lex, TRUE) m_lex_keeper(lex, TRUE)
{} {}
virtual ~sp_instr_freturn() virtual ~sp_instr_freturn() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1729,8 +1718,7 @@ public:
: sp_instr(ip, ctx), m_count(count) : sp_instr(ip, ctx), m_count(count)
{} {}
virtual ~sp_instr_hpop() virtual ~sp_instr_hpop() = default;
{}
void update_count(uint count) void update_count(uint count)
{ {
@ -1760,8 +1748,7 @@ public:
m_frame(ctx->current_var_count()) m_frame(ctx->current_var_count())
{} {}
virtual ~sp_instr_hreturn() virtual ~sp_instr_hreturn() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1795,8 +1782,7 @@ public:
: sp_instr(ip, ctx), m_lex_keeper(lex, TRUE), m_cursor(offset) : sp_instr(ip, ctx), m_lex_keeper(lex, TRUE), m_cursor(offset)
{} {}
virtual ~sp_instr_cpush() virtual ~sp_instr_cpush() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1827,8 +1813,7 @@ public:
: sp_instr(ip, ctx), m_count(count) : sp_instr(ip, ctx), m_count(count)
{} {}
virtual ~sp_instr_cpop() virtual ~sp_instr_cpop() = default;
{}
void update_count(uint count) void update_count(uint count)
{ {
@ -1857,8 +1842,7 @@ public:
: sp_instr(ip, ctx), m_cursor(c) : sp_instr(ip, ctx), m_cursor(c)
{} {}
virtual ~sp_instr_copen() virtual ~sp_instr_copen() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1892,8 +1876,7 @@ public:
m_cursor(coffs), m_cursor(coffs),
m_var(voffs) m_var(voffs)
{} {}
virtual ~sp_instr_cursor_copy_struct() virtual ~sp_instr_cursor_copy_struct() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
virtual int exec_core(THD *thd, uint *nextp); virtual int exec_core(THD *thd, uint *nextp);
virtual void print(String *str); virtual void print(String *str);
@ -1911,8 +1894,7 @@ public:
: sp_instr(ip, ctx), m_cursor(c) : sp_instr(ip, ctx), m_cursor(c)
{} {}
virtual ~sp_instr_cclose() virtual ~sp_instr_cclose() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1938,8 +1920,7 @@ public:
m_varlist.empty(); m_varlist.empty();
} }
virtual ~sp_instr_cfetch() virtual ~sp_instr_cfetch() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1974,8 +1955,7 @@ public:
sp_instr_agg_cfetch(uint ip, sp_pcontext *ctx) sp_instr_agg_cfetch(uint ip, sp_pcontext *ctx)
: sp_instr(ip, ctx){} : sp_instr(ip, ctx){}
virtual ~sp_instr_agg_cfetch() virtual ~sp_instr_agg_cfetch() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -1996,8 +1976,7 @@ public:
: sp_instr(ip, ctx), m_errcode(errcode) : sp_instr(ip, ctx), m_errcode(errcode)
{} {}
virtual ~sp_instr_error() virtual ~sp_instr_error() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);
@ -2027,8 +2006,7 @@ public:
m_lex_keeper(lex, TRUE) m_lex_keeper(lex, TRUE)
{} {}
virtual ~sp_instr_set_case_expr() virtual ~sp_instr_set_case_expr() = default;
{}
virtual int execute(THD *thd, uint *nextp); virtual int execute(THD *thd, uint *nextp);

View file

@ -214,8 +214,8 @@ struct Geometry_buffer;
class Geometry class Geometry
{ {
public: public:
Geometry() {} /* Remove gcc warning */ Geometry() = default; /* Remove gcc warning */
virtual ~Geometry() {} /* Remove gcc warning */ virtual ~Geometry() = default; /* Remove gcc warning */
static void *operator new(size_t size, void *buffer) static void *operator new(size_t size, void *buffer)
{ {
return buffer; return buffer;
@ -396,8 +396,8 @@ protected:
class Gis_point: public Geometry class Gis_point: public Geometry
{ {
public: public:
Gis_point() {} /* Remove gcc warning */ Gis_point() = default; /* Remove gcc warning */
virtual ~Gis_point() {} /* Remove gcc warning */ virtual ~Gis_point() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
@ -466,8 +466,8 @@ public:
class Gis_line_string: public Geometry class Gis_line_string: public Geometry
{ {
public: public:
Gis_line_string() {} /* Remove gcc warning */ Gis_line_string() = default; /* Remove gcc warning */
virtual ~Gis_line_string() {} /* Remove gcc warning */ virtual ~Gis_line_string() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
@ -499,8 +499,8 @@ public:
class Gis_polygon: public Geometry class Gis_polygon: public Geometry
{ {
public: public:
Gis_polygon() {} /* Remove gcc warning */ Gis_polygon() = default; /* Remove gcc warning */
virtual ~Gis_polygon() {} /* Remove gcc warning */ virtual ~Gis_polygon() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
@ -536,8 +536,8 @@ class Gis_multi_point: public Geometry
(uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) / (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
(WKB_HEADER_SIZE + POINT_DATA_SIZE); (WKB_HEADER_SIZE + POINT_DATA_SIZE);
public: public:
Gis_multi_point() {} /* Remove gcc warning */ Gis_multi_point() = default; /* Remove gcc warning */
virtual ~Gis_multi_point() {} /* Remove gcc warning */ virtual ~Gis_multi_point() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
@ -567,8 +567,8 @@ public:
class Gis_multi_line_string: public Geometry class Gis_multi_line_string: public Geometry
{ {
public: public:
Gis_multi_line_string() {} /* Remove gcc warning */ Gis_multi_line_string() = default; /* Remove gcc warning */
virtual ~Gis_multi_line_string() {} /* Remove gcc warning */ virtual ~Gis_multi_line_string() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
@ -598,8 +598,8 @@ public:
class Gis_multi_polygon: public Geometry class Gis_multi_polygon: public Geometry
{ {
public: public:
Gis_multi_polygon() {} /* Remove gcc warning */ Gis_multi_polygon() = default; /* Remove gcc warning */
virtual ~Gis_multi_polygon() {} /* Remove gcc warning */ virtual ~Gis_multi_polygon() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
@ -629,8 +629,8 @@ public:
class Gis_geometry_collection: public Geometry class Gis_geometry_collection: public Geometry
{ {
public: public:
Gis_geometry_collection() {} /* Remove gcc warning */ Gis_geometry_collection() = default; /* Remove gcc warning */
virtual ~Gis_geometry_collection() {} /* Remove gcc warning */ virtual ~Gis_geometry_collection() = default; /* Remove gcc warning */
uint32 get_data_size() const; uint32 get_data_size() const;
bool init_from_wkt(Gis_read_stream *trs, String *wkb); bool init_from_wkt(Gis_read_stream *trs, String *wkb);
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);

View file

@ -191,7 +191,7 @@ class ACL_USER :public ACL_USER_BASE,
{ {
public: public:
ACL_USER() { } ACL_USER() = default;
ACL_USER(THD *thd, const LEX_USER &combo, ACL_USER(THD *thd, const LEX_USER &combo,
const Account_options &options, const Account_options &options,
const ulong privileges); const ulong privileges);
@ -328,7 +328,7 @@ class ACL_PROXY_USER :public ACL_ACCESS
MYSQL_PROXIES_PRIV_GRANTOR, MYSQL_PROXIES_PRIV_GRANTOR,
MYSQL_PROXIES_PRIV_TIMESTAMP } proxy_table_fields; MYSQL_PROXIES_PRIV_TIMESTAMP } proxy_table_fields;
public: public:
ACL_PROXY_USER () {}; ACL_PROXY_USER () = default;
void init(const char *host_arg, const char *user_arg, void init(const char *host_arg, const char *user_arg,
const char *proxied_host_arg, const char *proxied_user_arg, const char *proxied_host_arg, const char *proxied_user_arg,
@ -919,7 +919,7 @@ class User_table: public Grant_table_base
virtual longlong get_password_lifetime () const = 0; virtual longlong get_password_lifetime () const = 0;
virtual int set_password_lifetime (longlong x) const = 0; virtual int set_password_lifetime (longlong x) const = 0;
virtual ~User_table() {} virtual ~User_table() = default;
private: private:
friend class Grant_tables; friend class Grant_tables;
virtual int setup_sysvars() const = 0; virtual int setup_sysvars() const = 0;
@ -1250,7 +1250,7 @@ class User_table_tabular: public User_table
return 1; return 1;
} }
virtual ~User_table_tabular() {} virtual ~User_table_tabular() = default;
private: private:
friend class Grant_tables; friend class Grant_tables;
@ -1566,7 +1566,7 @@ class User_table_json: public User_table
int set_password_expired (bool x) const int set_password_expired (bool x) const
{ return x ? set_password_last_changed(0) : 0; } { return x ? set_password_last_changed(0) : 0; }
~User_table_json() {} ~User_table_json() = default;
private: private:
friend class Grant_tables; friend class Grant_tables;
static const uint JSON_SIZE=1024; static const uint JSON_SIZE=1024;
@ -5181,7 +5181,7 @@ public:
GRANT_NAME(const char *h, const char *d,const char *u, GRANT_NAME(const char *h, const char *d,const char *u,
const char *t, ulong p, bool is_routine); const char *t, ulong p, bool is_routine);
GRANT_NAME (TABLE *form, bool is_routine); GRANT_NAME (TABLE *form, bool is_routine);
virtual ~GRANT_NAME() {}; virtual ~GRANT_NAME() = default;
virtual bool ok() { return privs != 0; } virtual bool ok() { return privs != 0; }
void set_user_details(const char *h, const char *d, void set_user_details(const char *h, const char *d,
const char *u, const char *t, const char *u, const char *t,
@ -11446,8 +11446,7 @@ public:
: is_grave(FALSE) : is_grave(FALSE)
{} {}
virtual ~Silence_routine_definer_errors() virtual ~Silence_routine_definer_errors() = default;
{}
virtual bool handle_condition(THD *thd, virtual bool handle_condition(THD *thd,
uint sql_errno, uint sql_errno,

View file

@ -321,11 +321,9 @@ enum ACL_internal_access_result
class ACL_internal_table_access class ACL_internal_table_access
{ {
public: public:
ACL_internal_table_access() ACL_internal_table_access() = default;
{}
virtual ~ACL_internal_table_access() virtual ~ACL_internal_table_access() = default;
{}
/** /**
Check access to an internal table. Check access to an internal table.
@ -360,11 +358,9 @@ public:
class ACL_internal_schema_access class ACL_internal_schema_access
{ {
public: public:
ACL_internal_schema_access() ACL_internal_schema_access() = default;
{}
virtual ~ACL_internal_schema_access() virtual ~ACL_internal_schema_access() = default;
{}
/** /**
Check access to an internal schema. Check access to an internal schema.

View file

@ -34,11 +34,9 @@ public:
/** /**
Constructor, used to represent a ANALYZE TABLE statement. Constructor, used to represent a ANALYZE TABLE statement.
*/ */
Sql_cmd_analyze_table() Sql_cmd_analyze_table() = default;
{}
~Sql_cmd_analyze_table() ~Sql_cmd_analyze_table() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -59,11 +57,9 @@ public:
/** /**
Constructor, used to represent a CHECK TABLE statement. Constructor, used to represent a CHECK TABLE statement.
*/ */
Sql_cmd_check_table() Sql_cmd_check_table() = default;
{}
~Sql_cmd_check_table() ~Sql_cmd_check_table() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -83,11 +79,9 @@ public:
/** /**
Constructor, used to represent a OPTIMIZE TABLE statement. Constructor, used to represent a OPTIMIZE TABLE statement.
*/ */
Sql_cmd_optimize_table() Sql_cmd_optimize_table() = default;
{}
~Sql_cmd_optimize_table() ~Sql_cmd_optimize_table() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -108,11 +102,9 @@ public:
/** /**
Constructor, used to represent a REPAIR TABLE statement. Constructor, used to represent a REPAIR TABLE statement.
*/ */
Sql_cmd_repair_table() Sql_cmd_repair_table() = default;
{}
~Sql_cmd_repair_table() ~Sql_cmd_repair_table() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);

View file

@ -355,11 +355,9 @@ protected:
/** /**
Constructor. Constructor.
*/ */
Sql_cmd_common_alter_table() Sql_cmd_common_alter_table() = default;
{}
virtual ~Sql_cmd_common_alter_table() virtual ~Sql_cmd_common_alter_table() = default;
{}
virtual enum_sql_command sql_command_code() const virtual enum_sql_command sql_command_code() const
{ {
@ -378,11 +376,9 @@ public:
/** /**
Constructor, used to represent a ALTER TABLE statement. Constructor, used to represent a ALTER TABLE statement.
*/ */
Sql_cmd_alter_table() Sql_cmd_alter_table() = default;
{}
~Sql_cmd_alter_table() ~Sql_cmd_alter_table() = default;
{}
Storage_engine_name *option_storage_engine_name() { return this; } Storage_engine_name *option_storage_engine_name() { return this; }
@ -404,8 +400,7 @@ public:
:DDL_options(options) :DDL_options(options)
{} {}
~Sql_cmd_alter_sequence() ~Sql_cmd_alter_sequence() = default;
{}
enum_sql_command sql_command_code() const enum_sql_command sql_command_code() const
{ {

View file

@ -1491,7 +1491,7 @@ public:
: m_ot_ctx(ot_ctx_arg), m_is_active(FALSE) : m_ot_ctx(ot_ctx_arg), m_is_active(FALSE)
{} {}
virtual ~MDL_deadlock_handler() {} virtual ~MDL_deadlock_handler() = default;
virtual bool handle_condition(THD *thd, virtual bool handle_condition(THD *thd,
uint sql_errno, uint sql_errno,

View file

@ -388,7 +388,7 @@ inline bool setup_fields_with_no_wrap(THD *thd, Ref_ptr_array ref_pointer_array,
class Prelocking_strategy class Prelocking_strategy
{ {
public: public:
virtual ~Prelocking_strategy() { } virtual ~Prelocking_strategy() = default;
virtual void reset(THD *thd) { }; virtual void reset(THD *thd) { };
virtual bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx, virtual bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,

View file

@ -99,7 +99,7 @@ public:
or to call set_all()/clear_all()/set_prefix() or to call set_all()/clear_all()/set_prefix()
to initialize bitmap. to initialize bitmap.
*/ */
Bitmap() { } Bitmap() = default;
explicit Bitmap(uint prefix) explicit Bitmap(uint prefix)
{ {

View file

@ -91,7 +91,7 @@ typedef my_bool (*qc_engine_callback)(THD *thd, const char *table_key,
*/ */
struct Query_cache_block_table struct Query_cache_block_table
{ {
Query_cache_block_table() {} /* Remove gcc warning */ Query_cache_block_table() = default; /* Remove gcc warning */
/** /**
This node holds a position in a static table list belonging This node holds a position in a static table list belonging
@ -122,7 +122,7 @@ struct Query_cache_block_table
struct Query_cache_block struct Query_cache_block
{ {
Query_cache_block() {} /* Remove gcc warning */ Query_cache_block() = default; /* Remove gcc warning */
enum block_type {FREE, QUERY, RESULT, RES_CONT, RES_BEG, enum block_type {FREE, QUERY, RESULT, RES_CONT, RES_BEG,
RES_INCOMPLETE, TABLE, INCOMPLETE}; RES_INCOMPLETE, TABLE, INCOMPLETE};
@ -161,7 +161,7 @@ struct Query_cache_query
uint8 ready; uint8 ready;
ulonglong hit_count; ulonglong hit_count;
Query_cache_query() {} /* Remove gcc warning */ Query_cache_query() = default; /* Remove gcc warning */
inline void init_n_lock(); inline void init_n_lock();
void unlock_n_destroy(); void unlock_n_destroy();
inline ulonglong found_rows() { return limit_found_rows; } inline ulonglong found_rows() { return limit_found_rows; }
@ -197,7 +197,7 @@ struct Query_cache_query
struct Query_cache_table struct Query_cache_table
{ {
Query_cache_table() {} /* Remove gcc warning */ Query_cache_table() = default; /* Remove gcc warning */
char *tbl; char *tbl;
uint32 key_len; uint32 key_len;
uint8 suffix_len; /* For partitioned tables */ uint8 suffix_len; /* For partitioned tables */
@ -240,7 +240,7 @@ struct Query_cache_table
struct Query_cache_result struct Query_cache_result
{ {
Query_cache_result() {} /* Remove gcc warning */ Query_cache_result() = default; /* Remove gcc warning */
Query_cache_block *query; Query_cache_block *query;
inline uchar* data() inline uchar* data()
@ -266,7 +266,7 @@ extern "C" void query_cache_invalidate_by_MyISAM_filename(const char* filename);
struct Query_cache_memory_bin struct Query_cache_memory_bin
{ {
Query_cache_memory_bin() {} /* Remove gcc warning */ Query_cache_memory_bin() = default; /* Remove gcc warning */
#ifndef DBUG_OFF #ifndef DBUG_OFF
size_t size; size_t size;
#endif #endif
@ -285,7 +285,7 @@ struct Query_cache_memory_bin
struct Query_cache_memory_bin_step struct Query_cache_memory_bin_step
{ {
Query_cache_memory_bin_step() {} /* Remove gcc warning */ Query_cache_memory_bin_step() = default; /* Remove gcc warning */
size_t size; size_t size;
size_t increment; size_t increment;
size_t idx; size_t idx;

View file

@ -4072,9 +4072,7 @@ void THD::restore_active_arena(Query_arena *set, Query_arena *backup)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
Statement::~Statement() Statement::~Statement() = default;
{
}
C_MODE_START C_MODE_START

View file

@ -396,7 +396,7 @@ public:
invisible(false) invisible(false)
{} {}
Key(const Key &rhs, MEM_ROOT *mem_root); Key(const Key &rhs, MEM_ROOT *mem_root);
virtual ~Key() {} virtual ~Key() = default;
/* Equality comparison of keys (ignoring name) */ /* Equality comparison of keys (ignoring name) */
friend bool foreign_key_prefix(Key *a, Key *b); friend bool foreign_key_prefix(Key *a, Key *b);
/** /**
@ -1096,7 +1096,7 @@ public:
Query_arena() { INIT_ARENA_DBUG_INFO; } Query_arena() { INIT_ARENA_DBUG_INFO; }
virtual Type type() const; virtual Type type() const;
virtual ~Query_arena() {}; virtual ~Query_arena() = default;
inline bool is_stmt_prepare() const { return state == STMT_INITIALIZED; } inline bool is_stmt_prepare() const { return state == STMT_INITIALIZED; }
inline bool is_stmt_prepare_or_first_sp_execute() const inline bool is_stmt_prepare_or_first_sp_execute() const
@ -1147,7 +1147,7 @@ public:
Query_arena_memroot() : Query_arena() Query_arena_memroot() : Query_arena()
{} {}
virtual ~Query_arena_memroot() {} virtual ~Query_arena_memroot() = default;
}; };
@ -1263,7 +1263,7 @@ public:
my_bool query_cache_is_applicable; my_bool query_cache_is_applicable;
/* This constructor is called for backup statements */ /* This constructor is called for backup statements */
Statement() {} Statement() = default;
Statement(LEX *lex_arg, MEM_ROOT *mem_root_arg, Statement(LEX *lex_arg, MEM_ROOT *mem_root_arg,
enum enum_state state_arg, ulong id_arg); enum enum_state state_arg, ulong id_arg);
@ -1349,7 +1349,7 @@ struct st_savepoint {
class Security_context { class Security_context {
public: public:
Security_context() {} /* Remove gcc warning */ Security_context() = default; /* Remove gcc warning */
/* /*
host - host of the client host - host of the client
user - user of the client, set to NULL until the user has been read from user - user of the client, set to NULL until the user has been read from
@ -1768,7 +1768,7 @@ protected:
m_prev_internal_handler(NULL) m_prev_internal_handler(NULL)
{} {}
virtual ~Internal_error_handler() {} virtual ~Internal_error_handler() = default;
public: public:
/** /**
@ -1826,7 +1826,7 @@ public:
/* Ignore error */ /* Ignore error */
return TRUE; return TRUE;
} }
Dummy_error_handler() {} /* Remove gcc warning */ Dummy_error_handler() = default; /* Remove gcc warning */
}; };
@ -1863,7 +1863,7 @@ public:
class Drop_table_error_handler : public Internal_error_handler class Drop_table_error_handler : public Internal_error_handler
{ {
public: public:
Drop_table_error_handler() {} Drop_table_error_handler() = default;
public: public:
bool handle_condition(THD *thd, bool handle_condition(THD *thd,
@ -5232,7 +5232,7 @@ public:
example for a duplicate row entry written to a temp table. example for a duplicate row entry written to a temp table.
*/ */
virtual int send_data(List<Item> &items)=0; virtual int send_data(List<Item> &items)=0;
virtual ~select_result_sink() {}; virtual ~select_result_sink() = default;
void reset(THD *thd_arg) { thd= thd_arg; } void reset(THD *thd_arg) { thd= thd_arg; }
}; };
@ -5264,7 +5264,7 @@ public:
ha_rows est_records; /* estimated number of records in the result */ ha_rows est_records; /* estimated number of records in the result */
select_result(THD *thd_arg): select_result_sink(thd_arg), est_records(0) {} select_result(THD *thd_arg): select_result_sink(thd_arg), est_records(0) {}
void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; } void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; }
virtual ~select_result() {}; virtual ~select_result() = default;
/** /**
Change wrapped select_result. Change wrapped select_result.
@ -6313,7 +6313,7 @@ class user_var_entry
{ {
CHARSET_INFO *m_charset; CHARSET_INFO *m_charset;
public: public:
user_var_entry() {} /* Remove gcc warning */ user_var_entry() = default; /* Remove gcc warning */
LEX_CSTRING name; LEX_CSTRING name;
char *value; char *value;
size_t length; size_t length;
@ -6434,7 +6434,7 @@ public:
enum type { SESSION_VAR, LOCAL_VAR, PARAM_VAR }; enum type { SESSION_VAR, LOCAL_VAR, PARAM_VAR };
type scope; type scope;
my_var(const LEX_CSTRING *j, enum type s) : name(*j), scope(s) { } my_var(const LEX_CSTRING *j, enum type s) : name(*j), scope(s) { }
virtual ~my_var() {} virtual ~my_var() = default;
virtual bool set(THD *thd, Item *val) = 0; virtual bool set(THD *thd, Item *val) = 0;
virtual my_var_sp *get_my_var_sp() { return NULL; } virtual my_var_sp *get_my_var_sp() { return NULL; }
}; };
@ -6455,7 +6455,7 @@ public:
: my_var(j, LOCAL_VAR), : my_var(j, LOCAL_VAR),
m_rcontext_handler(rcontext_handler), m_rcontext_handler(rcontext_handler),
m_type_handler(type_handler), offset(o), sp(s) { } m_type_handler(type_handler), offset(o), sp(s) { }
~my_var_sp() { } ~my_var_sp() = default;
bool set(THD *thd, Item *val); bool set(THD *thd, Item *val);
my_var_sp *get_my_var_sp() { return this; } my_var_sp *get_my_var_sp() { return this; }
const Type_handler *type_handler() const { return m_type_handler; } const Type_handler *type_handler() const { return m_type_handler; }
@ -6484,7 +6484,7 @@ class my_var_user: public my_var {
public: public:
my_var_user(const LEX_CSTRING *j) my_var_user(const LEX_CSTRING *j)
: my_var(j, SESSION_VAR) { } : my_var(j, SESSION_VAR) { }
~my_var_user() { } ~my_var_user() = default;
bool set(THD *thd, Item *val); bool set(THD *thd, Item *val);
}; };
@ -6497,7 +6497,7 @@ public:
select_dumpvar(THD *thd_arg) select_dumpvar(THD *thd_arg)
:select_result_interceptor(thd_arg), row_count(0), m_var_sp_row(NULL) :select_result_interceptor(thd_arg), row_count(0), m_var_sp_row(NULL)
{ var_list.empty(); } { var_list.empty(); }
~select_dumpvar() {} ~select_dumpvar() = default;
int prepare(List<Item> &list, SELECT_LEX_UNIT *u); int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
int send_data(List<Item> &items); int send_data(List<Item> &items);
bool send_eof(); bool send_eof();

View file

@ -193,8 +193,7 @@ public:
} }
protected: protected:
Sql_cmd() Sql_cmd() = default;
{}
virtual ~Sql_cmd() virtual ~Sql_cmd()
{ {
@ -242,8 +241,7 @@ public:
m_handler(handler) m_handler(handler)
{} {}
virtual ~Sql_cmd_call() virtual ~Sql_cmd_call() = default;
{}
/** /**
Execute a CALL statement at runtime. Execute a CALL statement at runtime.

View file

@ -30,12 +30,12 @@ class SQL_CRYPT :public Sql_alloc
char decode_buff[256],encode_buff[256]; char decode_buff[256],encode_buff[256];
uint shift; uint shift;
public: public:
SQL_CRYPT() {} SQL_CRYPT() = default;
SQL_CRYPT(ulong *seed) SQL_CRYPT(ulong *seed)
{ {
init(seed); init(seed);
} }
~SQL_CRYPT() {} ~SQL_CRYPT() = default;
void init(ulong *seed); void init(ulong *seed);
void reinit() { shift=0; rand=org_rand; } void reinit() { shift=0; rand=org_rand; }
void encode(char *str, uint length); void encode(char *str, uint length);

View file

@ -197,9 +197,7 @@ end:
Server_side_cursor Server_side_cursor
****************************************************************************/ ****************************************************************************/
Server_side_cursor::~Server_side_cursor() Server_side_cursor::~Server_side_cursor() = default;
{
}
void Server_side_cursor::operator delete(void *ptr, size_t size) void Server_side_cursor::operator delete(void *ptr, size_t size)

View file

@ -22,7 +22,7 @@
class Debug_key: public String class Debug_key: public String
{ {
public: public:
Debug_key() { }; Debug_key() = default;
void print(THD *thd) const void print(THD *thd) const
{ {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,

View file

@ -245,8 +245,7 @@ class Sql_condition_identity: public Sql_state_errno_level,
public Sql_user_condition_identity public Sql_user_condition_identity
{ {
public: public:
Sql_condition_identity() Sql_condition_identity() = default;
{ }
Sql_condition_identity(const Sql_state_errno_level &st, Sql_condition_identity(const Sql_state_errno_level &st,
const Sql_user_condition_identity &ucid) const Sql_user_condition_identity &ucid)
:Sql_state_errno_level(st), :Sql_state_errno_level(st),
@ -447,8 +446,7 @@ private:
} }
/** Destructor. */ /** Destructor. */
~Sql_condition() ~Sql_condition() = default;
{}
/** /**
Copy optional condition items attributes. Copy optional condition items attributes.
@ -863,8 +861,8 @@ public:
class ErrConv: public ErrBuff class ErrConv: public ErrBuff
{ {
public: public:
ErrConv() {} ErrConv() = default;
virtual ~ErrConv() {} virtual ~ErrConv() = default;
virtual const char *ptr() const = 0; virtual const char *ptr() const = 0;
}; };

View file

@ -143,7 +143,7 @@ public:
void print_explain_json_for_children(Explain_query *query, void print_explain_json_for_children(Explain_query *query,
Json_writer *writer, bool is_analyze); Json_writer *writer, bool is_analyze);
bool print_explain_json_cache(Json_writer *writer, bool is_analyze); bool print_explain_json_cache(Json_writer *writer, bool is_analyze);
virtual ~Explain_node(){} virtual ~Explain_node() = default;
}; };
@ -290,7 +290,7 @@ class Explain_aggr_node : public Sql_alloc
{ {
public: public:
virtual enum_explain_aggr_node_type get_type()= 0; virtual enum_explain_aggr_node_type get_type()= 0;
virtual ~Explain_aggr_node() {} virtual ~Explain_aggr_node() = default;
Explain_aggr_node *child; Explain_aggr_node *child;
}; };

View file

@ -36,8 +36,8 @@ class Expression_cache :public Sql_alloc
public: public:
enum result {ERROR, HIT, MISS}; enum result {ERROR, HIT, MISS};
Expression_cache(){}; Expression_cache()= default;
virtual ~Expression_cache() {}; virtual ~Expression_cache() = default;
/** /**
Shall check the presence of expression value in the cache for a given Shall check the presence of expression value in the cache for a given
set of values of the expression parameters. Return the result of the set of values of the expression parameters. Return the result of the

View file

@ -675,7 +675,7 @@ public:
THD *thd(); THD *thd();
virtual ~JOIN_CACHE() {} virtual ~JOIN_CACHE() = default;
void reset_join(JOIN *j) { join= j; } void reset_join(JOIN *j) { join= j; }
void free() void free()
{ {
@ -1072,7 +1072,7 @@ public:
cache= join_tab->cache; cache= join_tab->cache;
} }
virtual ~JOIN_TAB_SCAN() {} virtual ~JOIN_TAB_SCAN() = default;
/* /*
Shall calculate the increment of the auxiliary buffer for a record Shall calculate the increment of the auxiliary buffer for a record

View file

@ -1705,8 +1705,8 @@ public:
These constructor and destructor serve for creation/destruction These constructor and destructor serve for creation/destruction
of Query_tables_list instances which are used as backup storage. of Query_tables_list instances which are used as backup storage.
*/ */
Query_tables_list() {} Query_tables_list() = default;
~Query_tables_list() {} ~Query_tables_list() = default;
/* Initializes (or resets) Query_tables_list object for "real" use. */ /* Initializes (or resets) Query_tables_list object for "real" use. */
void reset_query_tables_list(bool init); void reset_query_tables_list(bool init);
@ -2364,13 +2364,9 @@ class Lex_input_stream
const char *str, const char *end, int sep); const char *str, const char *end, int sep);
my_charset_conv_wc_mb get_escape_func(THD *thd, my_wc_t sep) const; my_charset_conv_wc_mb get_escape_func(THD *thd, my_wc_t sep) const;
public: public:
Lex_input_stream() Lex_input_stream() = default;
{
}
~Lex_input_stream() ~Lex_input_stream() = default;
{
}
/** /**
Object initializer. Must be called before usage. Object initializer. Must be called before usage.
@ -2962,7 +2958,7 @@ public:
protected: protected:
bool save_explain_data_intern(MEM_ROOT *mem_root, Explain_update *eu, bool is_analyze); bool save_explain_data_intern(MEM_ROOT *mem_root, Explain_update *eu, bool is_analyze);
public: public:
virtual ~Update_plan() {} virtual ~Update_plan() = default;
Update_plan(MEM_ROOT *mem_root_arg) : Update_plan(MEM_ROOT *mem_root_arg) :
impossible_where(false), no_partitions(false), impossible_where(false), no_partitions(false),
@ -3016,7 +3012,7 @@ enum password_exp_type
struct Account_options: public USER_RESOURCES struct Account_options: public USER_RESOURCES
{ {
Account_options() { } Account_options() = default;
void reset() void reset()
{ {
@ -4653,14 +4649,13 @@ class Set_signal_information
{ {
public: public:
/** Empty default constructor, use clear() */ /** Empty default constructor, use clear() */
Set_signal_information() {} Set_signal_information() = default;
/** Copy constructor. */ /** Copy constructor. */
Set_signal_information(const Set_signal_information& set); Set_signal_information(const Set_signal_information& set);
/** Destructor. */ /** Destructor. */
~Set_signal_information() ~Set_signal_information() = default;
{}
/** Clear all items. */ /** Clear all items. */
void clear(); void clear();
@ -4783,8 +4778,7 @@ public:
return m_lip.init(thd, buff, length); return m_lip.init(thd, buff, length);
} }
~Parser_state() ~Parser_state() = default;
{}
Lex_input_stream m_lip; Lex_input_stream m_lip;
Yacc_state m_yacc; Yacc_state m_yacc;

View file

@ -138,7 +138,7 @@ public:
virtual void remove_unused_space(uchar **unused_start, uchar **unused_end)=0; virtual void remove_unused_space(uchar **unused_start, uchar **unused_end)=0;
virtual uchar *used_area() = 0; virtual uchar *used_area() = 0;
virtual ~Lifo_buffer() {}; virtual ~Lifo_buffer() = default;
}; };

View file

@ -127,8 +127,7 @@ public:
: Sql_cmd_common_alter_table() : Sql_cmd_common_alter_table()
{} {}
~Sql_cmd_alter_table_exchange_partition() ~Sql_cmd_alter_table_exchange_partition() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -150,8 +149,7 @@ public:
: Sql_cmd_analyze_table() : Sql_cmd_analyze_table()
{} {}
~Sql_cmd_alter_table_analyze_partition() ~Sql_cmd_alter_table_analyze_partition() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -176,8 +174,7 @@ public:
: Sql_cmd_check_table() : Sql_cmd_check_table()
{} {}
~Sql_cmd_alter_table_check_partition() ~Sql_cmd_alter_table_check_partition() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -202,8 +199,7 @@ public:
: Sql_cmd_optimize_table() : Sql_cmd_optimize_table()
{} {}
~Sql_cmd_alter_table_optimize_partition() ~Sql_cmd_alter_table_optimize_partition() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -228,8 +224,7 @@ public:
: Sql_cmd_repair_table() : Sql_cmd_repair_table()
{} {}
~Sql_cmd_alter_table_repair_partition() ~Sql_cmd_alter_table_repair_partition() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);
@ -250,11 +245,9 @@ public:
/** /**
Constructor, used to represent a ALTER TABLE TRUNCATE PARTITION statement. Constructor, used to represent a ALTER TABLE TRUNCATE PARTITION statement.
*/ */
Sql_cmd_alter_table_truncate_partition() Sql_cmd_alter_table_truncate_partition() = default;
{}
virtual ~Sql_cmd_alter_table_truncate_partition() virtual ~Sql_cmd_alter_table_truncate_partition() = default;
{}
bool execute(THD *thd); bool execute(THD *thd);

View file

@ -3922,9 +3922,7 @@ Reprepare_observer::report_error(THD *thd)
* Server_runnable * Server_runnable
*******************************************************************/ *******************************************************************/
Server_runnable::~Server_runnable() Server_runnable::~Server_runnable() = default;
{
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View file

@ -125,7 +125,7 @@ public:
MEM_ROOT *mem_root_arg); MEM_ROOT *mem_root_arg);
/** We don't call member destructors, they all are POD types. */ /** We don't call member destructors, they all are POD types. */
~Ed_result_set() {} ~Ed_result_set() = default;
size_t get_field_count() const { return m_column_count; } size_t get_field_count() const { return m_column_count; }

View file

@ -26,7 +26,7 @@ public:
Schema(const LEX_CSTRING &name) Schema(const LEX_CSTRING &name)
:m_name(name) :m_name(name)
{ } { }
virtual ~Schema() { } virtual ~Schema() = default;
const LEX_CSTRING &name() const { return m_name; } const LEX_CSTRING &name() const { return m_name; }
virtual const Type_handler *map_data_type(THD *thd, const Type_handler *src) virtual const Type_handler *map_data_type(THD *thd, const Type_handler *src)
const const

View file

@ -728,7 +728,7 @@ public:
virtual void mark_used() = 0; virtual void mark_used() = 0;
virtual ~Semi_join_strategy_picker() {} virtual ~Semi_join_strategy_picker() = default;
}; };
@ -1918,7 +1918,7 @@ public:
null_ptr(arg.null_ptr), err(arg.err) null_ptr(arg.null_ptr), err(arg.err)
{} {}
virtual ~store_key() {} /** Not actually needed */ virtual ~store_key() = default; /** Not actually needed */
virtual enum Type type() const=0; virtual enum Type type() const=0;
virtual const char *name() const=0; virtual const char *name() const=0;
virtual bool store_key_is_const() { return false; } virtual bool store_key_is_const() { return false; }

View file

@ -10529,11 +10529,9 @@ exit:
class IS_internal_schema_access : public ACL_internal_schema_access class IS_internal_schema_access : public ACL_internal_schema_access
{ {
public: public:
IS_internal_schema_access() IS_internal_schema_access() = default;
{}
~IS_internal_schema_access() ~IS_internal_schema_access() = default;
{}
ACL_internal_access_result check(ulong want_access, ACL_internal_access_result check(ulong want_access,
ulong *save_priv) const; ulong *save_priv) const;

View file

@ -36,8 +36,7 @@ protected:
m_set_signal_information(set) m_set_signal_information(set)
{} {}
virtual ~Sql_cmd_common_signal() virtual ~Sql_cmd_common_signal() = default;
{}
/** /**
Evaluate each signal condition items for this statement. Evaluate each signal condition items for this statement.
@ -84,8 +83,7 @@ public:
: Sql_cmd_common_signal(cond, set) : Sql_cmd_common_signal(cond, set)
{} {}
virtual ~Sql_cmd_signal() virtual ~Sql_cmd_signal() = default;
{}
virtual enum_sql_command sql_command_code() const virtual enum_sql_command sql_command_code() const
{ {
@ -111,8 +109,7 @@ public:
: Sql_cmd_common_signal(cond, set) : Sql_cmd_common_signal(cond, set)
{} {}
virtual ~Sql_cmd_resignal() virtual ~Sql_cmd_resignal() = default;
{}
virtual enum_sql_command sql_command_code() const virtual enum_sql_command sql_command_code() const
{ {

View file

@ -513,7 +513,7 @@ public:
} }
virtual ~Stat_table() {} virtual ~Stat_table() = default;
/** /**
@brief @brief
@ -1633,7 +1633,7 @@ protected:
public: public:
Count_distinct_field() {} Count_distinct_field() = default;
/** /**
@param @param

View file

@ -739,7 +739,7 @@ public:
class String: public Charset, public Binary_string class String: public Charset, public Binary_string
{ {
public: public:
String() { } String() = default;
String(size_t length_arg) String(size_t length_arg)
:Binary_string(length_arg) :Binary_string(length_arg)
{ } { }
@ -760,10 +760,7 @@ public:
:Charset(cs), :Charset(cs),
Binary_string(str, len) Binary_string(str, len)
{ } { }
String(const String &str) String(const String &str) = default;
:Charset(str),
Binary_string(str)
{ }
void set(String &str,size_t offset,size_t arg_length) void set(String &str,size_t offset,size_t arg_length)
{ {

View file

@ -31,11 +31,9 @@ public:
/** /**
Constructor, used to represent a TRUNCATE statement. Constructor, used to represent a TRUNCATE statement.
*/ */
Sql_cmd_truncate_table() Sql_cmd_truncate_table() = default;
{}
virtual ~Sql_cmd_truncate_table() virtual ~Sql_cmd_truncate_table() = default;
{}
/** /**
Execute a TRUNCATE statement at runtime. Execute a TRUNCATE statement at runtime.

View file

@ -252,7 +252,7 @@ class Dec_ptr
{ {
protected: protected:
my_decimal *m_ptr; my_decimal *m_ptr;
Dec_ptr() { } Dec_ptr() = default;
public: public:
Dec_ptr(my_decimal *ptr) :m_ptr(ptr) { } Dec_ptr(my_decimal *ptr) :m_ptr(ptr) { }
bool is_null() const { return m_ptr == NULL; } bool is_null() const { return m_ptr == NULL; }
@ -395,7 +395,7 @@ protected:
{ {
m_sec= m_usec= m_neg= m_truncated= 0; m_sec= m_usec= m_neg= m_truncated= 0;
} }
Sec6() { } Sec6() = default;
bool add_nanoseconds(uint nanoseconds) bool add_nanoseconds(uint nanoseconds)
{ {
DBUG_ASSERT(nanoseconds <= 1000000000); DBUG_ASSERT(nanoseconds <= 1000000000);
@ -555,7 +555,7 @@ protected:
Sec6::make_from_int(nr); Sec6::make_from_int(nr);
m_nsec= 0; m_nsec= 0;
} }
Sec9() { } Sec9() = default;
public: public:
Sec9(const my_decimal *d) Sec9(const my_decimal *d)
{ {
@ -2707,7 +2707,7 @@ class Timestamp_or_zero_datetime_native:
public NativeBuffer<STRING_BUFFER_TIMESTAMP_BINARY_SIZE> public NativeBuffer<STRING_BUFFER_TIMESTAMP_BINARY_SIZE>
{ {
public: public:
Timestamp_or_zero_datetime_native() { } Timestamp_or_zero_datetime_native() = default;
Timestamp_or_zero_datetime_native(const Timestamp_or_zero_datetime &ts, Timestamp_or_zero_datetime_native(const Timestamp_or_zero_datetime &ts,
uint decimals) uint decimals)
{ {
@ -3168,7 +3168,7 @@ public:
Type_all_attributes(const Type_all_attributes *other) Type_all_attributes(const Type_all_attributes *other)
:Type_std_attributes(other) :Type_std_attributes(other)
{ } { }
virtual ~Type_all_attributes() {} virtual ~Type_all_attributes() = default;
virtual void set_maybe_null(bool maybe_null_arg)= 0; virtual void set_maybe_null(bool maybe_null_arg)= 0;
// Returns total number of decimal digits // Returns total number of decimal digits
virtual uint decimal_precision() const= 0; virtual uint decimal_precision() const= 0;
@ -3188,7 +3188,7 @@ public:
class Type_cmp_attributes class Type_cmp_attributes
{ {
public: public:
virtual ~Type_cmp_attributes() { } virtual ~Type_cmp_attributes() = default;
virtual CHARSET_INFO *compare_collation() const= 0; virtual CHARSET_INFO *compare_collation() const= 0;
}; };
@ -3579,7 +3579,7 @@ public:
{ {
return false; return false;
} }
virtual ~Type_handler() {} virtual ~Type_handler() = default;
/** /**
Determines MariaDB traditional data types that always present Determines MariaDB traditional data types that always present
in the server. in the server.
@ -4025,7 +4025,7 @@ class Type_handler_row: public Type_handler
{ {
static const Name m_name_row; static const Name m_name_row;
public: public:
virtual ~Type_handler_row() {} virtual ~Type_handler_row() = default;
const Name name() const override { return m_name_row; } const Name name() const override { return m_name_row; }
bool is_scalar_type() const override { return false; } bool is_scalar_type() const override { return false; }
bool can_return_int() const override { return false; } bool can_return_int() const override { return false; }
@ -4401,7 +4401,7 @@ public:
bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*, bool Item_func_min_max_get_date(THD *thd, Item_func_min_max*,
MYSQL_TIME *, date_mode_t fuzzydate) const MYSQL_TIME *, date_mode_t fuzzydate) const
override; override;
virtual ~Type_handler_numeric() { } virtual ~Type_handler_numeric() = default;
bool can_change_cond_ref_to_const(Item_bool_func2 *target, bool can_change_cond_ref_to_const(Item_bool_func2 *target,
Item *target_expr, Item *target_value, Item *target_expr, Item *target_value,
Item_bool_func2 *source, Item_bool_func2 *source,
@ -4421,7 +4421,7 @@ class Type_handler_real_result: public Type_handler_numeric
public: public:
Item_result result_type() const { return REAL_RESULT; } Item_result result_type() const { return REAL_RESULT; }
Item_result cmp_type() const { return REAL_RESULT; } Item_result cmp_type() const { return REAL_RESULT; }
virtual ~Type_handler_real_result() {} virtual ~Type_handler_real_result() = default;
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
void Column_definition_reuse_fix_attributes(THD *thd, void Column_definition_reuse_fix_attributes(THD *thd,
Column_definition *c, Column_definition *c,
@ -4507,7 +4507,7 @@ public:
} }
Item_result result_type() const { return DECIMAL_RESULT; } Item_result result_type() const { return DECIMAL_RESULT; }
Item_result cmp_type() const { return DECIMAL_RESULT; } Item_result cmp_type() const { return DECIMAL_RESULT; }
virtual ~Type_handler_decimal_result() {}; virtual ~Type_handler_decimal_result() = default;
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const
{ {
@ -4737,7 +4737,7 @@ public:
Item_result cmp_type() const { return INT_RESULT; } Item_result cmp_type() const { return INT_RESULT; }
bool is_order_clause_position_type() const { return true; } bool is_order_clause_position_type() const { return true; }
bool is_limit_clause_valid_type() const { return true; } bool is_limit_clause_valid_type() const { return true; }
virtual ~Type_handler_int_result() {} virtual ~Type_handler_int_result() = default;
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const; int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
bool subquery_type_allows_materialization(const Item *inner, bool subquery_type_allows_materialization(const Item *inner,
@ -4832,7 +4832,7 @@ protected:
public: public:
Item_result result_type() const { return STRING_RESULT; } Item_result result_type() const { return STRING_RESULT; }
Item_result cmp_type() const { return TIME_RESULT; } Item_result cmp_type() const { return TIME_RESULT; }
virtual ~Type_handler_temporal_result() {} virtual ~Type_handler_temporal_result() = default;
void make_sort_key(uchar *to, Item *item, const SORT_FIELD_ATTR *sort_field, void make_sort_key(uchar *to, Item *item, const SORT_FIELD_ATTR *sort_field,
Sort_param *param) const; Sort_param *param) const;
void sortlength(THD *thd, void sortlength(THD *thd,
@ -4914,7 +4914,7 @@ public:
Item_result result_type() const { return STRING_RESULT; } Item_result result_type() const { return STRING_RESULT; }
Item_result cmp_type() const { return STRING_RESULT; } Item_result cmp_type() const { return STRING_RESULT; }
CHARSET_INFO *charset_for_protocol(const Item *item) const; CHARSET_INFO *charset_for_protocol(const Item *item) const;
virtual ~Type_handler_string_result() {} virtual ~Type_handler_string_result() = default;
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const; int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) const;
const Type_handler * const Type_handler *
@ -5084,7 +5084,7 @@ class Type_handler_tiny: public Type_handler_general_purpose_int
static const Type_limits_int m_limits_sint8; static const Type_limits_int m_limits_sint8;
static const Type_limits_int m_limits_uint8; static const Type_limits_int m_limits_uint8;
public: public:
virtual ~Type_handler_tiny() {} virtual ~Type_handler_tiny() = default;
const Name name() const { return m_name_tiny; } const Name name() const { return m_name_tiny; }
enum_field_types field_type() const { return MYSQL_TYPE_TINY; } enum_field_types field_type() const { return MYSQL_TYPE_TINY; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5129,7 +5129,7 @@ class Type_handler_short: public Type_handler_general_purpose_int
static const Type_limits_int m_limits_sint16; static const Type_limits_int m_limits_sint16;
static const Type_limits_int m_limits_uint16; static const Type_limits_int m_limits_uint16;
public: public:
virtual ~Type_handler_short() {} virtual ~Type_handler_short() = default;
const Name name() const { return m_name_short; } const Name name() const { return m_name_short; }
enum_field_types field_type() const { return MYSQL_TYPE_SHORT; } enum_field_types field_type() const { return MYSQL_TYPE_SHORT; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5174,7 +5174,7 @@ class Type_handler_long: public Type_handler_general_purpose_int
static const Type_limits_int m_limits_sint32; static const Type_limits_int m_limits_sint32;
static const Type_limits_int m_limits_uint32; static const Type_limits_int m_limits_uint32;
public: public:
virtual ~Type_handler_long() {} virtual ~Type_handler_long() = default;
const Name name() const { return m_name_int; } const Name name() const { return m_name_int; }
enum_field_types field_type() const { return MYSQL_TYPE_LONG; } enum_field_types field_type() const { return MYSQL_TYPE_LONG; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5230,7 +5230,7 @@ class Type_handler_longlong: public Type_handler_general_purpose_int
static const Type_limits_int m_limits_sint64; static const Type_limits_int m_limits_sint64;
static const Type_limits_int m_limits_uint64; static const Type_limits_int m_limits_uint64;
public: public:
virtual ~Type_handler_longlong() {} virtual ~Type_handler_longlong() = default;
const Name name() const { return m_name_longlong; } const Name name() const { return m_name_longlong; }
enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; } enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5276,7 +5276,7 @@ public:
class Type_handler_vers_trx_id: public Type_handler_longlong class Type_handler_vers_trx_id: public Type_handler_longlong
{ {
public: public:
virtual ~Type_handler_vers_trx_id() {} virtual ~Type_handler_vers_trx_id() = default;
Field *make_table_field(const LEX_CSTRING *name, Field *make_table_field(const LEX_CSTRING *name,
const Record_addr &addr, const Record_addr &addr,
const Type_all_attributes &attr, const Type_all_attributes &attr,
@ -5290,7 +5290,7 @@ class Type_handler_int24: public Type_handler_general_purpose_int
static const Type_limits_int m_limits_sint24; static const Type_limits_int m_limits_sint24;
static const Type_limits_int m_limits_uint24; static const Type_limits_int m_limits_uint24;
public: public:
virtual ~Type_handler_int24() {} virtual ~Type_handler_int24() = default;
const Name name() const { return m_name_mediumint; } const Name name() const { return m_name_mediumint; }
enum_field_types field_type() const { return MYSQL_TYPE_INT24; } enum_field_types field_type() const { return MYSQL_TYPE_INT24; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5331,7 +5331,7 @@ class Type_handler_year: public Type_handler_int_result
{ {
static const Name m_name_year; static const Name m_name_year;
public: public:
virtual ~Type_handler_year() {} virtual ~Type_handler_year() = default;
const Name name() const { return m_name_year; } const Name name() const { return m_name_year; }
enum_field_types field_type() const { return MYSQL_TYPE_YEAR; } enum_field_types field_type() const { return MYSQL_TYPE_YEAR; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5383,7 +5383,7 @@ class Type_handler_bit: public Type_handler_int_result
{ {
static const Name m_name_bit; static const Name m_name_bit;
public: public:
virtual ~Type_handler_bit() {} virtual ~Type_handler_bit() = default;
const Name name() const { return m_name_bit; } const Name name() const { return m_name_bit; }
enum_field_types field_type() const { return MYSQL_TYPE_BIT; } enum_field_types field_type() const { return MYSQL_TYPE_BIT; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5441,7 +5441,7 @@ class Type_handler_float: public Type_handler_real_result
{ {
static const Name m_name_float; static const Name m_name_float;
public: public:
virtual ~Type_handler_float() {} virtual ~Type_handler_float() = default;
const Name name() const { return m_name_float; } const Name name() const { return m_name_float; }
enum_field_types field_type() const { return MYSQL_TYPE_FLOAT; } enum_field_types field_type() const { return MYSQL_TYPE_FLOAT; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5491,7 +5491,7 @@ class Type_handler_double: public Type_handler_real_result
{ {
static const Name m_name_double; static const Name m_name_double;
public: public:
virtual ~Type_handler_double() {} virtual ~Type_handler_double() = default;
const Name name() const { return m_name_double; } const Name name() const { return m_name_double; }
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5540,7 +5540,7 @@ class Type_handler_time_common: public Type_handler_temporal_result
{ {
static const Name m_name_time; static const Name m_name_time;
public: public:
virtual ~Type_handler_time_common() { } virtual ~Type_handler_time_common() = default;
const Name name() const { return m_name_time; } const Name name() const { return m_name_time; }
enum_field_types field_type() const { return MYSQL_TYPE_TIME; } enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
protocol_send_type_t protocol_send_type() const protocol_send_type_t protocol_send_type() const
@ -5630,7 +5630,7 @@ class Type_handler_time: public Type_handler_time_common
static uint m_hires_bytes[MAX_DATETIME_PRECISION+1]; static uint m_hires_bytes[MAX_DATETIME_PRECISION+1];
public: public:
static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; } static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; }
virtual ~Type_handler_time() {} virtual ~Type_handler_time() = default;
const Name version() const { return m_version_mariadb53; } const Name version() const { return m_version_mariadb53; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata, Field *make_conversion_table_field(TABLE *, uint metadata,
@ -5656,7 +5656,7 @@ public:
class Type_handler_time2: public Type_handler_time_common class Type_handler_time2: public Type_handler_time_common
{ {
public: public:
virtual ~Type_handler_time2() {} virtual ~Type_handler_time2() = default;
const Name version() const { return m_version_mysql56; } const Name version() const { return m_version_mysql56; }
enum_field_types real_field_type() const { return MYSQL_TYPE_TIME2; } enum_field_types real_field_type() const { return MYSQL_TYPE_TIME2; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
@ -5683,7 +5683,7 @@ public:
class Type_handler_temporal_with_date: public Type_handler_temporal_result class Type_handler_temporal_with_date: public Type_handler_temporal_result
{ {
public: public:
virtual ~Type_handler_temporal_with_date() {} virtual ~Type_handler_temporal_with_date() = default;
Item_literal *create_literal_item(THD *thd, const char *str, size_t length, Item_literal *create_literal_item(THD *thd, const char *str, size_t length,
CHARSET_INFO *cs, bool send_error) const; CHARSET_INFO *cs, bool send_error) const;
bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr, bool Item_eq_value(THD *thd, const Type_cmp_attributes *attr,
@ -5708,7 +5708,7 @@ class Type_handler_date_common: public Type_handler_temporal_with_date
{ {
static const Name m_name_date; static const Name m_name_date;
public: public:
virtual ~Type_handler_date_common() {} virtual ~Type_handler_date_common() = default;
const Name name() const { return m_name_date; } const Name name() const { return m_name_date; }
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
enum_field_types field_type() const { return MYSQL_TYPE_DATE; } enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
@ -5753,7 +5753,7 @@ public:
class Type_handler_date: public Type_handler_date_common class Type_handler_date: public Type_handler_date_common
{ {
public: public:
virtual ~Type_handler_date() {} virtual ~Type_handler_date() = default;
uint32 calc_pack_length(uint32 length) const { return 4; } uint32 calc_pack_length(uint32 length) const { return 4; }
Field *make_conversion_table_field(TABLE *, uint metadata, Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const; const Field *target) const;
@ -5778,7 +5778,7 @@ public:
class Type_handler_newdate: public Type_handler_date_common class Type_handler_newdate: public Type_handler_date_common
{ {
public: public:
virtual ~Type_handler_newdate() {} virtual ~Type_handler_newdate() = default;
enum_field_types real_field_type() const { return MYSQL_TYPE_NEWDATE; } enum_field_types real_field_type() const { return MYSQL_TYPE_NEWDATE; }
uint32 calc_pack_length(uint32 length) const { return 3; } uint32 calc_pack_length(uint32 length) const { return 3; }
Field *make_conversion_table_field(TABLE *, uint metadata, Field *make_conversion_table_field(TABLE *, uint metadata,
@ -5805,7 +5805,7 @@ class Type_handler_datetime_common: public Type_handler_temporal_with_date
{ {
static const Name m_name_datetime; static const Name m_name_datetime;
public: public:
virtual ~Type_handler_datetime_common() {} virtual ~Type_handler_datetime_common() = default;
const Name name() const { return m_name_datetime; } const Name name() const { return m_name_datetime; }
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; } enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
@ -5863,7 +5863,7 @@ class Type_handler_datetime: public Type_handler_datetime_common
static uint m_hires_bytes[MAX_DATETIME_PRECISION + 1]; static uint m_hires_bytes[MAX_DATETIME_PRECISION + 1];
public: public:
static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; } static uint hires_bytes(uint dec) { return m_hires_bytes[dec]; }
virtual ~Type_handler_datetime() {} virtual ~Type_handler_datetime() = default;
const Name version() const { return m_version_mariadb53; } const Name version() const { return m_version_mariadb53; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata, Field *make_conversion_table_field(TABLE *, uint metadata,
@ -5889,7 +5889,7 @@ public:
class Type_handler_datetime2: public Type_handler_datetime_common class Type_handler_datetime2: public Type_handler_datetime_common
{ {
public: public:
virtual ~Type_handler_datetime2() {} virtual ~Type_handler_datetime2() = default;
const Name version() const { return m_version_mysql56; } const Name version() const { return m_version_mysql56; }
enum_field_types real_field_type() const { return MYSQL_TYPE_DATETIME2; } enum_field_types real_field_type() const { return MYSQL_TYPE_DATETIME2; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
@ -5919,7 +5919,7 @@ class Type_handler_timestamp_common: public Type_handler_temporal_with_date
protected: protected:
bool TIME_to_native(THD *, const MYSQL_TIME *from, Native *to, uint dec) const; bool TIME_to_native(THD *, const MYSQL_TIME *from, Native *to, uint dec) const;
public: public:
virtual ~Type_handler_timestamp_common() {} virtual ~Type_handler_timestamp_common() = default;
const Name name() const { return m_name_timestamp; } const Name name() const { return m_name_timestamp; }
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
const Type_handler *type_handler_for_native_format() const; const Type_handler *type_handler_for_native_format() const;
@ -5999,7 +5999,7 @@ class Type_handler_timestamp: public Type_handler_timestamp_common
static uint m_sec_part_bytes[MAX_DATETIME_PRECISION + 1]; static uint m_sec_part_bytes[MAX_DATETIME_PRECISION + 1];
public: public:
static uint sec_part_bytes(uint dec) { return m_sec_part_bytes[dec]; } static uint sec_part_bytes(uint dec) { return m_sec_part_bytes[dec]; }
virtual ~Type_handler_timestamp() {} virtual ~Type_handler_timestamp() = default;
const Name version() const { return m_version_mariadb53; } const Name version() const { return m_version_mariadb53; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
Field *make_conversion_table_field(TABLE *, uint metadata, Field *make_conversion_table_field(TABLE *, uint metadata,
@ -6025,7 +6025,7 @@ public:
class Type_handler_timestamp2: public Type_handler_timestamp_common class Type_handler_timestamp2: public Type_handler_timestamp_common
{ {
public: public:
virtual ~Type_handler_timestamp2() {} virtual ~Type_handler_timestamp2() = default;
const Name version() const { return m_version_mysql56; } const Name version() const { return m_version_mysql56; }
enum_field_types real_field_type() const { return MYSQL_TYPE_TIMESTAMP2; } enum_field_types real_field_type() const { return MYSQL_TYPE_TIMESTAMP2; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
@ -6055,7 +6055,7 @@ class Type_handler_olddecimal: public Type_handler_decimal_result
{ {
static const Name m_name_decimal; static const Name m_name_decimal;
public: public:
virtual ~Type_handler_olddecimal() {} virtual ~Type_handler_olddecimal() = default;
const Name name() const { return m_name_decimal; } const Name name() const { return m_name_decimal; }
enum_field_types field_type() const { return MYSQL_TYPE_DECIMAL; } enum_field_types field_type() const { return MYSQL_TYPE_DECIMAL; }
uint32 calc_pack_length(uint32 length) const { return length; } uint32 calc_pack_length(uint32 length) const { return length; }
@ -6086,7 +6086,7 @@ class Type_handler_newdecimal: public Type_handler_decimal_result
{ {
static const Name m_name_decimal; static const Name m_name_decimal;
public: public:
virtual ~Type_handler_newdecimal() {} virtual ~Type_handler_newdecimal() = default;
const Name name() const { return m_name_decimal; } const Name name() const { return m_name_decimal; }
enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; } enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
@ -6126,7 +6126,7 @@ class Type_handler_null: public Type_handler_general_purpose_string
{ {
static const Name m_name_null; static const Name m_name_null;
public: public:
virtual ~Type_handler_null() {} virtual ~Type_handler_null() = default;
const Name name() const { return m_name_null; } const Name name() const { return m_name_null; }
enum_field_types field_type() const { return MYSQL_TYPE_NULL; } enum_field_types field_type() const { return MYSQL_TYPE_NULL; }
const Type_handler *type_handler_for_comparison() const; const Type_handler *type_handler_for_comparison() const;
@ -6186,7 +6186,7 @@ class Type_handler_string: public Type_handler_longstr
{ {
static const Name m_name_char; static const Name m_name_char;
public: public:
virtual ~Type_handler_string() {} virtual ~Type_handler_string() = default;
const Name name() const override { return m_name_char; } const Name name() const override { return m_name_char; }
enum_field_types field_type() const override { return MYSQL_TYPE_STRING; } enum_field_types field_type() const override { return MYSQL_TYPE_STRING; }
ulong KEY_pack_flags(uint column_nr) const override ulong KEY_pack_flags(uint column_nr) const override
@ -6225,7 +6225,7 @@ class Type_handler_var_string: public Type_handler_string
{ {
static const Name m_name_var_string; static const Name m_name_var_string;
public: public:
virtual ~Type_handler_var_string() {} virtual ~Type_handler_var_string() = default;
const Name name() const { return m_name_var_string; } const Name name() const { return m_name_var_string; }
enum_field_types field_type() const { return MYSQL_TYPE_VAR_STRING; } enum_field_types field_type() const { return MYSQL_TYPE_VAR_STRING; }
enum_field_types real_field_type() const { return MYSQL_TYPE_STRING; } enum_field_types real_field_type() const { return MYSQL_TYPE_STRING; }
@ -6254,7 +6254,7 @@ class Type_handler_varchar: public Type_handler_longstr
{ {
static const Name m_name_varchar; static const Name m_name_varchar;
public: public:
virtual ~Type_handler_varchar() {} virtual ~Type_handler_varchar() = default;
const Name name() const override { return m_name_varchar; } const Name name() const override { return m_name_varchar; }
enum_field_types field_type() const override { return MYSQL_TYPE_VARCHAR; } enum_field_types field_type() const override { return MYSQL_TYPE_VARCHAR; }
ulong KEY_pack_flags(uint column_nr) const override ulong KEY_pack_flags(uint column_nr) const override
@ -6310,7 +6310,7 @@ class Type_handler_hex_hybrid: public Type_handler_varchar
{ {
static const Name m_name_hex_hybrid; static const Name m_name_hex_hybrid;
public: public:
virtual ~Type_handler_hex_hybrid() {} virtual ~Type_handler_hex_hybrid() = default;
const Name name() const override { return m_name_hex_hybrid; } const Name name() const override { return m_name_hex_hybrid; }
const Type_handler *cast_to_int_type_handler() const override; const Type_handler *cast_to_int_type_handler() const override;
const Type_handler *type_handler_for_system_time() const override; const Type_handler *type_handler_for_system_time() const override;
@ -6336,7 +6336,7 @@ public:
class Type_handler_blob_common: public Type_handler_longstr class Type_handler_blob_common: public Type_handler_longstr
{ {
public: public:
virtual ~Type_handler_blob_common() { } virtual ~Type_handler_blob_common() = default;
Field *make_conversion_table_field(TABLE *, uint metadata, Field *make_conversion_table_field(TABLE *, uint metadata,
const Field *target) const override; const Field *target) const override;
ulong KEY_pack_flags(uint column_nr) const override ulong KEY_pack_flags(uint column_nr) const override
@ -6390,7 +6390,7 @@ class Type_handler_tiny_blob: public Type_handler_blob_common
{ {
static const Name m_name_tinyblob; static const Name m_name_tinyblob;
public: public:
virtual ~Type_handler_tiny_blob() {} virtual ~Type_handler_tiny_blob() = default;
const Name name() const override { return m_name_tinyblob; } const Name name() const override { return m_name_tinyblob; }
enum_field_types field_type() const override { return MYSQL_TYPE_TINY_BLOB; } enum_field_types field_type() const override { return MYSQL_TYPE_TINY_BLOB; }
uint32 calc_pack_length(uint32 length) const override; uint32 calc_pack_length(uint32 length) const override;
@ -6406,7 +6406,7 @@ class Type_handler_medium_blob: public Type_handler_blob_common
{ {
static const Name m_name_mediumblob; static const Name m_name_mediumblob;
public: public:
virtual ~Type_handler_medium_blob() {} virtual ~Type_handler_medium_blob() = default;
const Name name() const override { return m_name_mediumblob; } const Name name() const override { return m_name_mediumblob; }
enum_field_types field_type() const override enum_field_types field_type() const override
{ return MYSQL_TYPE_MEDIUM_BLOB; } { return MYSQL_TYPE_MEDIUM_BLOB; }
@ -6423,7 +6423,7 @@ class Type_handler_long_blob: public Type_handler_blob_common
{ {
static const Name m_name_longblob; static const Name m_name_longblob;
public: public:
virtual ~Type_handler_long_blob() {} virtual ~Type_handler_long_blob() = default;
const Name name() const { return m_name_longblob; } const Name name() const { return m_name_longblob; }
enum_field_types field_type() const { return MYSQL_TYPE_LONG_BLOB; } enum_field_types field_type() const { return MYSQL_TYPE_LONG_BLOB; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
@ -6441,7 +6441,7 @@ class Type_handler_blob: public Type_handler_blob_common
{ {
static const Name m_name_blob; static const Name m_name_blob;
public: public:
virtual ~Type_handler_blob() {} virtual ~Type_handler_blob() = default;
const Name name() const { return m_name_blob; } const Name name() const { return m_name_blob; }
enum_field_types field_type() const { return MYSQL_TYPE_BLOB; } enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
uint32 calc_pack_length(uint32 length) const; uint32 calc_pack_length(uint32 length) const;
@ -6471,7 +6471,7 @@ class Type_handler_geometry: public Type_handler_string_result
{ {
static const Name m_name_geometry; static const Name m_name_geometry;
public: public:
virtual ~Type_handler_geometry() {} virtual ~Type_handler_geometry() = default;
const Name name() const { return m_name_geometry; } const Name name() const { return m_name_geometry; }
enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; } enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; }
bool is_param_long_data_type() const { return true; } bool is_param_long_data_type() const { return true; }
@ -6572,7 +6572,7 @@ extern MYSQL_PLUGIN_IMPORT Type_handler_geometry type_handler_geometry;
class Type_handler_typelib: public Type_handler_general_purpose_string class Type_handler_typelib: public Type_handler_general_purpose_string
{ {
public: public:
virtual ~Type_handler_typelib() { } virtual ~Type_handler_typelib() = default;
enum_field_types field_type() const { return MYSQL_TYPE_STRING; } enum_field_types field_type() const { return MYSQL_TYPE_STRING; }
const Type_handler *type_handler_for_item_field() const; const Type_handler *type_handler_for_item_field() const;
const Type_handler *cast_to_int_type_handler() const; const Type_handler *cast_to_int_type_handler() const;
@ -6608,7 +6608,7 @@ class Type_handler_enum: public Type_handler_typelib
{ {
static const Name m_name_enum; static const Name m_name_enum;
public: public:
virtual ~Type_handler_enum() {} virtual ~Type_handler_enum() = default;
const Name name() const { return m_name_enum; } const Name name() const { return m_name_enum; }
enum_field_types real_field_type() const { return MYSQL_TYPE_ENUM; } enum_field_types real_field_type() const { return MYSQL_TYPE_ENUM; }
enum_field_types traditional_merge_field_type() const enum_field_types traditional_merge_field_type() const
@ -6640,7 +6640,7 @@ class Type_handler_set: public Type_handler_typelib
{ {
static const Name m_name_set; static const Name m_name_set;
public: public:
virtual ~Type_handler_set() {} virtual ~Type_handler_set() = default;
const Name name() const { return m_name_set; } const Name name() const { return m_name_set; }
enum_field_types real_field_type() const { return MYSQL_TYPE_SET; } enum_field_types real_field_type() const { return MYSQL_TYPE_SET; }
enum_field_types traditional_merge_field_type() const enum_field_types traditional_merge_field_type() const
@ -6813,7 +6813,7 @@ class Type_aggregator
const Type_handler *m_handler1; const Type_handler *m_handler1;
const Type_handler *m_handler2; const Type_handler *m_handler2;
const Type_handler *m_result; const Type_handler *m_result;
Pair() { } Pair() = default;
Pair(const Type_handler *handler1, Pair(const Type_handler *handler1,
const Type_handler *handler2, const Type_handler *handler2,
const Type_handler *result) const Type_handler *result)

View file

@ -27,7 +27,7 @@ class Type_handler_json_longtext: public Type_handler_long_blob
const LEX_CSTRING *field_name) const LEX_CSTRING *field_name)
const; const;
public: public:
virtual ~Type_handler_json_longtext() {} virtual ~Type_handler_json_longtext() = default;
bool Column_definition_validate_check_constraint(THD *thd, bool Column_definition_validate_check_constraint(THD *thd,
Column_definition *c) const; Column_definition *c) const;
}; };

View file

@ -948,7 +948,7 @@ protected:
class Table_read_cursor : public Rowid_seq_cursor class Table_read_cursor : public Rowid_seq_cursor
{ {
public: public:
virtual ~Table_read_cursor() {} virtual ~Table_read_cursor() = default;
void init(READ_RECORD *info) void init(READ_RECORD *info)
{ {
@ -1132,7 +1132,7 @@ public:
virtual bool is_outside_computation_bounds() const { return false; }; virtual bool is_outside_computation_bounds() const { return false; };
virtual ~Frame_cursor() {} virtual ~Frame_cursor() = default;
/* /*
Regular frame cursors add or remove values from the sum functions they Regular frame cursors add or remove values from the sum functions they

View file

@ -106,7 +106,7 @@ class Window_spec : public Sql_alloc
{ {
bool window_names_are_checked; bool window_names_are_checked;
public: public:
virtual ~Window_spec() {} virtual ~Window_spec() = default;
LEX_CSTRING *window_ref; LEX_CSTRING *window_ref;

View file

@ -852,7 +852,7 @@ public:
class Load_data_outvar class Load_data_outvar
{ {
public: public:
virtual ~Load_data_outvar() {} virtual ~Load_data_outvar() = default;
virtual bool load_data_set_null(THD *thd, const Load_data_param *param)= 0; virtual bool load_data_set_null(THD *thd, const Load_data_param *param)= 0;
virtual bool load_data_set_value(THD *thd, const char *pos, uint length, virtual bool load_data_set_value(THD *thd, const char *pos, uint length,
const Load_data_param *param)= 0; const Load_data_param *param)= 0;
@ -866,7 +866,7 @@ public:
class Timeval: public timeval class Timeval: public timeval
{ {
protected: protected:
Timeval() { } Timeval() = default;
public: public:
Timeval(my_time_t sec, ulong usec) Timeval(my_time_t sec, ulong usec)
{ {

View file

@ -44,7 +44,7 @@ public:
virtual void rdlock()= 0; virtual void rdlock()= 0;
virtual void wrlock()= 0; virtual void wrlock()= 0;
virtual void unlock()= 0; virtual void unlock()= 0;
virtual ~PolyLock() {} virtual ~PolyLock() = default;
}; };
class PolyLock_mutex: public PolyLock class PolyLock_mutex: public PolyLock

Some files were not shown because too many files have changed in this diff Show more