mirror of
https://github.com/MariaDB/server.git
synced 2025-04-18 21:44:20 +03:00
MDEV-33746 Supply missing override markings
Find and fix missing virtual override markings. Updates cmake maintainer flags to include -Wsuggest-override and -Winconsistent-missing-override.
This commit is contained in:
parent
ab448d4b34
commit
db0c28eff8
@ -27,14 +27,16 @@ SET(MY_WARNING_FLAGS
|
||||
-Wenum-conversion
|
||||
-Wextra
|
||||
-Wformat-security
|
||||
-Winconsistent-missing-override
|
||||
-Wno-format-truncation
|
||||
-Wno-init-self
|
||||
-Wno-nonnull-compare
|
||||
-Wno-null-conversion
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-private-field
|
||||
-Woverloaded-virtual
|
||||
-Wnon-virtual-dtor
|
||||
-Woverloaded-virtual
|
||||
-Wsuggest-override
|
||||
-Wvla
|
||||
-Wwrite-strings
|
||||
)
|
||||
|
@ -101,10 +101,10 @@ public:
|
||||
uchar source_tail[MY_AES_BLOCK_SIZE];
|
||||
|
||||
MyCTX_nopad() : MyCTX() { }
|
||||
~MyCTX_nopad() = default;
|
||||
~MyCTX_nopad() override = default;
|
||||
|
||||
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
|
||||
const uchar *iv, uint ivlen)
|
||||
const uchar *iv, uint ivlen) override
|
||||
{
|
||||
compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad));
|
||||
this->key= key;
|
||||
@ -141,13 +141,13 @@ public:
|
||||
source_tail_len= new_tail_len;
|
||||
}
|
||||
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen) override
|
||||
{
|
||||
update_source_tail(src, slen);
|
||||
return MyCTX::update(src, slen, dst, dlen);
|
||||
}
|
||||
|
||||
int finish(uchar *dst, uint *dlen)
|
||||
int finish(uchar *dst, uint *dlen) override
|
||||
{
|
||||
if (source_tail_len)
|
||||
{
|
||||
@ -206,10 +206,10 @@ public:
|
||||
const uchar *aad;
|
||||
int aadlen;
|
||||
MyCTX_gcm() : MyCTX() { }
|
||||
~MyCTX_gcm() { }
|
||||
~MyCTX_gcm() override { }
|
||||
|
||||
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
|
||||
const uchar *iv, uint ivlen)
|
||||
const uchar *iv, uint ivlen) override
|
||||
{
|
||||
compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_gcm));
|
||||
int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen);
|
||||
@ -219,7 +219,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
|
||||
int update(const uchar *src, uint slen, uchar *dst, uint *dlen) override
|
||||
{
|
||||
/*
|
||||
note that this GCM class cannot do streaming decryption, because
|
||||
@ -244,7 +244,7 @@ public:
|
||||
return MyCTX::update(src, slen, dst, dlen);
|
||||
}
|
||||
|
||||
int finish(uchar *dst, uint *dlen)
|
||||
int finish(uchar *dst, uint *dlen) override
|
||||
{
|
||||
int fin;
|
||||
if (!EVP_CipherFinal_ex(ctx, dst, &fin))
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
Base(logLevel)
|
||||
{
|
||||
}
|
||||
virtual LogLevel GetLogLevel(void) const override
|
||||
LogLevel GetLogLevel(void) const override
|
||||
{
|
||||
return (LogLevel)log_level;
|
||||
}
|
||||
@ -162,12 +162,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void Flush(void) override
|
||||
void Flush(void) override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void ProcessFormattedStatement(Aws::String&& statement) override
|
||||
void ProcessFormattedStatement(Aws::String&& statement) override
|
||||
{
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
|
@ -53,7 +53,7 @@ class Url_http: public Url {
|
||||
{
|
||||
proxy_host.length= 0;
|
||||
}
|
||||
~Url_http()
|
||||
~Url_http() override
|
||||
{
|
||||
my_free(host.str);
|
||||
my_free(port.str);
|
||||
@ -62,9 +62,9 @@ class Url_http: public Url {
|
||||
}
|
||||
|
||||
public:
|
||||
void abort();
|
||||
int send(const char* data, size_t data_length);
|
||||
int set_proxy(const char *proxy, size_t proxy_len)
|
||||
void abort() override;
|
||||
int send(const char* data, size_t data_length) override;
|
||||
int set_proxy(const char *proxy, size_t proxy_len) override
|
||||
{
|
||||
if (use_proxy())
|
||||
{
|
||||
|
@ -24,20 +24,20 @@ class Item_func_sysconst_test :public Item_func_sysconst
|
||||
{
|
||||
public:
|
||||
Item_func_sysconst_test(THD *thd): Item_func_sysconst(thd) {}
|
||||
String *val_str(String *str)
|
||||
String *val_str(String *str) override
|
||||
{
|
||||
null_value= str->copy(STRING_WITH_LEN("sysconst_test"), system_charset_info);
|
||||
return null_value ? NULL : str;
|
||||
}
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
max_length= MAX_FIELD_NAME * system_charset_info->mbmaxlen;
|
||||
maybe_null= true;
|
||||
return false;
|
||||
}
|
||||
const char *func_name() const { return "sysconst_test"; }
|
||||
const char *fully_qualified_func_name() const { return "sysconst_test()"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "sysconst_test"; }
|
||||
const char *fully_qualified_func_name() const override { return "sysconst_test()"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_sysconst_test>(thd, this); }
|
||||
};
|
||||
|
||||
|
@ -84,10 +84,10 @@ prep_stmt::operator =(const prep_stmt& x)
|
||||
|
||||
struct database : public database_i, private noncopyable {
|
||||
database(const config& c);
|
||||
virtual ~database();
|
||||
virtual dbcontext_ptr create_context(bool for_write) volatile;
|
||||
virtual void stop() volatile;
|
||||
virtual const config& get_conf() const volatile;
|
||||
~database() override;
|
||||
dbcontext_ptr create_context(bool for_write) volatile override;
|
||||
void stop() volatile override;
|
||||
const config& get_conf() const volatile override;
|
||||
public:
|
||||
int child_running;
|
||||
private:
|
||||
@ -128,21 +128,21 @@ struct expr_user_lock : private noncopyable {
|
||||
|
||||
struct dbcontext : public dbcontext_i, private noncopyable {
|
||||
dbcontext(volatile database *d, bool for_write);
|
||||
virtual ~dbcontext();
|
||||
virtual void init_thread(const void *stack_botton,
|
||||
volatile int& shutdown_flag);
|
||||
virtual void term_thread();
|
||||
virtual bool check_alive();
|
||||
virtual void lock_tables_if();
|
||||
virtual void unlock_tables_if();
|
||||
virtual bool get_commit_error();
|
||||
virtual void clear_error();
|
||||
virtual void close_tables_if();
|
||||
virtual void table_addref(size_t tbl_id);
|
||||
virtual void table_release(size_t tbl_id);
|
||||
virtual void cmd_open(dbcallback_i& cb, const cmd_open_args& args);
|
||||
virtual void cmd_exec(dbcallback_i& cb, const cmd_exec_args& args);
|
||||
virtual void set_statistics(size_t num_conns, size_t num_active);
|
||||
~dbcontext() override;
|
||||
void init_thread(const void *stack_botton,
|
||||
volatile int& shutdown_flag) override;
|
||||
void term_thread() override;
|
||||
bool check_alive() override;
|
||||
void lock_tables_if() override;
|
||||
void unlock_tables_if() override;
|
||||
bool get_commit_error() override;
|
||||
void clear_error() override;
|
||||
void close_tables_if() override;
|
||||
void table_addref(size_t tbl_id) override;
|
||||
void table_release(size_t tbl_id) override;
|
||||
void cmd_open(dbcallback_i& cb, const cmd_open_args& args) override;
|
||||
void cmd_exec(dbcallback_i& cb, const cmd_exec_args& args) override;
|
||||
void set_statistics(size_t num_conns, size_t num_active) override;
|
||||
private:
|
||||
int set_thread_message(const char *fmt, ...)
|
||||
__attribute__((format (printf, 2, 3)));
|
||||
|
@ -34,8 +34,8 @@ struct worker_throbj {
|
||||
|
||||
struct hstcpsvr : public hstcpsvr_i, private noncopyable {
|
||||
hstcpsvr(const config& c);
|
||||
~hstcpsvr();
|
||||
virtual std::string start_listen();
|
||||
~hstcpsvr() override;
|
||||
std::string start_listen() override;
|
||||
private:
|
||||
hstcpsvr_shared_c cshared;
|
||||
volatile hstcpsvr_shared_v vshared;
|
||||
|
@ -77,15 +77,15 @@ struct hstcpsvr_conn : public dbcallback_i {
|
||||
bool write_more(bool *more_r = 0);
|
||||
bool read_more(bool *more_r = 0);
|
||||
public:
|
||||
virtual void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v);
|
||||
virtual const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const;
|
||||
virtual void dbcb_resp_short(uint32_t code, const char *msg);
|
||||
virtual void dbcb_resp_short_num(uint32_t code, uint32_t value);
|
||||
virtual void dbcb_resp_short_num64(uint32_t code, uint64_t value);
|
||||
virtual void dbcb_resp_begin(size_t num_flds);
|
||||
virtual void dbcb_resp_entry(const char *fld, size_t fldlen);
|
||||
virtual void dbcb_resp_end();
|
||||
virtual void dbcb_resp_cancel();
|
||||
void dbcb_set_prep_stmt(size_t pst_id, const prep_stmt& v) override;
|
||||
const prep_stmt *dbcb_get_prep_stmt(size_t pst_id) const override;
|
||||
void dbcb_resp_short(uint32_t code, const char *msg) override;
|
||||
void dbcb_resp_short_num(uint32_t code, uint32_t value) override;
|
||||
void dbcb_resp_short_num64(uint32_t code, uint64_t value) override;
|
||||
void dbcb_resp_begin(size_t num_flds) override;
|
||||
void dbcb_resp_entry(const char *fld, size_t fldlen) override;
|
||||
void dbcb_resp_end() override;
|
||||
void dbcb_resp_cancel() override;
|
||||
public:
|
||||
hstcpsvr_conn() : addr_len(sizeof(addr)), readsize(4096),
|
||||
nonblocking(false), read_finished(false), write_finished(false),
|
||||
@ -254,7 +254,7 @@ hstcpsvr_conn::dbcb_resp_cancel()
|
||||
|
||||
struct hstcpsvr_worker : public hstcpsvr_worker_i, private noncopyable {
|
||||
hstcpsvr_worker(const hstcpsvr_worker_arg& arg);
|
||||
virtual void run();
|
||||
void run() override;
|
||||
private:
|
||||
const hstcpsvr_shared_c& cshared;
|
||||
volatile hstcpsvr_shared_v& vshared;
|
||||
|
@ -27,23 +27,23 @@ namespace dena {
|
||||
|
||||
struct hstcpcli : public hstcpcli_i, private noncopyable {
|
||||
hstcpcli(const socket_args& args);
|
||||
virtual void close();
|
||||
virtual int reconnect();
|
||||
virtual bool stable_point();
|
||||
virtual void request_buf_open_index(size_t pst_id, const char *dbn,
|
||||
const char *tbl, const char *idx, const char *retflds, const char *filflds);
|
||||
virtual void request_buf_auth(const char *secret, const char *typ);
|
||||
virtual void request_buf_exec_generic(size_t pst_id, const string_ref& op,
|
||||
void close() override;
|
||||
int reconnect() override;
|
||||
bool stable_point() override;
|
||||
void request_buf_open_index(size_t pst_id, const char *dbn,
|
||||
const char *tbl, const char *idx, const char *retflds, const char *filflds) override;
|
||||
void request_buf_auth(const char *secret, const char *typ) override;
|
||||
void request_buf_exec_generic(size_t pst_id, const string_ref& op,
|
||||
const string_ref *kvs, size_t kvslen, uint32_t limit, uint32_t skip,
|
||||
const string_ref& mod_op, const string_ref *mvs, size_t mvslen,
|
||||
const hstcpcli_filter *fils, size_t filslen, int invalues_keypart,
|
||||
const string_ref *invalues, size_t invalueslen);
|
||||
virtual int request_send();
|
||||
virtual int response_recv(size_t& num_flds_r);
|
||||
virtual const string_ref *get_next_row();
|
||||
virtual void response_buf_remove();
|
||||
virtual int get_error_code();
|
||||
virtual std::string get_error();
|
||||
const string_ref *invalues, size_t invalueslen) override;
|
||||
int request_send() override;
|
||||
int response_recv(size_t& num_flds_r) override;
|
||||
const string_ref *get_next_row() override;
|
||||
void response_buf_remove() override;
|
||||
int get_error_code() override;
|
||||
std::string get_error() override;
|
||||
private:
|
||||
int read_more();
|
||||
void clear_error();
|
||||
|
@ -27,13 +27,13 @@
|
||||
|
||||
class Item_func_inet_aton : public Item_longlong_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{ return check_argument_types_can_return_text(0, arg_count); }
|
||||
public:
|
||||
Item_func_inet_aton(THD *thd, Item *a): Item_longlong_func(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "inet_aton"; }
|
||||
bool fix_length_and_dec()
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "inet_aton"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals= 0;
|
||||
max_length= 21;
|
||||
@ -41,7 +41,7 @@ public:
|
||||
unsigned_flag= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_inet_aton>(thd, this); }
|
||||
};
|
||||
|
||||
@ -55,16 +55,16 @@ class Item_func_inet_ntoa : public Item_str_func
|
||||
public:
|
||||
Item_func_inet_ntoa(THD *thd, Item *a): Item_str_func(thd, a)
|
||||
{ }
|
||||
String* val_str(String* str);
|
||||
const char *func_name() const { return "inet_ntoa"; }
|
||||
bool fix_length_and_dec()
|
||||
String* val_str(String* str) override;
|
||||
const char *func_name() const override { return "inet_ntoa"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals= 0;
|
||||
fix_length_and_charset(3 * 8 + 7, default_charset());
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_inet_ntoa>(thd, this); }
|
||||
};
|
||||
|
||||
@ -82,7 +82,7 @@ public:
|
||||
{
|
||||
null_value= false;
|
||||
}
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
};
|
||||
|
||||
|
||||
@ -98,20 +98,20 @@ public:
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{ return "inet6_aton"; }
|
||||
|
||||
virtual bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals= 0;
|
||||
fix_length_and_charset(16, &my_charset_bin);
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_inet6_aton>(thd, this); }
|
||||
|
||||
String *val_str(String *to);
|
||||
String *val_str(String *to) override;
|
||||
};
|
||||
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{ return "inet6_ntoa"; }
|
||||
|
||||
virtual bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals= 0;
|
||||
|
||||
@ -142,8 +142,8 @@ public:
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
String *val_str_ascii(String *to);
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str_ascii(String *to) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_inet6_ntoa>(thd, this); }
|
||||
};
|
||||
|
||||
@ -160,12 +160,12 @@ public:
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{ return "is_ipv4"; }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_is_ipv4>(thd, this); }
|
||||
|
||||
longlong val_int();
|
||||
longlong val_int() override;
|
||||
};
|
||||
|
||||
|
||||
@ -180,12 +180,12 @@ public:
|
||||
Item_func_inet_bool_base(thd, ip_addr)
|
||||
{ }
|
||||
|
||||
virtual const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{ return "is_ipv6"; }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_is_ipv6>(thd, this); }
|
||||
|
||||
longlong val_int();
|
||||
longlong val_int() override;
|
||||
};
|
||||
|
||||
|
||||
@ -199,11 +199,11 @@ public:
|
||||
inline Item_func_is_ipv4_compat(THD *thd, Item *ip_addr):
|
||||
Item_func_inet_bool_base(thd, ip_addr)
|
||||
{ }
|
||||
virtual const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{ return "is_ipv4_compat"; }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, this); }
|
||||
longlong val_int();
|
||||
longlong val_int() override;
|
||||
};
|
||||
|
||||
|
||||
@ -217,11 +217,11 @@ public:
|
||||
inline Item_func_is_ipv4_mapped(THD *thd, Item *ip_addr):
|
||||
Item_func_inet_bool_base(thd, ip_addr)
|
||||
{ }
|
||||
virtual const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{ return "is_ipv4_mapped"; }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, this); }
|
||||
longlong val_int();
|
||||
longlong val_int() override;
|
||||
};
|
||||
|
||||
#endif // ITEM_INETFUNC_INCLUDED
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
static Create_func_inet_ntoa s_singleton;
|
||||
protected:
|
||||
Create_func_inet_ntoa() {}
|
||||
virtual ~Create_func_inet_ntoa() {}
|
||||
~Create_func_inet_ntoa() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ public:
|
||||
static Create_func_inet_aton s_singleton;
|
||||
protected:
|
||||
Create_func_inet_aton() {}
|
||||
virtual ~Create_func_inet_aton() {}
|
||||
~Create_func_inet_aton() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ public:
|
||||
static Create_func_inet6_aton s_singleton;
|
||||
protected:
|
||||
Create_func_inet6_aton() {}
|
||||
virtual ~Create_func_inet6_aton() {}
|
||||
~Create_func_inet6_aton() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
static Create_func_inet6_ntoa s_singleton;
|
||||
protected:
|
||||
Create_func_inet6_ntoa() {}
|
||||
virtual ~Create_func_inet6_ntoa() {}
|
||||
~Create_func_inet6_ntoa() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ public:
|
||||
static Create_func_is_ipv4 s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv4() {}
|
||||
virtual ~Create_func_is_ipv4() {}
|
||||
~Create_func_is_ipv4() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
static Create_func_is_ipv6 s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv6() {}
|
||||
virtual ~Create_func_is_ipv6() {}
|
||||
~Create_func_is_ipv6() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ public:
|
||||
static Create_func_is_ipv4_compat s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv4_compat() {}
|
||||
virtual ~Create_func_is_ipv4_compat() {}
|
||||
~Create_func_is_ipv4_compat() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ public:
|
||||
static Create_func_is_ipv4_mapped s_singleton;
|
||||
protected:
|
||||
Create_func_is_ipv4_mapped() {}
|
||||
virtual ~Create_func_is_ipv4_mapped() {}
|
||||
~Create_func_is_ipv4_mapped() override {}
|
||||
};
|
||||
|
||||
|
||||
|
@ -1102,9 +1102,9 @@ public:
|
||||
Item_cache_inet6(THD *thd)
|
||||
:Item_cache(thd, &type_handler_inet6)
|
||||
{ }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_cache_inet6>(thd, this); }
|
||||
bool cache_value()
|
||||
bool cache_value() override
|
||||
{
|
||||
if (!example)
|
||||
return false;
|
||||
@ -1119,54 +1119,54 @@ public:
|
||||
type_handler());
|
||||
return true;
|
||||
}
|
||||
String* val_str(String *to)
|
||||
String* val_str(String *to) override
|
||||
{
|
||||
if (!has_value())
|
||||
return NULL;
|
||||
Inet6_null tmp(m_value.ptr(), m_value.length());
|
||||
return tmp.is_null() || tmp.to_string(to) ? NULL : to;
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *to)
|
||||
my_decimal *val_decimal(my_decimal *to) override
|
||||
{
|
||||
if (!has_value())
|
||||
return NULL;
|
||||
my_decimal_set_zero(to);
|
||||
return to;
|
||||
}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
if (!has_value())
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
if (!has_value())
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
longlong val_datetime_packed(THD *thd)
|
||||
longlong val_datetime_packed(THD *thd) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
if (!has_value())
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
longlong val_time_packed(THD *thd)
|
||||
longlong val_time_packed(THD *thd) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
if (!has_value())
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
if (!has_value())
|
||||
return true;
|
||||
set_zero_time(ltime, MYSQL_TIMESTAMP_TIME);
|
||||
return false;
|
||||
}
|
||||
bool val_native(THD *thd, Native *to)
|
||||
bool val_native(THD *thd, Native *to) override
|
||||
{
|
||||
if (!has_value())
|
||||
return true;
|
||||
|
@ -62,14 +62,14 @@ public:
|
||||
&my_charset_utf8mb4_bin)
|
||||
{}
|
||||
|
||||
String *val_str(String *val_buffer, String *val_str);
|
||||
const Type_handler *type_handler() const { return &type_handler_mysql_json; }
|
||||
String *val_str(String *val_buffer, String *val_str) override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_mysql_json; }
|
||||
bool parse_mysql(String *dest, const char *data, size_t length) const;
|
||||
bool send(Protocol *protocol) { return Field::send(protocol); }
|
||||
void sql_type(String &s) const
|
||||
bool send(Protocol *protocol) override { return Field::send(protocol); }
|
||||
void sql_type(String &s) const override
|
||||
{ s.set_ascii(STRING_WITH_LEN("mysql_json /* JSON from MySQL 5.7 */")); }
|
||||
/* this will make ALTER TABLE to consider it different from built-in field */
|
||||
Compression_method *compression_method() const { return (Compression_method*)1; }
|
||||
Compression_method *compression_method() const override { return (Compression_method*)1; }
|
||||
};
|
||||
|
||||
Field *Type_handler_mysql_json::make_conversion_table_field(MEM_ROOT *root,
|
||||
|
@ -30,14 +30,14 @@ template <TR_table::field_id_t TRT_FIELD>
|
||||
class Create_func_trt : public Create_native_func
|
||||
{
|
||||
public:
|
||||
virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list);
|
||||
Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list) override;
|
||||
|
||||
static Create_func_trt<TRT_FIELD> s_singleton;
|
||||
|
||||
protected:
|
||||
Create_func_trt() = default;
|
||||
virtual ~Create_func_trt() = default;
|
||||
~Create_func_trt() override = default;
|
||||
};
|
||||
|
||||
template<TR_table::field_id_t TRT_FIELD>
|
||||
@ -104,8 +104,8 @@ template <class Item_func_trt_trx_seesX>
|
||||
class Create_func_trt_trx_sees : public Create_native_func
|
||||
{
|
||||
public:
|
||||
virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list)
|
||||
Item *create_native(THD *thd, const LEX_CSTRING *name,
|
||||
List<Item> *item_list) override
|
||||
{
|
||||
Item *func= NULL;
|
||||
int arg_count= 0;
|
||||
@ -133,7 +133,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_trt_trx_sees() = default;
|
||||
virtual ~Create_func_trt_trx_sees() = default;
|
||||
~Create_func_trt_trx_sees() override = default;
|
||||
};
|
||||
|
||||
template<class X>
|
||||
|
@ -71,14 +71,14 @@ public:
|
||||
Stored_program_creation_ctx **ctx);
|
||||
|
||||
public:
|
||||
virtual Stored_program_creation_ctx *clone(MEM_ROOT *mem_root)
|
||||
Stored_program_creation_ctx *clone(MEM_ROOT *mem_root) override
|
||||
{
|
||||
return new (mem_root)
|
||||
Event_creation_ctx(m_client_cs, m_connection_cl, m_db_cl);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Object_creation_ctx *create_backup_ctx(THD *thd) const
|
||||
Object_creation_ctx *create_backup_ctx(THD *thd) const override
|
||||
{
|
||||
/*
|
||||
We can avoid usual backup/restore employed in stored programs since we
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
virtual ~Event_queue_element();
|
||||
|
||||
virtual bool
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
load_from_row(THD *thd, TABLE *table) override;
|
||||
|
||||
bool
|
||||
compute_next_execution_time();
|
||||
@ -155,7 +155,7 @@ public:
|
||||
init();
|
||||
|
||||
virtual bool
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
load_from_row(THD *thd, TABLE *table) override;
|
||||
|
||||
int
|
||||
get_create_event(THD *thd, String *buf);
|
||||
@ -176,7 +176,7 @@ public:
|
||||
Event_job_data();
|
||||
|
||||
virtual bool
|
||||
load_from_row(THD *thd, TABLE *table);
|
||||
load_from_row(THD *thd, TABLE *table) override;
|
||||
|
||||
bool
|
||||
execute(THD *thd, bool drop);
|
||||
|
14
sql/field.h
14
sql/field.h
@ -3156,7 +3156,7 @@ public:
|
||||
:Field_temporal(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
|
||||
unireg_check_arg, field_name_arg)
|
||||
{}
|
||||
bool validate_value_in_record(THD *thd, const uchar *record) const;
|
||||
bool validate_value_in_record(THD *thd, const uchar *record) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -4161,7 +4161,7 @@ public:
|
||||
{
|
||||
return (uint32) field_length + sort_suffix_length();
|
||||
}
|
||||
virtual uint32 sort_suffix_length() const override
|
||||
uint32 sort_suffix_length() const override
|
||||
{
|
||||
return (field_charset() == &my_charset_bin ? length_bytes : 0);
|
||||
}
|
||||
@ -4507,7 +4507,7 @@ public:
|
||||
uint32 sort_length() const override;
|
||||
uint32 sort_suffix_length() const override;
|
||||
uint32 value_length() override { return get_length(); }
|
||||
virtual uint32 max_data_length() const override
|
||||
uint32 max_data_length() const override
|
||||
{
|
||||
return (uint32) (((ulonglong) 1 << (packlength*8)) -1);
|
||||
}
|
||||
@ -5119,20 +5119,20 @@ public:
|
||||
m_table(NULL)
|
||||
{}
|
||||
~Field_row();
|
||||
en_fieldtype tmp_engine_column_type(bool use_packed_rows) const
|
||||
en_fieldtype tmp_engine_column_type(bool use_packed_rows) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return Field::tmp_engine_column_type(use_packed_rows);
|
||||
}
|
||||
enum_conv_type rpl_conv_type_from(const Conv_source &source,
|
||||
const Relay_log_info *rli,
|
||||
const Conv_param ¶m) const
|
||||
const Conv_param ¶m) const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return CONV_TYPE_IMPOSSIBLE;
|
||||
}
|
||||
Virtual_tmp_table **virtual_tmp_table_addr() { return &m_table; }
|
||||
bool sp_prepare_and_store_item(THD *thd, Item **value);
|
||||
Virtual_tmp_table **virtual_tmp_table_addr() override { return &m_table; }
|
||||
bool sp_prepare_and_store_item(THD *thd, Item **value) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -146,16 +146,16 @@ public:
|
||||
Gcalc_operation_transporter(Gcalc_function *fn, Gcalc_heap *heap) :
|
||||
Gcalc_shape_transporter(heap), m_fn(fn) {}
|
||||
|
||||
int single_point(double x, double y);
|
||||
int start_line();
|
||||
int complete_line();
|
||||
int start_poly();
|
||||
int complete_poly();
|
||||
int start_ring();
|
||||
int complete_ring();
|
||||
int add_point(double x, double y);
|
||||
int start_collection(int n_objects);
|
||||
int empty_shape();
|
||||
int single_point(double x, double y) override;
|
||||
int start_line() override;
|
||||
int complete_line() override;
|
||||
int start_poly() override;
|
||||
int complete_poly() override;
|
||||
int start_ring() override;
|
||||
int complete_ring() override;
|
||||
int add_point(double x, double y) override;
|
||||
int start_collection(int n_objects) override;
|
||||
int empty_shape() override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -10344,7 +10344,7 @@ public:
|
||||
m_tot_parts(tot_parts)
|
||||
{}
|
||||
|
||||
~ha_partition_inplace_ctx()
|
||||
~ha_partition_inplace_ctx() override
|
||||
{
|
||||
if (handler_ctx_array)
|
||||
{
|
||||
|
@ -478,7 +478,7 @@ public:
|
||||
}
|
||||
Partition_share *get_part_share() { return part_share; }
|
||||
handler *clone(const char *name, MEM_ROOT *mem_root) override;
|
||||
virtual void set_part_info(partition_info *part_info) override
|
||||
void set_part_info(partition_info *part_info) override
|
||||
{
|
||||
m_part_info= part_info;
|
||||
m_is_sub_partitioned= part_info->is_sub_partitioned();
|
||||
|
@ -67,44 +67,44 @@ public:
|
||||
~ha_sequence();
|
||||
|
||||
/* virtual function that are re-implemented for sequence */
|
||||
int open(const char *name, int mode, uint test_if_locked);
|
||||
int open(const char *name, int mode, uint test_if_locked) override;
|
||||
int create(const char *name, TABLE *form,
|
||||
HA_CREATE_INFO *create_info);
|
||||
handler *clone(const char *name, MEM_ROOT *mem_root);
|
||||
int write_row(const uchar *buf);
|
||||
Table_flags table_flags() const;
|
||||
HA_CREATE_INFO *create_info) override;
|
||||
handler *clone(const char *name, MEM_ROOT *mem_root) override;
|
||||
int write_row(const uchar *buf) override;
|
||||
Table_flags table_flags() const override;
|
||||
/* One can't update or delete from sequence engine */
|
||||
int update_row(const uchar *old_data, const uchar *new_data)
|
||||
int update_row(const uchar *old_data, const uchar *new_data) override
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
int delete_row(const uchar *buf)
|
||||
int delete_row(const uchar *buf) override
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
/* One can't delete from sequence engine */
|
||||
int truncate()
|
||||
int truncate() override
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
/* Can't use query cache */
|
||||
uint8 table_cache_type()
|
||||
uint8 table_cache_type() override
|
||||
{ return HA_CACHE_TBL_NOCACHE; }
|
||||
void print_error(int error, myf errflag);
|
||||
int info(uint);
|
||||
LEX_CSTRING *engine_name() { return hton_name(file->ht); }
|
||||
int external_lock(THD *thd, int lock_type);
|
||||
int extra(enum ha_extra_function operation);
|
||||
void print_error(int error, myf errflag) override;
|
||||
int info(uint) override;
|
||||
LEX_CSTRING *engine_name() override { return hton_name(file->ht); }
|
||||
int external_lock(THD *thd, int lock_type) override;
|
||||
int extra(enum ha_extra_function operation) override;
|
||||
/* For ALTER ONLINE TABLE */
|
||||
bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
|
||||
uint table_changes);
|
||||
uint table_changes) override;
|
||||
void write_lock() { write_locked= 1;}
|
||||
void unlock() { write_locked= 0; }
|
||||
bool is_locked() { return write_locked; }
|
||||
|
||||
/* Functions that are directly mapped to the underlying handler */
|
||||
int rnd_init(bool scan)
|
||||
int rnd_init(bool scan) override
|
||||
{ return file->rnd_init(scan); }
|
||||
/*
|
||||
We need to have a lock here to protect engines like MyISAM from
|
||||
simultaneous read and write. For sequence's this is not critical
|
||||
as this function is used extremely seldom.
|
||||
*/
|
||||
int rnd_next(uchar *buf)
|
||||
int rnd_next(uchar *buf) override
|
||||
{
|
||||
int error;
|
||||
table->s->sequence->read_lock(table);
|
||||
@ -112,9 +112,9 @@ public:
|
||||
table->s->sequence->read_unlock(table);
|
||||
return error;
|
||||
}
|
||||
int rnd_end()
|
||||
int rnd_end() override
|
||||
{ return file->rnd_end(); }
|
||||
int rnd_pos(uchar *buf, uchar *pos)
|
||||
int rnd_pos(uchar *buf, uchar *pos) override
|
||||
{
|
||||
int error;
|
||||
table->s->sequence->read_lock(table);
|
||||
@ -122,37 +122,37 @@ public:
|
||||
table->s->sequence->read_unlock(table);
|
||||
return error;
|
||||
}
|
||||
void position(const uchar *record)
|
||||
void position(const uchar *record) override
|
||||
{ return file->position(record); }
|
||||
const char *table_type() const
|
||||
{ return file->table_type(); }
|
||||
ulong index_flags(uint inx, uint part, bool all_parts) const
|
||||
ulong index_flags(uint inx, uint part, bool all_parts) const override
|
||||
{ return file->index_flags(inx, part, all_parts); }
|
||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||
enum thr_lock_type lock_type)
|
||||
enum thr_lock_type lock_type) override
|
||||
{ return file->store_lock(thd, to, lock_type); }
|
||||
int close(void)
|
||||
int close(void) override
|
||||
{ return file->close(); }
|
||||
const char **bas_ext() const
|
||||
{ return file->bas_ext(); }
|
||||
int delete_table(const char*name)
|
||||
int delete_table(const char*name) override
|
||||
{ return file->delete_table(name); }
|
||||
int rename_table(const char *from, const char *to)
|
||||
int rename_table(const char *from, const char *to) override
|
||||
{ return file->rename_table(from, to); }
|
||||
void unbind_psi()
|
||||
void unbind_psi() override
|
||||
{ file->unbind_psi(); }
|
||||
void rebind_psi()
|
||||
void rebind_psi() override
|
||||
{ file->rebind_psi(); }
|
||||
|
||||
bool auto_repair(int error) const
|
||||
bool auto_repair(int error) const override
|
||||
{ return file->auto_repair(error); }
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt) override
|
||||
{ return file->repair(thd, check_opt); }
|
||||
bool check_and_repair(THD *thd)
|
||||
bool check_and_repair(THD *thd) override
|
||||
{ return file->check_and_repair(thd); }
|
||||
bool is_crashed() const
|
||||
bool is_crashed() const override
|
||||
{ return file->is_crashed(); }
|
||||
void column_bitmaps_signal()
|
||||
void column_bitmaps_signal() override
|
||||
{ return file->column_bitmaps_signal(); }
|
||||
|
||||
/* New methods */
|
||||
|
@ -162,7 +162,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
*cond_hdl= NULL;
|
||||
if (non_existing_table_error(sql_errno))
|
||||
|
@ -5141,8 +5141,8 @@ public:
|
||||
: thd(thd_arg), wild(NULL), with_temps(true), tables(tables_arg) {}
|
||||
~Discovered_table_list() = default;
|
||||
|
||||
bool add_table(const char *tname, size_t tlen);
|
||||
bool add_file(const char *fname);
|
||||
bool add_table(const char *tname, size_t tlen) override;
|
||||
bool add_file(const char *fname) override;
|
||||
|
||||
void sort();
|
||||
void remove_duplicates(); // assumes that the list is sorted
|
||||
|
@ -7992,7 +7992,7 @@ class Dependency_marker: public Field_enumerator
|
||||
public:
|
||||
THD *thd;
|
||||
st_select_lex *current_select;
|
||||
virtual void visit_field(Item_field *item)
|
||||
void visit_field(Item_field *item) override
|
||||
{
|
||||
// Find which select the field is in. This is achieved by walking up
|
||||
// the select tree and looking for the table of interest.
|
||||
|
170
sql/item.h
170
sql/item.h
@ -417,16 +417,16 @@ public:
|
||||
class Sp_rcontext_handler_local: public Sp_rcontext_handler
|
||||
{
|
||||
public:
|
||||
const LEX_CSTRING *get_name_prefix() const;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const;
|
||||
const LEX_CSTRING *get_name_prefix() const override;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const override;
|
||||
};
|
||||
|
||||
|
||||
class Sp_rcontext_handler_package_body: public Sp_rcontext_handler
|
||||
{
|
||||
public:
|
||||
const LEX_CSTRING *get_name_prefix() const;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const;
|
||||
const LEX_CSTRING *get_name_prefix() const override;
|
||||
sp_rcontext *get_rcontext(sp_rcontext *ctx) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -1156,9 +1156,9 @@ public:
|
||||
{
|
||||
return type_handler()->max_display_length(this);
|
||||
}
|
||||
const TYPELIB *get_typelib() const { return NULL; }
|
||||
void set_maybe_null(bool maybe_null_arg) { maybe_null= maybe_null_arg; }
|
||||
void set_typelib(const TYPELIB *typelib)
|
||||
const TYPELIB *get_typelib() const override { return NULL; }
|
||||
void set_maybe_null(bool maybe_null_arg) override { maybe_null= maybe_null_arg; }
|
||||
void set_typelib(const TYPELIB *typelib) override
|
||||
{
|
||||
// Non-field Items (e.g. hybrid functions) never have ENUM/SET types yet.
|
||||
DBUG_ASSERT(0);
|
||||
@ -1666,7 +1666,7 @@ public:
|
||||
inline uint float_length(uint decimals_par) const
|
||||
{ return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
|
||||
/* Returns total number of decimal digits */
|
||||
virtual uint decimal_precision() const
|
||||
uint decimal_precision() const override
|
||||
{
|
||||
return type_handler()->Item_decimal_precision(this);
|
||||
}
|
||||
@ -2798,20 +2798,20 @@ public:
|
||||
Item_fixed_hybrid(THD *thd, Item_fixed_hybrid *item)
|
||||
:Item(thd, item), fixed(item->fixed)
|
||||
{ }
|
||||
bool fix_fields(THD *thd, Item **ref)
|
||||
bool fix_fields(THD *thd, Item **ref) override
|
||||
{
|
||||
DBUG_ASSERT(!fixed);
|
||||
fixed= true;
|
||||
return false;
|
||||
}
|
||||
void cleanup()
|
||||
void cleanup() override
|
||||
{
|
||||
Item::cleanup();
|
||||
fixed= false;
|
||||
}
|
||||
void quick_fix_field() { fixed= true; }
|
||||
void unfix_fields() { fixed= false; }
|
||||
bool is_fixed() const { return fixed; }
|
||||
void quick_fix_field() override { fixed= true; }
|
||||
void unfix_fields() override { fixed= false; }
|
||||
bool is_fixed() const override { return fixed; }
|
||||
};
|
||||
|
||||
|
||||
@ -2889,8 +2889,8 @@ class Item_basic_constant :public Item_basic_value
|
||||
{
|
||||
public:
|
||||
Item_basic_constant(THD *thd): Item_basic_value(thd) {};
|
||||
bool check_vcol_func_processor(void *arg) { return false; }
|
||||
const Item_const *get_item_const() const { return this; }
|
||||
bool check_vcol_func_processor(void *arg) override { return false; }
|
||||
const Item_const *get_item_const() const override { return this; }
|
||||
virtual Item_basic_constant *make_string_literal_concat(THD *thd,
|
||||
const LEX_CSTRING *)
|
||||
{
|
||||
@ -4330,11 +4330,11 @@ public:
|
||||
Item_uint(THD *thd, const char *str_arg, size_t length);
|
||||
Item_uint(THD *thd, ulonglong i): Item_int(thd, i, 10) {}
|
||||
Item_uint(THD *thd, const char *str_arg, longlong i, uint length);
|
||||
double val_real() { return ulonglong2double((ulonglong)value); }
|
||||
Item *clone_item(THD *thd);
|
||||
Item *neg(THD *thd);
|
||||
uint decimal_precision() const { return max_length; }
|
||||
Item *get_copy(THD *thd)
|
||||
double val_real() override { return ulonglong2double((ulonglong)value); }
|
||||
Item *clone_item(THD *thd) override;
|
||||
Item *neg(THD *thd) override;
|
||||
uint decimal_precision() const override { return max_length; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_uint>(thd, this); }
|
||||
};
|
||||
|
||||
@ -4617,7 +4617,7 @@ public:
|
||||
const LEX_CSTRING &str, CHARSET_INFO *tocs):
|
||||
Item_string(thd, name_arg, str, tocs)
|
||||
{ }
|
||||
virtual bool is_cs_specified() const
|
||||
bool is_cs_specified() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -4696,7 +4696,7 @@ public:
|
||||
{
|
||||
max_length= length;
|
||||
}
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function("safe_string", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
@ -4721,7 +4721,7 @@ public:
|
||||
:Item_partition_func_safe_string(thd, LEX_CSTRING({header, strlen(header)}),
|
||||
length * cs->mbmaxlen, cs)
|
||||
{ }
|
||||
void make_send_field(THD *thd, Send_field *field);
|
||||
void make_send_field(THD *thd, Send_field *field) override;
|
||||
};
|
||||
|
||||
|
||||
@ -4735,7 +4735,7 @@ public:
|
||||
{
|
||||
unsigned_flag=1;
|
||||
}
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
const Type_handler *h=
|
||||
Type_handler::get_handler_by_field_type(int_field_type);
|
||||
@ -4761,14 +4761,14 @@ public:
|
||||
{
|
||||
hex_string_init(thd, str, str_length);
|
||||
}
|
||||
const Type_handler *type_handler() const { return &type_handler_varchar; }
|
||||
virtual Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
|
||||
const Type_handler *type_handler() const override { return &type_handler_varchar; }
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override
|
||||
{
|
||||
return const_charset_converter(thd, tocs, true);
|
||||
}
|
||||
const String *const_ptr_string() const { return &str_value; }
|
||||
String *val_str(String*) { return &str_value; }
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
const String *const_ptr_string() const override { return &str_value; }
|
||||
String *val_str(String*) override { return &str_value; }
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
@ -5132,7 +5132,7 @@ public:
|
||||
{
|
||||
maybe_null= false;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
cached_time.copy_to_mysql_time(ltime);
|
||||
return (null_value= false);
|
||||
@ -5153,7 +5153,7 @@ public:
|
||||
{
|
||||
maybe_null= false;
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
cached_time.copy_to_mysql_time(ltime);
|
||||
return (null_value= false);
|
||||
@ -7074,7 +7074,7 @@ class Item_cache_year: public Item_cache_int
|
||||
public:
|
||||
Item_cache_year(THD *thd, const Type_handler *handler)
|
||||
:Item_cache_int(thd, handler) { }
|
||||
bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
|
||||
bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode) override
|
||||
{
|
||||
return type_handler_year.Item_get_date_with_warn(thd, this, to, mode);
|
||||
}
|
||||
@ -7281,8 +7281,8 @@ public:
|
||||
Item_cache_double(THD *thd)
|
||||
:Item_cache_real(thd, &type_handler_double)
|
||||
{ }
|
||||
String* val_str(String *str);
|
||||
Item *get_copy(THD *thd)
|
||||
String* val_str(String *str) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_cache_double>(thd, this); }
|
||||
};
|
||||
|
||||
@ -7293,8 +7293,8 @@ public:
|
||||
Item_cache_float(THD *thd)
|
||||
:Item_cache_real(thd, &type_handler_float)
|
||||
{ }
|
||||
String* val_str(String *str);
|
||||
Item *get_copy(THD *thd)
|
||||
String* val_str(String *str) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_cache_float>(thd, this); }
|
||||
};
|
||||
|
||||
@ -7358,7 +7358,7 @@ public:
|
||||
Item_cache_str_for_nullif(THD *thd, const Item *item)
|
||||
:Item_cache_str(thd, item)
|
||||
{ }
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override
|
||||
{
|
||||
/**
|
||||
Item_cache_str::safe_charset_converter() returns a new Item_cache
|
||||
@ -7372,7 +7372,7 @@ public:
|
||||
*/
|
||||
return Item::safe_charset_converter(thd, tocs);
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_cache_str_for_nullif>(thd, this); }
|
||||
};
|
||||
|
||||
@ -7594,9 +7594,9 @@ class Item_iterator_ref_list: public Item_iterator
|
||||
public:
|
||||
Item_iterator_ref_list(List_iterator<Item*> &arg_list):
|
||||
list(arg_list) {}
|
||||
void open() { list.rewind(); }
|
||||
Item *next() { return *(list++); }
|
||||
void close() {}
|
||||
void open() override { list.rewind(); }
|
||||
Item *next() override { return *(list++); }
|
||||
void close() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -7610,9 +7610,9 @@ class Item_iterator_list: public Item_iterator
|
||||
public:
|
||||
Item_iterator_list(List_iterator<Item> &arg_list):
|
||||
list(arg_list) {}
|
||||
void open() { list.rewind(); }
|
||||
Item *next() { return (list++); }
|
||||
void close() {}
|
||||
void open() override { list.rewind(); }
|
||||
Item *next() override { return (list++); }
|
||||
void close() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -7626,14 +7626,14 @@ class Item_iterator_row: public Item_iterator
|
||||
uint current;
|
||||
public:
|
||||
Item_iterator_row(Item *base) : base_item(base), current(0) {}
|
||||
void open() { current= 0; }
|
||||
Item *next()
|
||||
void open() override { current= 0; }
|
||||
Item *next() override
|
||||
{
|
||||
if (current >= base_item->cols())
|
||||
return NULL;
|
||||
return base_item->element_index(current++);
|
||||
}
|
||||
void close() {}
|
||||
void close() override {}
|
||||
};
|
||||
|
||||
|
||||
@ -7679,84 +7679,84 @@ public:
|
||||
|
||||
void change_item(THD *thd, Item *);
|
||||
|
||||
bool fix_fields(THD *thd, Item **it);
|
||||
bool fix_fields(THD *thd, Item **it) override;
|
||||
|
||||
void print(String *str, enum_query_type query_type);
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
|
||||
Item *get_tmp_table_item(THD *thd)
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override;
|
||||
Item *get_tmp_table_item(THD *thd) override
|
||||
{ return m_item->get_tmp_table_item(thd); }
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_direct_ref_to_item>(thd, this); }
|
||||
COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
|
||||
bool link_item_fields,
|
||||
COND_EQUAL **cond_equal_ref)
|
||||
COND_EQUAL **cond_equal_ref) override
|
||||
{
|
||||
return m_item->build_equal_items(thd, inherited, link_item_fields,
|
||||
cond_equal_ref);
|
||||
}
|
||||
const char *full_name() const { return m_item->full_name(); }
|
||||
void make_send_field(THD *thd, Send_field *field)
|
||||
const char *full_name() const override { return m_item->full_name(); }
|
||||
void make_send_field(THD *thd, Send_field *field) override
|
||||
{ m_item->make_send_field(thd, field); }
|
||||
bool eq(const Item *item, bool binary_cmp) const
|
||||
bool eq(const Item *item, bool binary_cmp) const override
|
||||
{
|
||||
const Item *it= item->real_item();
|
||||
return m_item->eq(it, binary_cmp);
|
||||
}
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge)
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge) override
|
||||
{ m_item->fix_after_pullout(new_parent, &m_item, merge); }
|
||||
void save_val(Field *to)
|
||||
void save_val(Field *to) override
|
||||
{ return m_item->save_val(to); }
|
||||
void save_result(Field *to)
|
||||
void save_result(Field *to) override
|
||||
{ return m_item->save_result(to); }
|
||||
int save_in_field(Field *to, bool no_conversions)
|
||||
int save_in_field(Field *to, bool no_conversions) override
|
||||
{ return m_item->save_in_field(to, no_conversions); }
|
||||
const Type_handler *type_handler() const { return m_item->type_handler(); }
|
||||
table_map used_tables() const { return m_item->used_tables(); }
|
||||
void update_used_tables()
|
||||
const Type_handler *type_handler() const override { return m_item->type_handler(); }
|
||||
table_map used_tables() const override { return m_item->used_tables(); }
|
||||
void update_used_tables() override
|
||||
{ m_item->update_used_tables(); }
|
||||
bool const_item() const { return m_item->const_item(); }
|
||||
table_map not_null_tables() const { return m_item->not_null_tables(); }
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg)
|
||||
bool const_item() const override { return m_item->const_item(); }
|
||||
table_map not_null_tables() const override { return m_item->not_null_tables(); }
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg) override
|
||||
{
|
||||
return m_item->walk(processor, walk_subquery, arg) ||
|
||||
(this->*processor)(arg);
|
||||
}
|
||||
bool enumerate_field_refs_processor(void *arg)
|
||||
bool enumerate_field_refs_processor(void *arg) override
|
||||
{ return m_item->enumerate_field_refs_processor(arg); }
|
||||
Item_field *field_for_view_update()
|
||||
Item_field *field_for_view_update() override
|
||||
{ return m_item->field_for_view_update(); }
|
||||
|
||||
/* Row emulation: forwarding of ROW-related calls to orig_item */
|
||||
uint cols() const
|
||||
uint cols() const override
|
||||
{ return m_item->cols(); }
|
||||
Item* element_index(uint i)
|
||||
Item* element_index(uint i) override
|
||||
{ return this; }
|
||||
Item** addr(uint i)
|
||||
Item** addr(uint i) override
|
||||
{ return &m_item; }
|
||||
bool check_cols(uint c)
|
||||
bool check_cols(uint c) override
|
||||
{ return Item::check_cols(c); }
|
||||
bool null_inside()
|
||||
bool null_inside() override
|
||||
{ return m_item->null_inside(); }
|
||||
void bring_value()
|
||||
void bring_value() override
|
||||
{}
|
||||
|
||||
Item_equal *get_item_equal() { return m_item->get_item_equal(); }
|
||||
void set_item_equal(Item_equal *item_eq) { m_item->set_item_equal(item_eq); }
|
||||
Item_equal *find_item_equal(COND_EQUAL *cond_equal)
|
||||
Item_equal *get_item_equal() override { return m_item->get_item_equal(); }
|
||||
void set_item_equal(Item_equal *item_eq) override { m_item->set_item_equal(item_eq); }
|
||||
Item_equal *find_item_equal(COND_EQUAL *cond_equal) override
|
||||
{ return m_item->find_item_equal(cond_equal); }
|
||||
Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override
|
||||
{ return m_item->propagate_equal_fields(thd, ctx, cond); }
|
||||
Item *replace_equal_field(THD *thd, uchar *arg)
|
||||
Item *replace_equal_field(THD *thd, uchar *arg) override
|
||||
{ return m_item->replace_equal_field(thd, arg); }
|
||||
|
||||
bool excl_dep_on_table(table_map tab_map)
|
||||
bool excl_dep_on_table(table_map tab_map) override
|
||||
{ return m_item->excl_dep_on_table(tab_map); }
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel)
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel) override
|
||||
{ return m_item->excl_dep_on_grouping_fields(sel); }
|
||||
bool is_expensive() { return m_item->is_expensive(); }
|
||||
bool is_expensive() override { return m_item->is_expensive(); }
|
||||
void set_item(Item *item) { m_item= item; }
|
||||
Item *build_clone(THD *thd)
|
||||
Item *build_clone(THD *thd) override
|
||||
{
|
||||
Item *clone_item= m_item->build_clone(thd);
|
||||
if (clone_item)
|
||||
@ -7771,7 +7771,7 @@ public:
|
||||
}
|
||||
|
||||
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
List<Item> &fields, uint flags)
|
||||
List<Item> &fields, uint flags) override
|
||||
{
|
||||
m_item->split_sum_func(thd, ref_pointer_array, fields, flags);
|
||||
}
|
||||
@ -7779,7 +7779,7 @@ public:
|
||||
This processor states that this is safe for virtual columns
|
||||
(because this Item transparency)
|
||||
*/
|
||||
bool check_vcol_func_processor(void *arg) { return FALSE;}
|
||||
bool check_vcol_func_processor(void *arg) override { return FALSE;}
|
||||
};
|
||||
|
||||
inline bool TABLE::mark_column_with_deps(Field *field)
|
||||
|
@ -4823,7 +4823,7 @@ class Func_handler_bit_or_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
Longlong_null a= item->arguments()[0]->to_longlong_null();
|
||||
@ -4836,7 +4836,7 @@ class Func_handler_bit_or_dec_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
VDec a(item->arguments()[0]);
|
||||
@ -4858,7 +4858,7 @@ class Func_handler_bit_and_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
Longlong_null a= item->arguments()[0]->to_longlong_null();
|
||||
@ -4871,7 +4871,7 @@ class Func_handler_bit_and_dec_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
VDec a(item->arguments()[0]);
|
||||
|
1064
sql/item_cmpfunc.h
1064
sql/item_cmpfunc.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2150,7 +2150,7 @@ class Func_handler_shift_left_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return item->arguments()[0]->to_longlong_null() <<
|
||||
@ -2163,7 +2163,7 @@ class Func_handler_shift_left_decimal_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null() <<
|
||||
@ -2184,7 +2184,7 @@ class Func_handler_shift_right_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->fixed == 1);
|
||||
return item->arguments()[0]->to_longlong_null() >>
|
||||
@ -2197,7 +2197,7 @@ class Func_handler_shift_right_decimal_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null() >>
|
||||
@ -2218,7 +2218,7 @@ class Func_handler_bit_neg_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return ~ item->arguments()[0]->to_longlong_null();
|
||||
@ -2230,7 +2230,7 @@ class Func_handler_bit_neg_decimal_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return ~ VDec(item->arguments()[0]).to_xlonglong_null();
|
||||
@ -3428,7 +3428,7 @@ class Func_handler_bit_count_int_to_slong:
|
||||
public Item_handled_func::Handler_slong2
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return item->arguments()[0]->to_longlong_null().bit_count();
|
||||
@ -3440,7 +3440,7 @@ class Func_handler_bit_count_decimal_to_slong:
|
||||
public Item_handled_func::Handler_slong2
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null().bit_count();
|
||||
@ -4182,7 +4182,7 @@ public:
|
||||
const char * /* sqlstate */,
|
||||
Sql_condition::enum_warning_level* /* level */,
|
||||
const char *message,
|
||||
Sql_condition ** /* cond_hdl */);
|
||||
Sql_condition ** /* cond_hdl */) override;
|
||||
};
|
||||
|
||||
bool
|
||||
@ -6500,7 +6500,7 @@ class Func_handler_bit_xor_int_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return item->arguments()[0]->to_longlong_null() ^
|
||||
@ -6513,7 +6513,7 @@ class Func_handler_bit_xor_dec_to_ulonglong:
|
||||
public Item_handled_func::Handler_ulonglong
|
||||
{
|
||||
public:
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const
|
||||
Longlong_null to_longlong_null(Item_handled_func *item) const override
|
||||
{
|
||||
DBUG_ASSERT(item->is_fixed());
|
||||
return VDec(item->arguments()[0]).to_xlonglong_null() ^
|
||||
|
1440
sql/item_func.h
1440
sql/item_func.h
File diff suppressed because it is too large
Load Diff
@ -2790,7 +2790,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_area() = default;
|
||||
virtual ~Create_func_area() = default;
|
||||
~Create_func_area() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2806,7 +2806,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_as_wkb() = default;
|
||||
virtual ~Create_func_as_wkb() = default;
|
||||
~Create_func_as_wkb() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2822,7 +2822,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_as_wkt() = default;
|
||||
virtual ~Create_func_as_wkt() = default;
|
||||
~Create_func_as_wkt() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2839,7 +2839,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_centroid() = default;
|
||||
virtual ~Create_func_centroid() = default;
|
||||
~Create_func_centroid() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2855,7 +2855,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_convexhull() = default;
|
||||
virtual ~Create_func_convexhull() = default;
|
||||
~Create_func_convexhull() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2871,7 +2871,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_pointonsurface() = default;
|
||||
virtual ~Create_func_pointonsurface() = default;
|
||||
~Create_func_pointonsurface() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2888,7 +2888,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_contains() = default;
|
||||
virtual ~Create_func_mbr_contains() = default;
|
||||
~Create_func_mbr_contains() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2904,7 +2904,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_contains() = default;
|
||||
virtual ~Create_func_contains() = default;
|
||||
~Create_func_contains() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2920,7 +2920,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_crosses() = default;
|
||||
virtual ~Create_func_crosses() = default;
|
||||
~Create_func_crosses() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2936,7 +2936,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_dimension() = default;
|
||||
virtual ~Create_func_dimension() = default;
|
||||
~Create_func_dimension() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2953,7 +2953,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_disjoint() = default;
|
||||
virtual ~Create_func_mbr_disjoint() = default;
|
||||
~Create_func_mbr_disjoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2969,7 +2969,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_disjoint() = default;
|
||||
virtual ~Create_func_disjoint() = default;
|
||||
~Create_func_disjoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2985,7 +2985,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_distance() = default;
|
||||
virtual ~Create_func_distance() = default;
|
||||
~Create_func_distance() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -2998,7 +2998,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_distance_sphere() = default;
|
||||
virtual ~Create_func_distance_sphere() = default;
|
||||
~Create_func_distance_sphere() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3033,7 +3033,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_endpoint() = default;
|
||||
virtual ~Create_func_endpoint() = default;
|
||||
~Create_func_endpoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3049,7 +3049,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_envelope() = default;
|
||||
virtual ~Create_func_envelope() = default;
|
||||
~Create_func_envelope() override = default;
|
||||
};
|
||||
|
||||
class Create_func_boundary : public Create_func_arg1
|
||||
@ -3064,7 +3064,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_boundary() = default;
|
||||
virtual ~Create_func_boundary() = default;
|
||||
~Create_func_boundary() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3081,7 +3081,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_equals() = default;
|
||||
virtual ~Create_func_mbr_equals() = default;
|
||||
~Create_func_mbr_equals() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3098,7 +3098,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_equals() = default;
|
||||
virtual ~Create_func_equals() = default;
|
||||
~Create_func_equals() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3115,7 +3115,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_exteriorring() = default;
|
||||
virtual ~Create_func_exteriorring() = default;
|
||||
~Create_func_exteriorring() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3130,7 +3130,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_from_text() = default;
|
||||
virtual ~Create_func_geometry_from_text() = default;
|
||||
~Create_func_geometry_from_text() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3181,7 +3181,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_from_wkb() = default;
|
||||
virtual ~Create_func_geometry_from_wkb() = default;
|
||||
~Create_func_geometry_from_wkb() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3231,7 +3231,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_from_json() = default;
|
||||
virtual ~Create_func_geometry_from_json() = default;
|
||||
~Create_func_geometry_from_json() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3291,7 +3291,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_as_geojson() = default;
|
||||
virtual ~Create_func_as_geojson() = default;
|
||||
~Create_func_as_geojson() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3351,7 +3351,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometry_type() = default;
|
||||
virtual ~Create_func_geometry_type() = default;
|
||||
~Create_func_geometry_type() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3368,7 +3368,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_geometryn() = default;
|
||||
virtual ~Create_func_geometryn() = default;
|
||||
~Create_func_geometryn() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3385,7 +3385,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_gis_debug() = default;
|
||||
virtual ~Create_func_gis_debug() = default;
|
||||
~Create_func_gis_debug() override = default;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -3402,7 +3402,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_glength() = default;
|
||||
virtual ~Create_func_glength() = default;
|
||||
~Create_func_glength() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3419,7 +3419,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_interiorringn() = default;
|
||||
virtual ~Create_func_interiorringn() = default;
|
||||
~Create_func_interiorringn() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3435,7 +3435,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_relate() = default;
|
||||
virtual ~Create_func_relate() = default;
|
||||
~Create_func_relate() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3452,7 +3452,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_intersects() = default;
|
||||
virtual ~Create_func_mbr_intersects() = default;
|
||||
~Create_func_mbr_intersects() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3469,7 +3469,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_intersects() = default;
|
||||
virtual ~Create_func_intersects() = default;
|
||||
~Create_func_intersects() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3486,7 +3486,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_intersection() = default;
|
||||
virtual ~Create_func_intersection() = default;
|
||||
~Create_func_intersection() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3503,7 +3503,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_difference() = default;
|
||||
virtual ~Create_func_difference() = default;
|
||||
~Create_func_difference() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3520,7 +3520,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_union() = default;
|
||||
virtual ~Create_func_union() = default;
|
||||
~Create_func_union() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3537,7 +3537,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_symdifference() = default;
|
||||
virtual ~Create_func_symdifference() = default;
|
||||
~Create_func_symdifference() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3553,7 +3553,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_buffer() = default;
|
||||
virtual ~Create_func_buffer() = default;
|
||||
~Create_func_buffer() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3569,7 +3569,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_isclosed() = default;
|
||||
virtual ~Create_func_isclosed() = default;
|
||||
~Create_func_isclosed() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3585,7 +3585,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_isring() = default;
|
||||
virtual ~Create_func_isring() = default;
|
||||
~Create_func_isring() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3601,7 +3601,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_isempty() = default;
|
||||
virtual ~Create_func_isempty() = default;
|
||||
~Create_func_isempty() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3617,7 +3617,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_issimple() = default;
|
||||
virtual ~Create_func_issimple() = default;
|
||||
~Create_func_issimple() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3634,7 +3634,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_numgeometries() = default;
|
||||
virtual ~Create_func_numgeometries() = default;
|
||||
~Create_func_numgeometries() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3650,7 +3650,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_numinteriorring() = default;
|
||||
virtual ~Create_func_numinteriorring() = default;
|
||||
~Create_func_numinteriorring() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3666,7 +3666,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_numpoints() = default;
|
||||
virtual ~Create_func_numpoints() = default;
|
||||
~Create_func_numpoints() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3683,7 +3683,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_overlaps() = default;
|
||||
virtual ~Create_func_mbr_overlaps() = default;
|
||||
~Create_func_mbr_overlaps() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3700,7 +3700,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_overlaps() = default;
|
||||
virtual ~Create_func_overlaps() = default;
|
||||
~Create_func_overlaps() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3719,7 +3719,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_pointn() = default;
|
||||
virtual ~Create_func_pointn() = default;
|
||||
~Create_func_pointn() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3737,7 +3737,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_srid() = default;
|
||||
virtual ~Create_func_srid() = default;
|
||||
~Create_func_srid() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3754,7 +3754,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_startpoint() = default;
|
||||
virtual ~Create_func_startpoint() = default;
|
||||
~Create_func_startpoint() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3772,7 +3772,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_touches() = default;
|
||||
virtual ~Create_func_touches() = default;
|
||||
~Create_func_touches() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3789,7 +3789,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_mbr_within() = default;
|
||||
virtual ~Create_func_mbr_within() = default;
|
||||
~Create_func_mbr_within() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3806,7 +3806,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_within() = default;
|
||||
virtual ~Create_func_within() = default;
|
||||
~Create_func_within() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3822,7 +3822,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_x() = default;
|
||||
virtual ~Create_func_x() = default;
|
||||
~Create_func_x() override = default;
|
||||
};
|
||||
|
||||
|
||||
@ -3838,7 +3838,7 @@ public:
|
||||
|
||||
protected:
|
||||
Create_func_y() = default;
|
||||
virtual ~Create_func_y() = default;
|
||||
~Create_func_y() override = default;
|
||||
};
|
||||
|
||||
|
||||
|
@ -42,8 +42,8 @@ public:
|
||||
Item_geometry_func(THD *thd, Item *a, Item *b, Item *c):
|
||||
Item_str_func(thd, a, b, c) {}
|
||||
Item_geometry_func(THD *thd, List<Item> &list): Item_str_func(thd, list) {}
|
||||
bool fix_length_and_dec();
|
||||
const Type_handler *type_handler() const { return &type_handler_geometry; }
|
||||
bool fix_length_and_dec() override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_geometry; }
|
||||
};
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ class Item_real_func_args_geometry: public Item_real_func
|
||||
{
|
||||
protected:
|
||||
String value;
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count == 1);
|
||||
return Type_handler_geometry::check_type_geom_or_binary(func_name(),
|
||||
@ -71,7 +71,7 @@ public:
|
||||
*/
|
||||
class Item_long_func_args_geometry: public Item_long_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count == 1);
|
||||
return Type_handler_geometry::check_type_geom_or_binary(func_name(),
|
||||
@ -92,7 +92,7 @@ class Item_bool_func_args_geometry: public Item_bool_func
|
||||
{
|
||||
protected:
|
||||
String value;
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count == 1);
|
||||
return Type_handler_geometry::check_type_geom_or_binary(func_name(),
|
||||
@ -110,7 +110,7 @@ public:
|
||||
class Item_str_ascii_func_args_geometry: public Item_str_ascii_func
|
||||
{
|
||||
protected:
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 1);
|
||||
return Type_handler_geometry::check_type_geom_or_binary(func_name(),
|
||||
@ -132,7 +132,7 @@ public:
|
||||
class Item_binary_func_args_geometry: public Item_str_func
|
||||
{
|
||||
protected:
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 1);
|
||||
return Type_handler_geometry::check_type_geom_or_binary(func_name(),
|
||||
@ -150,7 +150,7 @@ public:
|
||||
class Item_geometry_func_args_geometry: public Item_geometry_func
|
||||
{
|
||||
protected:
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 1);
|
||||
return Type_handler_geometry::check_type_geom_or_binary(func_name(),
|
||||
@ -170,7 +170,7 @@ public:
|
||||
class Item_real_func_args_geometry_geometry: public Item_real_func
|
||||
{
|
||||
protected:
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 2);
|
||||
return Type_handler_geometry::check_types_geom_or_binary(func_name(),
|
||||
@ -189,7 +189,7 @@ class Item_bool_func_args_geometry_geometry: public Item_bool_func
|
||||
{
|
||||
protected:
|
||||
String value;
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 2);
|
||||
return Type_handler_geometry::check_types_geom_or_binary(func_name(),
|
||||
@ -203,7 +203,7 @@ public:
|
||||
|
||||
class Item_func_geometry_from_text: public Item_geometry_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return args[0]->check_type_general_purpose_string(func_name()) ||
|
||||
check_argument_types_can_return_int(1, MY_MIN(2, arg_count));
|
||||
@ -212,15 +212,15 @@ public:
|
||||
Item_func_geometry_from_text(THD *thd, Item *a): Item_geometry_func(thd, a) {}
|
||||
Item_func_geometry_from_text(THD *thd, Item *a, Item *srid):
|
||||
Item_geometry_func(thd, a, srid) {}
|
||||
const char *func_name() const { return "st_geometryfromtext"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_geometryfromtext"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_geometry_from_text>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_geometry_from_wkb: public Item_geometry_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return
|
||||
Type_handler_geometry::check_type_geom_or_binary(func_name(), args[0]) ||
|
||||
@ -230,9 +230,9 @@ public:
|
||||
Item_func_geometry_from_wkb(THD *thd, Item *a): Item_geometry_func(thd, a) {}
|
||||
Item_func_geometry_from_wkb(THD *thd, Item *a, Item *srid):
|
||||
Item_geometry_func(thd, a, srid) {}
|
||||
const char *func_name() const { return "st_geometryfromwkb"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_geometryfromwkb"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_geometry_from_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
@ -240,7 +240,7 @@ public:
|
||||
class Item_func_geometry_from_json: public Item_geometry_func
|
||||
{
|
||||
String tmp_js;
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
// TODO: check with Alexey, for better args[1] and args[2] type control
|
||||
return args[0]->check_type_general_purpose_string(func_name()) ||
|
||||
@ -252,9 +252,9 @@ public:
|
||||
Item_geometry_func(thd, js, opt) {}
|
||||
Item_func_geometry_from_json(THD *thd, Item *js, Item *opt, Item *srid):
|
||||
Item_geometry_func(thd, js, opt, srid) {}
|
||||
const char *func_name() const { return "st_geomfromgeojson"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_geomfromgeojson"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_geometry_from_json>(thd, this); }
|
||||
};
|
||||
|
||||
@ -264,10 +264,10 @@ class Item_func_as_wkt: public Item_str_ascii_func_args_geometry
|
||||
public:
|
||||
Item_func_as_wkt(THD *thd, Item *a)
|
||||
:Item_str_ascii_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_astext"; }
|
||||
String *val_str_ascii(String *);
|
||||
bool fix_length_and_dec();
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_astext"; }
|
||||
String *val_str_ascii(String *) override;
|
||||
bool fix_length_and_dec() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_as_wkt>(thd, this); }
|
||||
};
|
||||
|
||||
@ -276,10 +276,10 @@ class Item_func_as_wkb: public Item_binary_func_args_geometry
|
||||
public:
|
||||
Item_func_as_wkb(THD *thd, Item *a)
|
||||
:Item_binary_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_aswkb"; }
|
||||
String *val_str(String *);
|
||||
const Type_handler *type_handler() const { return &type_handler_long_blob; }
|
||||
bool fix_length_and_dec()
|
||||
const char *func_name() const override { return "st_aswkb"; }
|
||||
String *val_str(String *) override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_long_blob; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
collation.set(&my_charset_bin);
|
||||
decimals=0;
|
||||
@ -287,14 +287,14 @@ public:
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_as_wkb>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
class Item_func_as_geojson: public Item_str_ascii_func_args_geometry
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
// TODO: check with Alexey, for better args[1] and args[2] type control
|
||||
return Item_str_ascii_func_args_geometry::check_arguments() ||
|
||||
@ -307,10 +307,10 @@ public:
|
||||
:Item_str_ascii_func_args_geometry(thd, js, max_dec_digits) {}
|
||||
Item_func_as_geojson(THD *thd, Item *js, Item *max_dec_digits, Item *opt)
|
||||
:Item_str_ascii_func_args_geometry(thd, js, max_dec_digits, opt) {}
|
||||
const char *func_name() const { return "st_asgeojson"; }
|
||||
bool fix_length_and_dec();
|
||||
String *val_str_ascii(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_asgeojson"; }
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str_ascii(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_as_geojson>(thd, this); }
|
||||
};
|
||||
|
||||
@ -320,16 +320,16 @@ class Item_func_geometry_type: public Item_str_ascii_func_args_geometry
|
||||
public:
|
||||
Item_func_geometry_type(THD *thd, Item *a)
|
||||
:Item_str_ascii_func_args_geometry(thd, a) {}
|
||||
String *val_str_ascii(String *);
|
||||
const char *func_name() const { return "st_geometrytype"; }
|
||||
bool fix_length_and_dec()
|
||||
String *val_str_ascii(String *) override;
|
||||
const char *func_name() const override { return "st_geometrytype"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
// "GeometryCollection" is the longest
|
||||
fix_length_and_charset(20, default_charset());
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
};
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_geometry_type>(thd, this); }
|
||||
};
|
||||
|
||||
@ -362,9 +362,9 @@ public:
|
||||
:Item_geometry_func_args_geometry(thd, a),
|
||||
res_heap(8192, sizeof(ch_node))
|
||||
{}
|
||||
const char *func_name() const { return "st_convexhull"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_convexhull"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_convexhull>(thd, this); }
|
||||
};
|
||||
|
||||
@ -374,13 +374,13 @@ class Item_func_centroid: public Item_geometry_func_args_geometry
|
||||
public:
|
||||
Item_func_centroid(THD *thd, Item *a)
|
||||
:Item_geometry_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_centroid"; }
|
||||
String *val_str(String *);
|
||||
const Type_handler *type_handler() const
|
||||
const char *func_name() const override { return "st_centroid"; }
|
||||
String *val_str(String *) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_point;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_centroid>(thd, this); }
|
||||
};
|
||||
|
||||
@ -389,13 +389,13 @@ class Item_func_envelope: public Item_geometry_func_args_geometry
|
||||
public:
|
||||
Item_func_envelope(THD *thd, Item *a)
|
||||
:Item_geometry_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_envelope"; }
|
||||
String *val_str(String *);
|
||||
const Type_handler *type_handler() const
|
||||
const char *func_name() const override { return "st_envelope"; }
|
||||
String *val_str(String *) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_polygon;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_envelope>(thd, this); }
|
||||
};
|
||||
|
||||
@ -412,43 +412,43 @@ class Item_func_boundary: public Item_geometry_func_args_geometry
|
||||
Transporter(Gcalc_result_receiver *receiver) :
|
||||
Gcalc_shape_transporter(NULL), m_receiver(receiver)
|
||||
{}
|
||||
int single_point(double x, double y);
|
||||
int start_line();
|
||||
int complete_line();
|
||||
int start_poly();
|
||||
int complete_poly();
|
||||
int start_ring();
|
||||
int complete_ring();
|
||||
int add_point(double x, double y);
|
||||
int single_point(double x, double y) override;
|
||||
int start_line() override;
|
||||
int complete_line() override;
|
||||
int start_poly() override;
|
||||
int complete_poly() override;
|
||||
int start_ring() override;
|
||||
int complete_ring() override;
|
||||
int add_point(double x, double y) override;
|
||||
|
||||
int start_collection(int n_objects);
|
||||
int start_collection(int n_objects) override;
|
||||
};
|
||||
Gcalc_result_receiver res_receiver;
|
||||
public:
|
||||
Item_func_boundary(THD *thd, Item *a)
|
||||
:Item_geometry_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_boundary"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_boundary"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_boundary>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
class Item_func_point: public Item_geometry_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{ return check_argument_types_can_return_real(0, 2); }
|
||||
public:
|
||||
Item_func_point(THD *thd, Item *a, Item *b): Item_geometry_func(thd, a, b) {}
|
||||
Item_func_point(THD *thd, Item *a, Item *b, Item *srid):
|
||||
Item_geometry_func(thd, a, b, srid) {}
|
||||
const char *func_name() const { return "point"; }
|
||||
String *val_str(String *);
|
||||
const Type_handler *type_handler() const
|
||||
const char *func_name() const override { return "point"; }
|
||||
String *val_str(String *) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_point;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_point>(thd, this); }
|
||||
};
|
||||
|
||||
@ -458,7 +458,7 @@ class Item_func_spatial_decomp: public Item_geometry_func_args_geometry
|
||||
public:
|
||||
Item_func_spatial_decomp(THD *thd, Item *a, Item_func::Functype ft):
|
||||
Item_geometry_func_args_geometry(thd, a) { decomp_func = ft; }
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
switch (decomp_func)
|
||||
{
|
||||
@ -473,15 +473,15 @@ public:
|
||||
return "spatial_decomp_unknown";
|
||||
}
|
||||
}
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_spatial_decomp>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_decomp_n: public Item_geometry_func_args_geometry
|
||||
{
|
||||
enum Functype decomp_func_n;
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return Item_geometry_func_args_geometry::check_arguments() ||
|
||||
args[1]->check_type_can_return_int(func_name());
|
||||
@ -491,7 +491,7 @@ public:
|
||||
:Item_geometry_func_args_geometry(thd, a, b),
|
||||
decomp_func_n(ft)
|
||||
{ }
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
switch (decomp_func_n)
|
||||
{
|
||||
@ -506,14 +506,14 @@ public:
|
||||
return "spatial_decomp_n_unknown";
|
||||
}
|
||||
}
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_spatial_decomp_n>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_spatial_collection: public Item_geometry_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return Type_handler_geometry::check_types_geom_or_binary(func_name(), args,
|
||||
0, arg_count);
|
||||
@ -528,8 +528,8 @@ public:
|
||||
coll_type=ct;
|
||||
item_type=it;
|
||||
}
|
||||
String *val_str(String *);
|
||||
bool fix_length_and_dec()
|
||||
String *val_str(String *) override;
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (Item_geometry_func::fix_length_and_dec())
|
||||
return TRUE;
|
||||
@ -558,12 +558,12 @@ public:
|
||||
Geometry::wkb_geometrycollection,
|
||||
Geometry::wkb_point)
|
||||
{ }
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_geometrycollection;
|
||||
}
|
||||
const char *func_name() const { return "geometrycollection"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "geometrycollection"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_geometrycollection>(thd, this); }
|
||||
};
|
||||
|
||||
@ -576,9 +576,9 @@ public:
|
||||
Geometry::wkb_linestring,
|
||||
Geometry::wkb_point)
|
||||
{ }
|
||||
const Type_handler *type_handler() const { return &type_handler_linestring; }
|
||||
const char *func_name() const { return "linestring"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const Type_handler *type_handler() const override { return &type_handler_linestring; }
|
||||
const char *func_name() const override { return "linestring"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_linestring>(thd, this); }
|
||||
};
|
||||
|
||||
@ -591,9 +591,9 @@ public:
|
||||
Geometry::wkb_polygon,
|
||||
Geometry::wkb_linestring)
|
||||
{ }
|
||||
const Type_handler *type_handler() const { return &type_handler_polygon; }
|
||||
const char *func_name() const { return "polygon"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const Type_handler *type_handler() const override { return &type_handler_polygon; }
|
||||
const char *func_name() const override { return "polygon"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_polygon>(thd, this); }
|
||||
};
|
||||
|
||||
@ -606,12 +606,12 @@ public:
|
||||
Geometry::wkb_multilinestring,
|
||||
Geometry::wkb_linestring)
|
||||
{ }
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_multilinestring;
|
||||
}
|
||||
const char *func_name() const { return "multilinestring"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "multilinestring"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_multilinestring>(thd, this); }
|
||||
};
|
||||
|
||||
@ -624,12 +624,12 @@ public:
|
||||
Geometry::wkb_multipoint,
|
||||
Geometry::wkb_point)
|
||||
{ }
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_multipoint;
|
||||
}
|
||||
const char *func_name() const { return "multipoint"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "multipoint"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_multipoint>(thd, this); }
|
||||
};
|
||||
|
||||
@ -642,12 +642,12 @@ public:
|
||||
Geometry::wkb_multipolygon,
|
||||
Geometry::wkb_polygon)
|
||||
{ }
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_multipolygon;
|
||||
}
|
||||
const char *func_name() const { return "multipolygon"; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "multipolygon"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_multipolygon>(thd, this); }
|
||||
};
|
||||
|
||||
@ -664,8 +664,8 @@ protected:
|
||||
String tmp_value1, tmp_value2;
|
||||
SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, Field *field,
|
||||
KEY_PART *key_part,
|
||||
Item_func::Functype type, Item *value);
|
||||
bool check_arguments() const
|
||||
Item_func::Functype type, Item *value) override;
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 2);
|
||||
return Type_handler_geometry::check_types_geom_or_binary(func_name(),
|
||||
@ -677,8 +677,8 @@ public:
|
||||
{
|
||||
maybe_null= true;
|
||||
}
|
||||
enum Functype functype() const { return spatial_rel; }
|
||||
enum Functype rev_functype() const
|
||||
enum Functype functype() const override { return spatial_rel; }
|
||||
enum Functype rev_functype() const override
|
||||
{
|
||||
switch (spatial_rel)
|
||||
{
|
||||
@ -690,16 +690,16 @@ public:
|
||||
return spatial_rel;
|
||||
}
|
||||
}
|
||||
bool is_null() { (void) val_int(); return null_value; }
|
||||
bool is_null() override { (void) val_int(); return null_value; }
|
||||
void add_key_fields(JOIN *join, KEY_FIELD **key_fields,
|
||||
uint *and_level, table_map usable_tables,
|
||||
SARGABLE_PARAM **sargables)
|
||||
SARGABLE_PARAM **sargables) override
|
||||
{
|
||||
return add_key_fields_optimize_op(join, key_fields, and_level,
|
||||
usable_tables, sargables, false);
|
||||
}
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *build_clone(THD *thd) { return 0; }
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *build_clone(THD *thd) override { return 0; }
|
||||
};
|
||||
|
||||
|
||||
@ -709,9 +709,9 @@ public:
|
||||
Item_func_spatial_mbr_rel(THD *thd, Item *a, Item *b, enum Functype sp_rel):
|
||||
Item_func_spatial_rel(thd, a, b, sp_rel)
|
||||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const;
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_spatial_mbr_rel>(thd, this); }
|
||||
};
|
||||
|
||||
@ -725,9 +725,9 @@ public:
|
||||
Item_func_spatial_precise_rel(THD *thd, Item *a, Item *b, enum Functype sp_rel):
|
||||
Item_func_spatial_rel(thd, a, b, sp_rel), collector()
|
||||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const;
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_spatial_precise_rel>(thd, this); }
|
||||
};
|
||||
|
||||
@ -738,7 +738,7 @@ class Item_func_spatial_relate: public Item_bool_func_args_geometry_geometry
|
||||
Gcalc_scan_iterator scan_it;
|
||||
Gcalc_function func;
|
||||
String tmp_value1, tmp_value2, tmp_matrix;
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return Item_bool_func_args_geometry_geometry::check_arguments() ||
|
||||
args[2]->check_type_general_purpose_string(func_name());
|
||||
@ -747,10 +747,10 @@ public:
|
||||
Item_func_spatial_relate(THD *thd, Item *a, Item *b, Item *matrix):
|
||||
Item_bool_func_args_geometry_geometry(thd, a, b, matrix)
|
||||
{ }
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_relate"; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_relate"; }
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_spatial_relate>(thd, this); }
|
||||
};
|
||||
|
||||
@ -761,7 +761,7 @@ public:
|
||||
|
||||
class Item_func_spatial_operation: public Item_geometry_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
DBUG_ASSERT(arg_count >= 2);
|
||||
return Type_handler_geometry::check_types_geom_or_binary(func_name(),
|
||||
@ -781,20 +781,20 @@ public:
|
||||
Item_geometry_func(thd, a, b), spatial_op(sp_op)
|
||||
{}
|
||||
virtual ~Item_func_spatial_operation();
|
||||
String *val_str(String *);
|
||||
const char *func_name() const;
|
||||
virtual inline void print(String *str, enum_query_type query_type)
|
||||
String *val_str(String *) override;
|
||||
const char *func_name() const override;
|
||||
void print(String *str, enum_query_type query_type) override
|
||||
{
|
||||
Item_func::print(str, query_type);
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_spatial_operation>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
class Item_func_buffer: public Item_geometry_func_args_geometry
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
return Item_geometry_func_args_geometry::check_arguments() ||
|
||||
args[1]->check_type_can_return_real(func_name());
|
||||
@ -822,16 +822,16 @@ protected:
|
||||
Gcalc_function::op_difference),
|
||||
skip_line(FALSE)
|
||||
{}
|
||||
int single_point(double x, double y);
|
||||
int start_line();
|
||||
int complete_line();
|
||||
int start_poly();
|
||||
int complete_poly();
|
||||
int start_ring();
|
||||
int complete_ring();
|
||||
int add_point(double x, double y);
|
||||
int single_point(double x, double y) override;
|
||||
int start_line() override;
|
||||
int complete_line() override;
|
||||
int start_poly() override;
|
||||
int complete_poly() override;
|
||||
int start_ring() override;
|
||||
int complete_ring() override;
|
||||
int add_point(double x, double y) override;
|
||||
|
||||
int start_collection(int n_objects);
|
||||
int start_collection(int n_objects) override;
|
||||
};
|
||||
Gcalc_heap collector;
|
||||
Gcalc_function func;
|
||||
@ -842,9 +842,9 @@ protected:
|
||||
public:
|
||||
Item_func_buffer(THD *thd, Item *obj, Item *distance)
|
||||
:Item_geometry_func_args_geometry(thd, obj, distance) {}
|
||||
const char *func_name() const { return "st_buffer"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "st_buffer"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_buffer>(thd, this); }
|
||||
};
|
||||
|
||||
@ -854,11 +854,11 @@ class Item_func_isempty: public Item_bool_func_args_geometry
|
||||
public:
|
||||
Item_func_isempty(THD *thd, Item *a)
|
||||
:Item_bool_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_isempty"; }
|
||||
bool fix_length_and_dec() { maybe_null= 1; return FALSE; }
|
||||
bool need_parentheses_in_default() { return false; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_isempty"; }
|
||||
bool fix_length_and_dec() override { maybe_null= 1; return FALSE; }
|
||||
bool need_parentheses_in_default() override { return false; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_isempty>(thd, this); }
|
||||
};
|
||||
|
||||
@ -871,11 +871,11 @@ class Item_func_issimple: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_issimple(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_issimple"; }
|
||||
bool fix_length_and_dec() { decimals=0; max_length=2; return FALSE; }
|
||||
uint decimal_precision() const { return 1; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_issimple"; }
|
||||
bool fix_length_and_dec() override { decimals=0; max_length=2; return FALSE; }
|
||||
uint decimal_precision() const override { return 1; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_issimple>(thd, this); }
|
||||
};
|
||||
|
||||
@ -884,11 +884,11 @@ class Item_func_isclosed: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_isclosed(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_isclosed"; }
|
||||
bool fix_length_and_dec() { decimals=0; max_length=2; return FALSE; }
|
||||
uint decimal_precision() const { return 1; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_isclosed"; }
|
||||
bool fix_length_and_dec() override { decimals=0; max_length=2; return FALSE; }
|
||||
uint decimal_precision() const override { return 1; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_isclosed>(thd, this); }
|
||||
};
|
||||
|
||||
@ -896,9 +896,9 @@ class Item_func_isring: public Item_func_issimple
|
||||
{
|
||||
public:
|
||||
Item_func_isring(THD *thd, Item *a): Item_func_issimple(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_isring"; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_isring"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_isring>(thd, this); }
|
||||
};
|
||||
|
||||
@ -907,10 +907,10 @@ class Item_func_dimension: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_dimension(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_dimension"; }
|
||||
bool fix_length_and_dec() { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_dimension"; }
|
||||
bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_dimension>(thd, this); }
|
||||
};
|
||||
|
||||
@ -919,16 +919,16 @@ class Item_func_x: public Item_real_func_args_geometry
|
||||
{
|
||||
public:
|
||||
Item_func_x(THD *thd, Item *a): Item_real_func_args_geometry(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_x"; }
|
||||
bool fix_length_and_dec()
|
||||
double val_real() override;
|
||||
const char *func_name() const override { return "st_x"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (Item_real_func::fix_length_and_dec())
|
||||
return TRUE;
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_x>(thd, this); }
|
||||
};
|
||||
|
||||
@ -937,16 +937,16 @@ class Item_func_y: public Item_real_func_args_geometry
|
||||
{
|
||||
public:
|
||||
Item_func_y(THD *thd, Item *a): Item_real_func_args_geometry(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_y"; }
|
||||
bool fix_length_and_dec()
|
||||
double val_real() override;
|
||||
const char *func_name() const override { return "st_y"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (Item_real_func::fix_length_and_dec())
|
||||
return TRUE;
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_y>(thd, this); }
|
||||
};
|
||||
|
||||
@ -956,10 +956,10 @@ class Item_func_numgeometries: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_numgeometries(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_numgeometries"; }
|
||||
bool fix_length_and_dec() { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_numgeometries"; }
|
||||
bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_numgeometries>(thd, this); }
|
||||
};
|
||||
|
||||
@ -969,10 +969,10 @@ class Item_func_numinteriorring: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_numinteriorring(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_numinteriorrings"; }
|
||||
bool fix_length_and_dec() { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_numinteriorrings"; }
|
||||
bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_numinteriorring>(thd, this); }
|
||||
};
|
||||
|
||||
@ -982,10 +982,10 @@ class Item_func_numpoints: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_numpoints(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "st_numpoints"; }
|
||||
bool fix_length_and_dec() { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "st_numpoints"; }
|
||||
bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_numpoints>(thd, this); }
|
||||
};
|
||||
|
||||
@ -994,16 +994,16 @@ class Item_func_area: public Item_real_func_args_geometry
|
||||
{
|
||||
public:
|
||||
Item_func_area(THD *thd, Item *a): Item_real_func_args_geometry(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_area"; }
|
||||
bool fix_length_and_dec()
|
||||
double val_real() override;
|
||||
const char *func_name() const override { return "st_area"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (Item_real_func::fix_length_and_dec())
|
||||
return TRUE;
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_area>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1014,16 +1014,16 @@ class Item_func_glength: public Item_real_func_args_geometry
|
||||
public:
|
||||
Item_func_glength(THD *thd, Item *a)
|
||||
:Item_real_func_args_geometry(thd, a) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_length"; }
|
||||
bool fix_length_and_dec()
|
||||
double val_real() override;
|
||||
const char *func_name() const override { return "st_length"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (Item_real_func::fix_length_and_dec())
|
||||
return TRUE;
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_glength>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1033,10 +1033,10 @@ class Item_func_srid: public Item_long_func_args_geometry
|
||||
public:
|
||||
Item_func_srid(THD *thd, Item *a)
|
||||
:Item_long_func_args_geometry(thd, a) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "srid"; }
|
||||
bool fix_length_and_dec() { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "srid"; }
|
||||
bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_srid>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1051,9 +1051,9 @@ class Item_func_distance: public Item_real_func_args_geometry_geometry
|
||||
public:
|
||||
Item_func_distance(THD *thd, Item *a, Item *b)
|
||||
:Item_real_func_args_geometry_geometry(thd, a, b) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_distance"; }
|
||||
Item *get_copy(THD *thd)
|
||||
double val_real() override;
|
||||
const char *func_name() const override { return "st_distance"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_distance>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1065,9 +1065,9 @@ class Item_func_sphere_distance: public Item_real_func
|
||||
public:
|
||||
Item_func_sphere_distance(THD *thd, List<Item> &list):
|
||||
Item_real_func(thd, list) {}
|
||||
double val_real();
|
||||
const char *func_name() const { return "st_distance_sphere"; }
|
||||
Item *get_copy(THD *thd)
|
||||
double val_real() override;
|
||||
const char *func_name() const override { return "st_distance_sphere"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_sphere_distance>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1081,13 +1081,13 @@ class Item_func_pointonsurface: public Item_geometry_func_args_geometry
|
||||
public:
|
||||
Item_func_pointonsurface(THD *thd, Item *a)
|
||||
:Item_geometry_func_args_geometry(thd, a) {}
|
||||
const char *func_name() const { return "st_pointonsurface"; }
|
||||
String *val_str(String *);
|
||||
const Type_handler *type_handler() const
|
||||
const char *func_name() const override { return "st_pointonsurface"; }
|
||||
String *val_str(String *) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_point;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_pointonsurface>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1098,14 +1098,14 @@ class Item_func_gis_debug: public Item_long_func
|
||||
public:
|
||||
Item_func_gis_debug(THD *thd, Item *a): Item_long_func(thd, a)
|
||||
{ null_value= false; }
|
||||
bool fix_length_and_dec() { fix_char_length(10); return FALSE; }
|
||||
const char *func_name() const { return "st_gis_debug"; }
|
||||
longlong val_int();
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
bool fix_length_and_dec() override { fix_char_length(10); return FALSE; }
|
||||
const char *func_name() const override { return "st_gis_debug"; }
|
||||
longlong val_int() override;
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_gis_debug>(thd, this); }
|
||||
};
|
||||
#endif
|
||||
|
@ -75,23 +75,23 @@ protected:
|
||||
|
||||
public:
|
||||
Item_func_json_valid(THD *thd, Item *json) : Item_bool_func(thd, json) {}
|
||||
longlong val_int();
|
||||
const char *func_name() const { return "json_valid"; }
|
||||
bool fix_length_and_dec()
|
||||
longlong val_int() override;
|
||||
const char *func_name() const override { return "json_valid"; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (Item_bool_func::fix_length_and_dec())
|
||||
return TRUE;
|
||||
maybe_null= 1;
|
||||
return FALSE;
|
||||
}
|
||||
bool set_format_by_check_constraint(Send_field_extended_metadata *to) const
|
||||
bool set_format_by_check_constraint(Send_field_extended_metadata *to) const override
|
||||
{
|
||||
static const Lex_cstring fmt(STRING_WITH_LEN("json"));
|
||||
return to->set_format_name(fmt);
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_valid>(thd, this); }
|
||||
enum Functype functype() const { return JSON_VALID_FUNC; }
|
||||
enum Functype functype() const override { return JSON_VALID_FUNC; }
|
||||
};
|
||||
|
||||
|
||||
@ -104,11 +104,11 @@ protected:
|
||||
public:
|
||||
Item_func_json_exists(THD *thd, Item *js, Item *i_path):
|
||||
Item_bool_func(thd, js, i_path) {}
|
||||
const char *func_name() const { return "json_exists"; }
|
||||
bool fix_length_and_dec();
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_exists"; }
|
||||
bool fix_length_and_dec() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_exists>(thd, this); }
|
||||
longlong val_int();
|
||||
longlong val_int() override;
|
||||
};
|
||||
|
||||
|
||||
@ -186,10 +186,10 @@ protected:
|
||||
|
||||
public:
|
||||
Item_func_json_quote(THD *thd, Item *s): Item_str_func(thd, s) {}
|
||||
const char *func_name() const { return "json_quote"; }
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_quote"; }
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_quote>(thd, this); }
|
||||
};
|
||||
|
||||
@ -201,10 +201,10 @@ protected:
|
||||
String *read_json(json_engine_t *je);
|
||||
public:
|
||||
Item_func_json_unquote(THD *thd, Item *s): Item_str_func(thd, s) {}
|
||||
const char *func_name() const { return "json_unquote"; }
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_unquote"; }
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_unquote>(thd, this); }
|
||||
};
|
||||
|
||||
@ -233,7 +233,7 @@ public:
|
||||
Item_json_func(thd, list), paths(NULL), tmp_paths(0), n_paths(0) {}
|
||||
virtual ~Item_json_str_multipath();
|
||||
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
virtual uint get_n_paths() const = 0;
|
||||
};
|
||||
|
||||
@ -247,15 +247,15 @@ public:
|
||||
char **out_val, int *value_len);
|
||||
Item_func_json_extract(THD *thd, List<Item> &list):
|
||||
Item_json_str_multipath(thd, list) {}
|
||||
const char *func_name() const { return "json_extract"; }
|
||||
enum Functype functype() const { return JSON_EXTRACT_FUNC; }
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
longlong val_int();
|
||||
double val_real();
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
uint get_n_paths() const { return arg_count - 1; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_extract"; }
|
||||
enum Functype functype() const override { return JSON_EXTRACT_FUNC; }
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
longlong val_int() override;
|
||||
double val_real() override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
uint get_n_paths() const override { return arg_count - 1; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_extract>(thd, this); }
|
||||
};
|
||||
|
||||
@ -271,10 +271,10 @@ protected:
|
||||
public:
|
||||
Item_func_json_contains(THD *thd, List<Item> &list):
|
||||
Item_bool_func(thd, list) {}
|
||||
const char *func_name() const { return "json_contains"; }
|
||||
bool fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_contains"; }
|
||||
bool fix_length_and_dec() override;
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_contains>(thd, this); }
|
||||
};
|
||||
|
||||
@ -293,11 +293,11 @@ public:
|
||||
Item_func_json_contains_path(THD *thd, List<Item> &list):
|
||||
Item_bool_func(thd, list), tmp_paths(0) {}
|
||||
virtual ~Item_func_json_contains_path();
|
||||
const char *func_name() const { return "json_contains_path"; }
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_contains_path"; }
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
bool fix_length_and_dec() override;
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_contains_path>(thd, this); }
|
||||
};
|
||||
|
||||
@ -312,10 +312,10 @@ public:
|
||||
Item_json_func(thd) {}
|
||||
Item_func_json_array(THD *thd, List<Item> &list):
|
||||
Item_json_func(thd, list) {}
|
||||
String *val_str(String *);
|
||||
bool fix_length_and_dec();
|
||||
const char *func_name() const { return "json_array"; }
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str(String *) override;
|
||||
bool fix_length_and_dec() override;
|
||||
const char *func_name() const override { return "json_array"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_array>(thd, this); }
|
||||
};
|
||||
|
||||
@ -328,11 +328,11 @@ protected:
|
||||
public:
|
||||
Item_func_json_array_append(THD *thd, List<Item> &list):
|
||||
Item_json_str_multipath(thd, list) {}
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count/2; }
|
||||
const char *func_name() const { return "json_array_append"; }
|
||||
Item *get_copy(THD *thd)
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
uint get_n_paths() const override { return arg_count/2; }
|
||||
const char *func_name() const override { return "json_array_append"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_array_append>(thd, this); }
|
||||
};
|
||||
|
||||
@ -342,9 +342,9 @@ class Item_func_json_array_insert: public Item_func_json_array_append
|
||||
public:
|
||||
Item_func_json_array_insert(THD *thd, List<Item> &list):
|
||||
Item_func_json_array_append(thd, list) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "json_array_insert"; }
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str(String *) override;
|
||||
const char *func_name() const override { return "json_array_insert"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_array_insert>(thd, this); }
|
||||
};
|
||||
|
||||
@ -356,9 +356,9 @@ public:
|
||||
Item_func_json_array(thd) {}
|
||||
Item_func_json_object(THD *thd, List<Item> &list):
|
||||
Item_func_json_array(thd, list) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "json_object"; }
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str(String *) override;
|
||||
const char *func_name() const override { return "json_object"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_object>(thd, this); }
|
||||
};
|
||||
|
||||
@ -370,9 +370,9 @@ protected:
|
||||
public:
|
||||
Item_func_json_merge(THD *thd, List<Item> &list):
|
||||
Item_func_json_array(thd, list) {}
|
||||
String *val_str(String *);
|
||||
const char *func_name() const { return "json_merge_preserve"; }
|
||||
Item *get_copy(THD *thd)
|
||||
String *val_str(String *) override;
|
||||
const char *func_name() const override { return "json_merge_preserve"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_merge>(thd, this); }
|
||||
};
|
||||
|
||||
@ -381,15 +381,15 @@ class Item_func_json_merge_patch: public Item_func_json_merge
|
||||
public:
|
||||
Item_func_json_merge_patch(THD *thd, List<Item> &list):
|
||||
Item_func_json_merge(thd, list) {}
|
||||
const char *func_name() const { return "json_merge_patch"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_merge_patch"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_merge_patch>(thd, this); }
|
||||
};
|
||||
|
||||
class Item_func_json_length: public Item_long_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{
|
||||
if (arg_count == 0 || arg_count > 2)
|
||||
{
|
||||
@ -407,26 +407,26 @@ protected:
|
||||
public:
|
||||
Item_func_json_length(THD *thd, List<Item> &list):
|
||||
Item_long_func(thd, list) {}
|
||||
const char *func_name() const { return "json_length"; }
|
||||
bool fix_length_and_dec();
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_length"; }
|
||||
bool fix_length_and_dec() override;
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_length>(thd, this); }
|
||||
};
|
||||
|
||||
|
||||
class Item_func_json_depth: public Item_long_func
|
||||
{
|
||||
bool check_arguments() const
|
||||
bool check_arguments() const override
|
||||
{ return args[0]->check_type_can_return_text(func_name()); }
|
||||
protected:
|
||||
String tmp_js;
|
||||
public:
|
||||
Item_func_json_depth(THD *thd, Item *js): Item_long_func(thd, js) {}
|
||||
const char *func_name() const { return "json_depth"; }
|
||||
bool fix_length_and_dec() { max_length= 10; return FALSE; }
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_depth"; }
|
||||
bool fix_length_and_dec() override { max_length= 10; return FALSE; }
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_depth>(thd, this); }
|
||||
};
|
||||
|
||||
@ -437,10 +437,10 @@ protected:
|
||||
String tmp_js;
|
||||
public:
|
||||
Item_func_json_type(THD *thd, Item *js): Item_str_func(thd, js) {}
|
||||
const char *func_name() const { return "json_type"; }
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_type"; }
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_type>(thd, this); }
|
||||
};
|
||||
|
||||
@ -455,15 +455,15 @@ public:
|
||||
Item_func_json_insert(bool i_mode, bool r_mode, THD *thd, List<Item> &list):
|
||||
Item_json_str_multipath(thd, list),
|
||||
mode_insert(i_mode), mode_replace(r_mode) {}
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count/2; }
|
||||
const char *func_name() const
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
uint get_n_paths() const override { return arg_count/2; }
|
||||
const char *func_name() const override
|
||||
{
|
||||
return mode_insert ?
|
||||
(mode_replace ? "json_set" : "json_insert") : "json_replace";
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_insert>(thd, this); }
|
||||
};
|
||||
|
||||
@ -475,11 +475,11 @@ protected:
|
||||
public:
|
||||
Item_func_json_remove(THD *thd, List<Item> &list):
|
||||
Item_json_str_multipath(thd, list) {}
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count - 1; }
|
||||
const char *func_name() const { return "json_remove"; }
|
||||
Item *get_copy(THD *thd)
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
uint get_n_paths() const override { return arg_count - 1; }
|
||||
const char *func_name() const override { return "json_remove"; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_remove>(thd, this); }
|
||||
};
|
||||
|
||||
@ -493,10 +493,10 @@ protected:
|
||||
public:
|
||||
Item_func_json_keys(THD *thd, List<Item> &list):
|
||||
Item_str_func(thd, list) {}
|
||||
const char *func_name() const { return "json_keys"; }
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_keys"; }
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_keys>(thd, this); }
|
||||
};
|
||||
|
||||
@ -516,12 +516,12 @@ protected:
|
||||
public:
|
||||
Item_func_json_search(THD *thd, List<Item> &list):
|
||||
Item_json_str_multipath(thd, list) {}
|
||||
const char *func_name() const { return "json_search"; }
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *);
|
||||
uint get_n_paths() const { return arg_count > 4 ? arg_count - 4 : 0; }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "json_search"; }
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *) override;
|
||||
uint get_n_paths() const override { return arg_count > 4 ? arg_count - 4 : 0; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_search>(thd, this); }
|
||||
};
|
||||
|
||||
@ -545,11 +545,11 @@ public:
|
||||
Item_func_json_format(THD *thd, List<Item> &list):
|
||||
Item_json_func(thd, list), fmt(DETAILED) {}
|
||||
|
||||
const char *func_name() const;
|
||||
bool fix_length_and_dec();
|
||||
String *val_str(String *str);
|
||||
String *val_json(String *str);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override;
|
||||
bool fix_length_and_dec() override;
|
||||
String *val_str(String *str) override;
|
||||
String *val_json(String *str) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_json_format>(thd, this); }
|
||||
};
|
||||
|
||||
|
@ -57,104 +57,104 @@ public:
|
||||
not_null_tables_cache(0), with_null(0)
|
||||
{ }
|
||||
|
||||
bool with_subquery() const { DBUG_ASSERT(fixed); return m_with_subquery; }
|
||||
enum Type type() const { return ROW_ITEM; };
|
||||
const Type_handler *type_handler() const { return &type_handler_row; }
|
||||
bool with_subquery() const override { DBUG_ASSERT(fixed); return m_with_subquery; }
|
||||
enum Type type() const override { return ROW_ITEM; };
|
||||
const Type_handler *type_handler() const override { return &type_handler_row; }
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
return NULL; // Check with Vicentiu why it's called for Item_row
|
||||
}
|
||||
void illegal_method_call(const char *);
|
||||
bool is_null() { return null_value; }
|
||||
void make_send_field(THD *thd, Send_field *)
|
||||
bool is_null() override { return null_value; }
|
||||
void make_send_field(THD *thd, Send_field *) override
|
||||
{
|
||||
illegal_method_call((const char*)"make_send_field");
|
||||
};
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
illegal_method_call((const char*)"val");
|
||||
return 0;
|
||||
};
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
illegal_method_call((const char*)"val_int");
|
||||
return 0;
|
||||
};
|
||||
String *val_str(String *)
|
||||
String *val_str(String *) override
|
||||
{
|
||||
illegal_method_call((const char*)"val_str");
|
||||
return 0;
|
||||
};
|
||||
my_decimal *val_decimal(my_decimal *)
|
||||
my_decimal *val_decimal(my_decimal *) override
|
||||
{
|
||||
illegal_method_call((const char*)"val_decimal");
|
||||
return 0;
|
||||
};
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
illegal_method_call((const char*)"get_date");
|
||||
return true;
|
||||
}
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge);
|
||||
void cleanup();
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge) override;
|
||||
void cleanup() override;
|
||||
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
List<Item> &fields, uint flags);
|
||||
bool with_sum_func() const { return m_with_sum_func; }
|
||||
With_sum_func_cache* get_with_sum_func_cache() { return this; }
|
||||
table_map used_tables() const { return used_tables_cache; };
|
||||
bool const_item() const { return const_item_cache; };
|
||||
void update_used_tables()
|
||||
List<Item> &fields, uint flags) override;
|
||||
bool with_sum_func() const override { return m_with_sum_func; }
|
||||
With_sum_func_cache* get_with_sum_func_cache() override { return this; }
|
||||
table_map used_tables() const override { return used_tables_cache; };
|
||||
bool const_item() const override { return const_item_cache; };
|
||||
void update_used_tables() override
|
||||
{
|
||||
used_tables_and_const_cache_init();
|
||||
used_tables_and_const_cache_update_and_join(arg_count, args);
|
||||
}
|
||||
table_map not_null_tables() const { return not_null_tables_cache; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
table_map not_null_tables() const override { return not_null_tables_cache; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg)
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg) override
|
||||
{
|
||||
if (walk_args(processor, walk_subquery, arg))
|
||||
return true;
|
||||
return (this->*processor)(arg);
|
||||
}
|
||||
Item *transform(THD *thd, Item_transformer transformer, uchar *arg);
|
||||
bool eval_not_null_tables(void *opt_arg);
|
||||
bool find_not_null_fields(table_map allowed);
|
||||
Item *transform(THD *thd, Item_transformer transformer, uchar *arg) override;
|
||||
bool eval_not_null_tables(void *opt_arg) override;
|
||||
bool find_not_null_fields(table_map allowed) override;
|
||||
|
||||
uint cols() const { return arg_count; }
|
||||
Item* element_index(uint i) { return args[i]; }
|
||||
Item** addr(uint i) { return args + i; }
|
||||
bool check_cols(uint c);
|
||||
bool null_inside() { return with_null; };
|
||||
void bring_value();
|
||||
uint cols() const override { return arg_count; }
|
||||
Item* element_index(uint i) override { return args[i]; }
|
||||
Item** addr(uint i) override { return args + i; }
|
||||
bool check_cols(uint c) override;
|
||||
bool null_inside() override { return with_null; };
|
||||
void bring_value() override;
|
||||
|
||||
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
|
||||
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override
|
||||
{
|
||||
Item_args::propagate_equal_fields(thd, Context_identity(), cond);
|
||||
return this;
|
||||
}
|
||||
|
||||
bool excl_dep_on_table(table_map tab_map)
|
||||
bool excl_dep_on_table(table_map tab_map) override
|
||||
{
|
||||
return Item_args::excl_dep_on_table(tab_map);
|
||||
}
|
||||
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel)
|
||||
bool excl_dep_on_grouping_fields(st_select_lex *sel) override
|
||||
{
|
||||
return Item_args::excl_dep_on_grouping_fields(sel);
|
||||
}
|
||||
|
||||
bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred)
|
||||
bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred) override
|
||||
{
|
||||
return Item_args::excl_dep_on_in_subq_left_part(subq_pred);
|
||||
}
|
||||
|
||||
bool check_vcol_func_processor(void *arg) {return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
bool check_vcol_func_processor(void *arg) override {return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_row>(thd, this); }
|
||||
Item *build_clone(THD *thd);
|
||||
Item *build_clone(THD *thd) override;
|
||||
};
|
||||
|
||||
#endif /* ITEM_ROW_INCLUDED */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -468,7 +468,7 @@ class Field_fixer: public Field_enumerator
|
||||
public:
|
||||
table_map used_tables; /* Collect used_tables here */
|
||||
st_select_lex *new_parent; /* Select we're in */
|
||||
virtual void visit_field(Item_field *item)
|
||||
void visit_field(Item_field *item) override
|
||||
{
|
||||
//for (TABLE_LIST *tbl= new_parent->leaf_tables; tbl; tbl= tbl->next_local)
|
||||
//{
|
||||
|
@ -307,29 +307,29 @@ public:
|
||||
Item_singlerow_subselect(THD *thd_arg): Item_subselect(thd_arg), value(0), row (0)
|
||||
{}
|
||||
|
||||
void cleanup();
|
||||
subs_type substype() { return SINGLEROW_SUBS; }
|
||||
void cleanup() override;
|
||||
subs_type substype() override { return SINGLEROW_SUBS; }
|
||||
|
||||
void reset();
|
||||
void no_rows_in_result();
|
||||
bool select_transformer(JOIN *join);
|
||||
void reset() override;
|
||||
void no_rows_in_result() override;
|
||||
bool select_transformer(JOIN *join) override;
|
||||
void store(uint i, Item* item);
|
||||
double val_real();
|
||||
longlong val_int ();
|
||||
String *val_str (String *);
|
||||
bool val_native(THD *thd, Native *);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool val_bool();
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
|
||||
const Type_handler *type_handler() const;
|
||||
bool fix_length_and_dec();
|
||||
double val_real() override;
|
||||
longlong val_int () override;
|
||||
String *val_str (String *) override;
|
||||
bool val_native(THD *thd, Native *) override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
bool val_bool() override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
const Type_handler *type_handler() const override;
|
||||
bool fix_length_and_dec() override;
|
||||
|
||||
uint cols() const;
|
||||
Item* element_index(uint i) { return reinterpret_cast<Item*>(row[i]); }
|
||||
Item** addr(uint i) { return (Item**)row + i; }
|
||||
bool check_cols(uint c);
|
||||
bool null_inside();
|
||||
void bring_value();
|
||||
uint cols() const override;
|
||||
Item* element_index(uint i) override { return reinterpret_cast<Item*>(row[i]); }
|
||||
Item** addr(uint i) override { return (Item**)row + i; }
|
||||
bool check_cols(uint c) override;
|
||||
bool null_inside() override;
|
||||
void bring_value() override;
|
||||
|
||||
/**
|
||||
This method is used to implement a special case of semantic tree
|
||||
@ -345,7 +345,7 @@ public:
|
||||
*/
|
||||
st_select_lex* invalidate_and_restore_select_lex();
|
||||
|
||||
Item* expr_cache_insert_transformer(THD *thd, uchar *unused);
|
||||
Item* expr_cache_insert_transformer(THD *thd, uchar *unused) override;
|
||||
|
||||
friend class select_singlerow_subselect;
|
||||
};
|
||||
@ -360,12 +360,12 @@ protected:
|
||||
public:
|
||||
Item_maxmin_subselect(THD *thd, Item_subselect *parent,
|
||||
st_select_lex *select_lex, bool max);
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
void cleanup();
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
void cleanup() override;
|
||||
bool any_value() { return was_values; }
|
||||
void register_value() { was_values= TRUE; }
|
||||
void reset_value_registration() { was_values= FALSE; }
|
||||
void no_rows_in_result();
|
||||
void reset_value_registration() override { was_values= FALSE; }
|
||||
void no_rows_in_result() override;
|
||||
};
|
||||
|
||||
/* exists subselect */
|
||||
@ -800,16 +800,16 @@ public:
|
||||
chooser_compare_func_creator fc,
|
||||
st_select_lex *select_lex, bool all);
|
||||
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
// only ALL subquery has upper not
|
||||
subs_type substype() { return all?ALL_SUBS:ANY_SUBS; }
|
||||
bool select_transformer(JOIN *join);
|
||||
subs_type substype() override { return all?ALL_SUBS:ANY_SUBS; }
|
||||
bool select_transformer(JOIN *join) override;
|
||||
void create_comp_func(bool invert) { func= func_creator(invert); }
|
||||
void print(String *str, enum_query_type query_type);
|
||||
enum precedence precedence() const { return CMP_PRECEDENCE; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
enum precedence precedence() const override { return CMP_PRECEDENCE; }
|
||||
bool is_maxmin_applicable(JOIN *join);
|
||||
bool transform_into_max_min(JOIN *join);
|
||||
void no_rows_in_result();
|
||||
void no_rows_in_result() override;
|
||||
};
|
||||
|
||||
|
||||
@ -1066,9 +1066,9 @@ public:
|
||||
check_null(chk_null),
|
||||
having(having_arg)
|
||||
{ DBUG_ASSERT(subs); }
|
||||
int exec();
|
||||
void print (String *str, enum_query_type query_type);
|
||||
virtual enum_engine_type engine_type() { return INDEXSUBQUERY_ENGINE; }
|
||||
int exec() override;
|
||||
void print (String *str, enum_query_type query_type) override;
|
||||
enum_engine_type engine_type() override { return INDEXSUBQUERY_ENGINE; }
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1509,7 +1509,7 @@ protected:
|
||||
|
||||
bool test_null_row(rownum_t row_num);
|
||||
bool exists_complementing_null_row(MY_BITMAP *keys_to_complement);
|
||||
bool partial_match();
|
||||
bool partial_match() override;
|
||||
public:
|
||||
subselect_rowid_merge_engine(subselect_uniquesubquery_engine *engine_arg,
|
||||
TABLE *tmp_table_arg, uint merge_keys_count_arg,
|
||||
@ -1528,15 +1528,15 @@ public:
|
||||
{}
|
||||
~subselect_rowid_merge_engine();
|
||||
bool init(MY_BITMAP *non_null_key_parts, MY_BITMAP *partial_match_key_parts);
|
||||
void cleanup();
|
||||
virtual enum_engine_type engine_type() { return ROWID_MERGE_ENGINE; }
|
||||
void cleanup() override;
|
||||
enum_engine_type engine_type() override { return ROWID_MERGE_ENGINE; }
|
||||
};
|
||||
|
||||
|
||||
class subselect_table_scan_engine: public subselect_partial_match_engine
|
||||
{
|
||||
protected:
|
||||
bool partial_match();
|
||||
bool partial_match() override;
|
||||
public:
|
||||
subselect_table_scan_engine(subselect_uniquesubquery_engine *engine_arg,
|
||||
TABLE *tmp_table_arg, Item_subselect *item_arg,
|
||||
@ -1545,7 +1545,7 @@ public:
|
||||
bool has_covering_null_row_arg,
|
||||
bool has_covering_null_columns_arg,
|
||||
uint count_columns_with_nulls_arg);
|
||||
void cleanup();
|
||||
virtual enum_engine_type engine_type() { return TABLE_SCAN_ENGINE; }
|
||||
void cleanup() override;
|
||||
enum_engine_type engine_type() override { return TABLE_SCAN_ENGINE; }
|
||||
};
|
||||
#endif /* ITEM_SUBSELECT_INCLUDED */
|
||||
|
482
sql/item_sum.h
482
sql/item_sum.h
@ -418,7 +418,7 @@ public:
|
||||
Item_sum(THD *thd, List<Item> &list);
|
||||
//Copy constructor, need to perform subselects with temporary tables
|
||||
Item_sum(THD *thd, Item_sum *item);
|
||||
enum Type type() const { return SUM_FUNC_ITEM; }
|
||||
enum Type type() const override { return SUM_FUNC_ITEM; }
|
||||
virtual enum Sumfunctype sum_func () const=0;
|
||||
bool is_aggr_sum_func()
|
||||
{
|
||||
@ -468,14 +468,14 @@ public:
|
||||
Updated value is then saved in the field.
|
||||
*/
|
||||
virtual void update_field()=0;
|
||||
virtual bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{ maybe_null=1; null_value=1; return FALSE; }
|
||||
virtual Item *result_item(THD *thd, Field *field);
|
||||
|
||||
void update_used_tables ();
|
||||
void update_used_tables () override;
|
||||
COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
|
||||
bool link_item_fields,
|
||||
COND_EQUAL **cond_equal_ref)
|
||||
COND_EQUAL **cond_equal_ref) override
|
||||
{
|
||||
/*
|
||||
Item_sum (and derivants) of the original WHERE/HAVING clauses
|
||||
@ -486,7 +486,7 @@ public:
|
||||
return Item::build_equal_items(thd, inherited, link_item_fields,
|
||||
cond_equal_ref);
|
||||
}
|
||||
bool is_null() { return null_value; }
|
||||
bool is_null() override { return null_value; }
|
||||
/**
|
||||
make_const()
|
||||
Called if we've managed to calculate the value of this Item in
|
||||
@ -499,8 +499,8 @@ public:
|
||||
const_item_cache= true;
|
||||
}
|
||||
void reset_forced_const() { const_item_cache= false; }
|
||||
virtual bool const_during_execution() const { return false; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool const_during_execution() const override { return false; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
void fix_num_length_and_dec();
|
||||
|
||||
/**
|
||||
@ -513,7 +513,7 @@ public:
|
||||
may be initialized to 0 by clear() and to NULL by
|
||||
no_rows_in_result().
|
||||
*/
|
||||
virtual void no_rows_in_result()
|
||||
void no_rows_in_result() override
|
||||
{
|
||||
set_aggregator(with_distinct ?
|
||||
Aggregator::DISTINCT_AGGREGATOR :
|
||||
@ -521,14 +521,14 @@ public:
|
||||
aggregator_clear();
|
||||
}
|
||||
virtual void make_unique() { force_copy_fields= TRUE; }
|
||||
Item *get_tmp_table_item(THD *thd);
|
||||
Item *get_tmp_table_item(THD *thd) override;
|
||||
virtual Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table);
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
return create_tmp_field(root, param->group(), table);
|
||||
}
|
||||
virtual bool collect_outer_ref_processor(void *param);
|
||||
bool collect_outer_ref_processor(void *param) override;
|
||||
bool init_sum_func_check(THD *thd);
|
||||
bool check_sum_func(THD *thd, Item **ref);
|
||||
bool register_sum_func(THD *thd, Item **ref);
|
||||
@ -588,14 +588,14 @@ public:
|
||||
virtual bool supports_removal() const { return false; }
|
||||
virtual void remove() { DBUG_ASSERT(0); }
|
||||
|
||||
virtual void cleanup();
|
||||
bool check_vcol_func_processor(void *arg);
|
||||
void cleanup() override;
|
||||
bool check_vcol_func_processor(void *arg) override;
|
||||
virtual void setup_window_func(THD *thd, Window_spec *window_spec) {}
|
||||
void mark_as_window_func_sum_expr() { window_func_sum_expr_flag= true; }
|
||||
bool is_window_func_sum_expr() { return window_func_sum_expr_flag; }
|
||||
virtual void setup_caches(THD *thd) {};
|
||||
|
||||
bool with_sum_func() const { return true; }
|
||||
bool with_sum_func() const override { return true; }
|
||||
virtual void set_partition_row_count(ulonglong count) { DBUG_ASSERT(0); }
|
||||
|
||||
/*
|
||||
@ -702,15 +702,15 @@ public:
|
||||
Aggregator(sum), table(NULL), tmp_table_param(NULL), tree(NULL),
|
||||
always_null(false), use_distinct_values(false) {}
|
||||
virtual ~Aggregator_distinct ();
|
||||
Aggregator_type Aggrtype() { return DISTINCT_AGGREGATOR; }
|
||||
Aggregator_type Aggrtype() override { return DISTINCT_AGGREGATOR; }
|
||||
|
||||
bool setup(THD *);
|
||||
void clear();
|
||||
bool add();
|
||||
void endup();
|
||||
virtual my_decimal *arg_val_decimal(my_decimal * value);
|
||||
virtual double arg_val_real();
|
||||
virtual bool arg_is_null(bool use_null_value);
|
||||
bool setup(THD *) override;
|
||||
void clear() override;
|
||||
bool add() override;
|
||||
void endup() override;
|
||||
my_decimal *arg_val_decimal(my_decimal * value) override;
|
||||
double arg_val_real() override;
|
||||
bool arg_is_null(bool use_null_value) override;
|
||||
|
||||
bool unique_walk_function(void *element);
|
||||
bool unique_walk_function_for_count(void *element);
|
||||
@ -729,15 +729,15 @@ public:
|
||||
|
||||
Aggregator_simple (Item_sum *sum) :
|
||||
Aggregator(sum) {}
|
||||
Aggregator_type Aggrtype() { return Aggregator::SIMPLE_AGGREGATOR; }
|
||||
Aggregator_type Aggrtype() override { return Aggregator::SIMPLE_AGGREGATOR; }
|
||||
|
||||
bool setup(THD * thd) { return item_sum->setup(thd); }
|
||||
void clear() { item_sum->clear(); }
|
||||
bool add() { return item_sum->add(); }
|
||||
void endup() {};
|
||||
virtual my_decimal *arg_val_decimal(my_decimal * value);
|
||||
virtual double arg_val_real();
|
||||
virtual bool arg_is_null(bool use_null_value);
|
||||
bool setup(THD * thd) override { return item_sum->setup(thd); }
|
||||
void clear() override { item_sum->clear(); }
|
||||
bool add() override { return item_sum->add(); }
|
||||
void endup() override {};
|
||||
my_decimal *arg_val_decimal(my_decimal * value) override;
|
||||
double arg_val_real() override;
|
||||
bool arg_is_null(bool use_null_value) override;
|
||||
};
|
||||
|
||||
|
||||
@ -753,7 +753,7 @@ public:
|
||||
Item_sum(thd, list) {}
|
||||
Item_sum_num(THD *thd, Item_sum_num *item):
|
||||
Item_sum(thd, item) {}
|
||||
bool fix_fields(THD *, Item **);
|
||||
bool fix_fields(THD *, Item **) override;
|
||||
};
|
||||
|
||||
|
||||
@ -764,23 +764,23 @@ public:
|
||||
Item_sum_double(THD *thd, Item *item_par): Item_sum_num(thd, item_par) {}
|
||||
Item_sum_double(THD *thd, List<Item> &list): Item_sum_num(thd, list) {}
|
||||
Item_sum_double(THD *thd, Item_sum_double *item) :Item_sum_num(thd, item) {}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
return val_int_from_real();
|
||||
}
|
||||
String *val_str(String*str)
|
||||
String *val_str(String*str) override
|
||||
{
|
||||
return val_string_from_real(str);
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *to)
|
||||
my_decimal *val_decimal(my_decimal *to) override
|
||||
{
|
||||
return val_decimal_from_real(to);
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return get_date_from_real(thd, ltime, fuzzydate);
|
||||
}
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
};
|
||||
|
||||
|
||||
@ -791,14 +791,14 @@ public:
|
||||
Item_sum_int(THD *thd, Item *item_par): Item_sum_num(thd, item_par) {}
|
||||
Item_sum_int(THD *thd, List<Item> &list): Item_sum_num(thd, list) {}
|
||||
Item_sum_int(THD *thd, Item_sum_int *item) :Item_sum_num(thd, item) {}
|
||||
double val_real() { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
|
||||
String *val_str(String*str);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
double val_real() override { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
|
||||
String *val_str(String*str) override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return get_date_from_int(thd, ltime, fuzzydate);
|
||||
}
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{ decimals=0; max_length=21; maybe_null=null_value=0; return FALSE; }
|
||||
};
|
||||
|
||||
@ -815,7 +815,7 @@ protected:
|
||||
my_decimal direct_sum_decimal;
|
||||
my_decimal dec_buffs[2];
|
||||
uint curr_dec_buff;
|
||||
bool fix_length_and_dec();
|
||||
bool fix_length_and_dec() override;
|
||||
|
||||
public:
|
||||
Item_sum_sum(THD *thd, Item *item_par, bool distinct):
|
||||
@ -825,40 +825,40 @@ public:
|
||||
set_distinct(distinct);
|
||||
}
|
||||
Item_sum_sum(THD *thd, Item_sum_sum *item);
|
||||
enum Sumfunctype sum_func () const
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return has_with_distinct() ? SUM_DISTINCT_FUNC : SUM_FUNC;
|
||||
}
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
void direct_add(my_decimal *add_sum_decimal);
|
||||
void direct_add(double add_sum_real, bool add_sum_is_null);
|
||||
void clear();
|
||||
bool add();
|
||||
double val_real();
|
||||
longlong val_int();
|
||||
String *val_str(String*str);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
void clear() override;
|
||||
bool add() override;
|
||||
double val_real() override;
|
||||
longlong val_int() override;
|
||||
String *val_str(String*str) override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{ return Type_handler_hybrid_field_type::type_handler(); }
|
||||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_decimal();
|
||||
void reset_field();
|
||||
void update_field();
|
||||
void no_rows_in_result() {}
|
||||
const char *func_name() const
|
||||
void reset_field() override;
|
||||
void update_field() override;
|
||||
void no_rows_in_result() override {}
|
||||
const char *func_name() const override
|
||||
{
|
||||
return has_with_distinct() ? "sum(distinct " : "sum(";
|
||||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
void remove();
|
||||
Item *get_copy(THD *thd)
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
void remove() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_sum>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -878,10 +878,10 @@ class Item_sum_count :public Item_sum_int
|
||||
|
||||
friend class Aggregator_distinct;
|
||||
|
||||
void clear();
|
||||
bool add();
|
||||
void cleanup();
|
||||
void remove();
|
||||
void clear() override;
|
||||
bool add() override;
|
||||
void cleanup() override;
|
||||
void remove() override;
|
||||
|
||||
public:
|
||||
Item_sum_count(THD *thd, Item *item_par):
|
||||
@ -907,30 +907,30 @@ public:
|
||||
Item_sum_int(thd, item), direct_counted(FALSE),
|
||||
direct_reseted_field(FALSE), count(item->count)
|
||||
{}
|
||||
enum Sumfunctype sum_func () const
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return has_with_distinct() ? COUNT_DISTINCT_FUNC : COUNT_FUNC;
|
||||
}
|
||||
void no_rows_in_result() { count=0; }
|
||||
void no_rows_in_result() override { count=0; }
|
||||
void make_const(longlong count_arg)
|
||||
{
|
||||
count=count_arg;
|
||||
Item_sum::make_const();
|
||||
}
|
||||
const Type_handler *type_handler() const { return &type_handler_slonglong; }
|
||||
longlong val_int();
|
||||
void reset_field();
|
||||
void update_field();
|
||||
const Type_handler *type_handler() const override { return &type_handler_slonglong; }
|
||||
longlong val_int() override;
|
||||
void reset_field() override;
|
||||
void update_field() override;
|
||||
void direct_add(longlong add_count);
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
return has_with_distinct() ? "count(distinct " : "count(";
|
||||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_count>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -955,38 +955,38 @@ public:
|
||||
|
||||
void fix_length_and_dec_double();
|
||||
void fix_length_and_dec_decimal();
|
||||
bool fix_length_and_dec();
|
||||
enum Sumfunctype sum_func () const
|
||||
bool fix_length_and_dec() override;
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return has_with_distinct() ? AVG_DISTINCT_FUNC : AVG_FUNC;
|
||||
}
|
||||
void clear();
|
||||
bool add();
|
||||
void remove();
|
||||
double val_real();
|
||||
void clear() override;
|
||||
bool add() override;
|
||||
void remove() override;
|
||||
double val_real() override;
|
||||
// In SPs we might force the "wrong" type with select into a declare variable
|
||||
longlong val_int() { return val_int_from_real(); }
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
String *val_str(String *str);
|
||||
void reset_field();
|
||||
void update_field();
|
||||
Item *result_item(THD *thd, Field *field);
|
||||
void no_rows_in_result() {}
|
||||
const char *func_name() const
|
||||
longlong val_int() override { return val_int_from_real(); }
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
String *val_str(String *str) override;
|
||||
void reset_field() override;
|
||||
void update_field() override;
|
||||
Item *result_item(THD *thd, Field *field) override;
|
||||
void no_rows_in_result() override {}
|
||||
const char *func_name() const override
|
||||
{
|
||||
return has_with_distinct() ? "avg(distinct " : "avg(";
|
||||
}
|
||||
Item *copy_or_same(THD* thd);
|
||||
Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table);
|
||||
void cleanup()
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table) override;
|
||||
void cleanup() override
|
||||
{
|
||||
count= 0;
|
||||
Item_sum_sum::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_avg>(thd, this); }
|
||||
|
||||
bool supports_removal() const
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -1111,7 +1111,7 @@ public:
|
||||
:Item_sum(thd, item),
|
||||
Type_handler_hybrid_field_type(item)
|
||||
{ }
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{ return Type_handler_hybrid_field_type::type_handler(); }
|
||||
bool fix_length_and_dec_generic();
|
||||
bool fix_length_and_dec_numeric(const Type_handler *h);
|
||||
@ -1145,35 +1145,35 @@ public:
|
||||
direct_added(FALSE), value(item->value), arg_cache(0),
|
||||
cmp_sign(item->cmp_sign), was_values(item->was_values)
|
||||
{ }
|
||||
bool fix_fields(THD *, Item **);
|
||||
bool fix_length_and_dec();
|
||||
bool fix_fields(THD *, Item **) override;
|
||||
bool fix_length_and_dec() override;
|
||||
void setup_hybrid(THD *thd, Item *item, Item *value_arg);
|
||||
void clear();
|
||||
void clear() override;
|
||||
void direct_add(Item *item);
|
||||
double val_real();
|
||||
longlong val_int();
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
|
||||
void reset_field();
|
||||
String *val_str(String *);
|
||||
bool val_native(THD *thd, Native *);
|
||||
const Type_handler *real_type_handler() const
|
||||
double val_real() override;
|
||||
longlong val_int() override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
void reset_field() override;
|
||||
String *val_str(String *) override;
|
||||
bool val_native(THD *thd, Native *) override;
|
||||
const Type_handler *real_type_handler() const override
|
||||
{
|
||||
return get_arg(0)->real_type_handler();
|
||||
}
|
||||
const TYPELIB *get_typelib() const { return args[0]->get_typelib(); }
|
||||
void update_field();
|
||||
const TYPELIB *get_typelib() const override { return args[0]->get_typelib(); }
|
||||
void update_field() override;
|
||||
void min_max_update_str_field();
|
||||
void min_max_update_real_field();
|
||||
void min_max_update_int_field();
|
||||
void min_max_update_decimal_field();
|
||||
void min_max_update_native_field();
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
bool any_value() { return was_values; }
|
||||
void no_rows_in_result();
|
||||
void restore_to_before_no_rows_in_result();
|
||||
Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table);
|
||||
void setup_caches(THD *thd) { setup_hybrid(thd, arguments()[0], NULL); }
|
||||
void no_rows_in_result() override;
|
||||
void restore_to_before_no_rows_in_result() override;
|
||||
Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table) override;
|
||||
void setup_caches(THD *thd) override { setup_hybrid(thd, arguments()[0], NULL); }
|
||||
};
|
||||
|
||||
|
||||
@ -1182,12 +1182,12 @@ class Item_sum_min final :public Item_sum_min_max
|
||||
public:
|
||||
Item_sum_min(THD *thd, Item *item_par): Item_sum_min_max(thd, item_par, 1) {}
|
||||
Item_sum_min(THD *thd, Item_sum_min *item) :Item_sum_min_max(thd, item) {}
|
||||
enum Sumfunctype sum_func () const {return MIN_FUNC;}
|
||||
enum Sumfunctype sum_func () const override {return MIN_FUNC;}
|
||||
|
||||
bool add();
|
||||
const char *func_name() const { return "min("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
bool add() override;
|
||||
const char *func_name() const override { return "min("; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_min>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1197,12 +1197,12 @@ class Item_sum_max final :public Item_sum_min_max
|
||||
public:
|
||||
Item_sum_max(THD *thd, Item *item_par): Item_sum_min_max(thd, item_par, -1) {}
|
||||
Item_sum_max(THD *thd, Item_sum_max *item) :Item_sum_min_max(thd, item) {}
|
||||
enum Sumfunctype sum_func () const {return MAX_FUNC;}
|
||||
enum Sumfunctype sum_func () const override {return MAX_FUNC;}
|
||||
|
||||
bool add();
|
||||
const char *func_name() const { return "max("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
bool add() override;
|
||||
const char *func_name() const override { return "max("; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_max>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1221,20 +1221,20 @@ public:
|
||||
if (as_window_function)
|
||||
memcpy(bit_counters, item->bit_counters, sizeof(bit_counters));
|
||||
}
|
||||
enum Sumfunctype sum_func () const {return SUM_BIT_FUNC;}
|
||||
void clear();
|
||||
longlong val_int();
|
||||
void reset_field();
|
||||
void update_field();
|
||||
const Type_handler *type_handler() const { return &type_handler_ulonglong; }
|
||||
bool fix_length_and_dec()
|
||||
enum Sumfunctype sum_func () const override {return SUM_BIT_FUNC;}
|
||||
void clear() override;
|
||||
longlong val_int() override;
|
||||
void reset_field() override;
|
||||
void update_field() override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_ulonglong; }
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
if (args[0]->check_type_can_return_int(func_name()))
|
||||
return true;
|
||||
decimals= 0; max_length=21; unsigned_flag= 1; maybe_null= null_value= 0;
|
||||
return FALSE;
|
||||
}
|
||||
void cleanup()
|
||||
void cleanup() override
|
||||
{
|
||||
bits= reset_bits;
|
||||
if (as_window_function)
|
||||
@ -1242,12 +1242,12 @@ public:
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
void setup_window_func(THD *thd __attribute__((unused)),
|
||||
Window_spec *window_spec __attribute__((unused)))
|
||||
Window_spec *window_spec __attribute__((unused))) override
|
||||
{
|
||||
as_window_function= TRUE;
|
||||
clear_as_window();
|
||||
}
|
||||
void remove()
|
||||
void remove() override
|
||||
{
|
||||
if (as_window_function)
|
||||
{
|
||||
@ -1258,7 +1258,7 @@ public:
|
||||
DBUG_ASSERT(0);
|
||||
}
|
||||
|
||||
bool supports_removal() const
|
||||
bool supports_removal() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -1286,14 +1286,14 @@ class Item_sum_or final :public Item_sum_bit
|
||||
public:
|
||||
Item_sum_or(THD *thd, Item *item_par): Item_sum_bit(thd, item_par, 0) {}
|
||||
Item_sum_or(THD *thd, Item_sum_or *item) :Item_sum_bit(thd, item) {}
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_or("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
bool add() override;
|
||||
const char *func_name() const override { return "bit_or("; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_or>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
void set_bits_from_counters() override;
|
||||
};
|
||||
|
||||
|
||||
@ -1303,14 +1303,14 @@ public:
|
||||
Item_sum_and(THD *thd, Item *item_par):
|
||||
Item_sum_bit(thd, item_par, ULONGLONG_MAX) {}
|
||||
Item_sum_and(THD *thd, Item_sum_and *item) :Item_sum_bit(thd, item) {}
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_and("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
bool add() override;
|
||||
const char *func_name() const override { return "bit_and("; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_and>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
void set_bits_from_counters() override;
|
||||
};
|
||||
|
||||
class Item_sum_xor final :public Item_sum_bit
|
||||
@ -1318,14 +1318,14 @@ class Item_sum_xor final :public Item_sum_bit
|
||||
public:
|
||||
Item_sum_xor(THD *thd, Item *item_par): Item_sum_bit(thd, item_par, 0) {}
|
||||
Item_sum_xor(THD *thd, Item_sum_xor *item) :Item_sum_bit(thd, item) {}
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_xor("; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
bool add() override;
|
||||
const char *func_name() const override { return "bit_xor("; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_xor>(thd, this); }
|
||||
|
||||
private:
|
||||
void set_bits_from_counters();
|
||||
void set_bits_from_counters() override;
|
||||
};
|
||||
|
||||
class sp_head;
|
||||
@ -1394,48 +1394,48 @@ public:
|
||||
sp_head *sp, List<Item> &list);
|
||||
Item_sum_sp(THD *thd, Item_sum_sp *item);
|
||||
|
||||
enum Sumfunctype sum_func () const
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return SP_AGGREGATE_FUNC;
|
||||
}
|
||||
Field *create_field_for_create_select(MEM_ROOT *root, TABLE *table)
|
||||
Field *create_field_for_create_select(MEM_ROOT *root, TABLE *table) override
|
||||
{
|
||||
return create_table_field_from_handler(root, table);
|
||||
}
|
||||
bool fix_length_and_dec();
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
const char *func_name() const;
|
||||
const Type_handler *type_handler() const;
|
||||
bool add();
|
||||
bool fix_length_and_dec() override;
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
const char *func_name() const override;
|
||||
const Type_handler *type_handler() const override;
|
||||
bool add() override;
|
||||
|
||||
/* val_xx functions */
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
if(execute())
|
||||
return 0;
|
||||
return sp_result_field->val_int();
|
||||
}
|
||||
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
if(execute())
|
||||
return 0.0;
|
||||
return sp_result_field->val_real();
|
||||
}
|
||||
|
||||
my_decimal *val_decimal(my_decimal *dec_buf)
|
||||
my_decimal *val_decimal(my_decimal *dec_buf) override
|
||||
{
|
||||
if(execute())
|
||||
return NULL;
|
||||
return sp_result_field->val_decimal(dec_buf);
|
||||
}
|
||||
|
||||
bool val_native(THD *thd, Native *to)
|
||||
bool val_native(THD *thd, Native *to) override
|
||||
{
|
||||
return null_value= execute() || sp_result_field->val_native(to);
|
||||
}
|
||||
|
||||
String *val_str(String *str)
|
||||
String *val_str(String *str) override
|
||||
{
|
||||
String buf;
|
||||
char buff[20];
|
||||
@ -1453,11 +1453,11 @@ public:
|
||||
str->copy(buf);
|
||||
return str;
|
||||
}
|
||||
void reset_field(){DBUG_ASSERT(0);}
|
||||
void update_field(){DBUG_ASSERT(0);}
|
||||
void clear();
|
||||
void cleanup();
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
void reset_field() override{DBUG_ASSERT(0);}
|
||||
void update_field() override{DBUG_ASSERT(0);}
|
||||
void clear() override;
|
||||
void cleanup() override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return execute() || sp_result_field->get_date(ltime, fuzzydate);
|
||||
}
|
||||
@ -1465,9 +1465,9 @@ public:
|
||||
{
|
||||
return sp_result_field;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_sp>(thd, this); }
|
||||
Item *copy_or_same(THD *thd);
|
||||
Item *copy_or_same(THD *thd) override;
|
||||
};
|
||||
|
||||
/* Items to get the value of a stored sum function */
|
||||
@ -1486,18 +1486,18 @@ public:
|
||||
max_length= item->max_length;
|
||||
unsigned_flag= item->unsigned_flag;
|
||||
}
|
||||
table_map used_tables() const { return (table_map) 1L; }
|
||||
table_map used_tables() const override { return (table_map) 1L; }
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
return create_tmp_field_ex_simple(root, table, src, param);
|
||||
}
|
||||
void save_in_result_field(bool no_conversions) { DBUG_ASSERT(0); }
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
void save_in_result_field(bool no_conversions) override { DBUG_ASSERT(0); }
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function(name.str, arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
@ -1512,8 +1512,8 @@ public:
|
||||
Item_avg_field(THD *thd, Item_sum_avg *item)
|
||||
:Item_sum_field(thd, item), prec_increment(item->prec_increment)
|
||||
{ }
|
||||
enum Type type() const { return FIELD_AVG_ITEM; }
|
||||
bool is_null() { update_null_value(); return null_value; }
|
||||
enum Type type() const override { return FIELD_AVG_ITEM; }
|
||||
bool is_null() override { update_null_value(); return null_value; }
|
||||
};
|
||||
|
||||
|
||||
@ -1523,12 +1523,12 @@ public:
|
||||
Item_avg_field_double(THD *thd, Item_sum_avg *item)
|
||||
:Item_avg_field(thd, item)
|
||||
{ }
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
longlong val_int() { return val_int_from_real(); }
|
||||
my_decimal *val_decimal(my_decimal *dec) { return val_decimal_from_real(dec); }
|
||||
String *val_str(String *str) { return val_string_from_real(str); }
|
||||
double val_real();
|
||||
Item *get_copy(THD *thd)
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
longlong val_int() override { return val_int_from_real(); }
|
||||
my_decimal *val_decimal(my_decimal *dec) override { return val_decimal_from_real(dec); }
|
||||
String *val_str(String *str) override { return val_string_from_real(str); }
|
||||
double val_real() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_avg_field_double>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1543,21 +1543,21 @@ public:
|
||||
f_scale(item->f_scale),
|
||||
dec_bin_size(item->dec_bin_size)
|
||||
{ }
|
||||
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
|
||||
double val_real()
|
||||
const Type_handler *type_handler() const override { return &type_handler_newdecimal; }
|
||||
double val_real() override
|
||||
{
|
||||
return VDec(this).to_double();
|
||||
}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
return VDec(this).to_longlong(unsigned_flag);
|
||||
}
|
||||
String *val_str(String *str)
|
||||
String *val_str(String *str) override
|
||||
{
|
||||
return VDec(this).to_string_round(str, decimals);
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
Item *get_copy(THD *thd)
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_avg_field_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1569,16 +1569,16 @@ public:
|
||||
Item_variance_field(THD *thd, Item_sum_variance *item)
|
||||
:Item_sum_field(thd, item), sample(item->sample)
|
||||
{ }
|
||||
enum Type type() const {return FIELD_VARIANCE_ITEM; }
|
||||
double val_real();
|
||||
longlong val_int() { return val_int_from_real(); }
|
||||
String *val_str(String *str)
|
||||
enum Type type() const override {return FIELD_VARIANCE_ITEM; }
|
||||
double val_real() override;
|
||||
longlong val_int() override { return val_int_from_real(); }
|
||||
String *val_str(String *str) override
|
||||
{ return val_string_from_real(str); }
|
||||
my_decimal *val_decimal(my_decimal *dec_buf)
|
||||
my_decimal *val_decimal(my_decimal *dec_buf) override
|
||||
{ return val_decimal_from_real(dec_buf); }
|
||||
bool is_null() { update_null_value(); return null_value; }
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
Item *get_copy(THD *thd)
|
||||
bool is_null() override { update_null_value(); return null_value; }
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_variance_field>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1589,9 +1589,9 @@ public:
|
||||
Item_std_field(THD *thd, Item_sum_std *item)
|
||||
:Item_variance_field(thd, item)
|
||||
{ }
|
||||
enum Type type() const { return FIELD_STD_ITEM; }
|
||||
double val_real();
|
||||
Item *get_copy(THD *thd)
|
||||
enum Type type() const override { return FIELD_STD_ITEM; }
|
||||
double val_real() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_std_field>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1617,8 +1617,8 @@ public:
|
||||
Item_udf_sum(THD *thd, Item_udf_sum *item)
|
||||
:Item_sum(thd, item), udf(item->udf)
|
||||
{ udf.not_original= TRUE; }
|
||||
const char *func_name() const { return udf.name(); }
|
||||
bool fix_fields(THD *thd, Item **ref)
|
||||
const char *func_name() const override { return udf.name(); }
|
||||
bool fix_fields(THD *thd, Item **ref) override
|
||||
{
|
||||
DBUG_ASSERT(fixed == 0);
|
||||
|
||||
@ -1650,18 +1650,18 @@ public:
|
||||
memcpy (orig_args, args, sizeof (Item *) * arg_count);
|
||||
return check_sum_func(thd, ref);
|
||||
}
|
||||
enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; }
|
||||
enum Sumfunctype sum_func () const override { return UDF_SUM_FUNC; }
|
||||
virtual bool have_field_update(void) const { return 0; }
|
||||
|
||||
void clear();
|
||||
bool add();
|
||||
bool supports_removal() const;
|
||||
void remove();
|
||||
void reset_field() {};
|
||||
void update_field() {};
|
||||
void cleanup();
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
void clear() override;
|
||||
bool add() override;
|
||||
bool supports_removal() const override;
|
||||
void remove() override;
|
||||
void reset_field() override {};
|
||||
void update_field() override {};
|
||||
void cleanup() override;
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
@ -1677,14 +1677,14 @@ class Item_sum_udf_float :public Item_udf_sum
|
||||
Item_udf_sum(thd, udf_arg, list) {}
|
||||
Item_sum_udf_float(THD *thd, Item_sum_udf_float *item)
|
||||
:Item_udf_sum(thd, item) {}
|
||||
longlong val_int() { return val_int_from_real(); }
|
||||
double val_real();
|
||||
String *val_str(String*str);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
bool fix_length_and_dec() { fix_num_length_and_dec(); return FALSE; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override { return val_int_from_real(); }
|
||||
double val_real() override;
|
||||
String *val_str(String*str) override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_udf_float>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1698,20 +1698,20 @@ public:
|
||||
Item_udf_sum(thd, udf_arg, list) {}
|
||||
Item_sum_udf_int(THD *thd, Item_sum_udf_int *item)
|
||||
:Item_udf_sum(thd, item) {}
|
||||
longlong val_int();
|
||||
double val_real()
|
||||
longlong val_int() override;
|
||||
double val_real() override
|
||||
{ DBUG_ASSERT(fixed == 1); return (double) Item_sum_udf_int::val_int(); }
|
||||
String *val_str(String*str);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
const Type_handler *type_handler() const
|
||||
String *val_str(String*str) override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
if (unsigned_flag)
|
||||
return &type_handler_ulonglong;
|
||||
return &type_handler_slonglong;
|
||||
}
|
||||
bool fix_length_and_dec() { decimals=0; max_length=21; return FALSE; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
bool fix_length_and_dec() override { decimals=0; max_length=21; return FALSE; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_udf_int>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1725,8 +1725,8 @@ public:
|
||||
Item_udf_sum(thd, udf_arg, list) {}
|
||||
Item_sum_udf_str(THD *thd, Item_sum_udf_str *item)
|
||||
:Item_udf_sum(thd, item) {}
|
||||
String *val_str(String *);
|
||||
double val_real()
|
||||
String *val_str(String *) override;
|
||||
double val_real() override
|
||||
{
|
||||
int err_not_used;
|
||||
char *end_not_used;
|
||||
@ -1735,7 +1735,7 @@ public:
|
||||
return res ? res->charset()->strntod((char*) res->ptr(),res->length(),
|
||||
&end_not_used, &err_not_used) : 0.0;
|
||||
}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
int err_not_used;
|
||||
char *end;
|
||||
@ -1748,11 +1748,11 @@ public:
|
||||
end= (char*) res->ptr()+res->length();
|
||||
return cs->strtoll10(res->ptr(), &end, &err_not_used);
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *dec);
|
||||
const Type_handler *type_handler() const { return string_type_handler(); }
|
||||
bool fix_length_and_dec();
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
my_decimal *val_decimal(my_decimal *dec) override;
|
||||
const Type_handler *type_handler() const override { return string_type_handler(); }
|
||||
bool fix_length_and_dec() override;
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_udf_str>(thd, this); }
|
||||
};
|
||||
|
||||
@ -1766,23 +1766,23 @@ public:
|
||||
Item_udf_sum(thd, udf_arg, list) {}
|
||||
Item_sum_udf_decimal(THD *thd, Item_sum_udf_decimal *item)
|
||||
:Item_udf_sum(thd, item) {}
|
||||
String *val_str(String *str)
|
||||
String *val_str(String *str) override
|
||||
{
|
||||
return VDec(this).to_string_round(str, decimals);
|
||||
}
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
return VDec(this).to_double();
|
||||
}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
return VDec(this).to_longlong(unsigned_flag);
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
|
||||
bool fix_length_and_dec() { fix_num_length_and_dec(); return FALSE; }
|
||||
Item *copy_or_same(THD* thd);
|
||||
Item *get_copy(THD *thd)
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_newdecimal; }
|
||||
bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; }
|
||||
Item *copy_or_same(THD* thd) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_udf_decimal>(thd, this); }
|
||||
};
|
||||
|
||||
|
@ -2462,21 +2462,21 @@ String *Item_char_typecast::val_str_binary_from_native(String *str)
|
||||
class Item_char_typecast_func_handler: public Item_handled_func::Handler_str
|
||||
{
|
||||
public:
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const
|
||||
const Type_handler *return_type_handler(const Item_handled_func *item) const override
|
||||
{
|
||||
return Type_handler::string_type_handler(item->max_length);
|
||||
}
|
||||
const Type_handler *
|
||||
type_handler_for_create_select(const Item_handled_func *item) const
|
||||
type_handler_for_create_select(const Item_handled_func *item) const override
|
||||
{
|
||||
return return_type_handler(item)->type_handler_for_tmp_table(item);
|
||||
}
|
||||
|
||||
bool fix_length_and_dec(Item_handled_func *item) const
|
||||
bool fix_length_and_dec(Item_handled_func *item) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
String *val_str(Item_handled_func *item, String *to) const
|
||||
String *val_str(Item_handled_func *item, String *to) const override
|
||||
{
|
||||
DBUG_ASSERT(dynamic_cast<const Item_char_typecast*>(item));
|
||||
return static_cast<Item_char_typecast*>(item)->val_str_generic(to);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -33,12 +33,12 @@ public:
|
||||
DBUG_ASSERT(a->type() == Item::FIELD_ITEM);
|
||||
}
|
||||
|
||||
virtual bool val_bool();
|
||||
virtual longlong val_int()
|
||||
bool val_bool() override;
|
||||
longlong val_int() override
|
||||
{
|
||||
return (val_bool() ? 1 : 0);
|
||||
}
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
maybe_null= 0;
|
||||
null_value= 0;
|
||||
@ -46,9 +46,9 @@ public:
|
||||
max_length= 1;
|
||||
return FALSE;
|
||||
}
|
||||
virtual const char* func_name() const { return "is_history"; }
|
||||
virtual void print(String *str, enum_query_type query_type);
|
||||
Item *get_copy(THD *thd)
|
||||
const char* func_name() const override { return "is_history"; }
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_history>(thd, this); }
|
||||
};
|
||||
|
||||
@ -57,7 +57,7 @@ class Item_func_trt_ts: public Item_datetimefunc
|
||||
TR_table::field_id_t trt_field;
|
||||
public:
|
||||
Item_func_trt_ts(THD *thd, Item* a, TR_table::field_id_t _trt_field);
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
if (trt_field == TR_table::FLD_BEGIN_TS)
|
||||
{
|
||||
@ -65,10 +65,10 @@ public:
|
||||
}
|
||||
return "trt_commit_ts";
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate);
|
||||
Item *get_copy(THD *thd)
|
||||
bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_trt_ts>(thd, this); }
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{ fix_attributes_datetime(decimals); return FALSE; }
|
||||
};
|
||||
|
||||
@ -84,7 +84,7 @@ public:
|
||||
Item_func_trt_id(THD *thd, Item* a, TR_table::field_id_t _trt_field, bool _backwards= false);
|
||||
Item_func_trt_id(THD *thd, Item* a, Item* b, TR_table::field_id_t _trt_field);
|
||||
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
switch (trt_field)
|
||||
{
|
||||
@ -100,15 +100,15 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
bool res= Item_int_func::fix_length_and_dec();
|
||||
max_length= 20;
|
||||
return res;
|
||||
}
|
||||
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_trt_id>(thd, this); }
|
||||
};
|
||||
|
||||
@ -119,12 +119,12 @@ protected:
|
||||
|
||||
public:
|
||||
Item_func_trt_trx_sees(THD *thd, Item* a, Item* b);
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
return "trt_trx_sees";
|
||||
}
|
||||
longlong val_int();
|
||||
Item *get_copy(THD *thd)
|
||||
longlong val_int() override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_trt_trx_sees>(thd, this); }
|
||||
};
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
{
|
||||
accept_eq= true;
|
||||
}
|
||||
const char *func_name() const
|
||||
const char *func_name() const override
|
||||
{
|
||||
return "trt_trx_sees_eq";
|
||||
}
|
||||
|
@ -118,37 +118,37 @@ public:
|
||||
Item_sum_row_number(THD *thd)
|
||||
: Item_sum_int(thd), count(0) {}
|
||||
|
||||
const Type_handler *type_handler() const { return &type_handler_slonglong; }
|
||||
const Type_handler *type_handler() const override { return &type_handler_slonglong; }
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
count= 0;
|
||||
}
|
||||
|
||||
bool add()
|
||||
bool add() override
|
||||
{
|
||||
count++;
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void update_field() {}
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
void update_field() override {}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return ROW_NUMBER_FUNC;
|
||||
}
|
||||
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
return count;
|
||||
}
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "row_number";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_row_number>(thd, this); }
|
||||
};
|
||||
|
||||
@ -181,38 +181,38 @@ public:
|
||||
|
||||
Item_sum_rank(THD *thd) : Item_sum_int(thd), peer_tracker(NULL) {}
|
||||
|
||||
const Type_handler *type_handler() const { return &type_handler_slonglong; }
|
||||
const Type_handler *type_handler() const override { return &type_handler_slonglong; }
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
/* This is called on partition start */
|
||||
cur_rank= 1;
|
||||
row_number= 0;
|
||||
}
|
||||
|
||||
bool add();
|
||||
bool add() override;
|
||||
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
return cur_rank;
|
||||
}
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void update_field() {}
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
void update_field() override {}
|
||||
|
||||
enum Sumfunctype sum_func () const
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return RANK_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "rank";
|
||||
}
|
||||
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
|
||||
void cleanup()
|
||||
void cleanup() override
|
||||
{
|
||||
if (peer_tracker)
|
||||
{
|
||||
@ -221,7 +221,7 @@ public:
|
||||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_rank>(thd, this); }
|
||||
};
|
||||
|
||||
@ -255,35 +255,35 @@ class Item_sum_dense_rank: public Item_sum_int
|
||||
XXX(cvicentiu) This class could potentially be implemented in the rank
|
||||
class, with a switch for the DENSE case.
|
||||
*/
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
dense_rank= 0;
|
||||
first_add= true;
|
||||
}
|
||||
bool add();
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void update_field() {}
|
||||
longlong val_int()
|
||||
bool add() override;
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
void update_field() override {}
|
||||
longlong val_int() override
|
||||
{
|
||||
return dense_rank;
|
||||
}
|
||||
|
||||
Item_sum_dense_rank(THD *thd)
|
||||
: Item_sum_int(thd), dense_rank(0), first_add(true), peer_tracker(NULL) {}
|
||||
const Type_handler *type_handler() const { return &type_handler_slonglong; }
|
||||
enum Sumfunctype sum_func () const
|
||||
const Type_handler *type_handler() const override { return &type_handler_slonglong; }
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return DENSE_RANK_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "dense_rank";
|
||||
}
|
||||
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
|
||||
void cleanup()
|
||||
void cleanup() override
|
||||
{
|
||||
if (peer_tracker)
|
||||
{
|
||||
@ -292,7 +292,7 @@ class Item_sum_dense_rank: public Item_sum_int
|
||||
}
|
||||
Item_sum_int::cleanup();
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_dense_rank>(thd, this); }
|
||||
};
|
||||
|
||||
@ -309,22 +309,22 @@ class Item_sum_hybrid_simple : public Item_sum_hybrid
|
||||
value(NULL)
|
||||
{ }
|
||||
|
||||
bool add();
|
||||
bool fix_fields(THD *, Item **);
|
||||
bool fix_length_and_dec();
|
||||
bool add() override;
|
||||
bool fix_fields(THD *, Item **) override;
|
||||
bool fix_length_and_dec() override;
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
double val_real();
|
||||
longlong val_int();
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
void reset_field();
|
||||
String *val_str(String *);
|
||||
bool val_native(THD *thd, Native *to);
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
|
||||
const Type_handler *type_handler() const
|
||||
double val_real() override;
|
||||
longlong val_int() override;
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
void reset_field() override;
|
||||
String *val_str(String *) override;
|
||||
bool val_native(THD *thd, Native *to) override;
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override;
|
||||
const Type_handler *type_handler() const override
|
||||
{ return Type_handler_hybrid_field_type::type_handler(); }
|
||||
void update_field();
|
||||
Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table);
|
||||
void clear()
|
||||
void update_field() override;
|
||||
Field *create_tmp_field(MEM_ROOT *root, bool group, TABLE *table) override;
|
||||
void clear() override
|
||||
{
|
||||
value->clear();
|
||||
null_value= 1;
|
||||
@ -345,17 +345,17 @@ class Item_sum_first_value : public Item_sum_hybrid_simple
|
||||
Item_sum_hybrid_simple(thd, arg_expr) {}
|
||||
|
||||
|
||||
enum Sumfunctype sum_func () const
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return FIRST_VALUE_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "first_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_first_value>(thd, this); }
|
||||
};
|
||||
|
||||
@ -371,17 +371,17 @@ class Item_sum_last_value : public Item_sum_hybrid_simple
|
||||
Item_sum_last_value(THD* thd, Item* arg_expr) :
|
||||
Item_sum_hybrid_simple(thd, arg_expr) {}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return LAST_VALUE_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "last_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_last_value>(thd, this); }
|
||||
};
|
||||
|
||||
@ -391,17 +391,17 @@ class Item_sum_nth_value : public Item_sum_hybrid_simple
|
||||
Item_sum_nth_value(THD *thd, Item *arg_expr, Item* offset_expr) :
|
||||
Item_sum_hybrid_simple(thd, arg_expr, offset_expr) {}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return NTH_VALUE_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "nth_value";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_nth_value>(thd, this); }
|
||||
};
|
||||
|
||||
@ -411,17 +411,17 @@ class Item_sum_lead : public Item_sum_hybrid_simple
|
||||
Item_sum_lead(THD *thd, Item *arg_expr, Item* offset_expr) :
|
||||
Item_sum_hybrid_simple(thd, arg_expr, offset_expr) {}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return LEAD_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "lead";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_lead>(thd, this); }
|
||||
};
|
||||
|
||||
@ -431,17 +431,17 @@ class Item_sum_lag : public Item_sum_hybrid_simple
|
||||
Item_sum_lag(THD *thd, Item *arg_expr, Item* offset_expr) :
|
||||
Item_sum_hybrid_simple(thd, arg_expr, offset_expr) {}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return LAG_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "lag";
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_lag>(thd, this); }
|
||||
};
|
||||
|
||||
@ -495,7 +495,7 @@ class Item_sum_percent_rank: public Item_sum_double,
|
||||
Item_sum_percent_rank(THD *thd)
|
||||
: Item_sum_double(thd), cur_rank(1), peer_tracker(NULL) {}
|
||||
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
/*
|
||||
Percent rank is a real value so calling the integer value should never
|
||||
@ -505,7 +505,7 @@ class Item_sum_percent_rank: public Item_sum_double,
|
||||
return 0;
|
||||
}
|
||||
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
/*
|
||||
We can not get the real value without knowing the number of rows
|
||||
@ -518,43 +518,43 @@ class Item_sum_percent_rank: public Item_sum_double,
|
||||
static_cast<double>(cur_rank - 1) / (partition_rows - 1) : 0;
|
||||
}
|
||||
|
||||
enum Sumfunctype sum_func () const
|
||||
enum Sumfunctype sum_func () const override
|
||||
{
|
||||
return PERCENT_RANK_FUNC;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "percent_rank";
|
||||
}
|
||||
|
||||
void update_field() {}
|
||||
void update_field() override {}
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
cur_rank= 1;
|
||||
row_number= 0;
|
||||
}
|
||||
bool add();
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
bool add() override;
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals = 10; // TODO-cvicentiu find out how many decimals the standard
|
||||
// requires.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
|
||||
void set_partition_row_count(ulonglong count)
|
||||
void set_partition_row_count(ulonglong count) override
|
||||
{
|
||||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_percent_rank>(thd, this); }
|
||||
|
||||
private:
|
||||
@ -563,7 +563,7 @@ class Item_sum_percent_rank: public Item_sum_double,
|
||||
|
||||
Group_bound_tracker *peer_tracker;
|
||||
|
||||
void cleanup()
|
||||
void cleanup() override
|
||||
{
|
||||
if (peer_tracker)
|
||||
{
|
||||
@ -596,51 +596,51 @@ class Item_sum_cume_dist: public Item_sum_double,
|
||||
Item_sum_cume_dist(THD *thd) :Item_sum_double(thd) { }
|
||||
Item_sum_cume_dist(THD *thd, Item *arg) :Item_sum_double(thd, arg) { }
|
||||
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
return calc_val_real(&null_value, current_row_count_);
|
||||
}
|
||||
|
||||
bool add()
|
||||
bool add() override
|
||||
{
|
||||
current_row_count_++;
|
||||
return false;
|
||||
}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return CUME_DIST_FUNC;
|
||||
}
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
current_row_count_= 0;
|
||||
partition_row_count_= 0;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "cume_dist";
|
||||
}
|
||||
|
||||
void update_field() {}
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
void update_field() override {}
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals = 10; // TODO-cvicentiu find out how many decimals the standard
|
||||
// requires.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
|
||||
void set_partition_row_count(ulonglong count)
|
||||
void set_partition_row_count(ulonglong count) override
|
||||
{
|
||||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_cume_dist>(thd, this); }
|
||||
|
||||
};
|
||||
@ -654,7 +654,7 @@ class Item_sum_ntile : public Item_sum_int,
|
||||
Item_sum_int(thd, num_quantiles_expr), n_old_val_(0)
|
||||
{ }
|
||||
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
if (get_row_count() == 0)
|
||||
{
|
||||
@ -681,41 +681,41 @@ class Item_sum_ntile : public Item_sum_int,
|
||||
return (current_row_count_ - 1 - extra_rows) / quantile_size + 1;
|
||||
}
|
||||
|
||||
bool add()
|
||||
bool add() override
|
||||
{
|
||||
current_row_count_++;
|
||||
return false;
|
||||
}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return NTILE_FUNC;
|
||||
}
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
current_row_count_= 0;
|
||||
partition_row_count_= 0;
|
||||
n_old_val_= 0;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "ntile";
|
||||
}
|
||||
|
||||
void update_field() {}
|
||||
void update_field() override {}
|
||||
|
||||
const Type_handler *type_handler() const { return &type_handler_slonglong; }
|
||||
const Type_handler *type_handler() const override { return &type_handler_slonglong; }
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
|
||||
void set_partition_row_count(ulonglong count)
|
||||
void set_partition_row_count(ulonglong count) override
|
||||
{
|
||||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_ntile>(thd, this); }
|
||||
|
||||
private:
|
||||
@ -734,7 +734,7 @@ public:
|
||||
value(NULL), val_calculated(FALSE), first_call(TRUE),
|
||||
prev_value(0), order_item(NULL){}
|
||||
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -745,7 +745,7 @@ public:
|
||||
return value->val_real();
|
||||
}
|
||||
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -756,7 +756,7 @@ public:
|
||||
return value->val_int();
|
||||
}
|
||||
|
||||
my_decimal* val_decimal(my_decimal* dec)
|
||||
my_decimal* val_decimal(my_decimal* dec) override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -767,7 +767,7 @@ public:
|
||||
return value->val_decimal(dec);
|
||||
}
|
||||
|
||||
String* val_str(String *str)
|
||||
String* val_str(String *str) override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -778,7 +778,7 @@ public:
|
||||
return value->val_str(str);
|
||||
}
|
||||
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -789,7 +789,7 @@ public:
|
||||
return value->get_date(thd, ltime, fuzzydate);
|
||||
}
|
||||
|
||||
bool val_native(THD *thd, Native *to)
|
||||
bool val_native(THD *thd, Native *to) override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -800,7 +800,7 @@ public:
|
||||
return value->val_native(thd, to);
|
||||
}
|
||||
|
||||
bool add()
|
||||
bool add() override
|
||||
{
|
||||
Item *arg= get_arg(0);
|
||||
if (arg->is_null())
|
||||
@ -841,12 +841,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return PERCENTILE_DISC_FUNC;
|
||||
}
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
val_calculated= false;
|
||||
first_call= true;
|
||||
@ -855,34 +855,34 @@ public:
|
||||
current_row_count_= 0;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "percentile_disc";
|
||||
}
|
||||
|
||||
void update_field() {}
|
||||
const Type_handler *type_handler() const
|
||||
void update_field() override {}
|
||||
const Type_handler *type_handler() const override
|
||||
{return Type_handler_hybrid_field_type::type_handler();}
|
||||
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals = 10; // TODO-cvicentiu find out how many decimals the standard
|
||||
// requires.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
|
||||
void set_partition_row_count(ulonglong count)
|
||||
void set_partition_row_count(ulonglong count) override
|
||||
{
|
||||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_percentile_disc>(thd, this); }
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
|
||||
private:
|
||||
Item_cache *value;
|
||||
@ -901,7 +901,7 @@ public:
|
||||
floor_value(NULL), ceil_value(NULL), first_call(TRUE),prev_value(0),
|
||||
ceil_val_calculated(FALSE), floor_val_calculated(FALSE), order_item(NULL){}
|
||||
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
if (get_row_count() == 0 || get_arg(0)->is_null())
|
||||
{
|
||||
@ -928,7 +928,7 @@ public:
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
bool add()
|
||||
bool add() override
|
||||
{
|
||||
Item *arg= get_arg(0);
|
||||
if (arg->is_null())
|
||||
@ -978,12 +978,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
enum Sumfunctype sum_func() const
|
||||
enum Sumfunctype sum_func() const override
|
||||
{
|
||||
return PERCENTILE_CONT_FUNC;
|
||||
}
|
||||
|
||||
void clear()
|
||||
void clear() override
|
||||
{
|
||||
first_call= true;
|
||||
floor_value->clear();
|
||||
@ -994,31 +994,31 @@ public:
|
||||
current_row_count_= 0;
|
||||
}
|
||||
|
||||
const char*func_name() const
|
||||
const char*func_name() const override
|
||||
{
|
||||
return "percentile_cont";
|
||||
}
|
||||
void update_field() {}
|
||||
void update_field() override {}
|
||||
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
decimals = 10; // TODO-cvicentiu find out how many decimals the standard
|
||||
// requires.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void reset_field() { DBUG_ASSERT(0); }
|
||||
void reset_field() override { DBUG_ASSERT(0); }
|
||||
|
||||
void set_partition_row_count(ulonglong count)
|
||||
void set_partition_row_count(ulonglong count) override
|
||||
{
|
||||
Partition_row_count::set_partition_row_count(count);
|
||||
}
|
||||
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_sum_percentile_cont>(thd, this); }
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec);
|
||||
void setup_window_func(THD *thd, Window_spec *window_spec) override;
|
||||
void setup_hybrid(THD *thd, Item *item);
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
|
||||
private:
|
||||
Item_cache *floor_value;
|
||||
@ -1056,7 +1056,7 @@ public:
|
||||
|
||||
Item_sum *window_func() const { return (Item_sum *) args[0]; }
|
||||
|
||||
void update_used_tables();
|
||||
void update_used_tables() override;
|
||||
|
||||
/*
|
||||
This is used by filesort to mark the columns it needs to read (because they
|
||||
@ -1067,7 +1067,7 @@ public:
|
||||
have been computed. In that case, window function will need to read its
|
||||
temp.table field. In order to allow that, mark that field in the read_set.
|
||||
*/
|
||||
bool register_field_in_read_map(void *arg)
|
||||
bool register_field_in_read_map(void *arg) override
|
||||
{
|
||||
TABLE *table= (TABLE*) arg;
|
||||
if (result_field && (result_field->table == table || !table))
|
||||
@ -1170,11 +1170,11 @@ public:
|
||||
*/
|
||||
void setup_partition_border_check(THD *thd);
|
||||
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return ((Item_sum *) args[0])->type_handler();
|
||||
}
|
||||
enum Item::Type type() const { return Item::WINDOW_FUNC_ITEM; }
|
||||
enum Item::Type type() const override { return Item::WINDOW_FUNC_ITEM; }
|
||||
|
||||
private:
|
||||
/*
|
||||
@ -1217,7 +1217,7 @@ public:
|
||||
read_value_from_result_field= true;
|
||||
}
|
||||
|
||||
bool is_null()
|
||||
bool is_null() override
|
||||
{
|
||||
if (force_return_blank)
|
||||
return true;
|
||||
@ -1228,7 +1228,7 @@ public:
|
||||
return window_func()->is_null();
|
||||
}
|
||||
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
double res;
|
||||
if (force_return_blank)
|
||||
@ -1249,7 +1249,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
longlong res;
|
||||
if (force_return_blank)
|
||||
@ -1270,7 +1270,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
String* val_str(String* str)
|
||||
String* val_str(String* str) override
|
||||
{
|
||||
String *res;
|
||||
if (force_return_blank)
|
||||
@ -1293,7 +1293,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
bool val_native(THD *thd, Native *to)
|
||||
bool val_native(THD *thd, Native *to) override
|
||||
{
|
||||
if (force_return_blank)
|
||||
return null_value= true;
|
||||
@ -1302,7 +1302,7 @@ public:
|
||||
return val_native_from_item(thd, window_func(), to);
|
||||
}
|
||||
|
||||
my_decimal* val_decimal(my_decimal* dec)
|
||||
my_decimal* val_decimal(my_decimal* dec) override
|
||||
{
|
||||
my_decimal *res;
|
||||
if (force_return_blank)
|
||||
@ -1325,7 +1325,7 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
bool res;
|
||||
if (force_return_blank)
|
||||
@ -1349,23 +1349,23 @@ public:
|
||||
}
|
||||
|
||||
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
List<Item> &fields, uint flags);
|
||||
List<Item> &fields, uint flags) override;
|
||||
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
Type_std_attributes::set(window_func());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const char* func_name() const { return "WF"; }
|
||||
const char* func_name() const override { return "WF"; }
|
||||
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
|
||||
bool resolve_window_name(THD *thd);
|
||||
|
||||
void print(String *str, enum_query_type query_type);
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
|
||||
Item *get_copy(THD *thd) { return 0; }
|
||||
Item *get_copy(THD *thd) override { return 0; }
|
||||
|
||||
};
|
||||
|
||||
|
@ -141,21 +141,21 @@ public:
|
||||
fltend= (MY_XPATH_FLT*) tmp_native_value.end();
|
||||
nodeset->length(0);
|
||||
}
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
return &type_handler_xpath_nodeset;
|
||||
}
|
||||
const Type_handler *fixed_type_handler() const
|
||||
const Type_handler *fixed_type_handler() const override
|
||||
{
|
||||
return &type_handler_xpath_nodeset;
|
||||
}
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
String *val_str(String *str)
|
||||
String *val_str(String *str) override
|
||||
{
|
||||
prepare_nodes();
|
||||
val_native(current_thd, &tmp2_native_value);
|
||||
@ -189,7 +189,7 @@ public:
|
||||
}
|
||||
return str;
|
||||
}
|
||||
bool fix_length_and_dec()
|
||||
bool fix_length_and_dec() override
|
||||
{
|
||||
max_length= MAX_BLOB_WIDTH;
|
||||
collation.collation= pxml->charset();
|
||||
@ -198,8 +198,8 @@ public:
|
||||
const_item_cache= false;
|
||||
return FALSE;
|
||||
}
|
||||
const char *func_name() const { return "nodeset"; }
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
const char *func_name() const override { return "nodeset"; }
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
@ -213,9 +213,9 @@ class Item_nodeset_func_rootelement :public Item_nodeset_func
|
||||
public:
|
||||
Item_nodeset_func_rootelement(THD *thd, String *pxml):
|
||||
Item_nodeset_func(thd, pxml) {}
|
||||
const char *func_name() const { return "xpath_rootelement"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_rootelement"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_rootelement>(thd, this); }
|
||||
};
|
||||
|
||||
@ -226,9 +226,9 @@ class Item_nodeset_func_union :public Item_nodeset_func
|
||||
public:
|
||||
Item_nodeset_func_union(THD *thd, Item *a, Item *b, String *pxml):
|
||||
Item_nodeset_func(thd, a, b, pxml) {}
|
||||
const char *func_name() const { return "xpath_union"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_union"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_union>(thd, this); }
|
||||
};
|
||||
|
||||
@ -242,7 +242,7 @@ public:
|
||||
Item_nodeset_func_axisbyname(THD *thd, Item *a, const char *n_arg, uint l_arg,
|
||||
String *pxml):
|
||||
Item_nodeset_func(thd, a, pxml), node_name(n_arg), node_namelen(l_arg) { }
|
||||
const char *func_name() const { return "xpath_axisbyname"; }
|
||||
const char *func_name() const override { return "xpath_axisbyname"; }
|
||||
bool validname(MY_XML_NODE *n)
|
||||
{
|
||||
if (node_name[0] == '*')
|
||||
@ -260,9 +260,9 @@ public:
|
||||
Item_nodeset_func_selfbyname(THD *thd, Item *a, const char *n_arg, uint l_arg,
|
||||
String *pxml):
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_selfbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_selfbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_selfbyname>(thd, this); }
|
||||
};
|
||||
|
||||
@ -274,9 +274,9 @@ public:
|
||||
Item_nodeset_func_childbyname(THD *thd, Item *a, const char *n_arg, uint l_arg,
|
||||
String *pxml):
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_childbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_childbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_childbyname>(thd, this); }
|
||||
};
|
||||
|
||||
@ -290,9 +290,9 @@ public:
|
||||
String *pxml, bool need_self_arg):
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml),
|
||||
need_self(need_self_arg) {}
|
||||
const char *func_name() const { return "xpath_descendantbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_descendantbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_descendantbyname>(thd, this); }
|
||||
};
|
||||
|
||||
@ -306,9 +306,9 @@ public:
|
||||
String *pxml, bool need_self_arg):
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml),
|
||||
need_self(need_self_arg) {}
|
||||
const char *func_name() const { return "xpath_ancestorbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_ancestorbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, this); }
|
||||
};
|
||||
|
||||
@ -320,9 +320,9 @@ public:
|
||||
Item_nodeset_func_parentbyname(THD *thd, Item *a, const char *n_arg, uint l_arg,
|
||||
String *pxml):
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_parentbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_parentbyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_parentbyname>(thd, this); }
|
||||
};
|
||||
|
||||
@ -334,9 +334,9 @@ public:
|
||||
Item_nodeset_func_attributebyname(THD *thd, Item *a, const char *n_arg,
|
||||
uint l_arg, String *pxml):
|
||||
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
|
||||
const char *func_name() const { return "xpath_attributebyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_attributebyname"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_attributebyname>(thd, this); }
|
||||
};
|
||||
|
||||
@ -351,9 +351,9 @@ class Item_nodeset_func_predicate :public Item_nodeset_func
|
||||
public:
|
||||
Item_nodeset_func_predicate(THD *thd, Item *a, Item *b, String *pxml):
|
||||
Item_nodeset_func(thd, a, b, pxml) {}
|
||||
const char *func_name() const { return "xpath_predicate"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_predicate"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_predicate>(thd, this); }
|
||||
};
|
||||
|
||||
@ -364,9 +364,9 @@ class Item_nodeset_func_elementbyindex :public Item_nodeset_func
|
||||
public:
|
||||
Item_nodeset_func_elementbyindex(THD *thd, Item *a, Item *b, String *pxml):
|
||||
Item_nodeset_func(thd, a, b, pxml) { }
|
||||
const char *func_name() const { return "xpath_elementbyindex"; }
|
||||
bool val_native(THD *thd, Native *nodeset);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_elementbyindex"; }
|
||||
bool val_native(THD *thd, Native *nodeset) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_func_elementbyindex>(thd, this); }
|
||||
};
|
||||
|
||||
@ -384,8 +384,8 @@ class Item_xpath_cast_bool :public Item_bool_func
|
||||
public:
|
||||
Item_xpath_cast_bool(THD *thd, Item *a, String *pxml_arg):
|
||||
Item_bool_func(thd, a), pxml(pxml_arg) {}
|
||||
const char *func_name() const { return "xpath_cast_bool"; }
|
||||
longlong val_int()
|
||||
const char *func_name() const override { return "xpath_cast_bool"; }
|
||||
longlong val_int() override
|
||||
{
|
||||
if (args[0]->fixed_type_handler() == &type_handler_xpath_nodeset)
|
||||
{
|
||||
@ -394,7 +394,7 @@ public:
|
||||
}
|
||||
return args[0]->val_real() ? 1 : 0;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_xpath_cast_bool>(thd, this); }
|
||||
};
|
||||
|
||||
@ -406,9 +406,9 @@ class Item_xpath_cast_number :public Item_real_func
|
||||
{
|
||||
public:
|
||||
Item_xpath_cast_number(THD *thd, Item *a): Item_real_func(thd, a) {}
|
||||
const char *func_name() const { return "xpath_cast_number"; }
|
||||
virtual double val_real() { return args[0]->val_real(); }
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "xpath_cast_number"; }
|
||||
double val_real() override { return args[0]->val_real(); }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_xpath_cast_number>(thd, this); }
|
||||
};
|
||||
|
||||
@ -422,12 +422,12 @@ public:
|
||||
Native *native_cache;
|
||||
Item_nodeset_context_cache(THD *thd, Native *native_arg, String *pxml):
|
||||
Item_nodeset_func(thd, pxml), native_cache(native_arg) { }
|
||||
bool val_native(THD *thd, Native *nodeset)
|
||||
bool val_native(THD *thd, Native *nodeset) override
|
||||
{
|
||||
return nodeset->copy(*native_cache);
|
||||
}
|
||||
bool fix_length_and_dec() { max_length= MAX_BLOB_WIDTH;; return FALSE; }
|
||||
Item *get_copy(THD *thd)
|
||||
bool fix_length_and_dec() override { max_length= MAX_BLOB_WIDTH;; return FALSE; }
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_context_cache>(thd, this); }
|
||||
};
|
||||
|
||||
@ -439,16 +439,16 @@ class Item_func_xpath_position :public Item_long_func
|
||||
public:
|
||||
Item_func_xpath_position(THD *thd, Item *a, String *p):
|
||||
Item_long_func(thd, a), pxml(p) {}
|
||||
const char *func_name() const { return "xpath_position"; }
|
||||
bool fix_length_and_dec() { max_length=10; return FALSE; }
|
||||
longlong val_int()
|
||||
const char *func_name() const override { return "xpath_position"; }
|
||||
bool fix_length_and_dec() override { max_length=10; return FALSE; }
|
||||
longlong val_int() override
|
||||
{
|
||||
args[0]->val_native(current_thd, &tmp_native_value);
|
||||
if (tmp_native_value.elements() == 1)
|
||||
return tmp_native_value.element(0).pos + 1;
|
||||
return 0;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_xpath_position>(thd, this); }
|
||||
};
|
||||
|
||||
@ -460,9 +460,9 @@ class Item_func_xpath_count :public Item_long_func
|
||||
public:
|
||||
Item_func_xpath_count(THD *thd, Item *a, String *p):
|
||||
Item_long_func(thd, a), pxml(p) {}
|
||||
const char *func_name() const { return "xpath_count"; }
|
||||
bool fix_length_and_dec() { max_length=10; return FALSE; }
|
||||
longlong val_int()
|
||||
const char *func_name() const override { return "xpath_count"; }
|
||||
bool fix_length_and_dec() override { max_length=10; return FALSE; }
|
||||
longlong val_int() override
|
||||
{
|
||||
uint predicate_supplied_context_size;
|
||||
args[0]->val_native(current_thd, &tmp_native_value);
|
||||
@ -471,7 +471,7 @@ public:
|
||||
return predicate_supplied_context_size;
|
||||
return tmp_native_value.elements();
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_xpath_count>(thd, this); }
|
||||
};
|
||||
|
||||
@ -484,8 +484,8 @@ public:
|
||||
Item_func_xpath_sum(THD *thd, Item *a, String *p):
|
||||
Item_real_func(thd, a), pxml(p) {}
|
||||
|
||||
const char *func_name() const { return "xpath_sum"; }
|
||||
double val_real()
|
||||
const char *func_name() const override { return "xpath_sum"; }
|
||||
double val_real() override
|
||||
{
|
||||
double sum= 0;
|
||||
args[0]->val_native(current_thd, &tmp_native_value);
|
||||
@ -516,7 +516,7 @@ public:
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_xpath_sum>(thd, this); }
|
||||
};
|
||||
|
||||
@ -531,13 +531,13 @@ public:
|
||||
CHARSET_INFO *cs):
|
||||
Item_string(thd, str, length, cs)
|
||||
{ }
|
||||
bool const_item() const { return false ; }
|
||||
bool basic_const_item() const { return false; }
|
||||
bool const_item() const override { return false ; }
|
||||
bool basic_const_item() const override { return false; }
|
||||
void set_value(const char *str, uint length, CHARSET_INFO *cs)
|
||||
{
|
||||
str_value.set(str, length, cs);
|
||||
}
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
|
||||
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override
|
||||
{
|
||||
/*
|
||||
Item_string::safe_charset_converter() does not accept non-constants.
|
||||
@ -556,18 +556,18 @@ public:
|
||||
Item_nodeset_to_const_comparator(THD *thd, Item *nodeset, Item *cmpfunc,
|
||||
String *p):
|
||||
Item_bool_func(thd, nodeset, cmpfunc), pxml(p) {}
|
||||
const char *func_name() const { return "xpath_nodeset_to_const_comparator"; }
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
const char *func_name() const override { return "xpath_nodeset_to_const_comparator"; }
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
return mark_unsupported_function(func_name(), arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
Item_func *comp= (Item_func*)args[1];
|
||||
Item_string_xml_non_const *fake=
|
||||
@ -598,7 +598,7 @@ public:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Item *get_copy(THD *thd)
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_nodeset_to_const_comparator>(thd, this); }
|
||||
};
|
||||
|
||||
|
@ -117,9 +117,9 @@ public:
|
||||
{
|
||||
maybe_null= TRUE;
|
||||
}
|
||||
bool fix_fields(THD *thd, Item **ref);
|
||||
bool fix_length_and_dec();
|
||||
bool const_item() const
|
||||
bool fix_fields(THD *thd, Item **ref) override;
|
||||
bool fix_length_and_dec() override;
|
||||
bool const_item() const override
|
||||
{
|
||||
return const_item_cache && (!nodeset_func || nodeset_func->const_item());
|
||||
}
|
||||
@ -131,9 +131,9 @@ class Item_func_xml_extractvalue: public Item_xml_str_func
|
||||
public:
|
||||
Item_func_xml_extractvalue(THD *thd, Item *a, Item *b):
|
||||
Item_xml_str_func(thd, a, b) {}
|
||||
const char *func_name() const { return "extractvalue"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "extractvalue"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_xml_extractvalue>(thd, this); }
|
||||
};
|
||||
|
||||
@ -148,9 +148,9 @@ class Item_func_xml_update: public Item_xml_str_func
|
||||
public:
|
||||
Item_func_xml_update(THD *thd, Item *a, Item *b, Item *c):
|
||||
Item_xml_str_func(thd, a, b, c) {}
|
||||
const char *func_name() const { return "updatexml"; }
|
||||
String *val_str(String *);
|
||||
Item *get_copy(THD *thd)
|
||||
const char *func_name() const override { return "updatexml"; }
|
||||
String *val_str(String *) override;
|
||||
Item *get_copy(THD *thd) override
|
||||
{ return get_item_copy<Item_func_xml_update>(thd, this); }
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
{
|
||||
return length == name_length && !memcmp(name, name_cmp, length);
|
||||
}
|
||||
~NAMED_ILINK()
|
||||
~NAMED_ILINK() override
|
||||
{
|
||||
my_free((void *) name);
|
||||
}
|
||||
|
@ -210,14 +210,14 @@ public:
|
||||
m_message[0]= '\0';
|
||||
}
|
||||
|
||||
virtual ~Silence_log_table_errors() = default;
|
||||
~Silence_log_table_errors() override = default;
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sql_state,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
const char *message() const { return m_message; }
|
||||
};
|
||||
|
||||
|
72
sql/log.h
72
sql/log.h
@ -101,25 +101,25 @@ class TC_LOG_DUMMY: public TC_LOG // use it to disable the logging
|
||||
{
|
||||
public:
|
||||
TC_LOG_DUMMY() = default;
|
||||
int open(const char *opt_name) { return 0; }
|
||||
void close() { }
|
||||
int open(const char *opt_name) override { return 0; }
|
||||
void close() override { }
|
||||
/*
|
||||
TC_LOG_DUMMY is only used when there are <= 1 XA-capable engines, and we
|
||||
only use internal XA during commit when >= 2 XA-capable engines
|
||||
participate.
|
||||
*/
|
||||
int log_and_order(THD *thd, my_xid xid, bool all,
|
||||
bool need_prepare_ordered, bool need_commit_ordered)
|
||||
bool need_prepare_ordered, bool need_commit_ordered) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return 1;
|
||||
}
|
||||
int unlog(ulong cookie, my_xid xid) { return 0; }
|
||||
int unlog_xa_prepare(THD *thd, bool all)
|
||||
int unlog(ulong cookie, my_xid xid) override { return 0; }
|
||||
int unlog_xa_prepare(THD *thd, bool all) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void commit_checkpoint_notify(void *cookie) { DBUG_ASSERT(0); };
|
||||
void commit_checkpoint_notify(void *cookie) override { DBUG_ASSERT(0); };
|
||||
};
|
||||
|
||||
#define TC_LOG_PAGE_SIZE 8192
|
||||
@ -197,16 +197,16 @@ class TC_LOG_MMAP: public TC_LOG
|
||||
|
||||
public:
|
||||
TC_LOG_MMAP(): inited(0), pending_checkpoint(0) {}
|
||||
int open(const char *opt_name);
|
||||
void close();
|
||||
int open(const char *opt_name) override;
|
||||
void close() override;
|
||||
int log_and_order(THD *thd, my_xid xid, bool all,
|
||||
bool need_prepare_ordered, bool need_commit_ordered);
|
||||
int unlog(ulong cookie, my_xid xid);
|
||||
int unlog_xa_prepare(THD *thd, bool all)
|
||||
bool need_prepare_ordered, bool need_commit_ordered) override;
|
||||
int unlog(ulong cookie, my_xid xid) override;
|
||||
int unlog_xa_prepare(THD *thd, bool all) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void commit_checkpoint_notify(void *cookie);
|
||||
void commit_checkpoint_notify(void *cookie) override;
|
||||
int recover();
|
||||
|
||||
private:
|
||||
@ -720,15 +720,15 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
int open(const char *opt_name);
|
||||
void close();
|
||||
virtual int generate_new_name(char *new_name, const char *log_name,
|
||||
ulong next_log_number);
|
||||
int open(const char *opt_name) override;
|
||||
void close() override;
|
||||
int generate_new_name(char *new_name, const char *log_name,
|
||||
ulong next_log_number) override;
|
||||
int log_and_order(THD *thd, my_xid xid, bool all,
|
||||
bool need_prepare_ordered, bool need_commit_ordered);
|
||||
int unlog(ulong cookie, my_xid xid);
|
||||
int unlog_xa_prepare(THD *thd, bool all);
|
||||
void commit_checkpoint_notify(void *cookie);
|
||||
bool need_prepare_ordered, bool need_commit_ordered) override;
|
||||
int unlog(ulong cookie, my_xid xid) override;
|
||||
int unlog_xa_prepare(THD *thd, bool all) override;
|
||||
void commit_checkpoint_notify(void *cookie) override;
|
||||
int recover(LOG_INFO *linfo, const char *last_log_name, IO_CACHE *first_log,
|
||||
Format_description_log_event *fdle, bool do_xa);
|
||||
int do_binlog_recovery(const char *opt_name, bool do_xa_recovery);
|
||||
@ -1017,19 +1017,19 @@ class Log_to_csv_event_handler: public Log_event_handler
|
||||
public:
|
||||
Log_to_csv_event_handler();
|
||||
~Log_to_csv_event_handler();
|
||||
virtual bool init();
|
||||
virtual void cleanup();
|
||||
bool init() override;
|
||||
void cleanup() override;
|
||||
|
||||
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
const char *user_host, size_t user_host_len, ulonglong query_utime,
|
||||
ulonglong lock_utime, bool is_command,
|
||||
const char *sql_text, size_t sql_text_len);
|
||||
virtual bool log_error(enum loglevel level, const char *format,
|
||||
va_list args);
|
||||
virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *sql_text, size_t sql_text_len) override;
|
||||
bool log_error(enum loglevel level, const char *format,
|
||||
va_list args) override;
|
||||
bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *command_type, size_t command_type_len,
|
||||
const char *sql_text, size_t sql_text_len,
|
||||
CHARSET_INFO *client_cs);
|
||||
CHARSET_INFO *client_cs) override;
|
||||
|
||||
int activate_log(THD *thd, uint log_type);
|
||||
};
|
||||
@ -1047,19 +1047,19 @@ class Log_to_file_event_handler: public Log_event_handler
|
||||
public:
|
||||
Log_to_file_event_handler(): is_initialized(FALSE)
|
||||
{}
|
||||
virtual bool init();
|
||||
virtual void cleanup();
|
||||
bool init() override;
|
||||
void cleanup() override;
|
||||
|
||||
virtual bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
bool log_slow(THD *thd, my_hrtime_t current_time,
|
||||
const char *user_host, size_t user_host_len, ulonglong query_utime,
|
||||
ulonglong lock_utime, bool is_command,
|
||||
const char *sql_text, size_t sql_text_len);
|
||||
virtual bool log_error(enum loglevel level, const char *format,
|
||||
va_list args);
|
||||
virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *sql_text, size_t sql_text_len) override;
|
||||
bool log_error(enum loglevel level, const char *format,
|
||||
va_list args) override;
|
||||
bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, size_t user_host_len, my_thread_id thread_id,
|
||||
const char *command_type, size_t command_type_len,
|
||||
const char *sql_text, size_t sql_text_len,
|
||||
CHARSET_INFO *client_cs);
|
||||
CHARSET_INFO *client_cs) override;
|
||||
void flush();
|
||||
void init_pthread_objects();
|
||||
MYSQL_QUERY_LOG *get_mysql_slow_log() { return &mysql_slow_log; }
|
||||
|
539
sql/log_event.h
539
sql/log_event.h
File diff suppressed because it is too large
Load Diff
@ -111,12 +111,12 @@ public:
|
||||
flag_set get_flags(flag_set flags_arg) const { return m_flags & flags_arg; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual void pack_info(Protocol *protocol);
|
||||
void pack_info(Protocol *protocol) override;
|
||||
#endif
|
||||
|
||||
#ifdef MYSQL_CLIENT
|
||||
/* not for direct call, each derived has its own ::print() */
|
||||
virtual bool print(FILE *file, PRINT_EVENT_INFO *print_event_info)= 0;
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override= 0;
|
||||
#endif
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
@ -127,16 +127,19 @@ public:
|
||||
#endif
|
||||
|
||||
/* Member functions to implement superclass interface */
|
||||
virtual int get_data_size();
|
||||
int get_data_size() override;
|
||||
|
||||
MY_BITMAP const *get_cols() const { return &m_cols; }
|
||||
size_t get_width() const { return m_width; }
|
||||
ulong get_table_id() const { return m_table_id; }
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
virtual bool write_data_header();
|
||||
virtual bool write_data_body();
|
||||
virtual const char *get_db() { return m_table->s->db.str; }
|
||||
bool write_data_header() override;
|
||||
bool write_data_body() override;
|
||||
const char *get_db() override { return m_table->s->db.str; }
|
||||
#ifdef HAVE_REPLICATION
|
||||
bool is_part_of_group() override { return 1; }
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
Check that malloc() succeeded in allocating memory for the rows
|
||||
@ -144,11 +147,10 @@ public:
|
||||
is valid is done in the Update_rows_log_event_old::is_valid()
|
||||
function.
|
||||
*/
|
||||
virtual bool is_valid() const
|
||||
bool is_valid() const override
|
||||
{
|
||||
return m_rows_buf && m_cols.bitmap;
|
||||
}
|
||||
bool is_part_of_group() { return 1; }
|
||||
|
||||
uint m_row_count; /* The number of rows added to the event */
|
||||
|
||||
@ -215,9 +217,9 @@ protected:
|
||||
private:
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(rpl_group_info *rgi);
|
||||
virtual int do_update_pos(rpl_group_info *rgi);
|
||||
virtual enum_skip_reason do_shall_skip(rpl_group_info *rgi);
|
||||
int do_apply_event(rpl_group_info *rgi) override;
|
||||
int do_update_pos(rpl_group_info *rgi) override;
|
||||
enum_skip_reason do_shall_skip(rpl_group_info *rgi) override;
|
||||
|
||||
/*
|
||||
Primitive to prepare for a sequence of row executions.
|
||||
@ -379,13 +381,13 @@ public:
|
||||
|
||||
private:
|
||||
#ifdef MYSQL_CLIENT
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info);
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override;
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_before_row_operations(const Slave_reporting_capability *const);
|
||||
virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
|
||||
virtual int do_exec_row(rpl_group_info *);
|
||||
int do_before_row_operations(const Slave_reporting_capability *const) override;
|
||||
int do_after_row_operations(const Slave_reporting_capability *const,int) override;
|
||||
int do_exec_row(rpl_group_info *) override;
|
||||
#endif
|
||||
/********** END OF CUT & PASTE FROM Write_rows_log_event **********/
|
||||
|
||||
@ -397,19 +399,19 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
Log_event_type get_type_code() override { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
// use old definition of do_apply_event()
|
||||
virtual int do_apply_event(rpl_group_info *rgi)
|
||||
int do_apply_event(rpl_group_info *rgi) override
|
||||
{ return Old_rows_log_event::do_apply_event(this, rgi); }
|
||||
|
||||
// primitives for old version of do_apply_event()
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
int do_before_row_operations(TABLE *table) override;
|
||||
int do_after_row_operations(TABLE *table, int error) override;
|
||||
virtual int do_prepare_row(THD*, rpl_group_info*, TABLE*,
|
||||
uchar const *row_start, uchar const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
uchar const *row_start, uchar const **row_end) override;
|
||||
int do_exec_row(TABLE *table) override;
|
||||
|
||||
#endif
|
||||
};
|
||||
@ -455,13 +457,13 @@ public:
|
||||
|
||||
protected:
|
||||
#ifdef MYSQL_CLIENT
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info);
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override;
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_before_row_operations(const Slave_reporting_capability *const);
|
||||
virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
|
||||
virtual int do_exec_row(rpl_group_info *);
|
||||
int do_before_row_operations(const Slave_reporting_capability *const) override;
|
||||
int do_after_row_operations(const Slave_reporting_capability *const,int) override;
|
||||
int do_exec_row(rpl_group_info *) override;
|
||||
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
|
||||
/********** END OF CUT & PASTE FROM Update_rows_log_event **********/
|
||||
|
||||
@ -475,19 +477,19 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
Log_event_type get_type_code() override { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
// use old definition of do_apply_event()
|
||||
virtual int do_apply_event(rpl_group_info *rgi)
|
||||
int do_apply_event(rpl_group_info *rgi) override
|
||||
{ return Old_rows_log_event::do_apply_event(this, rgi); }
|
||||
|
||||
// primitives for old version of do_apply_event()
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
int do_before_row_operations(TABLE *table) override;
|
||||
int do_after_row_operations(TABLE *table, int error) override;
|
||||
virtual int do_prepare_row(THD*, rpl_group_info*, TABLE*,
|
||||
uchar const *row_start, uchar const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
uchar const *row_start, uchar const **row_end) override;
|
||||
int do_exec_row(TABLE *table) override;
|
||||
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
|
||||
};
|
||||
|
||||
@ -529,13 +531,13 @@ public:
|
||||
|
||||
protected:
|
||||
#ifdef MYSQL_CLIENT
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info);
|
||||
bool print(FILE *file, PRINT_EVENT_INFO *print_event_info) override;
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_before_row_operations(const Slave_reporting_capability *const);
|
||||
virtual int do_after_row_operations(const Slave_reporting_capability *const,int);
|
||||
virtual int do_exec_row(rpl_group_info *);
|
||||
int do_before_row_operations(const Slave_reporting_capability *const) override;
|
||||
int do_after_row_operations(const Slave_reporting_capability *const,int) override;
|
||||
int do_exec_row(rpl_group_info *) override;
|
||||
#endif
|
||||
/********** END CUT & PASTE FROM Delete_rows_log_event **********/
|
||||
|
||||
@ -549,19 +551,19 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
|
||||
Log_event_type get_type_code() override { return (Log_event_type)TYPE_CODE; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
// use old definition of do_apply_event()
|
||||
virtual int do_apply_event(rpl_group_info *rgi)
|
||||
int do_apply_event(rpl_group_info *rgi) override
|
||||
{ return Old_rows_log_event::do_apply_event(this, rgi); }
|
||||
|
||||
// primitives for old version of do_apply_event()
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
int do_before_row_operations(TABLE *table) override;
|
||||
int do_after_row_operations(TABLE *table, int error) override;
|
||||
virtual int do_prepare_row(THD*, rpl_group_info*, TABLE*,
|
||||
uchar const *row_start, uchar const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
uchar const *row_start, uchar const **row_end) override;
|
||||
int do_exec_row(TABLE *table) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -8523,6 +8523,7 @@ uint8 Update_rows_log_event::get_trg_event_map()
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
|
||||
void Incident_log_event::pack_info(Protocol *protocol)
|
||||
{
|
||||
char buf[256];
|
||||
@ -8535,7 +8536,7 @@ void Incident_log_event::pack_info(Protocol *protocol)
|
||||
m_incident, description(), m_message.str);
|
||||
protocol->store(buf, bytes, &my_charset_bin);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WITH_WSREP)
|
||||
/*
|
||||
@ -8622,6 +8623,7 @@ Incident_log_event::write_data_body()
|
||||
}
|
||||
|
||||
|
||||
#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
|
||||
/* Pack info for its unrecognized ignorable event */
|
||||
void Ignorable_log_event::pack_info(Protocol *protocol)
|
||||
{
|
||||
@ -8631,7 +8633,7 @@ void Ignorable_log_event::pack_info(Protocol *protocol)
|
||||
number, description);
|
||||
protocol->store(buf, bytes, &my_charset_bin);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_REPLICATION)
|
||||
Heartbeat_log_event::Heartbeat_log_event(const char* buf, ulong event_len,
|
||||
|
36
sql/mdl.cc
36
sql/mdl.cc
@ -199,10 +199,10 @@ public:
|
||||
m_current_search_depth(0),
|
||||
m_found_deadlock(FALSE)
|
||||
{}
|
||||
virtual bool enter_node(MDL_context *node);
|
||||
virtual void leave_node(MDL_context *node);
|
||||
bool enter_node(MDL_context *node) override;
|
||||
void leave_node(MDL_context *node) override;
|
||||
|
||||
virtual bool inspect_edge(MDL_context *dest);
|
||||
bool inspect_edge(MDL_context *dest) override;
|
||||
|
||||
MDL_context *get_victim() const { return m_victim; }
|
||||
private:
|
||||
@ -434,11 +434,11 @@ public:
|
||||
struct MDL_scoped_lock : public MDL_lock_strategy
|
||||
{
|
||||
MDL_scoped_lock() = default;
|
||||
virtual const bitmap_t *incompatible_granted_types_bitmap() const
|
||||
const bitmap_t *incompatible_granted_types_bitmap() const override
|
||||
{ return m_granted_incompatible; }
|
||||
virtual const bitmap_t *incompatible_waiting_types_bitmap() const
|
||||
const bitmap_t *incompatible_waiting_types_bitmap() const override
|
||||
{ return m_waiting_incompatible; }
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const
|
||||
bool needs_notification(const MDL_ticket *ticket) const override
|
||||
{ return (ticket->get_type() == MDL_SHARED); }
|
||||
|
||||
/**
|
||||
@ -449,14 +449,14 @@ public:
|
||||
insert delayed. We need to kill such threads in order to get
|
||||
global shared lock. We do this my calling code outside of MDL.
|
||||
*/
|
||||
virtual bool conflicting_locks(const MDL_ticket *ticket) const
|
||||
bool conflicting_locks(const MDL_ticket *ticket) const override
|
||||
{ return ticket->get_type() == MDL_INTENTION_EXCLUSIVE; }
|
||||
|
||||
/*
|
||||
In scoped locks, only IX lock request would starve because of X/S. But that
|
||||
is practically very rare case. So just return 0 from this function.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
bitmap_t hog_lock_types_bitmap() const override
|
||||
{ return 0; }
|
||||
private:
|
||||
static const bitmap_t m_granted_incompatible[MDL_TYPE_END];
|
||||
@ -471,11 +471,11 @@ public:
|
||||
struct MDL_object_lock : public MDL_lock_strategy
|
||||
{
|
||||
MDL_object_lock() = default;
|
||||
virtual const bitmap_t *incompatible_granted_types_bitmap() const
|
||||
const bitmap_t *incompatible_granted_types_bitmap() const override
|
||||
{ return m_granted_incompatible; }
|
||||
virtual const bitmap_t *incompatible_waiting_types_bitmap() const
|
||||
const bitmap_t *incompatible_waiting_types_bitmap() const override
|
||||
{ return m_waiting_incompatible; }
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const
|
||||
bool needs_notification(const MDL_ticket *ticket) const override
|
||||
{
|
||||
return (MDL_BIT(ticket->get_type()) &
|
||||
(MDL_BIT(MDL_SHARED_NO_WRITE) |
|
||||
@ -491,7 +491,7 @@ public:
|
||||
lock or some other non-MDL resource we might need to wake it up
|
||||
by calling code outside of MDL.
|
||||
*/
|
||||
virtual bool conflicting_locks(const MDL_ticket *ticket) const
|
||||
bool conflicting_locks(const MDL_ticket *ticket) const override
|
||||
{ return ticket->get_type() < MDL_SHARED_UPGRADABLE; }
|
||||
|
||||
/*
|
||||
@ -499,7 +499,7 @@ public:
|
||||
max_write_lock_count times in a row while other lock types are
|
||||
waiting.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
bitmap_t hog_lock_types_bitmap() const override
|
||||
{
|
||||
return (MDL_BIT(MDL_SHARED_NO_WRITE) |
|
||||
MDL_BIT(MDL_SHARED_NO_READ_WRITE) |
|
||||
@ -515,11 +515,11 @@ public:
|
||||
struct MDL_backup_lock: public MDL_lock_strategy
|
||||
{
|
||||
MDL_backup_lock() = default;
|
||||
virtual const bitmap_t *incompatible_granted_types_bitmap() const
|
||||
const bitmap_t *incompatible_granted_types_bitmap() const override
|
||||
{ return m_granted_incompatible; }
|
||||
virtual const bitmap_t *incompatible_waiting_types_bitmap() const
|
||||
const bitmap_t *incompatible_waiting_types_bitmap() const override
|
||||
{ return m_waiting_incompatible; }
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const
|
||||
bool needs_notification(const MDL_ticket *ticket) const override
|
||||
{
|
||||
return (MDL_BIT(ticket->get_type()) & MDL_BIT(MDL_BACKUP_FTWRL1));
|
||||
}
|
||||
@ -529,7 +529,7 @@ public:
|
||||
We need to kill such threads in order to get lock for FTWRL statements.
|
||||
We do this by calling code outside of MDL.
|
||||
*/
|
||||
virtual bool conflicting_locks(const MDL_ticket *ticket) const
|
||||
bool conflicting_locks(const MDL_ticket *ticket) const override
|
||||
{
|
||||
return (MDL_BIT(ticket->get_type()) &
|
||||
(MDL_BIT(MDL_BACKUP_DML) |
|
||||
@ -541,7 +541,7 @@ public:
|
||||
BACKUP statements. This scenario is partically useless in real world,
|
||||
so we just return 0 here.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
bitmap_t hog_lock_types_bitmap() const override
|
||||
{ return 0; }
|
||||
private:
|
||||
static const bitmap_t m_granted_incompatible[MDL_BACKUP_END];
|
||||
|
@ -726,8 +726,8 @@ public:
|
||||
bool is_incompatible_when_waiting(enum_mdl_type type) const;
|
||||
|
||||
/** Implement MDL_wait_for_subgraph interface. */
|
||||
virtual bool accept_visitor(MDL_wait_for_graph_visitor *dvisitor);
|
||||
virtual uint get_deadlock_weight() const;
|
||||
bool accept_visitor(MDL_wait_for_graph_visitor *dvisitor) override;
|
||||
uint get_deadlock_weight() const override;
|
||||
/**
|
||||
Status of lock request represented by the ticket as reflected in P_S.
|
||||
*/
|
||||
|
@ -247,11 +247,11 @@ public:
|
||||
void *seq_init_param, uint n_ranges,
|
||||
uint mode, Key_parameters *key_par,
|
||||
Lifo_buffer *key_buffer,
|
||||
Buffer_manager *buf_manager_arg);
|
||||
int get_next(range_id_t *range_info);
|
||||
int refill_buffer(bool initial) { return initial? 0: HA_ERR_END_OF_FILE; }
|
||||
uchar *get_rowid_ptr() { return file->ref; }
|
||||
bool skip_record(range_id_t range_id, uchar *rowid)
|
||||
Buffer_manager *buf_manager_arg) override;
|
||||
int get_next(range_id_t *range_info) override;
|
||||
int refill_buffer(bool initial) override { return initial? 0: HA_ERR_END_OF_FILE; }
|
||||
uchar *get_rowid_ptr() override { return file->ref; }
|
||||
bool skip_record(range_id_t range_id, uchar *rowid) override
|
||||
{
|
||||
return (file->mrr_funcs.skip_record &&
|
||||
file->mrr_funcs.skip_record(file->mrr_iter, range_id, rowid));
|
||||
@ -270,12 +270,12 @@ public:
|
||||
void *seq_init_param, uint n_ranges,
|
||||
uint mode, Key_parameters *key_par,
|
||||
Lifo_buffer *key_buffer,
|
||||
Buffer_manager *buf_manager_arg);
|
||||
int get_next(range_id_t *range_info);
|
||||
int refill_buffer(bool initial);
|
||||
uchar *get_rowid_ptr() { return file->ref; }
|
||||
Buffer_manager *buf_manager_arg) override;
|
||||
int get_next(range_id_t *range_info) override;
|
||||
int refill_buffer(bool initial) override;
|
||||
uchar *get_rowid_ptr() override { return file->ref; }
|
||||
|
||||
bool skip_record(range_id_t range_info, uchar *rowid)
|
||||
bool skip_record(range_id_t range_info, uchar *rowid) override
|
||||
{
|
||||
return (mrr_funcs.skip_record &&
|
||||
mrr_funcs.skip_record(mrr_iter, range_info, rowid));
|
||||
@ -292,9 +292,9 @@ public:
|
||||
uchar **space_start, uchar *space_end);
|
||||
void set_no_interruption_temp_buffer();
|
||||
|
||||
void interrupt_read();
|
||||
void resume_read();
|
||||
void position();
|
||||
void interrupt_read() override;
|
||||
void resume_read() override;
|
||||
void position() override;
|
||||
private:
|
||||
Key_value_records_iterator kv_it;
|
||||
|
||||
@ -365,8 +365,8 @@ class Mrr_ordered_rndpos_reader : public Mrr_reader
|
||||
public:
|
||||
int init(handler *file, Mrr_index_reader *index_reader, uint mode,
|
||||
Lifo_buffer *buf, Rowid_filter *filter);
|
||||
int get_next(range_id_t *range_info);
|
||||
int refill_buffer(bool initial);
|
||||
int get_next(range_id_t *range_info) override;
|
||||
int refill_buffer(bool initial) override;
|
||||
private:
|
||||
handler *file; /* Handler to use */
|
||||
|
||||
|
@ -2269,10 +2269,10 @@ public:
|
||||
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)
|
||||
{}
|
||||
virtual ~TRP_RANGE() = default; /* Remove gcc warning */
|
||||
~TRP_RANGE() override = default; /* Remove gcc warning */
|
||||
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc)
|
||||
MEM_ROOT *parent_alloc) override
|
||||
{
|
||||
DBUG_ENTER("TRP_RANGE::make_quick");
|
||||
QUICK_RANGE_SELECT *quick;
|
||||
@ -2285,7 +2285,7 @@ public:
|
||||
DBUG_RETURN(quick);
|
||||
}
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
void TRP_RANGE::trace_basic_info(PARAM *param,
|
||||
@ -2317,9 +2317,9 @@ class TRP_ROR_INTERSECT : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_ROR_INTERSECT() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_ROR_INTERSECT() = default; /* Remove gcc warning */
|
||||
~TRP_ROR_INTERSECT() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
|
||||
/* Array of pointers to ROR range scans used in this intersection */
|
||||
struct st_ror_scan_info **first_scan;
|
||||
@ -2328,7 +2328,7 @@ public:
|
||||
bool is_covering; /* TRUE if no row retrieval phase is necessary */
|
||||
double index_scan_costs; /* SUM(cost(index_scan)) */
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -2343,13 +2343,13 @@ class TRP_ROR_UNION : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_ROR_UNION() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_ROR_UNION() = default; /* Remove gcc warning */
|
||||
~TRP_ROR_UNION() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */
|
||||
TABLE_READ_PLAN **last_ror; /* end of the above array */
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
void TRP_ROR_UNION::trace_basic_info(PARAM *param,
|
||||
@ -2376,15 +2376,15 @@ class TRP_INDEX_INTERSECT : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_INDEX_INTERSECT() = default; /* Remove gcc warning */
|
||||
~TRP_INDEX_INTERSECT() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
TRP_RANGE **range_scans; /* array of ptrs to plans of intersected scans */
|
||||
TRP_RANGE **range_scans_end; /* end of the array */
|
||||
/* keys whose scans are to be filtered by cpk conditions */
|
||||
key_map filtered_scans;
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
|
||||
};
|
||||
|
||||
@ -2413,13 +2413,13 @@ class TRP_INDEX_MERGE : public TABLE_READ_PLAN
|
||||
{
|
||||
public:
|
||||
TRP_INDEX_MERGE() = default; /* Remove gcc warning */
|
||||
virtual ~TRP_INDEX_MERGE() = default; /* Remove gcc warning */
|
||||
~TRP_INDEX_MERGE() override = default; /* Remove gcc warning */
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */
|
||||
TRP_RANGE **range_scans_end; /* end of the array */
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
void TRP_INDEX_MERGE::trace_basic_info(PARAM *param,
|
||||
@ -2481,13 +2481,13 @@ public:
|
||||
if (key_infix_len)
|
||||
memcpy(this->key_infix, key_infix_arg, key_infix_len);
|
||||
}
|
||||
virtual ~TRP_GROUP_MIN_MAX() = default; /* Remove gcc warning */
|
||||
~TRP_GROUP_MIN_MAX() override = default; /* Remove gcc warning */
|
||||
|
||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||
MEM_ROOT *parent_alloc);
|
||||
MEM_ROOT *parent_alloc) override;
|
||||
void use_index_scan() { is_index_scan= TRUE; }
|
||||
void trace_basic_info(PARAM *param,
|
||||
Json_writer_object *trace_object) const;
|
||||
Json_writer_object *trace_object) const override;
|
||||
};
|
||||
|
||||
|
||||
|
172
sql/opt_range.h
172
sql/opt_range.h
@ -1161,28 +1161,28 @@ public:
|
||||
{ return new QUICK_RANGE_SELECT(thd, head, index, no_alloc, parent_alloc,
|
||||
create_error); }
|
||||
|
||||
void need_sorted_output();
|
||||
int init();
|
||||
int reset(void);
|
||||
int get_next();
|
||||
void range_end();
|
||||
void need_sorted_output() override;
|
||||
int init() override;
|
||||
int reset(void) override;
|
||||
int get_next() override;
|
||||
void range_end() override;
|
||||
int get_next_prefix(uint prefix_length, uint group_key_parts,
|
||||
uchar *cur_prefix);
|
||||
bool reverse_sorted() { return 0; }
|
||||
bool unique_key_range();
|
||||
int init_ror_merged_scan(bool reuse_handler, MEM_ROOT *alloc);
|
||||
void save_last_pos()
|
||||
bool reverse_sorted() override { return 0; }
|
||||
bool unique_key_range() override;
|
||||
int init_ror_merged_scan(bool reuse_handler, MEM_ROOT *alloc) override;
|
||||
void save_last_pos() override
|
||||
{ file->position(record); }
|
||||
int get_type() { return QS_TYPE_RANGE; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths);
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc);
|
||||
int get_type() override { return QS_TYPE_RANGE; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths) override;
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc) override;
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_dump(int indent, bool verbose);
|
||||
void dbug_dump(int indent, bool verbose) override;
|
||||
#endif
|
||||
virtual void replace_handler(handler *new_file) { file= new_file; }
|
||||
QUICK_SELECT_I *make_reverse(uint used_key_parts_arg);
|
||||
void replace_handler(handler *new_file) override { file= new_file; }
|
||||
QUICK_SELECT_I *make_reverse(uint used_key_parts_arg) override;
|
||||
|
||||
virtual void add_used_key_part_to_set();
|
||||
void add_used_key_part_to_set() override;
|
||||
|
||||
private:
|
||||
/* Default copy ctor used by QUICK_SELECT_DESC */
|
||||
@ -1230,13 +1230,13 @@ public:
|
||||
:QUICK_RANGE_SELECT(thd, table, index_arg, no_alloc, parent_alloc,
|
||||
create_err)
|
||||
{};
|
||||
virtual QUICK_RANGE_SELECT *clone(bool *create_error)
|
||||
QUICK_RANGE_SELECT *clone(bool *create_error) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return new QUICK_RANGE_SELECT_GEOM(thd, head, index, no_alloc,
|
||||
parent_alloc, create_error);
|
||||
}
|
||||
virtual int get_next();
|
||||
int get_next() override;
|
||||
};
|
||||
|
||||
|
||||
@ -1312,16 +1312,16 @@ public:
|
||||
QUICK_INDEX_SORT_SELECT(THD *thd, TABLE *table);
|
||||
~QUICK_INDEX_SORT_SELECT();
|
||||
|
||||
int init();
|
||||
void need_sorted_output() { DBUG_ASSERT(0); /* Can't do it */ }
|
||||
int reset(void);
|
||||
bool reverse_sorted() { return false; }
|
||||
bool unique_key_range() { return false; }
|
||||
bool is_keys_used(const MY_BITMAP *fields);
|
||||
int init() override;
|
||||
void need_sorted_output() override { DBUG_ASSERT(0); /* Can't do it */ }
|
||||
int reset(void) override;
|
||||
bool reverse_sorted() override { return false; }
|
||||
bool unique_key_range() override { return false; }
|
||||
bool is_keys_used(const MY_BITMAP *fields) override;
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_dump(int indent, bool verbose);
|
||||
void dbug_dump(int indent, bool verbose) override;
|
||||
#endif
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc);
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc) override;
|
||||
|
||||
bool push_quick_back(QUICK_RANGE_SELECT *quick_sel_range);
|
||||
|
||||
@ -1333,7 +1333,7 @@ public:
|
||||
|
||||
MEM_ROOT alloc;
|
||||
THD *thd;
|
||||
virtual bool is_valid()
|
||||
bool is_valid() override
|
||||
{
|
||||
List_iterator_fast<QUICK_RANGE_SELECT> it(quick_selects);
|
||||
QUICK_RANGE_SELECT *quick;
|
||||
@ -1352,7 +1352,7 @@ public:
|
||||
/* used to get rows collected in Unique */
|
||||
READ_RECORD read_record;
|
||||
|
||||
virtual void add_used_key_part_to_set();
|
||||
void add_used_key_part_to_set() override;
|
||||
};
|
||||
|
||||
|
||||
@ -1363,31 +1363,31 @@ private:
|
||||
/* true if this select is currently doing a clustered PK scan */
|
||||
bool doing_pk_scan;
|
||||
protected:
|
||||
int read_keys_and_merge();
|
||||
int read_keys_and_merge() override;
|
||||
|
||||
public:
|
||||
QUICK_INDEX_MERGE_SELECT(THD *thd_arg, TABLE *table)
|
||||
:QUICK_INDEX_SORT_SELECT(thd_arg, table) {}
|
||||
|
||||
int get_next();
|
||||
int get_type() { return QS_TYPE_INDEX_MERGE; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths);
|
||||
int get_next() override;
|
||||
int get_type() override { return QS_TYPE_INDEX_MERGE; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths) override;
|
||||
};
|
||||
|
||||
class QUICK_INDEX_INTERSECT_SELECT : public QUICK_INDEX_SORT_SELECT
|
||||
{
|
||||
protected:
|
||||
int read_keys_and_merge();
|
||||
int read_keys_and_merge() override;
|
||||
|
||||
public:
|
||||
QUICK_INDEX_INTERSECT_SELECT(THD *thd_arg, TABLE *table)
|
||||
:QUICK_INDEX_SORT_SELECT(thd_arg, table) {}
|
||||
|
||||
key_map filtered_scans;
|
||||
int get_next();
|
||||
int get_type() { return QS_TYPE_INDEX_INTERSECT; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths);
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc);
|
||||
int get_next() override;
|
||||
int get_type() override { return QS_TYPE_INDEX_INTERSECT; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths) override;
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc) override;
|
||||
};
|
||||
|
||||
|
||||
@ -1417,21 +1417,21 @@ public:
|
||||
MEM_ROOT *parent_alloc);
|
||||
~QUICK_ROR_INTERSECT_SELECT();
|
||||
|
||||
int init();
|
||||
void need_sorted_output() { DBUG_ASSERT(0); /* Can't do it */ }
|
||||
int reset(void);
|
||||
int get_next();
|
||||
bool reverse_sorted() { return false; }
|
||||
bool unique_key_range() { return false; }
|
||||
int get_type() { return QS_TYPE_ROR_INTERSECT; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths);
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc);
|
||||
bool is_keys_used(const MY_BITMAP *fields);
|
||||
void add_used_key_part_to_set();
|
||||
int init() override;
|
||||
void need_sorted_output() override { DBUG_ASSERT(0); /* Can't do it */ }
|
||||
int reset(void) override;
|
||||
int get_next() override;
|
||||
bool reverse_sorted() override { return false; }
|
||||
bool unique_key_range() override { return false; }
|
||||
int get_type() override { return QS_TYPE_ROR_INTERSECT; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths) override;
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc) override;
|
||||
bool is_keys_used(const MY_BITMAP *fields) override;
|
||||
void add_used_key_part_to_set() override;
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_dump(int indent, bool verbose);
|
||||
void dbug_dump(int indent, bool verbose) override;
|
||||
#endif
|
||||
int init_ror_merged_scan(bool reuse_handler, MEM_ROOT *alloc);
|
||||
int init_ror_merged_scan(bool reuse_handler, MEM_ROOT *alloc) override;
|
||||
bool push_quick_back(MEM_ROOT *alloc, QUICK_RANGE_SELECT *quick_sel_range);
|
||||
|
||||
class QUICK_SELECT_WITH_RECORD : public Sql_alloc
|
||||
@ -1448,7 +1448,7 @@ public:
|
||||
*/
|
||||
List<QUICK_SELECT_WITH_RECORD> quick_selects;
|
||||
|
||||
virtual bool is_valid()
|
||||
bool is_valid() override
|
||||
{
|
||||
List_iterator_fast<QUICK_SELECT_WITH_RECORD> it(quick_selects);
|
||||
QUICK_SELECT_WITH_RECORD *quick;
|
||||
@ -1497,26 +1497,26 @@ public:
|
||||
QUICK_ROR_UNION_SELECT(THD *thd, TABLE *table);
|
||||
~QUICK_ROR_UNION_SELECT();
|
||||
|
||||
int init();
|
||||
void need_sorted_output() { DBUG_ASSERT(0); /* Can't do it */ }
|
||||
int reset(void);
|
||||
int get_next();
|
||||
bool reverse_sorted() { return false; }
|
||||
bool unique_key_range() { return false; }
|
||||
int get_type() { return QS_TYPE_ROR_UNION; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths);
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc);
|
||||
bool is_keys_used(const MY_BITMAP *fields);
|
||||
void add_used_key_part_to_set();
|
||||
int init() override;
|
||||
void need_sorted_output() override { DBUG_ASSERT(0); /* Can't do it */ }
|
||||
int reset(void) override;
|
||||
int get_next() override;
|
||||
bool reverse_sorted() override { return false; }
|
||||
bool unique_key_range() override { return false; }
|
||||
int get_type() override { return QS_TYPE_ROR_UNION; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths) override;
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc) override;
|
||||
bool is_keys_used(const MY_BITMAP *fields) override;
|
||||
void add_used_key_part_to_set() override;
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_dump(int indent, bool verbose);
|
||||
void dbug_dump(int indent, bool verbose) override;
|
||||
#endif
|
||||
|
||||
bool push_quick_back(QUICK_SELECT_I *quick_sel_range);
|
||||
|
||||
List<QUICK_SELECT_I> quick_selects; /* Merged quick selects */
|
||||
|
||||
virtual bool is_valid()
|
||||
bool is_valid() override
|
||||
{
|
||||
List_iterator_fast<QUICK_SELECT_I> it(quick_selects);
|
||||
QUICK_SELECT_I *quick;
|
||||
@ -1642,21 +1642,21 @@ public:
|
||||
void update_key_stat();
|
||||
void adjust_prefix_ranges();
|
||||
bool alloc_buffers();
|
||||
int init();
|
||||
void need_sorted_output() { /* always do it */ }
|
||||
int reset();
|
||||
int get_next();
|
||||
bool reverse_sorted() { return false; }
|
||||
bool unique_key_range() { return false; }
|
||||
int get_type() { return QS_TYPE_GROUP_MIN_MAX; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths);
|
||||
void add_used_key_part_to_set();
|
||||
int init() override;
|
||||
void need_sorted_output() override { /* always do it */ }
|
||||
int reset() override;
|
||||
int get_next() override;
|
||||
bool reverse_sorted() override { return false; }
|
||||
bool unique_key_range() override { return false; }
|
||||
int get_type() override { return QS_TYPE_GROUP_MIN_MAX; }
|
||||
void add_keys_and_lengths(String *key_names, String *used_lengths) override;
|
||||
void add_used_key_part_to_set() override;
|
||||
#ifndef DBUG_OFF
|
||||
void dbug_dump(int indent, bool verbose);
|
||||
void dbug_dump(int indent, bool verbose) override;
|
||||
#endif
|
||||
bool is_agg_distinct() { return have_agg_distinct; }
|
||||
bool loose_scan_is_scanning() { return is_index_scan; }
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc);
|
||||
Explain_quick_select *get_explain(MEM_ROOT *alloc) override;
|
||||
};
|
||||
|
||||
|
||||
@ -1664,18 +1664,18 @@ class QUICK_SELECT_DESC: public QUICK_RANGE_SELECT
|
||||
{
|
||||
public:
|
||||
QUICK_SELECT_DESC(QUICK_RANGE_SELECT *q, uint used_key_parts);
|
||||
virtual QUICK_RANGE_SELECT *clone(bool *create_error)
|
||||
QUICK_RANGE_SELECT *clone(bool *create_error) override
|
||||
{ DBUG_ASSERT(0); return new QUICK_SELECT_DESC(this, used_key_parts); }
|
||||
int get_next();
|
||||
bool reverse_sorted() { return 1; }
|
||||
int get_type() { return QS_TYPE_RANGE_DESC; }
|
||||
QUICK_SELECT_I *make_reverse(uint used_key_parts_arg)
|
||||
int get_next() override;
|
||||
bool reverse_sorted() override { return 1; }
|
||||
int get_type() override { return QS_TYPE_RANGE_DESC; }
|
||||
QUICK_SELECT_I *make_reverse(uint used_key_parts_arg) override
|
||||
{
|
||||
return this; // is already reverse sorted
|
||||
}
|
||||
private:
|
||||
bool range_reads_after_key(QUICK_RANGE *range);
|
||||
int reset(void) { rev_it.rewind(); return QUICK_RANGE_SELECT::reset(); }
|
||||
int reset(void) override { rev_it.rewind(); return QUICK_RANGE_SELECT::reset(); }
|
||||
List<QUICK_RANGE> rev_ranges;
|
||||
List_iterator<QUICK_RANGE> rev_it;
|
||||
uint used_key_parts;
|
||||
@ -1774,12 +1774,12 @@ public:
|
||||
QUICK_RANGE_SELECT (thd, table, key, 1, NULL, create_err)
|
||||
{ (void) init(); }
|
||||
~FT_SELECT() { file->ft_end(); }
|
||||
virtual QUICK_RANGE_SELECT *clone(bool *create_error)
|
||||
QUICK_RANGE_SELECT *clone(bool *create_error) override
|
||||
{ DBUG_ASSERT(0); return new FT_SELECT(thd, head, index, create_error); }
|
||||
int init() { return file->ft_init(); }
|
||||
int reset() { return 0; }
|
||||
int get_next() { return file->ha_ft_read(record); }
|
||||
int get_type() { return QS_TYPE_FULLTEXT; }
|
||||
int init() override { return file->ft_init(); }
|
||||
int reset() override { return 0; }
|
||||
int get_next() override { return file->ha_ft_read(record); }
|
||||
int get_type() override { return QS_TYPE_FULLTEXT; }
|
||||
};
|
||||
|
||||
FT_SELECT *get_ft_select(THD *thd, TABLE *table, uint key);
|
||||
|
@ -5837,7 +5837,7 @@ public:
|
||||
select_value_catcher(THD *thd_arg, Item_subselect *item_arg):
|
||||
select_subselect(thd_arg, item_arg)
|
||||
{}
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
int setup(List<Item> *items);
|
||||
bool assigned; /* TRUE <=> we've caught a value */
|
||||
uint n_elements; /* How many elements we get */
|
||||
|
@ -251,9 +251,9 @@ public:
|
||||
Field *field; /* Field this object is representing */
|
||||
|
||||
/* Iteration over unbound modules that are our dependencies */
|
||||
Iterator init_unbound_modules_iter(char *buf);
|
||||
Iterator init_unbound_modules_iter(char *buf) override;
|
||||
Dep_module* get_next_unbound_module(Dep_analysis_context *dac,
|
||||
Iterator iter);
|
||||
Iterator iter) override;
|
||||
|
||||
void make_unbound_modules_iter_skip_keys(Iterator iter);
|
||||
|
||||
@ -310,9 +310,9 @@ public:
|
||||
Dep_module_key *keys; /* Ordered list of Unique keys in this table */
|
||||
|
||||
/* Iteration over unbound modules that are our dependencies */
|
||||
Iterator init_unbound_modules_iter(char *buf);
|
||||
Iterator init_unbound_modules_iter(char *buf) override;
|
||||
Dep_module* get_next_unbound_module(Dep_analysis_context *dac,
|
||||
Iterator iter);
|
||||
Iterator iter) override;
|
||||
static const size_t iterator_size;
|
||||
private:
|
||||
class Module_iter
|
||||
@ -394,8 +394,8 @@ public:
|
||||
/* Used during condition analysis only, similar to KEYUSE::level */
|
||||
uint level;
|
||||
|
||||
Iterator init_unbound_values_iter(char *buf);
|
||||
Dep_value* get_next_unbound_value(Dep_analysis_context *dac, Iterator iter);
|
||||
Iterator init_unbound_values_iter(char *buf) override;
|
||||
Dep_value* get_next_unbound_value(Dep_analysis_context *dac, Iterator iter) override;
|
||||
static const size_t iterator_size;
|
||||
private:
|
||||
class Value_iter
|
||||
@ -429,8 +429,8 @@ public:
|
||||
/* Unique keys form a linked list, ordered by keyno */
|
||||
Dep_module_key *next_table_key;
|
||||
|
||||
Iterator init_unbound_values_iter(char *buf);
|
||||
Dep_value* get_next_unbound_value(Dep_analysis_context *dac, Iterator iter);
|
||||
Iterator init_unbound_values_iter(char *buf) override;
|
||||
Dep_value* get_next_unbound_value(Dep_analysis_context *dac, Iterator iter) override;
|
||||
static const size_t iterator_size;
|
||||
private:
|
||||
class Value_iter
|
||||
@ -459,18 +459,18 @@ public:
|
||||
{
|
||||
unbound_args= n_children;
|
||||
}
|
||||
bool is_final() { return TRUE; }
|
||||
bool is_final() override { return TRUE; }
|
||||
/*
|
||||
This is the goal module, so the running wave algorithm should terminate
|
||||
once it sees that this module is applicable and should never try to apply
|
||||
it, hence no use for unbound value iterator implementation.
|
||||
*/
|
||||
Iterator init_unbound_values_iter(char *buf)
|
||||
Iterator init_unbound_values_iter(char *buf) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
Dep_value* get_next_unbound_value(Dep_analysis_context *dac, Iterator iter)
|
||||
Dep_value* get_next_unbound_value(Dep_analysis_context *dac, Iterator iter) override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return NULL;
|
||||
@ -966,7 +966,7 @@ public:
|
||||
Field_dependency_recorder(Dep_analysis_context *ctx_arg): ctx(ctx_arg)
|
||||
{}
|
||||
|
||||
void visit_field(Item_field *item)
|
||||
void visit_field(Item_field *item) override
|
||||
{
|
||||
Field *field= item->field;
|
||||
Dep_value_table *tbl_dep;
|
||||
|
@ -68,8 +68,8 @@ class File_parser_dummy_hook: public Unknown_key_hook
|
||||
{
|
||||
public:
|
||||
File_parser_dummy_hook() = default; /* Remove gcc warning */
|
||||
virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
|
||||
MEM_ROOT *mem_root, const char *end);
|
||||
bool process_unknown_string(const char *&unknown_key, uchar* base,
|
||||
MEM_ROOT *mem_root, const char *end) override;
|
||||
};
|
||||
|
||||
extern File_parser_dummy_hook file_parser_dummy_hook;
|
||||
|
@ -44,9 +44,9 @@ public:
|
||||
this->name.str= name_par;
|
||||
this->name.length= strlen(name_par);
|
||||
}
|
||||
enum Type type() const { return Item::PROC_ITEM; }
|
||||
enum Type type() const override { return Item::PROC_ITEM; }
|
||||
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
|
||||
const Tmp_field_param *param)
|
||||
const Tmp_field_param *param) override
|
||||
{
|
||||
/*
|
||||
We can get to here when using a CURSOR for a query with PROCEDURE:
|
||||
@ -58,19 +58,19 @@ public:
|
||||
virtual void set(double nr)=0;
|
||||
virtual void set(const char *str,uint length,CHARSET_INFO *cs)=0;
|
||||
virtual void set(longlong nr)=0;
|
||||
const Type_handler *type_handler() const=0;
|
||||
const Type_handler *type_handler() const override=0;
|
||||
void set(const char *str) { set(str,(uint) strlen(str), default_charset()); }
|
||||
unsigned int size_of() { return sizeof(*this);}
|
||||
bool check_vcol_func_processor(void *arg)
|
||||
bool check_vcol_func_processor(void *arg) override
|
||||
{
|
||||
DBUG_ASSERT(0); // impossible
|
||||
return mark_unsupported_function("proc", arg, VCOL_IMPOSSIBLE);
|
||||
}
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
|
||||
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
|
||||
{
|
||||
return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate);
|
||||
}
|
||||
Item* get_copy(THD *thd) { return 0; }
|
||||
Item* get_copy(THD *thd) override { return 0; }
|
||||
};
|
||||
|
||||
class Item_proc_real :public Item_proc
|
||||
@ -82,23 +82,23 @@ public:
|
||||
{
|
||||
decimals=dec; max_length=float_length(dec);
|
||||
}
|
||||
const Type_handler *type_handler() const { return &type_handler_double; }
|
||||
void set(double nr) { value=nr; }
|
||||
void set(longlong nr) { value=(double) nr; }
|
||||
void set(const char *str,uint length,CHARSET_INFO *cs)
|
||||
const Type_handler *type_handler() const override { return &type_handler_double; }
|
||||
void set(double nr) override { value=nr; }
|
||||
void set(longlong nr) override { value=(double) nr; }
|
||||
void set(const char *str,uint length,CHARSET_INFO *cs) override
|
||||
{
|
||||
int err_not_used;
|
||||
char *end_not_used;
|
||||
value= cs->strntod((char*) str,length, &end_not_used, &err_not_used);
|
||||
}
|
||||
double val_real() { return value; }
|
||||
longlong val_int() { return (longlong) value; }
|
||||
String *val_str(String *s)
|
||||
double val_real() override { return value; }
|
||||
longlong val_int() override { return (longlong) value; }
|
||||
String *val_str(String *s) override
|
||||
{
|
||||
s->set_real(value,decimals,default_charset());
|
||||
return s;
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
unsigned int size_of() { return sizeof(*this);}
|
||||
};
|
||||
|
||||
@ -108,20 +108,20 @@ class Item_proc_int :public Item_proc
|
||||
public:
|
||||
Item_proc_int(THD *thd, const char *name_par): Item_proc(thd, name_par)
|
||||
{ max_length=11; }
|
||||
const Type_handler *type_handler() const
|
||||
const Type_handler *type_handler() const override
|
||||
{
|
||||
if (unsigned_flag)
|
||||
return &type_handler_ulonglong;
|
||||
return &type_handler_slonglong;
|
||||
}
|
||||
void set(double nr) { value=(longlong) nr; }
|
||||
void set(longlong nr) { value=nr; }
|
||||
void set(const char *str,uint length, CHARSET_INFO *cs)
|
||||
void set(double nr) override { value=(longlong) nr; }
|
||||
void set(longlong nr) override { value=nr; }
|
||||
void set(const char *str,uint length, CHARSET_INFO *cs) override
|
||||
{ int err; value= cs->strntoll(str,length,10,NULL,&err); }
|
||||
double val_real() { return (double) value; }
|
||||
longlong val_int() { return value; }
|
||||
String *val_str(String *s) { s->set(value, default_charset()); return s; }
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
double val_real() override { return (double) value; }
|
||||
longlong val_int() override { return value; }
|
||||
String *val_str(String *s) override { s->set(value, default_charset()); return s; }
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
unsigned int size_of() { return sizeof(*this);}
|
||||
};
|
||||
|
||||
@ -131,12 +131,12 @@ class Item_proc_string :public Item_proc
|
||||
public:
|
||||
Item_proc_string(THD *thd, const char *name_par, uint length):
|
||||
Item_proc(thd, name_par) { this->max_length=length; }
|
||||
const Type_handler *type_handler() const { return &type_handler_varchar; }
|
||||
void set(double nr) { str_value.set_real(nr, 2, default_charset()); }
|
||||
void set(longlong nr) { str_value.set(nr, default_charset()); }
|
||||
void set(const char *str, uint length, CHARSET_INFO *cs)
|
||||
const Type_handler *type_handler() const override { return &type_handler_varchar; }
|
||||
void set(double nr) override { str_value.set_real(nr, 2, default_charset()); }
|
||||
void set(longlong nr) override { str_value.set(nr, default_charset()); }
|
||||
void set(const char *str, uint length, CHARSET_INFO *cs) override
|
||||
{ str_value.copy(str,length,cs); }
|
||||
double val_real()
|
||||
double val_real() override
|
||||
{
|
||||
int err_not_used;
|
||||
char *end_not_used;
|
||||
@ -144,17 +144,17 @@ public:
|
||||
return cs->strntod((char*) str_value.ptr(), str_value.length(),
|
||||
&end_not_used, &err_not_used);
|
||||
}
|
||||
longlong val_int()
|
||||
longlong val_int() override
|
||||
{
|
||||
int err;
|
||||
CHARSET_INFO *cs=str_value.charset();
|
||||
return cs->strntoll(str_value.ptr(),str_value.length(),10,NULL,&err);
|
||||
}
|
||||
String *val_str(String*)
|
||||
String *val_str(String*) override
|
||||
{
|
||||
return null_value ? (String*) 0 : (String*) &str_value;
|
||||
}
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
my_decimal *val_decimal(my_decimal *) override;
|
||||
unsigned int size_of() { return sizeof(*this);}
|
||||
};
|
||||
|
||||
|
@ -274,9 +274,9 @@ public:
|
||||
|
||||
~Range_rowid_filter();
|
||||
|
||||
build_return_code build();
|
||||
build_return_code build() override;
|
||||
|
||||
bool check(char *elem)
|
||||
bool check(char *elem) override
|
||||
{
|
||||
if (container->is_empty())
|
||||
return false;
|
||||
@ -372,16 +372,16 @@ public:
|
||||
Rowid_filter_sorted_array(uint elems, uint elem_size)
|
||||
: refpos_container(elems, elem_size), is_checked(false) {}
|
||||
|
||||
Rowid_filter_container_type get_type()
|
||||
Rowid_filter_container_type get_type() override
|
||||
{ return SORTED_ARRAY_CONTAINER; }
|
||||
|
||||
bool alloc() { return refpos_container.alloc(); }
|
||||
bool alloc() override { return refpos_container.alloc(); }
|
||||
|
||||
bool add(void *ctxt, char *elem) { return refpos_container.add(elem); }
|
||||
bool add(void *ctxt, char *elem) override { return refpos_container.add(elem); }
|
||||
|
||||
bool check(void *ctxt, char *elem);
|
||||
bool check(void *ctxt, char *elem) override;
|
||||
|
||||
bool is_empty() { return refpos_container.is_empty(); }
|
||||
bool is_empty() override { return refpos_container.is_empty(); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -210,9 +210,9 @@ class Session_sysvars_tracker: public State_tracker
|
||||
public:
|
||||
void init(THD *thd);
|
||||
void deinit(THD *thd);
|
||||
bool enable(THD *thd);
|
||||
bool update(THD *thd, set_var *var);
|
||||
bool store(THD *thd, String *buf);
|
||||
bool enable(THD *thd) override;
|
||||
bool update(THD *thd, set_var *var) override;
|
||||
bool store(THD *thd, String *buf) override;
|
||||
void mark_as_changed(THD *thd, const sys_var *var);
|
||||
void deinit() { orig_list.deinit(); }
|
||||
/* callback */
|
||||
@ -237,8 +237,8 @@ bool sysvartrack_global_update(THD *thd, char *str, size_t len);
|
||||
class Current_schema_tracker: public State_tracker
|
||||
{
|
||||
public:
|
||||
bool update(THD *thd, set_var *var);
|
||||
bool store(THD *thd, String *buf);
|
||||
bool update(THD *thd, set_var *var) override;
|
||||
bool store(THD *thd, String *buf) override;
|
||||
};
|
||||
|
||||
|
||||
@ -259,8 +259,8 @@ public:
|
||||
class Session_state_change_tracker: public State_tracker
|
||||
{
|
||||
public:
|
||||
bool update(THD *thd, set_var *var);
|
||||
bool store(THD *thd, String *buf);
|
||||
bool update(THD *thd, set_var *var) override;
|
||||
bool store(THD *thd, String *buf) override;
|
||||
};
|
||||
|
||||
|
||||
@ -329,7 +329,7 @@ class Transaction_state_tracker : public State_tracker
|
||||
enum_tx_state calc_trx_state(THD *thd, thr_lock_type l, bool has_trx);
|
||||
public:
|
||||
|
||||
bool enable(THD *thd)
|
||||
bool enable(THD *thd) override
|
||||
{
|
||||
m_enabled= false;
|
||||
tx_changed= TX_CHG_NONE;
|
||||
@ -340,8 +340,8 @@ public:
|
||||
return State_tracker::enable(thd);
|
||||
}
|
||||
|
||||
bool update(THD *thd, set_var *var);
|
||||
bool store(THD *thd, String *buf);
|
||||
bool update(THD *thd, set_var *var) override;
|
||||
bool store(THD *thd, String *buf) override;
|
||||
|
||||
/** Change transaction characteristics */
|
||||
void set_read_flags(THD *thd, enum enum_tx_read_flags flags);
|
||||
|
@ -326,11 +326,11 @@ public:
|
||||
|
||||
set_var(THD *thd, enum_var_type type_arg, sys_var *var_arg,
|
||||
const LEX_CSTRING *base_name_arg, Item *value_arg);
|
||||
virtual bool is_system() { return 1; }
|
||||
int check(THD *thd);
|
||||
int update(THD *thd);
|
||||
int light_check(THD *thd);
|
||||
virtual bool is_var_optimizer_trace() const
|
||||
bool is_system() override { return 1; }
|
||||
int check(THD *thd) override;
|
||||
int update(THD *thd) override;
|
||||
int light_check(THD *thd) override;
|
||||
bool is_var_optimizer_trace() const override
|
||||
{
|
||||
extern sys_var *Sys_optimizer_trace_ptr;
|
||||
return var == Sys_optimizer_trace_ptr;
|
||||
@ -346,9 +346,9 @@ public:
|
||||
set_var_user(Item_func_set_user_var *item)
|
||||
:user_var_item(item)
|
||||
{}
|
||||
int check(THD *thd);
|
||||
int update(THD *thd);
|
||||
int light_check(THD *thd);
|
||||
int check(THD *thd) override;
|
||||
int update(THD *thd) override;
|
||||
int light_check(THD *thd) override;
|
||||
};
|
||||
|
||||
/* For SET PASSWORD */
|
||||
@ -359,8 +359,8 @@ class set_var_password: public set_var_base
|
||||
public:
|
||||
set_var_password(LEX_USER *user_arg) :user(user_arg)
|
||||
{}
|
||||
int check(THD *thd);
|
||||
int update(THD *thd);
|
||||
int check(THD *thd) override;
|
||||
int update(THD *thd) override;
|
||||
};
|
||||
|
||||
/* For SET ROLE */
|
||||
@ -371,8 +371,8 @@ class set_var_role: public set_var_base
|
||||
privilege_t access;
|
||||
public:
|
||||
set_var_role(LEX_CSTRING role_arg) : role(role_arg), access(NO_ACL) {}
|
||||
int check(THD *thd);
|
||||
int update(THD *thd);
|
||||
int check(THD *thd) override;
|
||||
int update(THD *thd) override;
|
||||
};
|
||||
|
||||
/* For SET DEFAULT ROLE */
|
||||
@ -385,8 +385,8 @@ class set_var_default_role: public set_var_base
|
||||
public:
|
||||
set_var_default_role(LEX_USER *user_arg, LEX_CSTRING role_arg) :
|
||||
user(user_arg), role(role_arg) {}
|
||||
int check(THD *thd);
|
||||
int update(THD *thd);
|
||||
int check(THD *thd) override;
|
||||
int update(THD *thd) override;
|
||||
};
|
||||
|
||||
/* For SET NAMES and SET CHARACTER SET */
|
||||
@ -404,8 +404,8 @@ public:
|
||||
character_set_results(result_coll_arg),
|
||||
collation_connection(connection_coll_arg)
|
||||
{}
|
||||
int check(THD *thd);
|
||||
int update(THD *thd);
|
||||
int check(THD *thd) override;
|
||||
int update(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
|
16
sql/sp.cc
16
sql/sp.cc
@ -255,7 +255,7 @@ public:
|
||||
load_from_db(THD *thd, const Database_qualified_name *name, TABLE *proc_tbl);
|
||||
|
||||
public:
|
||||
virtual Stored_program_creation_ctx *clone(MEM_ROOT *mem_root)
|
||||
Stored_program_creation_ctx *clone(MEM_ROOT *mem_root) override
|
||||
{
|
||||
return new (mem_root) Stored_routine_creation_ctx(m_client_cs,
|
||||
m_connection_cl,
|
||||
@ -263,7 +263,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Object_creation_ctx *create_backup_ctx(THD *thd) const
|
||||
Object_creation_ctx *create_backup_ctx(THD *thd) const override
|
||||
{
|
||||
DBUG_ENTER("Stored_routine_creation_ctx::create_backup_ctx");
|
||||
DBUG_RETURN(new Stored_routine_creation_ctx(thd));
|
||||
@ -428,7 +428,7 @@ public:
|
||||
Proc_table_intact() : m_print_once(TRUE) { has_keys= TRUE; }
|
||||
|
||||
protected:
|
||||
void report_error(uint code, const char *fmt, ...);
|
||||
void report_error(uint code, const char *fmt, ...) override;
|
||||
};
|
||||
|
||||
|
||||
@ -804,12 +804,12 @@ Sp_handler::db_find_and_cache_routine(THD *thd,
|
||||
struct Silence_deprecated_warning : public Internal_error_handler
|
||||
{
|
||||
public:
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
};
|
||||
|
||||
bool
|
||||
@ -899,12 +899,12 @@ public:
|
||||
:m_error_caught(false)
|
||||
{}
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* message,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
|
||||
bool error_caught() const { return m_error_caught; }
|
||||
|
||||
@ -1717,7 +1717,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
if (sql_errno == ER_NO_SUCH_TABLE ||
|
||||
sql_errno == ER_NO_SUCH_TABLE_IN_ENGINE ||
|
||||
|
96
sql/sp.h
96
sql/sp.h
@ -249,33 +249,33 @@ public:
|
||||
class Sp_handler_procedure: public Sp_handler
|
||||
{
|
||||
public:
|
||||
enum_sp_type type() const { return SP_TYPE_PROCEDURE; }
|
||||
LEX_CSTRING type_lex_cstring() const
|
||||
enum_sp_type type() const override { return SP_TYPE_PROCEDURE; }
|
||||
LEX_CSTRING type_lex_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING m_type_str= { STRING_WITH_LEN("PROCEDURE")};
|
||||
return m_type_str;
|
||||
}
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const;
|
||||
const char *show_create_routine_col1_caption() const
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const override;
|
||||
const char *show_create_routine_col1_caption() const override
|
||||
{
|
||||
return "Procedure";
|
||||
}
|
||||
const char *show_create_routine_col3_caption() const
|
||||
const char *show_create_routine_col3_caption() const override
|
||||
{
|
||||
return "Create Procedure";
|
||||
}
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const override
|
||||
{
|
||||
return MDL_key::PROCEDURE;
|
||||
}
|
||||
const Sp_handler *package_routine_handler() const;
|
||||
sp_cache **get_cache(THD *) const;
|
||||
const Sp_handler *package_routine_handler() const override;
|
||||
sp_cache **get_cache(THD *) const override;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
HASH *get_priv_hash() const;
|
||||
HASH *get_priv_hash() const override;
|
||||
#endif
|
||||
ulong recursion_depth(THD *thd) const;
|
||||
void recursion_level_error(THD *thd, const sp_head *sp) const;
|
||||
bool add_instr_preturn(THD *thd, sp_head *sp, sp_pcontext *spcont) const;
|
||||
ulong recursion_depth(THD *thd) const override;
|
||||
void recursion_level_error(THD *thd, const sp_head *sp) const override;
|
||||
bool add_instr_preturn(THD *thd, sp_head *sp, sp_pcontext *spcont) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -283,13 +283,13 @@ class Sp_handler_package_procedure: public Sp_handler_procedure
|
||||
{
|
||||
public:
|
||||
int sp_cache_routine(THD *thd, const Database_qualified_name *name,
|
||||
sp_head **sp) const
|
||||
sp_head **sp) const override
|
||||
{
|
||||
return sp_cache_package_routine(thd, name, sp);
|
||||
}
|
||||
sp_head *sp_find_routine(THD *thd,
|
||||
const Database_qualified_name *name,
|
||||
bool cache_only) const
|
||||
bool cache_only) const override
|
||||
{
|
||||
return sp_find_package_routine(thd, name, cache_only);
|
||||
}
|
||||
@ -299,32 +299,32 @@ public:
|
||||
class Sp_handler_function: public Sp_handler
|
||||
{
|
||||
public:
|
||||
enum_sp_type type() const { return SP_TYPE_FUNCTION; }
|
||||
LEX_CSTRING type_lex_cstring() const
|
||||
enum_sp_type type() const override { return SP_TYPE_FUNCTION; }
|
||||
LEX_CSTRING type_lex_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING m_type_str= { STRING_WITH_LEN("FUNCTION")};
|
||||
return m_type_str;
|
||||
}
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const;
|
||||
const char *show_create_routine_col1_caption() const
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const override;
|
||||
const char *show_create_routine_col1_caption() const override
|
||||
{
|
||||
return "Function";
|
||||
}
|
||||
const char *show_create_routine_col3_caption() const
|
||||
const char *show_create_routine_col3_caption() const override
|
||||
{
|
||||
return "Create Function";
|
||||
}
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const override
|
||||
{
|
||||
return MDL_key::FUNCTION;
|
||||
}
|
||||
const Sp_handler *package_routine_handler() const;
|
||||
sp_cache **get_cache(THD *) const;
|
||||
const Sp_handler *package_routine_handler() const override;
|
||||
sp_cache **get_cache(THD *) const override;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
HASH *get_priv_hash() const;
|
||||
HASH *get_priv_hash() const override;
|
||||
#endif
|
||||
bool add_instr_freturn(THD *thd, sp_head *sp, sp_pcontext *spcont,
|
||||
Item *item, LEX *lex) const;
|
||||
Item *item, LEX *lex) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -332,13 +332,13 @@ class Sp_handler_package_function: public Sp_handler_function
|
||||
{
|
||||
public:
|
||||
int sp_cache_routine(THD *thd, const Database_qualified_name *name,
|
||||
sp_head **sp) const
|
||||
sp_head **sp) const override
|
||||
{
|
||||
return sp_cache_package_routine(thd, name, sp);
|
||||
}
|
||||
sp_head *sp_find_routine(THD *thd,
|
||||
const Database_qualified_name *name,
|
||||
bool cache_only) const
|
||||
bool cache_only) const override
|
||||
{
|
||||
return sp_find_package_routine(thd, name, cache_only);
|
||||
}
|
||||
@ -357,7 +357,7 @@ public:
|
||||
const st_sp_chistics &chistics,
|
||||
const AUTHID &definer,
|
||||
const DDL_options_st ddl_options,
|
||||
sql_mode_t sql_mode) const;
|
||||
sql_mode_t sql_mode) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -366,34 +366,34 @@ class Sp_handler_package_spec: public Sp_handler_package
|
||||
public: // TODO: make it private or protected
|
||||
int sp_find_and_drop_routine(THD *thd, TABLE *table,
|
||||
const Database_qualified_name *name)
|
||||
const;
|
||||
const override;
|
||||
public:
|
||||
enum_sp_type type() const { return SP_TYPE_PACKAGE; }
|
||||
LEX_CSTRING type_lex_cstring() const
|
||||
enum_sp_type type() const override { return SP_TYPE_PACKAGE; }
|
||||
LEX_CSTRING type_lex_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING m_type_str= {STRING_WITH_LEN("PACKAGE")};
|
||||
return m_type_str;
|
||||
}
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const override
|
||||
{
|
||||
static LEX_CSTRING m_empty_body= {STRING_WITH_LEN("BEGIN END")};
|
||||
return m_empty_body;
|
||||
}
|
||||
const char *show_create_routine_col1_caption() const
|
||||
const char *show_create_routine_col1_caption() const override
|
||||
{
|
||||
return "Package";
|
||||
}
|
||||
const char *show_create_routine_col3_caption() const
|
||||
const char *show_create_routine_col3_caption() const override
|
||||
{
|
||||
return "Create Package";
|
||||
}
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const override
|
||||
{
|
||||
return MDL_key::PACKAGE_BODY;
|
||||
}
|
||||
sp_cache **get_cache(THD *) const;
|
||||
sp_cache **get_cache(THD *) const override;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
HASH *get_priv_hash() const;
|
||||
HASH *get_priv_hash() const override;
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -401,32 +401,32 @@ public:
|
||||
class Sp_handler_package_body: public Sp_handler_package
|
||||
{
|
||||
public:
|
||||
enum_sp_type type() const { return SP_TYPE_PACKAGE_BODY; }
|
||||
LEX_CSTRING type_lex_cstring() const
|
||||
enum_sp_type type() const override { return SP_TYPE_PACKAGE_BODY; }
|
||||
LEX_CSTRING type_lex_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING m_type_str= {STRING_WITH_LEN("PACKAGE BODY")};
|
||||
return m_type_str;
|
||||
}
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const
|
||||
LEX_CSTRING empty_body_lex_cstring(sql_mode_t mode) const override
|
||||
{
|
||||
static LEX_CSTRING m_empty_body= {STRING_WITH_LEN("BEGIN END")};
|
||||
return m_empty_body;
|
||||
}
|
||||
const char *show_create_routine_col1_caption() const
|
||||
const char *show_create_routine_col1_caption() const override
|
||||
{
|
||||
return "Package body";
|
||||
}
|
||||
const char *show_create_routine_col3_caption() const
|
||||
const char *show_create_routine_col3_caption() const override
|
||||
{
|
||||
return "Create Package Body";
|
||||
}
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const override
|
||||
{
|
||||
return MDL_key::PACKAGE_BODY;
|
||||
}
|
||||
sp_cache **get_cache(THD *) const;
|
||||
sp_cache **get_cache(THD *) const override;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
HASH *get_priv_hash() const;
|
||||
HASH *get_priv_hash() const override;
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -434,18 +434,18 @@ public:
|
||||
class Sp_handler_trigger: public Sp_handler
|
||||
{
|
||||
public:
|
||||
enum_sp_type type() const { return SP_TYPE_TRIGGER; }
|
||||
LEX_CSTRING type_lex_cstring() const
|
||||
enum_sp_type type() const override { return SP_TYPE_TRIGGER; }
|
||||
LEX_CSTRING type_lex_cstring() const override
|
||||
{
|
||||
static LEX_CSTRING m_type_str= { STRING_WITH_LEN("TRIGGER")};
|
||||
return m_type_str;
|
||||
}
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const
|
||||
MDL_key::enum_mdl_namespace get_mdl_type() const override
|
||||
{
|
||||
DBUG_ASSERT(0);
|
||||
return MDL_key::TRIGGER;
|
||||
}
|
||||
const Sp_handler *sp_handler_mysql_proc() const { return NULL; }
|
||||
const Sp_handler *sp_handler_mysql_proc() const override { return NULL; }
|
||||
};
|
||||
|
||||
|
||||
|
194
sql/sp_head.h
194
sql/sp_head.h
@ -87,7 +87,7 @@ protected:
|
||||
{ }
|
||||
|
||||
protected:
|
||||
virtual void change_env(THD *thd) const
|
||||
void change_env(THD *thd) const override
|
||||
{
|
||||
thd->variables.collation_database= m_db_cl;
|
||||
|
||||
@ -1044,9 +1044,9 @@ public:
|
||||
return m_routine_implementations.check_dup_qualified(lex->sphead) ||
|
||||
m_routine_implementations.push_back(lex, &main_mem_root);
|
||||
}
|
||||
sp_package *get_package() { return this; }
|
||||
void init_psi_share();
|
||||
bool is_invoked() const
|
||||
sp_package *get_package() override { return this; }
|
||||
void init_psi_share() override;
|
||||
bool is_invoked() const override
|
||||
{
|
||||
/*
|
||||
Cannot flush a package out of the SP cache when:
|
||||
@ -1081,8 +1081,8 @@ public:
|
||||
Query_arena(thd->lex->sphead->get_main_mem_root(), STMT_INITIALIZED_FOR_SP)
|
||||
{ }
|
||||
~sp_lex_cursor() { free_items(); }
|
||||
void cleanup_stmt() { }
|
||||
Query_arena *query_arena() { return this; }
|
||||
void cleanup_stmt() override { }
|
||||
Query_arena *query_arena() override { return this; }
|
||||
bool validate()
|
||||
{
|
||||
DBUG_ASSERT(sql_command == SQLCOM_SELECT);
|
||||
@ -1358,18 +1358,18 @@ public:
|
||||
|
||||
virtual ~sp_instr_stmt() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
private:
|
||||
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
|
||||
}; // class sp_instr_stmt : public sp_instr
|
||||
@ -1393,11 +1393,11 @@ public:
|
||||
|
||||
virtual ~sp_instr_set() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
protected:
|
||||
sp_rcontext *get_rcontext(THD *thd) const;
|
||||
@ -1407,7 +1407,7 @@ protected:
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_set : public sp_instr
|
||||
|
||||
@ -1436,9 +1436,9 @@ public:
|
||||
|
||||
virtual ~sp_instr_set_row_field() = default;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
}; // class sp_instr_set_field : public sp_instr_set
|
||||
|
||||
|
||||
@ -1478,9 +1478,9 @@ public:
|
||||
|
||||
virtual ~sp_instr_set_row_field_by_name() = default;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
}; // class sp_instr_set_field_by_name : public sp_instr_set
|
||||
|
||||
|
||||
@ -1504,11 +1504,11 @@ public:
|
||||
|
||||
virtual ~sp_instr_set_trigger_field() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
private:
|
||||
Item_trigger_field *trigger_field;
|
||||
@ -1516,7 +1516,7 @@ private:
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_trigger_field : public sp_instr
|
||||
|
||||
@ -1550,7 +1550,7 @@ public:
|
||||
virtual void set_destination(uint old_dest, uint new_dest)
|
||||
= 0;
|
||||
|
||||
virtual uint get_cont_dest() const;
|
||||
uint get_cont_dest() const override;
|
||||
|
||||
protected:
|
||||
|
||||
@ -1576,17 +1576,17 @@ public:
|
||||
|
||||
virtual ~sp_instr_jump() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads);
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override;
|
||||
|
||||
virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start);
|
||||
uint opt_shortcut_jump(sp_head *sp, sp_instr *start) override;
|
||||
|
||||
virtual void opt_move(uint dst, List<sp_instr> *ibp);
|
||||
void opt_move(uint dst, List<sp_instr> *ibp) override;
|
||||
|
||||
virtual void backpatch(uint dest, sp_pcontext *dst_ctx)
|
||||
void backpatch(uint dest, sp_pcontext *dst_ctx) override
|
||||
{
|
||||
/* Calling backpatch twice is a logic flaw in jump resolution. */
|
||||
DBUG_ASSERT(m_dest == 0);
|
||||
@ -1596,14 +1596,14 @@ public:
|
||||
/**
|
||||
Update the destination; used by the optimizer.
|
||||
*/
|
||||
virtual void set_destination(uint old_dest, uint new_dest)
|
||||
void set_destination(uint old_dest, uint new_dest) override
|
||||
{
|
||||
if (m_dest == old_dest)
|
||||
m_dest= new_dest;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_jump : public sp_instr_opt_meta
|
||||
|
||||
@ -1627,23 +1627,23 @@ public:
|
||||
|
||||
virtual ~sp_instr_jump_if_not() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads);
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override;
|
||||
|
||||
/** Override sp_instr_jump's shortcut; we stop here */
|
||||
virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start)
|
||||
uint opt_shortcut_jump(sp_head *sp, sp_instr *start) override
|
||||
{
|
||||
return m_ip;
|
||||
}
|
||||
|
||||
virtual void opt_move(uint dst, List<sp_instr> *ibp);
|
||||
void opt_move(uint dst, List<sp_instr> *ibp) override;
|
||||
|
||||
virtual void set_destination(uint old_dest, uint new_dest)
|
||||
void set_destination(uint old_dest, uint new_dest) override
|
||||
{
|
||||
sp_instr_jump::set_destination(old_dest, new_dest);
|
||||
if (m_cont_dest == old_dest)
|
||||
@ -1656,7 +1656,7 @@ private:
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_jump_if_not : public sp_instr_jump
|
||||
|
||||
@ -1674,18 +1674,18 @@ public:
|
||||
|
||||
virtual ~sp_instr_preturn() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads)
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override
|
||||
{
|
||||
marked= 1;
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_preturn : public sp_instr
|
||||
|
||||
@ -1705,13 +1705,13 @@ public:
|
||||
|
||||
virtual ~sp_instr_freturn() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads)
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override
|
||||
{
|
||||
marked= 1;
|
||||
return UINT_MAX;
|
||||
@ -1724,7 +1724,7 @@ protected:
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_freturn : public sp_instr
|
||||
|
||||
@ -1753,19 +1753,19 @@ public:
|
||||
m_handler= NULL;
|
||||
}
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads);
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override;
|
||||
|
||||
/** Override sp_instr_jump's shortcut; we stop here. */
|
||||
virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start)
|
||||
uint opt_shortcut_jump(sp_head *sp, sp_instr *start) override
|
||||
{
|
||||
return m_ip;
|
||||
}
|
||||
|
||||
virtual void backpatch(uint dest, sp_pcontext *dst_ctx)
|
||||
void backpatch(uint dest, sp_pcontext *dst_ctx) override
|
||||
{
|
||||
DBUG_ASSERT(!m_dest || !m_opt_hpop);
|
||||
if (!m_dest)
|
||||
@ -1792,7 +1792,7 @@ private:
|
||||
uint m_frame;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_hpush_jump : public sp_instr_jump
|
||||
|
||||
@ -1815,16 +1815,16 @@ public:
|
||||
m_count= count;
|
||||
}
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
private:
|
||||
|
||||
uint m_count;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_hpop : public sp_instr
|
||||
|
||||
@ -1843,24 +1843,24 @@ public:
|
||||
|
||||
virtual ~sp_instr_hreturn() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
/* This instruction will not be short cut optimized. */
|
||||
virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start)
|
||||
uint opt_shortcut_jump(sp_head *sp, sp_instr *start) override
|
||||
{
|
||||
return m_ip;
|
||||
}
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads);
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override;
|
||||
|
||||
private:
|
||||
|
||||
uint m_frame;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_hreturn : public sp_instr_jump
|
||||
|
||||
@ -1879,23 +1879,23 @@ public:
|
||||
|
||||
virtual ~sp_instr_cpush() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
/**
|
||||
This call is used to cleanup the instruction when a sensitive
|
||||
cursor is closed. For now stored procedures always use materialized
|
||||
cursors and the call is not used.
|
||||
*/
|
||||
virtual void cleanup_stmt() { /* no op */ }
|
||||
void cleanup_stmt() override { /* no op */ }
|
||||
private:
|
||||
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
uint m_cursor; /**< Frame offset (for debugging) */
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_cpush : public sp_instr
|
||||
|
||||
@ -1918,16 +1918,16 @@ public:
|
||||
m_count= count;
|
||||
}
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
private:
|
||||
|
||||
uint m_count;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_cpop : public sp_instr
|
||||
|
||||
@ -1945,18 +1945,18 @@ public:
|
||||
|
||||
virtual ~sp_instr_copen() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
private:
|
||||
|
||||
uint m_cursor; ///< Stack index
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_copen : public sp_instr_stmt
|
||||
|
||||
@ -1981,12 +1981,12 @@ public:
|
||||
m_var(voffs)
|
||||
{}
|
||||
virtual ~sp_instr_cursor_copy_struct() = default;
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
virtual void print(String *str);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
void print(String *str) override;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
};
|
||||
|
||||
@ -2004,16 +2004,16 @@ public:
|
||||
|
||||
virtual ~sp_instr_cclose() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
private:
|
||||
|
||||
uint m_cursor;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_cclose : public sp_instr
|
||||
|
||||
@ -2033,9 +2033,9 @@ public:
|
||||
|
||||
virtual ~sp_instr_cfetch() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
void add_to_varlist(sp_variable *var)
|
||||
{
|
||||
@ -2049,7 +2049,7 @@ private:
|
||||
bool m_error_on_no_data;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_cfetch : public sp_instr
|
||||
|
||||
@ -2071,12 +2071,12 @@ public:
|
||||
|
||||
virtual ~sp_instr_agg_cfetch() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_agg_cfetch : public sp_instr
|
||||
|
||||
@ -2096,11 +2096,11 @@ public:
|
||||
|
||||
virtual ~sp_instr_error() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads)
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override
|
||||
{
|
||||
marked= 1;
|
||||
return UINT_MAX;
|
||||
@ -2111,7 +2111,7 @@ private:
|
||||
int m_errcode;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_error : public sp_instr
|
||||
|
||||
@ -2129,17 +2129,17 @@ public:
|
||||
|
||||
virtual ~sp_instr_set_case_expr() = default;
|
||||
|
||||
virtual int execute(THD *thd, uint *nextp);
|
||||
int execute(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual int exec_core(THD *thd, uint *nextp);
|
||||
int exec_core(THD *thd, uint *nextp) override;
|
||||
|
||||
virtual void print(String *str);
|
||||
void print(String *str) override;
|
||||
|
||||
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads);
|
||||
uint opt_mark(sp_head *sp, List<sp_instr> *leads) override;
|
||||
|
||||
virtual void opt_move(uint dst, List<sp_instr> *ibp);
|
||||
void opt_move(uint dst, List<sp_instr> *ibp) override;
|
||||
|
||||
virtual void set_destination(uint old_dest, uint new_dest)
|
||||
void set_destination(uint old_dest, uint new_dest) override
|
||||
{
|
||||
if (m_cont_dest == old_dest)
|
||||
m_cont_dest= new_dest;
|
||||
@ -2152,7 +2152,7 @@ private:
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
|
||||
public:
|
||||
virtual PSI_statement_info* get_psi_info() { return & psi_info; }
|
||||
PSI_statement_info* get_psi_info() override { return & psi_info; }
|
||||
static PSI_statement_info psi_info;
|
||||
}; // class sp_instr_set_case_expr : public sp_instr_opt_meta
|
||||
|
||||
|
210
sql/spatial.h
210
sql/spatial.h
@ -399,14 +399,14 @@ class Gis_point: public Geometry
|
||||
public:
|
||||
Gis_point() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_point() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
|
||||
int get_xy(double *x, double *y) const
|
||||
{
|
||||
@ -429,7 +429,7 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
int get_x(double *x) const
|
||||
int get_x(double *x) const override
|
||||
{
|
||||
if (no_data(m_data, SIZEOF_STORED_DOUBLE))
|
||||
return 1;
|
||||
@ -437,7 +437,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_y(double *y) const
|
||||
int get_y(double *y) const override
|
||||
{
|
||||
const char *data= m_data;
|
||||
if (no_data(data, SIZEOF_STORED_DOUBLE * 2)) return 1;
|
||||
@ -445,16 +445,16 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int geom_length(double *len, const char **end) const;
|
||||
int area(double *ar, const char **end) const;
|
||||
bool dimension(uint32 *dim, const char **end) const
|
||||
int geom_length(double *len, const char **end) const override;
|
||||
int area(double *ar, const char **end) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override
|
||||
{
|
||||
*dim= 0;
|
||||
*end= 0; /* No default end */
|
||||
return 0;
|
||||
}
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
double calculate_haversine(const Geometry *g, const double sphere_radius,
|
||||
int *error);
|
||||
int spherical_distance_multipoints(Geometry *g, const double r, double *result,
|
||||
@ -469,29 +469,29 @@ class Gis_line_string: public Geometry
|
||||
public:
|
||||
Gis_line_string() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_line_string() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
int geom_length(double *len, const char **end) const;
|
||||
int area(double *ar, const char **end) const;
|
||||
int is_closed(int *closed) const;
|
||||
int num_points(uint32 *n_points) const;
|
||||
int start_point(String *point) const;
|
||||
int end_point(String *point) const;
|
||||
int point_n(uint32 n, String *result) const;
|
||||
bool dimension(uint32 *dim, const char **end) const
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
int geom_length(double *len, const char **end) const override;
|
||||
int area(double *ar, const char **end) const override;
|
||||
int is_closed(int *closed) const override;
|
||||
int num_points(uint32 *n_points) const override;
|
||||
int start_point(String *point) const override;
|
||||
int end_point(String *point) const override;
|
||||
int point_n(uint32 n, String *result) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override
|
||||
{
|
||||
*dim= 1;
|
||||
*end= 0; /* No default end */
|
||||
return 0;
|
||||
}
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
};
|
||||
|
||||
|
||||
@ -502,29 +502,29 @@ class Gis_polygon: public Geometry
|
||||
public:
|
||||
Gis_polygon() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_polygon() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
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_opresult(String *bin, const char *opres, uint res_len);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
uint init_from_opresult(String *bin, const char *opres, uint res_len) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
int area(double *ar, const char **end) const;
|
||||
int exterior_ring(String *result) const;
|
||||
int num_interior_ring(uint32 *n_int_rings) const;
|
||||
int interior_ring_n(uint32 num, String *result) const;
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
int area(double *ar, const char **end) const override;
|
||||
int exterior_ring(String *result) const override;
|
||||
int num_interior_ring(uint32 *n_int_rings) const override;
|
||||
int interior_ring_n(uint32 num, String *result) const override;
|
||||
int centroid_xy(double *x, double *y) const;
|
||||
int centroid(String *result) const;
|
||||
bool dimension(uint32 *dim, const char **end) const
|
||||
int centroid(String *result) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override
|
||||
{
|
||||
*dim= 2;
|
||||
*end= 0; /* No default end */
|
||||
return 0;
|
||||
}
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
};
|
||||
|
||||
|
||||
@ -539,25 +539,25 @@ class Gis_multi_point: public Geometry
|
||||
public:
|
||||
Gis_multi_point() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_multi_point() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
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_opresult(String *bin, const char *opres, uint res_len);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
uint init_from_opresult(String *bin, const char *opres, uint res_len) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
int num_geometries(uint32 *num) const;
|
||||
int geometry_n(uint32 num, String *result) const;
|
||||
bool dimension(uint32 *dim, const char **end) const
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
int num_geometries(uint32 *num) const override;
|
||||
int geometry_n(uint32 num, String *result) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override
|
||||
{
|
||||
*dim= 0;
|
||||
*end= 0; /* No default end */
|
||||
return 0;
|
||||
}
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
int spherical_distance_multipoints(Geometry *g, const double r, double *res,
|
||||
int *error);
|
||||
};
|
||||
@ -570,27 +570,27 @@ class Gis_multi_line_string: public Geometry
|
||||
public:
|
||||
Gis_multi_line_string() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_multi_line_string() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
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_opresult(String *bin, const char *opres, uint res_len);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
uint init_from_opresult(String *bin, const char *opres, uint res_len) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
int num_geometries(uint32 *num) const;
|
||||
int geometry_n(uint32 num, String *result) const;
|
||||
int geom_length(double *len, const char **end) const;
|
||||
int is_closed(int *closed) const;
|
||||
bool dimension(uint32 *dim, const char **end) const
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
int num_geometries(uint32 *num) const override;
|
||||
int geometry_n(uint32 num, String *result) const override;
|
||||
int geom_length(double *len, const char **end) const override;
|
||||
int is_closed(int *closed) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override
|
||||
{
|
||||
*dim= 1;
|
||||
*end= 0; /* No default end */
|
||||
return 0;
|
||||
}
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
};
|
||||
|
||||
|
||||
@ -601,27 +601,27 @@ class Gis_multi_polygon: public Geometry
|
||||
public:
|
||||
Gis_multi_polygon() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_multi_polygon() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
int num_geometries(uint32 *num) const;
|
||||
int geometry_n(uint32 num, String *result) const;
|
||||
int area(double *ar, const char **end) const;
|
||||
int centroid(String *result) const;
|
||||
bool dimension(uint32 *dim, const char **end) const
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
int num_geometries(uint32 *num) const override;
|
||||
int geometry_n(uint32 num, String *result) const override;
|
||||
int area(double *ar, const char **end) const override;
|
||||
int centroid(String *result) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override
|
||||
{
|
||||
*dim= 2;
|
||||
*end= 0; /* No default end */
|
||||
return 0;
|
||||
}
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
uint init_from_opresult(String *bin, const char *opres, uint res_len);
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
uint init_from_opresult(String *bin, const char *opres, uint res_len) override;
|
||||
};
|
||||
|
||||
|
||||
@ -632,22 +632,22 @@ class Gis_geometry_collection: public Geometry
|
||||
public:
|
||||
Gis_geometry_collection() = default; /* Remove gcc warning */
|
||||
virtual ~Gis_geometry_collection() = default; /* Remove gcc warning */
|
||||
uint32 get_data_size() const;
|
||||
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_opresult(String *bin, const char *opres, uint res_len);
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb);
|
||||
bool get_data_as_wkt(String *txt, const char **end) const;
|
||||
uint32 get_data_size() const override;
|
||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb) override;
|
||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) override;
|
||||
uint init_from_opresult(String *bin, const char *opres, uint res_len) override;
|
||||
bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) override;
|
||||
bool get_data_as_wkt(String *txt, const char **end) const override;
|
||||
bool get_data_as_json(String *txt, uint max_dec_digits,
|
||||
const char **end) const;
|
||||
bool get_mbr(MBR *mbr, const char **end) const;
|
||||
int area(double *ar, const char **end) const;
|
||||
int geom_length(double *len, const char **end) const;
|
||||
int num_geometries(uint32 *num) const;
|
||||
int geometry_n(uint32 num, String *result) const;
|
||||
bool dimension(uint32 *dim, const char **end) const;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const;
|
||||
const Class_info *get_class_info() const;
|
||||
const char **end) const override;
|
||||
bool get_mbr(MBR *mbr, const char **end) const override;
|
||||
int area(double *ar, const char **end) const override;
|
||||
int geom_length(double *len, const char **end) const override;
|
||||
int num_geometries(uint32 *num) const override;
|
||||
int geometry_n(uint32 num, String *result) const override;
|
||||
bool dimension(uint32 *dim, const char **end) const override;
|
||||
int store_shapes(Gcalc_shape_transporter *trn) const override;
|
||||
const Class_info *get_class_info() const override;
|
||||
};
|
||||
|
||||
struct Geometry_buffer : public
|
||||
|
158
sql/sql_acl.cc
158
sql/sql_acl.cc
@ -940,9 +940,9 @@ class User_table_tabular: public User_table
|
||||
{
|
||||
public:
|
||||
|
||||
LEX_CSTRING& name() const { return MYSQL_TABLE_NAME_USER; }
|
||||
LEX_CSTRING& name() const override { return MYSQL_TABLE_NAME_USER; }
|
||||
|
||||
int get_auth(THD *thd, MEM_ROOT *root, ACL_USER *u) const
|
||||
int get_auth(THD *thd, MEM_ROOT *root, ACL_USER *u) const override
|
||||
{
|
||||
mysql_mutex_assert_owner(&acl_cache->lock);
|
||||
u->alloc_auth(root, 1);
|
||||
@ -985,7 +985,7 @@ class User_table_tabular: public User_table
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool set_auth(const ACL_USER &u) const
|
||||
bool set_auth(const ACL_USER &u) const override
|
||||
{
|
||||
if (u.nauth != 1)
|
||||
return 1;
|
||||
@ -1006,7 +1006,7 @@ class User_table_tabular: public User_table
|
||||
return 0;
|
||||
}
|
||||
|
||||
privilege_t get_access() const
|
||||
privilege_t get_access() const override
|
||||
{
|
||||
privilege_t access(Grant_table_base::get_access());
|
||||
if ((num_fields() <= 13) && (access & CREATE_ACL))
|
||||
@ -1065,7 +1065,7 @@ class User_table_tabular: public User_table
|
||||
return access & GLOBAL_ACLS;
|
||||
}
|
||||
|
||||
void set_access(const privilege_t rights, bool revoke) const
|
||||
void set_access(const privilege_t rights, bool revoke) const override
|
||||
{
|
||||
ulonglong priv(SELECT_ACL);
|
||||
for (uint i= start_priv_columns; i < end_priv_columns; i++, priv <<= 1)
|
||||
@ -1075,132 +1075,132 @@ class User_table_tabular: public User_table
|
||||
}
|
||||
}
|
||||
|
||||
SSL_type get_ssl_type () const
|
||||
SSL_type get_ssl_type () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns, MYSQL_TYPE_ENUM);
|
||||
return (SSL_type)(f ? f->val_int()-1 : 0);
|
||||
}
|
||||
int set_ssl_type (SSL_type x) const
|
||||
int set_ssl_type (SSL_type x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns, MYSQL_TYPE_ENUM))
|
||||
return f->store(x+1, 0);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
const char* get_ssl_cipher (MEM_ROOT *root) const
|
||||
const char* get_ssl_cipher (MEM_ROOT *root) const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 1, MYSQL_TYPE_BLOB);
|
||||
return f ? ::get_field(root,f) : 0;
|
||||
}
|
||||
int set_ssl_cipher (const char *s, size_t l) const
|
||||
int set_ssl_cipher (const char *s, size_t l) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 1, MYSQL_TYPE_BLOB))
|
||||
return f->store(s, l, &my_charset_latin1);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
const char* get_x509_issuer (MEM_ROOT *root) const
|
||||
const char* get_x509_issuer (MEM_ROOT *root) const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 2, MYSQL_TYPE_BLOB);
|
||||
return f ? ::get_field(root,f) : 0;
|
||||
}
|
||||
int set_x509_issuer (const char *s, size_t l) const
|
||||
int set_x509_issuer (const char *s, size_t l) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 2, MYSQL_TYPE_BLOB))
|
||||
return f->store(s, l, &my_charset_latin1);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
const char* get_x509_subject (MEM_ROOT *root) const
|
||||
const char* get_x509_subject (MEM_ROOT *root) const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 3, MYSQL_TYPE_BLOB);
|
||||
return f ? ::get_field(root,f) : 0;
|
||||
}
|
||||
int set_x509_subject (const char *s, size_t l) const
|
||||
int set_x509_subject (const char *s, size_t l) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 3, MYSQL_TYPE_BLOB))
|
||||
return f->store(s, l, &my_charset_latin1);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
longlong get_max_questions () const
|
||||
longlong get_max_questions () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 4, MYSQL_TYPE_LONG);
|
||||
return f ? f->val_int() : 0;
|
||||
}
|
||||
int set_max_questions (longlong x) const
|
||||
int set_max_questions (longlong x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 4, MYSQL_TYPE_LONG))
|
||||
return f->store(x, 0);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
longlong get_max_updates () const
|
||||
longlong get_max_updates () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 5, MYSQL_TYPE_LONG);
|
||||
return f ? f->val_int() : 0;
|
||||
}
|
||||
int set_max_updates (longlong x) const
|
||||
int set_max_updates (longlong x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 5, MYSQL_TYPE_LONG))
|
||||
return f->store(x, 0);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
longlong get_max_connections () const
|
||||
longlong get_max_connections () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 6, MYSQL_TYPE_LONG);
|
||||
return f ? f->val_int() : 0;
|
||||
}
|
||||
int set_max_connections (longlong x) const
|
||||
int set_max_connections (longlong x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 6, MYSQL_TYPE_LONG))
|
||||
return f->store(x, 0);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
longlong get_max_user_connections () const
|
||||
longlong get_max_user_connections () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 7, MYSQL_TYPE_LONG);
|
||||
return f ? f->val_int() : 0;
|
||||
}
|
||||
int set_max_user_connections (longlong x) const
|
||||
int set_max_user_connections (longlong x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 7, MYSQL_TYPE_LONG))
|
||||
return f->store(x, 0);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
double get_max_statement_time () const
|
||||
double get_max_statement_time () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_NEWDECIMAL);
|
||||
return f ? f->val_real() : 0;
|
||||
}
|
||||
int set_max_statement_time (double x) const
|
||||
int set_max_statement_time (double x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_NEWDECIMAL))
|
||||
return f->store(x);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
bool get_is_role () const
|
||||
bool get_is_role () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_ENUM);
|
||||
return f ? f->val_int()-1 : 0;
|
||||
}
|
||||
int set_is_role (bool x) const
|
||||
int set_is_role (bool x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_ENUM))
|
||||
return f->store(x+1, 0);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
const char* get_default_role (MEM_ROOT *root) const
|
||||
const char* get_default_role (MEM_ROOT *root) const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_STRING);
|
||||
return f ? ::get_field(root,f) : 0;
|
||||
}
|
||||
int set_default_role (const char *s, size_t l) const
|
||||
int set_default_role (const char *s, size_t l) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_STRING))
|
||||
return f->store(s, l, system_charset_info);
|
||||
@ -1210,12 +1210,12 @@ class User_table_tabular: public User_table
|
||||
/* On a MariaDB 10.3 user table, the account locking accessors will try to
|
||||
get the content of the max_statement_time column, but they will fail due
|
||||
to the typecheck in get_field. */
|
||||
bool get_account_locked () const
|
||||
bool get_account_locked () const override
|
||||
{
|
||||
Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_ENUM);
|
||||
return f ? f->val_int()-1 : 0;
|
||||
}
|
||||
int set_account_locked (bool x) const
|
||||
int set_account_locked (bool x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 13, MYSQL_TYPE_ENUM))
|
||||
return f->store(x+1, 0);
|
||||
@ -1223,14 +1223,14 @@ class User_table_tabular: public User_table
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool get_password_expired () const
|
||||
bool get_password_expired () const override
|
||||
{
|
||||
uint field_num= end_priv_columns + 10;
|
||||
|
||||
Field *f= get_field(field_num, MYSQL_TYPE_ENUM);
|
||||
return f ? f->val_int()-1 : 0;
|
||||
}
|
||||
int set_password_expired (bool x) const
|
||||
int set_password_expired (bool x) const override
|
||||
{
|
||||
uint field_num= end_priv_columns + 10;
|
||||
|
||||
@ -1238,14 +1238,14 @@ class User_table_tabular: public User_table
|
||||
return f->store(x+1, 0);
|
||||
return 1;
|
||||
}
|
||||
my_time_t get_password_last_changed () const
|
||||
my_time_t get_password_last_changed () const override
|
||||
{
|
||||
ulong unused_dec;
|
||||
if (Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_TIMESTAMP2))
|
||||
return f->get_timestamp(&unused_dec);
|
||||
return 0;
|
||||
}
|
||||
int set_password_last_changed (my_time_t x) const
|
||||
int set_password_last_changed (my_time_t x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 11, MYSQL_TYPE_TIMESTAMP2))
|
||||
{
|
||||
@ -1254,7 +1254,7 @@ class User_table_tabular: public User_table
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
longlong get_password_lifetime () const
|
||||
longlong get_password_lifetime () const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_SHORT))
|
||||
{
|
||||
@ -1264,7 +1264,7 @@ class User_table_tabular: public User_table
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int set_password_lifetime (longlong x) const
|
||||
int set_password_lifetime (longlong x) const override
|
||||
{
|
||||
if (Field *f= get_field(end_priv_columns + 12, MYSQL_TYPE_SHORT))
|
||||
{
|
||||
@ -1279,7 +1279,7 @@ class User_table_tabular: public User_table
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual ~User_table_tabular() = default;
|
||||
~User_table_tabular() override = default;
|
||||
private:
|
||||
friend class Grant_tables;
|
||||
|
||||
@ -1304,7 +1304,7 @@ class User_table_tabular: public User_table
|
||||
return f->real_type() == type ? f : NULL;
|
||||
}
|
||||
|
||||
int setup_sysvars() const
|
||||
int setup_sysvars() const override
|
||||
{
|
||||
username_char_length= MY_MIN(m_table->field[1]->char_length(),
|
||||
USERNAME_CHAR_LENGTH);
|
||||
@ -1378,9 +1378,9 @@ class User_table_tabular: public User_table
|
||||
*/
|
||||
class User_table_json: public User_table
|
||||
{
|
||||
LEX_CSTRING& name() const { return MYSQL_TABLE_NAME[USER_TABLE]; }
|
||||
LEX_CSTRING& name() const override { return MYSQL_TABLE_NAME[USER_TABLE]; }
|
||||
|
||||
int get_auth(THD *thd, MEM_ROOT *root, ACL_USER *u) const
|
||||
int get_auth(THD *thd, MEM_ROOT *root, ACL_USER *u) const override
|
||||
{
|
||||
size_t array_len;
|
||||
const char *array;
|
||||
@ -1459,7 +1459,7 @@ class User_table_json: public User_table
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool set_auth(const ACL_USER &u) const
|
||||
bool set_auth(const ACL_USER &u) const override
|
||||
{
|
||||
size_t array_len;
|
||||
const char *array;
|
||||
@ -1584,7 +1584,7 @@ class User_table_json: public User_table
|
||||
return access & ALL_KNOWN_ACL;
|
||||
}
|
||||
|
||||
privilege_t get_access() const
|
||||
privilege_t get_access() const override
|
||||
{
|
||||
ulonglong version_id= (ulonglong) get_int_value("version_id");
|
||||
ulonglong access= (ulonglong) get_int_value("access");
|
||||
@ -1611,7 +1611,7 @@ class User_table_json: public User_table
|
||||
return adjust_access(version_id, access) & GLOBAL_ACLS;
|
||||
}
|
||||
|
||||
void set_access(const privilege_t rights, bool revoke) const
|
||||
void set_access(const privilege_t rights, bool revoke) const override
|
||||
{
|
||||
privilege_t access= get_access();
|
||||
if (revoke)
|
||||
@ -1624,77 +1624,77 @@ class User_table_json: public User_table
|
||||
const char *unsafe_str(const char *s) const
|
||||
{ return s[0] ? s : NULL; }
|
||||
|
||||
SSL_type get_ssl_type () const
|
||||
SSL_type get_ssl_type () const override
|
||||
{ return (SSL_type)get_int_value("ssl_type"); }
|
||||
int set_ssl_type (SSL_type x) const
|
||||
int set_ssl_type (SSL_type x) const override
|
||||
{ return set_int_value("ssl_type", x); }
|
||||
const char* get_ssl_cipher (MEM_ROOT *root) const
|
||||
const char* get_ssl_cipher (MEM_ROOT *root) const override
|
||||
{ return unsafe_str(get_str_value(root, "ssl_cipher")); }
|
||||
int set_ssl_cipher (const char *s, size_t l) const
|
||||
int set_ssl_cipher (const char *s, size_t l) const override
|
||||
{ return set_str_value("ssl_cipher", s, l); }
|
||||
const char* get_x509_issuer (MEM_ROOT *root) const
|
||||
const char* get_x509_issuer (MEM_ROOT *root) const override
|
||||
{ return unsafe_str(get_str_value(root, "x509_issuer")); }
|
||||
int set_x509_issuer (const char *s, size_t l) const
|
||||
int set_x509_issuer (const char *s, size_t l) const override
|
||||
{ return set_str_value("x509_issuer", s, l); }
|
||||
const char* get_x509_subject (MEM_ROOT *root) const
|
||||
const char* get_x509_subject (MEM_ROOT *root) const override
|
||||
{ return unsafe_str(get_str_value(root, "x509_subject")); }
|
||||
int set_x509_subject (const char *s, size_t l) const
|
||||
int set_x509_subject (const char *s, size_t l) const override
|
||||
{ return set_str_value("x509_subject", s, l); }
|
||||
longlong get_max_questions () const
|
||||
longlong get_max_questions () const override
|
||||
{ return get_int_value("max_questions"); }
|
||||
int set_max_questions (longlong x) const
|
||||
int set_max_questions (longlong x) const override
|
||||
{ return set_int_value("max_questions", x); }
|
||||
longlong get_max_updates () const
|
||||
longlong get_max_updates () const override
|
||||
{ return get_int_value("max_updates"); }
|
||||
int set_max_updates (longlong x) const
|
||||
int set_max_updates (longlong x) const override
|
||||
{ return set_int_value("max_updates", x); }
|
||||
longlong get_max_connections () const
|
||||
longlong get_max_connections () const override
|
||||
{ return get_int_value("max_connections"); }
|
||||
int set_max_connections (longlong x) const
|
||||
int set_max_connections (longlong x) const override
|
||||
{ return set_int_value("max_connections", x); }
|
||||
longlong get_max_user_connections () const
|
||||
longlong get_max_user_connections () const override
|
||||
{ return get_int_value("max_user_connections"); }
|
||||
int set_max_user_connections (longlong x) const
|
||||
int set_max_user_connections (longlong x) const override
|
||||
{ return set_int_value("max_user_connections", x); }
|
||||
double get_max_statement_time () const
|
||||
double get_max_statement_time () const override
|
||||
{ return get_double_value("max_statement_time"); }
|
||||
int set_max_statement_time (double x) const
|
||||
int set_max_statement_time (double x) const override
|
||||
{ return set_double_value("max_statement_time", x); }
|
||||
bool get_is_role () const
|
||||
bool get_is_role () const override
|
||||
{ return get_bool_value("is_role"); }
|
||||
int set_is_role (bool x) const
|
||||
int set_is_role (bool x) const override
|
||||
{ return set_bool_value("is_role", x); }
|
||||
const char* get_default_role (MEM_ROOT *root) const
|
||||
const char* get_default_role (MEM_ROOT *root) const override
|
||||
{ return get_str_value(root, "default_role"); }
|
||||
int set_default_role (const char *s, size_t l) const
|
||||
int set_default_role (const char *s, size_t l) const override
|
||||
{ return set_str_value("default_role", s, l); }
|
||||
bool get_account_locked () const
|
||||
bool get_account_locked () const override
|
||||
{ return get_bool_value("account_locked"); }
|
||||
int set_account_locked (bool x) const
|
||||
int set_account_locked (bool x) const override
|
||||
{ return set_bool_value("account_locked", x); }
|
||||
my_time_t get_password_last_changed () const
|
||||
my_time_t get_password_last_changed () const override
|
||||
{ return static_cast<my_time_t>(get_int_value("password_last_changed")); }
|
||||
int set_password_last_changed (my_time_t x) const
|
||||
int set_password_last_changed (my_time_t x) const override
|
||||
{ return set_int_value("password_last_changed", static_cast<longlong>(x)); }
|
||||
int set_password_lifetime (longlong x) const
|
||||
int set_password_lifetime (longlong x) const override
|
||||
{ return set_int_value("password_lifetime", x); }
|
||||
longlong get_password_lifetime () const
|
||||
longlong get_password_lifetime () const override
|
||||
{ return get_int_value("password_lifetime", -1); }
|
||||
/*
|
||||
password_last_changed=0 means the password is manually expired.
|
||||
In MySQL 5.7+ this state is described using the password_expired column
|
||||
in mysql.user
|
||||
*/
|
||||
bool get_password_expired () const
|
||||
bool get_password_expired () const override
|
||||
{ return get_int_value("password_last_changed", -1) == 0; }
|
||||
int set_password_expired (bool x) const
|
||||
int set_password_expired (bool x) const override
|
||||
{ return x ? set_password_last_changed(0) : 0; }
|
||||
|
||||
~User_table_json() = default;
|
||||
~User_table_json() override = default;
|
||||
private:
|
||||
friend class Grant_tables;
|
||||
static const uint JSON_SIZE=1024;
|
||||
int setup_sysvars() const
|
||||
int setup_sysvars() const override
|
||||
{
|
||||
using_global_priv_table= true;
|
||||
username_char_length= MY_MIN(m_table->field[1]->char_length(),
|
||||
@ -5366,8 +5366,8 @@ public:
|
||||
GRANT_TABLE(const char *h, const char *d,const char *u,
|
||||
const char *t, privilege_t p, privilege_t c);
|
||||
GRANT_TABLE (TABLE *form, TABLE *col_privs);
|
||||
~GRANT_TABLE();
|
||||
bool ok() { return privs != NO_ACL || cols != NO_ACL; }
|
||||
~GRANT_TABLE() override;
|
||||
bool ok() override { return privs != NO_ACL || cols != NO_ACL; }
|
||||
void init_hash()
|
||||
{
|
||||
my_hash_init2(key_memory_acl_memex, &hash_columns, 4, system_charset_info,
|
||||
@ -11628,14 +11628,14 @@ public:
|
||||
: is_grave(FALSE)
|
||||
{}
|
||||
|
||||
virtual ~Silence_routine_definer_errors() = default;
|
||||
~Silence_routine_definer_errors() override = default;
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
|
||||
bool has_errors() { return is_grave; }
|
||||
|
||||
|
@ -311,7 +311,7 @@ public:
|
||||
:m_command(command)
|
||||
{ }
|
||||
bool is_revoke() const { return m_command == SQLCOM_REVOKE; }
|
||||
enum_sql_command sql_command_code() const { return m_command; }
|
||||
enum_sql_command sql_command_code() const override { return m_command; }
|
||||
};
|
||||
|
||||
|
||||
@ -325,7 +325,7 @@ public:
|
||||
Sql_cmd_grant_proxy(enum_sql_command command, privilege_t grant_option)
|
||||
:Sql_cmd_grant(command), m_grant_option(grant_option)
|
||||
{ }
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@ -352,7 +352,7 @@ public:
|
||||
Sql_cmd_grant_table(enum_sql_command command, const Grant_privilege &grant)
|
||||
:Sql_cmd_grant_object(command, grant)
|
||||
{ }
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@ -366,7 +366,7 @@ public:
|
||||
:Sql_cmd_grant_object(command, grant),
|
||||
m_sph(sph)
|
||||
{ }
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
#endif /* SQL_ACL_INCLUDED */
|
||||
|
@ -38,9 +38,9 @@ public:
|
||||
|
||||
~Sql_cmd_analyze_table() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ANALYZE;
|
||||
}
|
||||
@ -61,9 +61,9 @@ public:
|
||||
|
||||
~Sql_cmd_check_table() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_CHECK;
|
||||
}
|
||||
@ -83,9 +83,9 @@ public:
|
||||
|
||||
~Sql_cmd_optimize_table() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_OPTIMIZE;
|
||||
}
|
||||
@ -106,9 +106,9 @@ public:
|
||||
|
||||
~Sql_cmd_repair_table() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_REPAIR;
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ protected:
|
||||
|
||||
virtual ~Sql_cmd_common_alter_table() = default;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_TABLE;
|
||||
}
|
||||
@ -383,9 +383,9 @@ public:
|
||||
|
||||
~Sql_cmd_alter_table() = default;
|
||||
|
||||
Storage_engine_name *option_storage_engine_name() { return this; }
|
||||
Storage_engine_name *option_storage_engine_name() override { return this; }
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@ -405,11 +405,11 @@ public:
|
||||
|
||||
~Sql_cmd_alter_sequence() = default;
|
||||
|
||||
enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_SEQUENCE;
|
||||
}
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
@ -429,7 +429,7 @@ public:
|
||||
: m_tablespace_op(tablespace_op_arg)
|
||||
{}
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
private:
|
||||
const enum_tablespace_op_type m_tablespace_op;
|
||||
|
@ -123,13 +123,13 @@ public:
|
||||
{ init_tree(&tree, 0, 0, sizeof(String), (qsort_cmp2) sortcmp2,
|
||||
free_string, NULL, MYF(MY_THREAD_SPECIFIC)); };
|
||||
|
||||
void add();
|
||||
void get_opt_type(String*, ha_rows);
|
||||
String *get_min_arg(String *not_used __attribute__((unused)))
|
||||
void add() override;
|
||||
void get_opt_type(String*, ha_rows) override;
|
||||
String *get_min_arg(String *not_used __attribute__((unused))) override
|
||||
{ return &min_arg; }
|
||||
String *get_max_arg(String *not_used __attribute__((unused)))
|
||||
String *get_max_arg(String *not_used __attribute__((unused))) override
|
||||
{ return &max_arg; }
|
||||
String *avg(String *s, ha_rows rows)
|
||||
String *avg(String *s, ha_rows rows) override
|
||||
{
|
||||
if (!(rows - nulls))
|
||||
s->set_real((double) 0.0, 1,my_thd_charset);
|
||||
@ -140,10 +140,10 @@ public:
|
||||
}
|
||||
friend int collect_string(String *element, element_count count,
|
||||
TREE_INFO *info);
|
||||
tree_walk_action collect_enum()
|
||||
tree_walk_action collect_enum() override
|
||||
{ return (tree_walk_action) collect_string; }
|
||||
String *std(String *s __attribute__((unused)),
|
||||
ha_rows rows __attribute__((unused)))
|
||||
ha_rows rows __attribute__((unused))) override
|
||||
{ return (String*) 0; }
|
||||
};
|
||||
|
||||
@ -165,16 +165,16 @@ public:
|
||||
0, (void *)&bin_size, MYF(MY_THREAD_SPECIFIC));
|
||||
};
|
||||
|
||||
void add();
|
||||
void get_opt_type(String*, ha_rows);
|
||||
String *get_min_arg(String *);
|
||||
String *get_max_arg(String *);
|
||||
String *avg(String *s, ha_rows rows);
|
||||
void add() override;
|
||||
void get_opt_type(String*, ha_rows) override;
|
||||
String *get_min_arg(String *) override;
|
||||
String *get_max_arg(String *) override;
|
||||
String *avg(String *s, ha_rows rows) override;
|
||||
friend int collect_decimal(uchar *element, element_count count,
|
||||
TREE_INFO *info);
|
||||
tree_walk_action collect_enum()
|
||||
tree_walk_action collect_enum() override
|
||||
{ return (tree_walk_action) collect_decimal; }
|
||||
String *std(String *s, ha_rows rows);
|
||||
String *std(String *s, ha_rows rows) override;
|
||||
};
|
||||
|
||||
|
||||
@ -193,19 +193,19 @@ public:
|
||||
(qsort_cmp2) compare_double2, NULL, NULL,
|
||||
MYF(MY_THREAD_SPECIFIC)); }
|
||||
|
||||
void add();
|
||||
void get_opt_type(String*, ha_rows);
|
||||
String *get_min_arg(String *s)
|
||||
void add() override;
|
||||
void get_opt_type(String*, ha_rows) override;
|
||||
String *get_min_arg(String *s) override
|
||||
{
|
||||
s->set_real(min_arg, item->decimals, my_thd_charset);
|
||||
return s;
|
||||
}
|
||||
String *get_max_arg(String *s)
|
||||
String *get_max_arg(String *s) override
|
||||
{
|
||||
s->set_real(max_arg, item->decimals, my_thd_charset);
|
||||
return s;
|
||||
}
|
||||
String *avg(String *s, ha_rows rows)
|
||||
String *avg(String *s, ha_rows rows) override
|
||||
{
|
||||
if (!(rows - nulls))
|
||||
s->set_real((double) 0.0, 1,my_thd_charset);
|
||||
@ -213,7 +213,7 @@ public:
|
||||
s->set_real(((double)sum / (double) (rows - nulls)), item->decimals,my_thd_charset);
|
||||
return s;
|
||||
}
|
||||
String *std(String *s, ha_rows rows)
|
||||
String *std(String *s, ha_rows rows) override
|
||||
{
|
||||
double tmp = ulonglong2double(rows);
|
||||
if (!(tmp - nulls))
|
||||
@ -226,10 +226,10 @@ public:
|
||||
}
|
||||
return s;
|
||||
}
|
||||
uint decimals() { return item->decimals; }
|
||||
uint decimals() override { return item->decimals; }
|
||||
friend int collect_real(double *element, element_count count,
|
||||
TREE_INFO *info);
|
||||
tree_walk_action collect_enum()
|
||||
tree_walk_action collect_enum() override
|
||||
{ return (tree_walk_action) collect_real;}
|
||||
};
|
||||
|
||||
@ -248,11 +248,11 @@ public:
|
||||
(qsort_cmp2) compare_longlong2, NULL, NULL,
|
||||
MYF(MY_THREAD_SPECIFIC)); }
|
||||
|
||||
void add();
|
||||
void get_opt_type(String*, ha_rows);
|
||||
String *get_min_arg(String *s) { s->set(min_arg,my_thd_charset); return s; }
|
||||
String *get_max_arg(String *s) { s->set(max_arg,my_thd_charset); return s; }
|
||||
String *avg(String *s, ha_rows rows)
|
||||
void add() override;
|
||||
void get_opt_type(String*, ha_rows) override;
|
||||
String *get_min_arg(String *s) override { s->set(min_arg,my_thd_charset); return s; }
|
||||
String *get_max_arg(String *s) override { s->set(max_arg,my_thd_charset); return s; }
|
||||
String *avg(String *s, ha_rows rows) override
|
||||
{
|
||||
if (!(rows - nulls))
|
||||
s->set_real((double) 0.0, 1,my_thd_charset);
|
||||
@ -260,7 +260,7 @@ public:
|
||||
s->set_real(((double) sum / (double) (rows - nulls)), DEC_IN_AVG,my_thd_charset);
|
||||
return s;
|
||||
}
|
||||
String *std(String *s, ha_rows rows)
|
||||
String *std(String *s, ha_rows rows) override
|
||||
{
|
||||
double tmp = ulonglong2double(rows);
|
||||
if (!(tmp - nulls))
|
||||
@ -275,7 +275,7 @@ public:
|
||||
}
|
||||
friend int collect_longlong(longlong *element, element_count count,
|
||||
TREE_INFO *info);
|
||||
tree_walk_action collect_enum()
|
||||
tree_walk_action collect_enum() override
|
||||
{ return (tree_walk_action) collect_longlong;}
|
||||
};
|
||||
|
||||
@ -293,11 +293,11 @@ public:
|
||||
{ init_tree(&tree, 0, 0, sizeof(ulonglong),
|
||||
(qsort_cmp2) compare_ulonglong2, NULL, NULL,
|
||||
MYF(MY_THREAD_SPECIFIC)); }
|
||||
void add();
|
||||
void get_opt_type(String*, ha_rows);
|
||||
String *get_min_arg(String *s) { s->set(min_arg,my_thd_charset); return s; }
|
||||
String *get_max_arg(String *s) { s->set(max_arg,my_thd_charset); return s; }
|
||||
String *avg(String *s, ha_rows rows)
|
||||
void add() override;
|
||||
void get_opt_type(String*, ha_rows) override;
|
||||
String *get_min_arg(String *s) override { s->set(min_arg,my_thd_charset); return s; }
|
||||
String *get_max_arg(String *s) override { s->set(max_arg,my_thd_charset); return s; }
|
||||
String *avg(String *s, ha_rows rows) override
|
||||
{
|
||||
if (!(rows - nulls))
|
||||
s->set_real((double) 0.0, 1,my_thd_charset);
|
||||
@ -306,7 +306,7 @@ public:
|
||||
DEC_IN_AVG,my_thd_charset);
|
||||
return s;
|
||||
}
|
||||
String *std(String *s, ha_rows rows)
|
||||
String *std(String *s, ha_rows rows) override
|
||||
{
|
||||
double tmp = ulonglong2double(rows);
|
||||
if (!(tmp - nulls))
|
||||
@ -322,7 +322,7 @@ public:
|
||||
}
|
||||
friend int collect_ulonglong(ulonglong *element, element_count count,
|
||||
TREE_INFO *info);
|
||||
tree_walk_action collect_enum()
|
||||
tree_walk_action collect_enum() override
|
||||
{ return (tree_walk_action) collect_ulonglong; }
|
||||
};
|
||||
|
||||
@ -354,11 +354,11 @@ public:
|
||||
delete (*f);
|
||||
}
|
||||
}
|
||||
virtual void add() {}
|
||||
virtual bool change_columns(THD *thd, List<Item> &fields);
|
||||
virtual int send_row(List<Item> &field_list);
|
||||
virtual void end_group(void) {}
|
||||
virtual int end_of_records(void);
|
||||
void add() override {}
|
||||
bool change_columns(THD *thd, List<Item> &fields) override;
|
||||
int send_row(List<Item> &field_list) override;
|
||||
void end_group(void) override {}
|
||||
int end_of_records(void) override;
|
||||
friend Procedure *proc_analyse_init(THD *thd, ORDER *param,
|
||||
select_result *result,
|
||||
List<Item> &field_list);
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
|
||||
/**
|
||||
Returns TRUE if there were ER_NO_SUCH_/WRONG_MRG_TABLE and there
|
||||
@ -517,7 +517,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
*cond_hdl= NULL;
|
||||
if (sql_errno == ER_OPEN_AS_READONLY)
|
||||
@ -1400,14 +1400,14 @@ public:
|
||||
: m_ot_ctx(ot_ctx_arg), m_is_active(FALSE)
|
||||
{}
|
||||
|
||||
virtual ~MDL_deadlock_handler() = default;
|
||||
~MDL_deadlock_handler() override = default;
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
|
||||
private:
|
||||
/** Open table context to be used for back-off request. */
|
||||
@ -3167,12 +3167,12 @@ request_backoff_action(enum_open_table_action action_arg,
|
||||
class MDL_deadlock_discovery_repair_handler : public Internal_error_handler
|
||||
{
|
||||
public:
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
if (sql_errno == ER_LOCK_DEADLOCK)
|
||||
{
|
||||
|
@ -419,13 +419,13 @@ public:
|
||||
class DML_prelocking_strategy : public Prelocking_strategy
|
||||
{
|
||||
public:
|
||||
virtual bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
Sroutine_hash_entry *rt, sp_head *sp,
|
||||
bool *need_prelocking);
|
||||
virtual bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
virtual bool handle_view(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
Sroutine_hash_entry *rt, sp_head *sp,
|
||||
bool *need_prelocking) override;
|
||||
bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
bool handle_view(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
};
|
||||
|
||||
|
||||
@ -436,8 +436,8 @@ public:
|
||||
|
||||
class Lock_tables_prelocking_strategy : public DML_prelocking_strategy
|
||||
{
|
||||
virtual bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
};
|
||||
|
||||
|
||||
@ -452,13 +452,13 @@ class Lock_tables_prelocking_strategy : public DML_prelocking_strategy
|
||||
class Alter_table_prelocking_strategy : public Prelocking_strategy
|
||||
{
|
||||
public:
|
||||
virtual bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
Sroutine_hash_entry *rt, sp_head *sp,
|
||||
bool *need_prelocking);
|
||||
virtual bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
virtual bool handle_view(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
Sroutine_hash_entry *rt, sp_head *sp,
|
||||
bool *need_prelocking) override;
|
||||
bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
bool handle_view(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
};
|
||||
|
||||
|
||||
@ -650,7 +650,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
|
||||
/**
|
||||
Returns TRUE if one or more ER_NO_SUCH_TABLE errors have been
|
||||
|
224
sql/sql_class.h
224
sql/sql_class.h
@ -486,7 +486,7 @@ public:
|
||||
Used to make a clone of this object for ALTER/CREATE TABLE
|
||||
@sa comment for Key_part_spec::clone
|
||||
*/
|
||||
virtual Key *clone(MEM_ROOT *mem_root) const
|
||||
Key *clone(MEM_ROOT *mem_root) const override
|
||||
{ return new (mem_root) Foreign_key(*this, mem_root); }
|
||||
/* Used to validate foreign key options */
|
||||
bool validate(List<Create_field> &table_fields);
|
||||
@ -1372,7 +1372,7 @@ public:
|
||||
void set_n_backup_statement(Statement *stmt, Statement *backup);
|
||||
void restore_backup_statement(Statement *stmt, Statement *backup);
|
||||
/* return class type */
|
||||
virtual Type type() const;
|
||||
Type type() const override;
|
||||
};
|
||||
|
||||
|
||||
@ -1924,7 +1924,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
/* Ignore error */
|
||||
return TRUE;
|
||||
@ -1946,7 +1946,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
if (*level == Sql_condition::WARN_LEVEL_ERROR)
|
||||
errors++;
|
||||
@ -1974,7 +1974,7 @@ public:
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl);
|
||||
Sql_condition ** cond_hdl) override;
|
||||
|
||||
private:
|
||||
};
|
||||
@ -1995,7 +1995,7 @@ public:
|
||||
const char *sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition **cond_hdl);
|
||||
Sql_condition **cond_hdl) override;
|
||||
|
||||
bool need_reopen() const { return m_need_reopen; };
|
||||
void init() { m_need_reopen= FALSE; };
|
||||
@ -2011,7 +2011,7 @@ struct Suppress_warnings_error_handler : public Internal_error_handler
|
||||
const char *sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char *msg,
|
||||
Sql_condition **cond_hdl)
|
||||
Sql_condition **cond_hdl) override
|
||||
{
|
||||
return *level == Sql_condition::WARN_LEVEL_WARN;
|
||||
}
|
||||
@ -3659,7 +3659,7 @@ public:
|
||||
enter_cond(mysql_cond_t *cond, mysql_mutex_t* mutex,
|
||||
const PSI_stage_info *stage, PSI_stage_info *old_stage,
|
||||
const char *src_function, const char *src_file,
|
||||
int src_line)
|
||||
int src_line) override
|
||||
{
|
||||
mysql_mutex_assert_owner(mutex);
|
||||
mysys_var->current_mutex = mutex;
|
||||
@ -3671,7 +3671,7 @@ public:
|
||||
}
|
||||
inline void exit_cond(const PSI_stage_info *stage,
|
||||
const char *src_function, const char *src_file,
|
||||
int src_line)
|
||||
int src_line) override
|
||||
{
|
||||
/*
|
||||
Putting the mutex unlock in thd->exit_cond() ensures that
|
||||
@ -3688,8 +3688,8 @@ public:
|
||||
mysql_mutex_unlock(&mysys_var->mutex);
|
||||
return;
|
||||
}
|
||||
virtual int is_killed() { return killed; }
|
||||
virtual THD* get_thd() { return this; }
|
||||
int is_killed() override { return killed; }
|
||||
THD* get_thd() override { return this; }
|
||||
|
||||
/**
|
||||
A callback to the server internals that is used to address
|
||||
@ -3714,8 +3714,8 @@ public:
|
||||
@retval TRUE if the thread was woken up
|
||||
@retval FALSE otherwise.
|
||||
*/
|
||||
virtual bool notify_shared_lock(MDL_context_owner *ctx_in_use,
|
||||
bool needs_thr_lock_abort);
|
||||
bool notify_shared_lock(MDL_context_owner *ctx_in_use,
|
||||
bool needs_thr_lock_abort) override;
|
||||
|
||||
// End implementation of MDL_context_owner interface.
|
||||
|
||||
@ -4825,7 +4825,7 @@ public:
|
||||
|
||||
public:
|
||||
/** Overloaded to guard query/query_length fields */
|
||||
virtual void set_statement(Statement *stmt);
|
||||
void set_statement(Statement *stmt) override;
|
||||
inline void set_command(enum enum_server_command command)
|
||||
{
|
||||
DBUG_ASSERT(command != COM_SLEEP);
|
||||
@ -5707,7 +5707,7 @@ public:
|
||||
TABLE *dst_table; /* table to write into */
|
||||
|
||||
/* The following is called in the child thread: */
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
};
|
||||
|
||||
|
||||
@ -5721,7 +5721,7 @@ class select_result_text_buffer : public select_result_sink
|
||||
{
|
||||
public:
|
||||
select_result_text_buffer(THD *thd_arg): select_result_sink(thd_arg) {}
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
bool send_result_set_metadata(List<Item> &fields, uint flag);
|
||||
|
||||
void save_to(String *res);
|
||||
@ -5749,9 +5749,9 @@ public:
|
||||
DBUG_PRINT("enter", ("this %p", this));
|
||||
DBUG_VOID_RETURN;
|
||||
} /* Remove gcc warning */
|
||||
uint field_count(List<Item> &fields) const { return 0; }
|
||||
bool send_result_set_metadata(List<Item> &fields, uint flag) { return FALSE; }
|
||||
select_result_interceptor *result_interceptor() { return this; }
|
||||
uint field_count(List<Item> &fields) const override { return 0; }
|
||||
bool send_result_set_metadata(List<Item> &fields, uint flag) override { return FALSE; }
|
||||
select_result_interceptor *result_interceptor() override { return this; }
|
||||
|
||||
/*
|
||||
Instruct the object to not call my_ok(). Client output will be handled
|
||||
@ -5819,10 +5819,10 @@ private:
|
||||
uint get_field_count() { return field_count; }
|
||||
void set_spvar_list(List<sp_variable> *vars) { spvar_list= vars; }
|
||||
|
||||
virtual bool send_eof() { return FALSE; }
|
||||
virtual int send_data(List<Item> &items);
|
||||
virtual int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
virtual bool view_structure_only() const { return m_view_structure_only; }
|
||||
bool send_eof() override { return FALSE; }
|
||||
int send_data(List<Item> &items) override;
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
bool view_structure_only() const override { return m_view_structure_only; }
|
||||
};
|
||||
|
||||
public:
|
||||
@ -5879,13 +5879,13 @@ class select_send :public select_result {
|
||||
public:
|
||||
select_send(THD *thd_arg):
|
||||
select_result(thd_arg), is_result_set_started(FALSE) {}
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags);
|
||||
int send_data(List<Item> &items);
|
||||
bool send_eof();
|
||||
virtual bool check_simple_select() const { return FALSE; }
|
||||
void abort_result_set();
|
||||
virtual void cleanup();
|
||||
select_result_interceptor *result_interceptor() { return NULL; }
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool send_eof() override;
|
||||
bool check_simple_select() const override { return FALSE; }
|
||||
void abort_result_set() override;
|
||||
void cleanup() override;
|
||||
select_result_interceptor *result_interceptor() override { return NULL; }
|
||||
};
|
||||
|
||||
|
||||
@ -5897,9 +5897,9 @@ public:
|
||||
|
||||
class select_send_analyze : public select_send
|
||||
{
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags) { return 0; }
|
||||
bool send_eof() { return 0; }
|
||||
void abort_result_set() {}
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags) override { return 0; }
|
||||
bool send_eof() override { return 0; }
|
||||
void abort_result_set() override {}
|
||||
public:
|
||||
select_send_analyze(THD *thd_arg): select_send(thd_arg) {}
|
||||
};
|
||||
@ -5918,8 +5918,8 @@ public:
|
||||
select_result_interceptor(thd_arg), exchange(ex), file(-1),row_count(0L)
|
||||
{ path[0]=0; }
|
||||
~select_to_file();
|
||||
bool send_eof();
|
||||
void cleanup();
|
||||
bool send_eof() override;
|
||||
void cleanup() override;
|
||||
};
|
||||
|
||||
|
||||
@ -5959,16 +5959,16 @@ class select_export :public select_to_file {
|
||||
public:
|
||||
select_export(THD *thd_arg, sql_exchange *ex): select_to_file(thd_arg, ex) {}
|
||||
~select_export();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
};
|
||||
|
||||
|
||||
class select_dump :public select_to_file {
|
||||
public:
|
||||
select_dump(THD *thd_arg, sql_exchange *ex): select_to_file(thd_arg, ex) {}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
};
|
||||
|
||||
|
||||
@ -5986,17 +5986,17 @@ class select_insert :public select_result_interceptor {
|
||||
List<Item> *update_values, enum_duplicates duplic,
|
||||
bool ignore, select_result *sel_ret_list);
|
||||
~select_insert();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
virtual int prepare2(JOIN *join);
|
||||
virtual int send_data(List<Item> &items);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
int prepare2(JOIN *join) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
virtual bool store_values(List<Item> &values);
|
||||
virtual bool can_rollback_data() { return 0; }
|
||||
bool prepare_eof();
|
||||
bool send_ok_packet();
|
||||
bool send_eof();
|
||||
virtual void abort_result_set();
|
||||
bool send_eof() override;
|
||||
void abort_result_set() override;
|
||||
/* not implemented: select_insert is never re-used in prepared statements */
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
};
|
||||
|
||||
|
||||
@ -6028,18 +6028,18 @@ public:
|
||||
m_plock(NULL), exit_done(0),
|
||||
saved_tmp_table_share(0)
|
||||
{}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
|
||||
int binlog_show_create_table(TABLE **tables, uint count);
|
||||
bool store_values(List<Item> &values);
|
||||
bool send_eof();
|
||||
virtual void abort_result_set();
|
||||
virtual bool can_rollback_data() { return 1; }
|
||||
bool store_values(List<Item> &values) override;
|
||||
bool send_eof() override;
|
||||
void abort_result_set() override;
|
||||
bool can_rollback_data() override { return 1; }
|
||||
|
||||
// Needed for access from local class MY_HOOKS in prepare(), since thd is proteted.
|
||||
const THD *get_thd(void) { return thd; }
|
||||
const HA_CREATE_INFO *get_create_info() { return create_info; };
|
||||
int prepare2(JOIN *join) { return 0; }
|
||||
int prepare2(JOIN *join) override { return 0; }
|
||||
|
||||
private:
|
||||
TABLE *create_table_from_items(THD *thd,
|
||||
@ -6198,7 +6198,7 @@ public:
|
||||
init();
|
||||
tmp_table_param.init();
|
||||
}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
/**
|
||||
Do prepare() and prepare2() if they have been postponed until
|
||||
column type information is computed (used by select_union_direct).
|
||||
@ -6209,13 +6209,13 @@ public:
|
||||
*/
|
||||
virtual bool postponed_prepare(List<Item> &types)
|
||||
{ return false; }
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
int write_record();
|
||||
int update_counter(Field *counter, longlong value);
|
||||
int delete_record();
|
||||
bool send_eof();
|
||||
bool send_eof() override;
|
||||
virtual bool flush();
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
virtual bool create_result_table(THD *thd, List<Item> *column_types,
|
||||
bool is_distinct, ulonglong options,
|
||||
const LEX_CSTRING *alias,
|
||||
@ -6342,11 +6342,11 @@ public:
|
||||
curr_op_type(UNSPECIFIED)
|
||||
{
|
||||
};
|
||||
int send_data(List<Item> &items);
|
||||
void change_select();
|
||||
int send_data(List<Item> &items) override;
|
||||
void change_select() override;
|
||||
int unfold_record(ha_rows cnt);
|
||||
bool send_eof();
|
||||
bool force_enable_index_if_needed()
|
||||
bool send_eof() override;
|
||||
bool force_enable_index_if_needed() override
|
||||
{
|
||||
is_index_enabled= true;
|
||||
return true;
|
||||
@ -6403,15 +6403,15 @@ class select_union_recursive :public select_unit
|
||||
row_counter(0)
|
||||
{ incr_table_param.init(); };
|
||||
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
bool create_result_table(THD *thd, List<Item> *column_types,
|
||||
bool is_distinct, ulonglong options,
|
||||
const LEX_CSTRING *alias,
|
||||
bool bit_fields_as_long,
|
||||
bool create_table,
|
||||
bool keep_row_order,
|
||||
uint hidden);
|
||||
void cleanup();
|
||||
uint hidden) override;
|
||||
void cleanup() override;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -6458,30 +6458,30 @@ public:
|
||||
done_send_result_set_metadata(false), done_initialize_tables(false),
|
||||
limit_found_rows(0)
|
||||
{ send_records= 0; }
|
||||
bool change_result(select_result *new_result);
|
||||
uint field_count(List<Item> &fields) const
|
||||
bool change_result(select_result *new_result) override;
|
||||
uint field_count(List<Item> &fields) const override
|
||||
{
|
||||
// Only called for top-level select_results, usually select_send
|
||||
DBUG_ASSERT(false); /* purecov: inspected */
|
||||
return 0; /* purecov: inspected */
|
||||
}
|
||||
bool postponed_prepare(List<Item> &types);
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags);
|
||||
int send_data(List<Item> &items);
|
||||
bool initialize_tables (JOIN *join);
|
||||
bool send_eof();
|
||||
bool flush() { return false; }
|
||||
bool check_simple_select() const
|
||||
bool postponed_prepare(List<Item> &types) override;
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool initialize_tables (JOIN *join) override;
|
||||
bool send_eof() override;
|
||||
bool flush() override { return false; }
|
||||
bool check_simple_select() const override
|
||||
{
|
||||
/* Only called for top-level select_results, usually select_send */
|
||||
DBUG_ASSERT(false); /* purecov: inspected */
|
||||
return false; /* purecov: inspected */
|
||||
}
|
||||
void abort_result_set()
|
||||
void abort_result_set() override
|
||||
{
|
||||
result->abort_result_set(); /* purecov: inspected */
|
||||
}
|
||||
void cleanup()
|
||||
void cleanup() override
|
||||
{
|
||||
send_records= 0;
|
||||
}
|
||||
@ -6499,7 +6499,11 @@ public:
|
||||
// EXPLAIN should never output to a select_union_direct
|
||||
DBUG_ASSERT(false); /* purecov: inspected */
|
||||
}
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
void begin_dataset() override
|
||||
#else
|
||||
void begin_dataset()
|
||||
#endif
|
||||
{
|
||||
// Only called for sp_cursor::Select_fetch_into_spvars
|
||||
DBUG_ASSERT(false); /* purecov: inspected */
|
||||
@ -6515,8 +6519,8 @@ protected:
|
||||
public:
|
||||
select_subselect(THD *thd_arg, Item_subselect *item_arg):
|
||||
select_result_interceptor(thd_arg), item(item_arg) {}
|
||||
int send_data(List<Item> &items)=0;
|
||||
bool send_eof() { return 0; };
|
||||
int send_data(List<Item> &items) override=0;
|
||||
bool send_eof() override { return 0; };
|
||||
};
|
||||
|
||||
/* Single value subselect interface class */
|
||||
@ -6526,7 +6530,7 @@ public:
|
||||
select_singlerow_subselect(THD *thd_arg, Item_subselect *item_arg):
|
||||
select_subselect(thd_arg, item_arg)
|
||||
{}
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
};
|
||||
|
||||
|
||||
@ -6577,10 +6581,10 @@ public:
|
||||
bool bit_fields_as_long,
|
||||
bool create_table,
|
||||
bool keep_row_order,
|
||||
uint hidden);
|
||||
uint hidden) override;
|
||||
bool init_result_table(ulonglong select_options);
|
||||
int send_data(List<Item> &items);
|
||||
void cleanup();
|
||||
int send_data(List<Item> &items) override;
|
||||
void cleanup() override;
|
||||
ha_rows get_null_count_of_col(uint idx)
|
||||
{
|
||||
DBUG_ASSERT(idx < table->s->fields);
|
||||
@ -6613,8 +6617,8 @@ public:
|
||||
bool mx, bool all):
|
||||
select_subselect(thd_arg, item_arg), cache(0), fmax(mx), is_all(all)
|
||||
{}
|
||||
void cleanup();
|
||||
int send_data(List<Item> &items);
|
||||
void cleanup() override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool cmp_real();
|
||||
bool cmp_int();
|
||||
bool cmp_decimal();
|
||||
@ -6629,7 +6633,7 @@ class select_exists_subselect :public select_subselect
|
||||
public:
|
||||
select_exists_subselect(THD *thd_arg, Item_subselect *item_arg):
|
||||
select_subselect(thd_arg, item_arg) {}
|
||||
int send_data(List<Item> &items);
|
||||
int send_data(List<Item> &items) override;
|
||||
};
|
||||
|
||||
|
||||
@ -6886,15 +6890,15 @@ public:
|
||||
public:
|
||||
multi_delete(THD *thd_arg, TABLE_LIST *dt, uint num_of_tables);
|
||||
~multi_delete();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
bool initialize_tables (JOIN *join);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool initialize_tables (JOIN *join) override;
|
||||
int do_deletes();
|
||||
int do_table_deletes(TABLE *table, SORT_INFO *sort_info, bool ignore);
|
||||
bool send_eof();
|
||||
bool send_eof() override;
|
||||
inline ha_rows num_deleted() const { return deleted; }
|
||||
virtual void abort_result_set();
|
||||
void prepare_to_read_rows();
|
||||
void abort_result_set() override;
|
||||
void prepare_to_read_rows() override;
|
||||
};
|
||||
|
||||
|
||||
@ -6941,17 +6945,17 @@ public:
|
||||
enum_duplicates handle_duplicates, bool ignore);
|
||||
~multi_update();
|
||||
bool init(THD *thd);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
bool initialize_tables (JOIN *join);
|
||||
int prepare2(JOIN *join);
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool initialize_tables (JOIN *join) override;
|
||||
int prepare2(JOIN *join) override;
|
||||
int do_updates();
|
||||
bool send_eof();
|
||||
bool send_eof() override;
|
||||
inline ha_rows num_found() const { return found; }
|
||||
inline ha_rows num_updated() const { return updated; }
|
||||
virtual void abort_result_set();
|
||||
void update_used_tables();
|
||||
void prepare_to_read_rows();
|
||||
void abort_result_set() override;
|
||||
void update_used_tables() override;
|
||||
void prepare_to_read_rows() override;
|
||||
};
|
||||
|
||||
class my_var_sp;
|
||||
@ -6983,8 +6987,8 @@ public:
|
||||
m_rcontext_handler(rcontext_handler),
|
||||
m_type_handler(type_handler), offset(o), sp(s) { }
|
||||
~my_var_sp() = default;
|
||||
bool set(THD *thd, Item *val);
|
||||
my_var_sp *get_my_var_sp() { return this; }
|
||||
bool set(THD *thd, Item *val) override;
|
||||
my_var_sp *get_my_var_sp() override { return this; }
|
||||
const Type_handler *type_handler() const { return m_type_handler; }
|
||||
sp_rcontext *get_rcontext(sp_rcontext *local_ctx) const;
|
||||
};
|
||||
@ -7004,7 +7008,7 @@ public:
|
||||
&type_handler_double/*Not really used*/, s),
|
||||
m_field_offset(field_idx)
|
||||
{ }
|
||||
bool set(THD *thd, Item *val);
|
||||
bool set(THD *thd, Item *val) override;
|
||||
};
|
||||
|
||||
class my_var_user: public my_var {
|
||||
@ -7012,7 +7016,7 @@ public:
|
||||
my_var_user(const LEX_CSTRING *j)
|
||||
: my_var(j, SESSION_VAR) { }
|
||||
~my_var_user() = default;
|
||||
bool set(THD *thd, Item *val);
|
||||
bool set(THD *thd, Item *val) override;
|
||||
};
|
||||
|
||||
class select_dumpvar :public select_result_interceptor {
|
||||
@ -7025,11 +7029,11 @@ public:
|
||||
:select_result_interceptor(thd_arg), row_count(0), m_var_sp_row(NULL)
|
||||
{ var_list.empty(); }
|
||||
~select_dumpvar() = default;
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int send_data(List<Item> &items);
|
||||
bool send_eof();
|
||||
virtual bool check_simple_select() const;
|
||||
void cleanup();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool send_eof() override;
|
||||
bool check_simple_select() const override;
|
||||
void cleanup() override;
|
||||
};
|
||||
|
||||
/* Bits in sql_command_flags */
|
||||
@ -7676,7 +7680,7 @@ public:
|
||||
ErrConvDQName(const Database_qualified_name *name)
|
||||
:m_name(name)
|
||||
{ }
|
||||
const char *ptr() const
|
||||
const char *ptr() const override
|
||||
{
|
||||
m_name->make_qname(err_buffer, sizeof(err_buffer), false);
|
||||
return err_buffer;
|
||||
@ -7696,10 +7700,10 @@ public:
|
||||
m_maybe_null(false)
|
||||
{ }
|
||||
|
||||
void set_maybe_null(bool maybe_null_arg) { m_maybe_null= maybe_null_arg; }
|
||||
void set_maybe_null(bool maybe_null_arg) override { m_maybe_null= maybe_null_arg; }
|
||||
bool get_maybe_null() const { return m_maybe_null; }
|
||||
|
||||
uint decimal_precision() const
|
||||
uint decimal_precision() const override
|
||||
{
|
||||
/*
|
||||
Type_holder is not used directly to create fields, so
|
||||
@ -7711,11 +7715,11 @@ public:
|
||||
DBUG_ASSERT(0);
|
||||
return 0;
|
||||
}
|
||||
void set_typelib(const TYPELIB *typelib)
|
||||
void set_typelib(const TYPELIB *typelib) override
|
||||
{
|
||||
m_typelib= typelib;
|
||||
}
|
||||
const TYPELIB *get_typelib() const
|
||||
const TYPELIB *get_typelib() const override
|
||||
{
|
||||
return m_typelib;
|
||||
}
|
||||
|
@ -220,9 +220,9 @@ public:
|
||||
:show_all_slaves_status(status_all)
|
||||
{}
|
||||
|
||||
enum_sql_command sql_command_code() const { return SQLCOM_SHOW_SLAVE_STAT; }
|
||||
enum_sql_command sql_command_code() const override { return SQLCOM_SHOW_SLAVE_STAT; }
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
bool is_show_all_slaves_stat() { return show_all_slaves_status; }
|
||||
};
|
||||
|
||||
@ -231,20 +231,20 @@ class Sql_cmd_create_table_like: public Sql_cmd,
|
||||
public Storage_engine_name
|
||||
{
|
||||
public:
|
||||
Storage_engine_name *option_storage_engine_name() { return this; }
|
||||
bool execute(THD *thd);
|
||||
Storage_engine_name *option_storage_engine_name() override { return this; }
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
class Sql_cmd_create_table: public Sql_cmd_create_table_like
|
||||
{
|
||||
public:
|
||||
enum_sql_command sql_command_code() const { return SQLCOM_CREATE_TABLE; }
|
||||
enum_sql_command sql_command_code() const override { return SQLCOM_CREATE_TABLE; }
|
||||
};
|
||||
|
||||
class Sql_cmd_create_sequence: public Sql_cmd_create_table_like
|
||||
{
|
||||
public:
|
||||
enum_sql_command sql_command_code() const { return SQLCOM_CREATE_SEQUENCE; }
|
||||
enum_sql_command sql_command_code() const override { return SQLCOM_CREATE_SEQUENCE; }
|
||||
};
|
||||
|
||||
|
||||
@ -268,9 +268,9 @@ public:
|
||||
@param thd the current thread.
|
||||
@return false on success.
|
||||
*/
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_CALL;
|
||||
}
|
||||
|
@ -49,15 +49,15 @@ public:
|
||||
Materialized_cursor(select_result *result, TABLE *table);
|
||||
|
||||
int send_result_set_metadata(THD *thd, List<Item> &send_result_set_metadata);
|
||||
virtual bool is_open() const { return table != 0; }
|
||||
virtual int open(JOIN *join __attribute__((unused)));
|
||||
virtual void fetch(ulong num_rows);
|
||||
virtual void close();
|
||||
bool export_structure(THD *thd, Row_definition_list *defs)
|
||||
bool is_open() const override { return table != 0; }
|
||||
int open(JOIN *join __attribute__((unused))) override;
|
||||
void fetch(ulong num_rows) override;
|
||||
void close() override;
|
||||
bool export_structure(THD *thd, Row_definition_list *defs) override
|
||||
{
|
||||
return table->export_structure(thd, defs);
|
||||
}
|
||||
virtual ~Materialized_cursor();
|
||||
~Materialized_cursor() override;
|
||||
|
||||
void on_table_fill_finished();
|
||||
};
|
||||
@ -79,9 +79,9 @@ public:
|
||||
Materialized_cursor *materialized_cursor;
|
||||
Select_materialize(THD *thd_arg, select_result *result_arg):
|
||||
select_unit(thd_arg), result(result_arg), materialized_cursor(0) {}
|
||||
virtual bool send_result_set_metadata(List<Item> &list, uint flags);
|
||||
bool send_eof() { return false; }
|
||||
bool view_structure_only() const
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags) override;
|
||||
bool send_eof() override { return false; }
|
||||
bool view_structure_only() const override
|
||||
{
|
||||
return result->view_structure_only();
|
||||
}
|
||||
|
@ -888,7 +888,7 @@ public:
|
||||
: ErrConv(), str(str_arg), len(strlen(str_arg)), cs(cs_arg) {}
|
||||
ErrConvString(const String *s)
|
||||
: ErrConv(), str(s->ptr()), len(s->length()), cs(s->charset()) {}
|
||||
const char *ptr() const
|
||||
const char *ptr() const override
|
||||
{
|
||||
return set_str(str, len, cs);
|
||||
}
|
||||
@ -899,7 +899,7 @@ class ErrConvInteger : public ErrConv, public Longlong_hybrid
|
||||
public:
|
||||
ErrConvInteger(const Longlong_hybrid &nr)
|
||||
: ErrConv(), Longlong_hybrid(nr) { }
|
||||
const char *ptr() const
|
||||
const char *ptr() const override
|
||||
{
|
||||
return set_longlong(static_cast<Longlong_hybrid>(*this));
|
||||
}
|
||||
@ -910,7 +910,7 @@ class ErrConvDouble: public ErrConv
|
||||
double num;
|
||||
public:
|
||||
ErrConvDouble(double num_arg) : ErrConv(), num(num_arg) {}
|
||||
const char *ptr() const
|
||||
const char *ptr() const override
|
||||
{
|
||||
return set_double(num);
|
||||
}
|
||||
@ -921,7 +921,7 @@ class ErrConvTime : public ErrConv
|
||||
const MYSQL_TIME *ltime;
|
||||
public:
|
||||
ErrConvTime(const MYSQL_TIME *ltime_arg) : ErrConv(), ltime(ltime_arg) {}
|
||||
const char *ptr() const
|
||||
const char *ptr() const override
|
||||
{
|
||||
return set_mysql_time(ltime);
|
||||
}
|
||||
@ -932,7 +932,7 @@ class ErrConvDecimal : public ErrConv
|
||||
const decimal_t *d;
|
||||
public:
|
||||
ErrConvDecimal(const decimal_t *d_arg) : ErrConv(), d(d_arg) {}
|
||||
const char *ptr() const
|
||||
const char *ptr() const override
|
||||
{
|
||||
return set_decimal(d);
|
||||
}
|
||||
|
@ -161,21 +161,21 @@ class Explain_table_access;
|
||||
class Explain_basic_join : public Explain_node
|
||||
{
|
||||
public:
|
||||
enum explain_node_type get_type() { return EXPLAIN_BASIC_JOIN; }
|
||||
enum explain_node_type get_type() override { return EXPLAIN_BASIC_JOIN; }
|
||||
|
||||
Explain_basic_join(MEM_ROOT *root) : Explain_node(root), join_tabs(NULL) {}
|
||||
~Explain_basic_join();
|
||||
|
||||
bool add_table(Explain_table_access *tab, Explain_query *query);
|
||||
|
||||
int get_select_id() { return select_id; }
|
||||
int get_select_id() override { return select_id; }
|
||||
|
||||
int select_id;
|
||||
|
||||
int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze);
|
||||
uint8 explain_flags, bool is_analyze) override;
|
||||
void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
bool is_analyze) override;
|
||||
|
||||
void print_explain_json_interns(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
@ -205,7 +205,7 @@ class Explain_aggr_node;
|
||||
class Explain_select : public Explain_basic_join
|
||||
{
|
||||
public:
|
||||
enum explain_node_type get_type() { return EXPLAIN_SELECT; }
|
||||
enum explain_node_type get_type() override { return EXPLAIN_SELECT; }
|
||||
|
||||
Explain_select(MEM_ROOT *root, bool is_analyze) :
|
||||
Explain_basic_join(root),
|
||||
@ -260,9 +260,9 @@ public:
|
||||
Explain_aggr_node* aggr_tree;
|
||||
|
||||
int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze);
|
||||
uint8 explain_flags, bool is_analyze) override;
|
||||
void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
bool is_analyze) override;
|
||||
|
||||
Table_access_tracker *get_using_temporary_read_tracker()
|
||||
{
|
||||
@ -299,7 +299,7 @@ class Explain_aggr_filesort : public Explain_aggr_node
|
||||
List<Item> sort_items;
|
||||
List<ORDER::enum_order> sort_directions;
|
||||
public:
|
||||
enum_explain_aggr_node_type get_type() { return AGGR_OP_FILESORT; }
|
||||
enum_explain_aggr_node_type get_type() override { return AGGR_OP_FILESORT; }
|
||||
Filesort_tracker tracker;
|
||||
|
||||
Explain_aggr_filesort(MEM_ROOT *mem_root, bool is_analyze,
|
||||
@ -311,20 +311,20 @@ public:
|
||||
class Explain_aggr_tmp_table : public Explain_aggr_node
|
||||
{
|
||||
public:
|
||||
enum_explain_aggr_node_type get_type() { return AGGR_OP_TEMP_TABLE; }
|
||||
enum_explain_aggr_node_type get_type() override { return AGGR_OP_TEMP_TABLE; }
|
||||
};
|
||||
|
||||
class Explain_aggr_remove_dups : public Explain_aggr_node
|
||||
{
|
||||
public:
|
||||
enum_explain_aggr_node_type get_type() { return AGGR_OP_REMOVE_DUPLICATES; }
|
||||
enum_explain_aggr_node_type get_type() override { return AGGR_OP_REMOVE_DUPLICATES; }
|
||||
};
|
||||
|
||||
class Explain_aggr_window_funcs : public Explain_aggr_node
|
||||
{
|
||||
List<Explain_aggr_filesort> sorts;
|
||||
public:
|
||||
enum_explain_aggr_node_type get_type() { return AGGR_OP_WINDOW_FUNCS; }
|
||||
enum_explain_aggr_node_type get_type() override { return AGGR_OP_WINDOW_FUNCS; }
|
||||
|
||||
void print_json_members(Json_writer *writer, bool is_analyze);
|
||||
friend class Window_funcs_computation;
|
||||
@ -351,10 +351,10 @@ public:
|
||||
fake_select_lex_explain(root, is_analyze)
|
||||
{}
|
||||
|
||||
enum explain_node_type get_type() { return EXPLAIN_UNION; }
|
||||
enum explain_node_type get_type() override { return EXPLAIN_UNION; }
|
||||
unit_common_op operation;
|
||||
|
||||
int get_select_id()
|
||||
int get_select_id() override
|
||||
{
|
||||
DBUG_ASSERT(union_members.elements() > 0);
|
||||
return union_members.at(0);
|
||||
@ -377,9 +377,9 @@ public:
|
||||
union_members.append(select_no);
|
||||
}
|
||||
int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze);
|
||||
uint8 explain_flags, bool is_analyze) override;
|
||||
void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
bool is_analyze) override;
|
||||
|
||||
const char *fake_select_type;
|
||||
bool using_filesort;
|
||||
@ -886,8 +886,8 @@ public:
|
||||
command_tracker(is_analyze)
|
||||
{}
|
||||
|
||||
virtual enum explain_node_type get_type() { return EXPLAIN_UPDATE; }
|
||||
virtual int get_select_id() { return 1; /* always root */ }
|
||||
enum explain_node_type get_type() override { return EXPLAIN_UPDATE; }
|
||||
int get_select_id() override { return 1; /* always root */ }
|
||||
|
||||
const char *select_type;
|
||||
|
||||
@ -943,10 +943,10 @@ public:
|
||||
/* TODO: This tracks time to read rows from the table */
|
||||
Exec_time_tracker table_tracker;
|
||||
|
||||
virtual int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze);
|
||||
virtual void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze) override;
|
||||
void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze) override;
|
||||
};
|
||||
|
||||
|
||||
@ -966,13 +966,13 @@ public:
|
||||
|
||||
StringBuffer<64> table_name;
|
||||
|
||||
enum explain_node_type get_type() { return EXPLAIN_INSERT; }
|
||||
int get_select_id() { return 1; /* always root */ }
|
||||
enum explain_node_type get_type() override { return EXPLAIN_INSERT; }
|
||||
int get_select_id() override { return 1; /* always root */ }
|
||||
|
||||
int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze);
|
||||
uint8 explain_flags, bool is_analyze) override;
|
||||
void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
bool is_analyze) override;
|
||||
};
|
||||
|
||||
|
||||
@ -993,13 +993,13 @@ public:
|
||||
*/
|
||||
bool deleting_all_rows;
|
||||
|
||||
virtual enum explain_node_type get_type() { return EXPLAIN_DELETE; }
|
||||
virtual int get_select_id() { return 1; /* always root */ }
|
||||
enum explain_node_type get_type() override { return EXPLAIN_DELETE; }
|
||||
int get_select_id() override { return 1; /* always root */ }
|
||||
|
||||
virtual int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze);
|
||||
virtual void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze);
|
||||
int print_explain(Explain_query *query, select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze) override;
|
||||
void print_explain_json(Explain_query *query, Json_writer *writer,
|
||||
bool is_analyze) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -113,19 +113,19 @@ class Expression_cache_tmptable :public Expression_cache
|
||||
public:
|
||||
Expression_cache_tmptable(THD *thd, List<Item> &dependants, Item *value);
|
||||
virtual ~Expression_cache_tmptable();
|
||||
virtual result check_value(Item **value);
|
||||
virtual my_bool put_value(Item *value);
|
||||
result check_value(Item **value) override;
|
||||
my_bool put_value(Item *value) override;
|
||||
|
||||
void print(String *str, enum_query_type query_type);
|
||||
bool is_inited() { return inited; };
|
||||
void init();
|
||||
void print(String *str, enum_query_type query_type) override;
|
||||
bool is_inited() override { return inited; };
|
||||
void init() override;
|
||||
|
||||
void set_tracker(Expression_cache_tracker *st)
|
||||
{
|
||||
tracker= st;
|
||||
update_tracker();
|
||||
}
|
||||
virtual void update_tracker()
|
||||
void update_tracker() override
|
||||
{
|
||||
if (tracker)
|
||||
{
|
||||
|
@ -39,12 +39,12 @@ public:
|
||||
: m_info(info)
|
||||
{}
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_GET_DIAGNOSTICS;
|
||||
}
|
||||
|
||||
virtual bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
private:
|
||||
/** The information to be obtained. */
|
||||
@ -223,7 +223,7 @@ public:
|
||||
{}
|
||||
|
||||
/** Obtain statement information in the context of a diagnostics area. */
|
||||
bool aggregate(THD *thd, const Diagnostics_area *da);
|
||||
bool aggregate(THD *thd, const Diagnostics_area *da) override;
|
||||
|
||||
private:
|
||||
/* List of statement information items. */
|
||||
@ -301,7 +301,7 @@ public:
|
||||
{}
|
||||
|
||||
/** Obtain condition information in the context of a diagnostics area. */
|
||||
bool aggregate(THD *thd, const Diagnostics_area *da);
|
||||
bool aggregate(THD *thd, const Diagnostics_area *da) override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -2298,7 +2298,7 @@ public:
|
||||
forced_insert_id(0), query(query_arg), time_zone(0),
|
||||
user(0), host(0), ip(0)
|
||||
{}
|
||||
~delayed_row()
|
||||
~delayed_row() override
|
||||
{
|
||||
my_free(query.str);
|
||||
my_free(record);
|
||||
@ -2381,7 +2381,7 @@ public:
|
||||
TL_WRITE_LOW_PRIORITY : TL_WRITE;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
~Delayed_insert()
|
||||
~Delayed_insert() override
|
||||
{
|
||||
/* The following is not really needed, but just for safety */
|
||||
delayed_row *row;
|
||||
@ -3057,13 +3057,13 @@ void kill_delayed_threads(void)
|
||||
class Delayed_prelocking_strategy : public Prelocking_strategy
|
||||
{
|
||||
public:
|
||||
virtual bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
bool handle_routine(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
Sroutine_hash_entry *rt, sp_head *sp,
|
||||
bool *need_prelocking);
|
||||
virtual bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
virtual bool handle_view(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking);
|
||||
bool *need_prelocking) override;
|
||||
bool handle_table(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
bool handle_view(THD *thd, Query_tables_list *prelocking_ctx,
|
||||
TABLE_LIST *table_list, bool *need_prelocking) override;
|
||||
};
|
||||
|
||||
|
||||
@ -4729,7 +4729,7 @@ select_create::prepare(List<Item> &_values, SELECT_LEX_UNIT *u)
|
||||
}
|
||||
|
||||
private:
|
||||
virtual int do_postlock(TABLE **tables, uint count)
|
||||
int do_postlock(TABLE **tables, uint count) override
|
||||
{
|
||||
int error;
|
||||
THD *thd= const_cast<THD*>(ptr->get_thd());
|
||||
|
@ -940,7 +940,7 @@ protected:
|
||||
}
|
||||
|
||||
/* Get the total length of all prefixes of a record in hashed join buffer */
|
||||
uint get_prefix_length()
|
||||
uint get_prefix_length() override
|
||||
{
|
||||
return base_prefix_length + get_size_of_rec_offset();
|
||||
}
|
||||
@ -949,13 +949,13 @@ protected:
|
||||
Get maximum size of the additional space per record used for
|
||||
the hash table with record keys
|
||||
*/
|
||||
uint get_max_key_addon_space_per_record();
|
||||
uint get_max_key_addon_space_per_record() override;
|
||||
|
||||
/*
|
||||
Calculate how much space in the buffer would not be occupied by
|
||||
records, key entries and additional memory for the MMR buffer.
|
||||
*/
|
||||
size_t rem_space()
|
||||
size_t rem_space() override
|
||||
{
|
||||
return MY_MAX(last_key_entry-end_pos-aux_buff_size,0);
|
||||
}
|
||||
@ -964,25 +964,25 @@ protected:
|
||||
Calculate how much space is taken by allocation of the key
|
||||
entry for a record in the join buffer
|
||||
*/
|
||||
uint extra_key_length() { return key_entry_length; }
|
||||
uint extra_key_length() override { return key_entry_length; }
|
||||
|
||||
/*
|
||||
Skip record from a hashed join buffer if its match flag
|
||||
is set to MATCH_FOUND
|
||||
*/
|
||||
bool skip_if_matched();
|
||||
bool skip_if_matched() override;
|
||||
|
||||
/*
|
||||
Skip record from a hashed join buffer if its match flag setting
|
||||
commands to do so
|
||||
*/
|
||||
bool skip_if_not_needed_match();
|
||||
bool skip_if_not_needed_match() override;
|
||||
|
||||
/* Search for a key in the hash table of the join buffer */
|
||||
bool key_search(uchar *key, uint key_len, uchar **key_ref_ptr);
|
||||
|
||||
/* Reallocate the join buffer of a hashed join cache */
|
||||
int realloc_buffer();
|
||||
int realloc_buffer() override;
|
||||
|
||||
/*
|
||||
This constructor creates an unlinked hashed join cache. The cache is to be
|
||||
@ -1003,16 +1003,16 @@ protected:
|
||||
public:
|
||||
|
||||
/* Initialize a hashed join cache */
|
||||
int init(bool for_explain);
|
||||
int init(bool for_explain) override;
|
||||
|
||||
/* Reset the buffer of a hashed join cache for reading/writing */
|
||||
void reset(bool for_writing);
|
||||
void reset(bool for_writing) override;
|
||||
|
||||
/* Add a record into the buffer of a hashed join cache */
|
||||
bool put_record();
|
||||
bool put_record() override;
|
||||
|
||||
/* Read the next record from the buffer of a hashed join cache */
|
||||
bool get_record();
|
||||
bool get_record() override;
|
||||
|
||||
/*
|
||||
Shall check whether all records in a key chain have
|
||||
@ -1112,13 +1112,13 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
bool prepare_look_for_matches(bool skip_last);
|
||||
bool prepare_look_for_matches(bool skip_last) override;
|
||||
|
||||
uchar *get_next_candidate_for_match();
|
||||
uchar *get_next_candidate_for_match() override;
|
||||
|
||||
bool skip_next_candidate_for_match(uchar *rec_ptr);
|
||||
bool skip_next_candidate_for_match(uchar *rec_ptr) override;
|
||||
|
||||
void read_next_candidate_for_match(uchar *rec_ptr);
|
||||
void read_next_candidate_for_match(uchar *rec_ptr) override;
|
||||
|
||||
public:
|
||||
|
||||
@ -1139,11 +1139,11 @@ public:
|
||||
:JOIN_CACHE(j, tab, prev) {}
|
||||
|
||||
/* Initialize the BNL cache */
|
||||
int init(bool for_explain);
|
||||
int init(bool for_explain) override;
|
||||
|
||||
enum Join_algorithm get_join_alg() { return BNL_JOIN_ALG; }
|
||||
enum Join_algorithm get_join_alg() override { return BNL_JOIN_ALG; }
|
||||
|
||||
bool is_key_access() { return FALSE; }
|
||||
bool is_key_access() override { return FALSE; }
|
||||
|
||||
};
|
||||
|
||||
@ -1179,13 +1179,13 @@ protected:
|
||||
*/
|
||||
uchar *get_matching_chain_by_join_key();
|
||||
|
||||
bool prepare_look_for_matches(bool skip_last);
|
||||
bool prepare_look_for_matches(bool skip_last) override;
|
||||
|
||||
uchar *get_next_candidate_for_match();
|
||||
uchar *get_next_candidate_for_match() override;
|
||||
|
||||
bool skip_next_candidate_for_match(uchar *rec_ptr);
|
||||
bool skip_next_candidate_for_match(uchar *rec_ptr) override;
|
||||
|
||||
void read_next_candidate_for_match(uchar *rec_ptr);
|
||||
void read_next_candidate_for_match(uchar *rec_ptr) override;
|
||||
|
||||
public:
|
||||
|
||||
@ -1206,11 +1206,11 @@ public:
|
||||
: JOIN_CACHE_HASHED(j, tab, prev) {}
|
||||
|
||||
/* Initialize the BNLH cache */
|
||||
int init(bool for_explain);
|
||||
int init(bool for_explain) override;
|
||||
|
||||
enum Join_algorithm get_join_alg() { return BNLH_JOIN_ALG; }
|
||||
enum Join_algorithm get_join_alg() override { return BNLH_JOIN_ALG; }
|
||||
|
||||
bool is_key_access() { return TRUE; }
|
||||
bool is_key_access() override { return TRUE; }
|
||||
|
||||
};
|
||||
|
||||
@ -1253,11 +1253,11 @@ public:
|
||||
JOIN_TAB_SCAN_MRR(JOIN *j, JOIN_TAB *tab, uint flags, RANGE_SEQ_IF rs_funcs)
|
||||
:JOIN_TAB_SCAN(j, tab), range_seq_funcs(rs_funcs), mrr_mode(flags) {}
|
||||
|
||||
uint aux_buffer_incr(size_t recno);
|
||||
uint aux_buffer_incr(size_t recno) override;
|
||||
|
||||
int open();
|
||||
int open() override;
|
||||
|
||||
int next();
|
||||
int next() override;
|
||||
|
||||
friend class JOIN_CACHE_BKA; /* it needs to add an mrr_mode flag after JOIN_CACHE::init() call */
|
||||
};
|
||||
@ -1293,26 +1293,26 @@ protected:
|
||||
Get the number of ranges in the cache buffer passed to the MRR
|
||||
interface. For each record its own range is passed.
|
||||
*/
|
||||
uint get_number_of_ranges_for_mrr() { return (uint)records; }
|
||||
uint get_number_of_ranges_for_mrr() override { return (uint)records; }
|
||||
|
||||
/*
|
||||
Setup the MRR buffer as the space between the last record put
|
||||
into the join buffer and the very end of the join buffer
|
||||
*/
|
||||
int setup_aux_buffer(HANDLER_BUFFER &aux_buff)
|
||||
int setup_aux_buffer(HANDLER_BUFFER &aux_buff) override
|
||||
{
|
||||
aux_buff.buffer= end_pos;
|
||||
aux_buff.buffer_end= buff+buff_size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool prepare_look_for_matches(bool skip_last);
|
||||
bool prepare_look_for_matches(bool skip_last) override;
|
||||
|
||||
uchar *get_next_candidate_for_match();
|
||||
uchar *get_next_candidate_for_match() override;
|
||||
|
||||
bool skip_next_candidate_for_match(uchar *rec_ptr);
|
||||
bool skip_next_candidate_for_match(uchar *rec_ptr) override;
|
||||
|
||||
void read_next_candidate_for_match(uchar *rec_ptr);
|
||||
void read_next_candidate_for_match(uchar *rec_ptr) override;
|
||||
|
||||
public:
|
||||
|
||||
@ -1338,14 +1338,14 @@ public:
|
||||
:JOIN_CACHE(bka->join, bka->join_tab, bka->prev_cache),
|
||||
mrr_mode(bka->mrr_mode) {}
|
||||
|
||||
uchar **get_curr_association_ptr() { return &curr_association; }
|
||||
uchar **get_curr_association_ptr() override { return &curr_association; }
|
||||
|
||||
/* Initialize the BKA cache */
|
||||
int init(bool for_explain);
|
||||
int init(bool for_explain) override;
|
||||
|
||||
enum Join_algorithm get_join_alg() { return BKA_JOIN_ALG; }
|
||||
enum Join_algorithm get_join_alg() override { return BKA_JOIN_ALG; }
|
||||
|
||||
bool is_key_access() { return TRUE; }
|
||||
bool is_key_access() override { return TRUE; }
|
||||
|
||||
/* Get the key built over the next record from the join buffer */
|
||||
uint get_next_key(uchar **key);
|
||||
@ -1353,7 +1353,7 @@ public:
|
||||
/* Check index condition of the joined table for a record from BKA cache */
|
||||
bool skip_index_tuple(range_id_t range_info);
|
||||
|
||||
bool save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
bool save_explain_data(EXPLAIN_BKA_TYPE *explain) override;
|
||||
};
|
||||
|
||||
|
||||
@ -1389,21 +1389,21 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
uint get_number_of_ranges_for_mrr() { return key_entries; }
|
||||
uint get_number_of_ranges_for_mrr() override { return key_entries; }
|
||||
|
||||
/*
|
||||
Initialize the MRR buffer allocating some space within the join buffer.
|
||||
The entire space between the last record put into the join buffer and the
|
||||
last key entry added to the hash table is used for the MRR buffer.
|
||||
*/
|
||||
int setup_aux_buffer(HANDLER_BUFFER &aux_buff)
|
||||
int setup_aux_buffer(HANDLER_BUFFER &aux_buff) override
|
||||
{
|
||||
aux_buff.buffer= end_pos;
|
||||
aux_buff.buffer_end= last_key_entry;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool prepare_look_for_matches(bool skip_last);
|
||||
bool prepare_look_for_matches(bool skip_last) override;
|
||||
|
||||
/*
|
||||
The implementations of the methods
|
||||
@ -1438,15 +1438,15 @@ public:
|
||||
:JOIN_CACHE_BNLH(bkah->join, bkah->join_tab, bkah->prev_cache),
|
||||
mrr_mode(bkah->mrr_mode) {}
|
||||
|
||||
uchar **get_curr_association_ptr() { return &curr_matching_chain; }
|
||||
uchar **get_curr_association_ptr() override { return &curr_matching_chain; }
|
||||
|
||||
/* Initialize the BKAH cache */
|
||||
int init(bool for_explain);
|
||||
int init(bool for_explain) override;
|
||||
|
||||
enum Join_algorithm get_join_alg() { return BKAH_JOIN_ALG; }
|
||||
enum Join_algorithm get_join_alg() override { return BKAH_JOIN_ALG; }
|
||||
|
||||
/* Check index condition of the joined table for a record from BKAH cache */
|
||||
bool skip_index_tuple(range_id_t range_info);
|
||||
|
||||
bool save_explain_data(EXPLAIN_BKA_TYPE *explain);
|
||||
bool save_explain_data(EXPLAIN_BKA_TYPE *explain) override;
|
||||
};
|
||||
|
@ -162,22 +162,22 @@ class Forward_lifo_buffer: public Lifo_buffer
|
||||
{
|
||||
uchar *pos;
|
||||
public:
|
||||
enum_direction type() { return FORWARD; }
|
||||
size_t used_size()
|
||||
enum_direction type() override { return FORWARD; }
|
||||
size_t used_size() override
|
||||
{
|
||||
return (size_t)(pos - start);
|
||||
}
|
||||
void reset()
|
||||
void reset() override
|
||||
{
|
||||
pos= start;
|
||||
}
|
||||
uchar *end_of_space() { return pos; }
|
||||
bool have_space_for(size_t bytes)
|
||||
uchar *end_of_space() override { return pos; }
|
||||
bool have_space_for(size_t bytes) override
|
||||
{
|
||||
return (pos + bytes < end);
|
||||
}
|
||||
|
||||
void write()
|
||||
void write() override
|
||||
{
|
||||
write_bytes(write_ptr1, size1);
|
||||
if (size2)
|
||||
@ -199,8 +199,8 @@ public:
|
||||
*position= (*position) - bytes;
|
||||
return *position;
|
||||
}
|
||||
bool read() { return read(&pos, &read_ptr1, &read_ptr2); }
|
||||
bool read(uchar **position, uchar **ptr1, uchar **ptr2)
|
||||
bool read() override { return read(&pos, &read_ptr1, &read_ptr2); }
|
||||
bool read(uchar **position, uchar **ptr1, uchar **ptr2) override
|
||||
{
|
||||
if (!have_data(*position, size1 + size2))
|
||||
return TRUE;
|
||||
@ -209,7 +209,7 @@ public:
|
||||
*ptr1= read_bytes(position, size1);
|
||||
return FALSE;
|
||||
}
|
||||
void remove_unused_space(uchar **unused_start, uchar **unused_end)
|
||||
void remove_unused_space(uchar **unused_start, uchar **unused_end) override
|
||||
{
|
||||
DBUG_ASSERT(0); /* Don't need this yet */
|
||||
}
|
||||
@ -228,9 +228,9 @@ public:
|
||||
end= unused_end;
|
||||
}
|
||||
/* Return pointer to start of the memory area that is occupied by the data */
|
||||
uchar *used_area() { return start; }
|
||||
uchar *used_area() override { return start; }
|
||||
friend class Lifo_buffer_iterator;
|
||||
uchar *get_pos() { return pos; }
|
||||
uchar *get_pos() override { return pos; }
|
||||
};
|
||||
|
||||
|
||||
@ -254,22 +254,22 @@ class Backward_lifo_buffer: public Lifo_buffer
|
||||
{
|
||||
uchar *pos;
|
||||
public:
|
||||
enum_direction type() { return BACKWARD; }
|
||||
enum_direction type() override { return BACKWARD; }
|
||||
|
||||
size_t used_size()
|
||||
size_t used_size() override
|
||||
{
|
||||
return (size_t)(end - pos);
|
||||
}
|
||||
void reset()
|
||||
void reset() override
|
||||
{
|
||||
pos= end;
|
||||
}
|
||||
uchar *end_of_space() { return end; }
|
||||
bool have_space_for(size_t bytes)
|
||||
uchar *end_of_space() override { return end; }
|
||||
bool have_space_for(size_t bytes) override
|
||||
{
|
||||
return (pos - bytes >= start);
|
||||
}
|
||||
void write()
|
||||
void write() override
|
||||
{
|
||||
if (write_ptr2)
|
||||
write_bytes(write_ptr2, size2);
|
||||
@ -281,11 +281,11 @@ public:
|
||||
pos -= bytes;
|
||||
memcpy(pos, data, bytes);
|
||||
}
|
||||
bool read()
|
||||
bool read() override
|
||||
{
|
||||
return read(&pos, &read_ptr1, &read_ptr2);
|
||||
}
|
||||
bool read(uchar **position, uchar **ptr1, uchar **ptr2)
|
||||
bool read(uchar **position, uchar **ptr1, uchar **ptr2) override
|
||||
{
|
||||
if (!have_data(*position, size1 + size2))
|
||||
return TRUE;
|
||||
@ -310,7 +310,7 @@ public:
|
||||
@param unused_start OUT Start of the unused space
|
||||
@param unused_end OUT End of the unused space
|
||||
*/
|
||||
void remove_unused_space(uchar **unused_start, uchar **unused_end)
|
||||
void remove_unused_space(uchar **unused_start, uchar **unused_end) override
|
||||
{
|
||||
*unused_start= start;
|
||||
*unused_end= pos;
|
||||
@ -321,9 +321,9 @@ public:
|
||||
DBUG_ASSERT(0); /* Not used for backward buffers */
|
||||
}
|
||||
/* Return pointer to start of the memory area that is occupied by the data */
|
||||
uchar *used_area() { return pos; }
|
||||
uchar *used_area() override { return pos; }
|
||||
friend class Lifo_buffer_iterator;
|
||||
uchar *get_pos() { return pos; }
|
||||
uchar *get_pos() override { return pos; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -1528,14 +1528,14 @@ class Silence_all_errors : public Internal_error_handler
|
||||
int error;
|
||||
public:
|
||||
Silence_all_errors():error(0) {}
|
||||
virtual ~Silence_all_errors() {}
|
||||
~Silence_all_errors() override {}
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sql_state,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
error= sql_errno;
|
||||
*cond_hdl= NULL;
|
||||
|
@ -129,7 +129,7 @@ public:
|
||||
|
||||
~Sql_cmd_alter_table_exchange_partition() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
private:
|
||||
bool exchange_partition(THD *thd, TABLE_LIST *, Alter_info *);
|
||||
@ -151,10 +151,10 @@ public:
|
||||
|
||||
~Sql_cmd_alter_table_analyze_partition() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
/* Override SQLCOM_ANALYZE, since it is an ALTER command */
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_TABLE;
|
||||
}
|
||||
@ -176,10 +176,10 @@ public:
|
||||
|
||||
~Sql_cmd_alter_table_check_partition() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
/* Override SQLCOM_CHECK, since it is an ALTER command */
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_TABLE;
|
||||
}
|
||||
@ -201,10 +201,10 @@ public:
|
||||
|
||||
~Sql_cmd_alter_table_optimize_partition() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
/* Override SQLCOM_OPTIMIZE, since it is an ALTER command */
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_TABLE;
|
||||
}
|
||||
@ -226,10 +226,10 @@ public:
|
||||
|
||||
~Sql_cmd_alter_table_repair_partition() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
/* Override SQLCOM_REPAIR, since it is an ALTER command */
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_TABLE;
|
||||
}
|
||||
@ -249,10 +249,10 @@ public:
|
||||
|
||||
virtual ~Sql_cmd_alter_table_truncate_partition() = default;
|
||||
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
/* Override SQLCOM_TRUNCATE, since it is an ALTER command */
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_ALTER_TABLE;
|
||||
}
|
||||
|
@ -314,22 +314,22 @@ public:
|
||||
sys_var_pluginvar(sys_var_chain *chain, const char *name_arg,
|
||||
st_plugin_int *p, st_mysql_sys_var *plugin_var_arg,
|
||||
const char *substitute);
|
||||
sys_var_pluginvar *cast_pluginvar() { return this; }
|
||||
sys_var_pluginvar *cast_pluginvar() override { return this; }
|
||||
uchar* real_value_ptr(THD *thd, enum_var_type type) const;
|
||||
TYPELIB* plugin_var_typelib(void) const;
|
||||
const uchar* do_value_ptr(THD *thd, enum_var_type type, const LEX_CSTRING *base) const;
|
||||
const uchar* session_value_ptr(THD *thd, const LEX_CSTRING *base) const
|
||||
const uchar* session_value_ptr(THD *thd, const LEX_CSTRING *base) const override
|
||||
{ return do_value_ptr(thd, OPT_SESSION, base); }
|
||||
const uchar* global_value_ptr(THD *thd, const LEX_CSTRING *base) const
|
||||
const uchar* global_value_ptr(THD *thd, const LEX_CSTRING *base) const override
|
||||
{ return do_value_ptr(thd, OPT_GLOBAL, base); }
|
||||
const uchar *default_value_ptr(THD *thd) const
|
||||
const uchar *default_value_ptr(THD *thd) const override
|
||||
{ return do_value_ptr(thd, OPT_DEFAULT, 0); }
|
||||
bool do_check(THD *thd, set_var *var);
|
||||
virtual void session_save_default(THD *thd, set_var *var) {}
|
||||
virtual void global_save_default(THD *thd, set_var *var) {}
|
||||
bool session_update(THD *thd, set_var *var);
|
||||
bool global_update(THD *thd, set_var *var);
|
||||
bool session_is_default(THD *thd);
|
||||
bool do_check(THD *thd, set_var *var) override;
|
||||
void session_save_default(THD *thd, set_var *var) override {}
|
||||
void global_save_default(THD *thd, set_var *var) override {}
|
||||
bool session_update(THD *thd, set_var *var) override;
|
||||
bool global_update(THD *thd, set_var *var) override;
|
||||
bool session_is_default(THD *thd) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -140,11 +140,11 @@ class Select_fetch_protocol_binary: public select_send
|
||||
Protocol_binary protocol;
|
||||
public:
|
||||
Select_fetch_protocol_binary(THD *thd);
|
||||
virtual bool send_result_set_metadata(List<Item> &list, uint flags);
|
||||
virtual int send_data(List<Item> &items);
|
||||
virtual bool send_eof();
|
||||
bool send_result_set_metadata(List<Item> &list, uint flags) override;
|
||||
int send_data(List<Item> &items) override;
|
||||
bool send_eof() override;
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
void begin_dataset()
|
||||
void begin_dataset() override
|
||||
{
|
||||
protocol.begin_dataset();
|
||||
}
|
||||
@ -204,10 +204,10 @@ public:
|
||||
String *expanded_query);
|
||||
public:
|
||||
Prepared_statement(THD *thd_arg);
|
||||
virtual ~Prepared_statement();
|
||||
~Prepared_statement() override;
|
||||
void setup_set_params();
|
||||
virtual Query_arena::Type type() const;
|
||||
virtual void cleanup_stmt();
|
||||
Query_arena::Type type() const override;
|
||||
void cleanup_stmt() override;
|
||||
bool set_name(const LEX_CSTRING *name);
|
||||
inline void close_cursor() { delete cursor; cursor= 0; }
|
||||
inline bool is_in_use() { return flags & (uint) IS_IN_USE; }
|
||||
@ -252,7 +252,7 @@ class Execute_sql_statement: public Server_runnable
|
||||
{
|
||||
public:
|
||||
Execute_sql_statement(LEX_STRING sql_text);
|
||||
virtual bool execute_server_code(THD *thd);
|
||||
bool execute_server_code(THD *thd) override;
|
||||
private:
|
||||
LEX_STRING m_sql_text;
|
||||
};
|
||||
@ -5535,29 +5535,33 @@ public:
|
||||
thd->set_binlog_bit();
|
||||
}
|
||||
protected:
|
||||
bool net_store_data(const uchar *from, size_t length);
|
||||
bool net_store_data(const uchar *from, size_t length) override;
|
||||
bool net_store_data_cs(const uchar *from, size_t length,
|
||||
CHARSET_INFO *fromcs, CHARSET_INFO *tocs);
|
||||
bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count);
|
||||
CHARSET_INFO *fromcs, CHARSET_INFO *tocs) override;
|
||||
bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count) override;
|
||||
bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *,
|
||||
bool, bool);
|
||||
bool net_send_error_packet(THD *, uint, const char *, const char *);
|
||||
bool, bool) override;
|
||||
bool net_send_error_packet(THD *, uint, const char *, const char *) override;
|
||||
bool begin_dataset();
|
||||
bool begin_dataset(THD *thd, uint numfields);
|
||||
|
||||
bool write();
|
||||
bool flush();
|
||||
bool write() override;
|
||||
bool flush() override;
|
||||
|
||||
bool store_field_metadata(const THD *thd, const Send_field &field,
|
||||
CHARSET_INFO *charset_for_protocol,
|
||||
uint pos);
|
||||
bool send_result_set_metadata(List<Item> *list, uint flags);
|
||||
bool send_result_set_metadata(List<Item> *list, uint flags) override;
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
void remove_last_row() override;
|
||||
#else
|
||||
void remove_last_row();
|
||||
bool store_null();
|
||||
void prepare_for_resend();
|
||||
#endif
|
||||
bool store_null() override;
|
||||
void prepare_for_resend() override;
|
||||
bool send_list_fields(List<Field> *list, const TABLE_LIST *table_list);
|
||||
|
||||
enum enum_protocol_type type() { return PROTOCOL_LOCAL; };
|
||||
enum enum_protocol_type type() override { return PROTOCOL_LOCAL; };
|
||||
};
|
||||
|
||||
static
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
:Schema(name)
|
||||
{ }
|
||||
const Type_handler *map_data_type(THD *thd, const Type_handler *src)
|
||||
const
|
||||
const override
|
||||
{
|
||||
if (src == &type_handler_newdate)
|
||||
return thd->type_handler_for_datetime();
|
||||
@ -34,7 +34,7 @@ public:
|
||||
}
|
||||
|
||||
Create_func *find_native_function_builder(THD *thd, const LEX_CSTRING &name)
|
||||
const
|
||||
const override
|
||||
{
|
||||
return native_functions_hash_oracle.find(thd, name);
|
||||
}
|
||||
@ -42,10 +42,10 @@ public:
|
||||
Item *make_item_func_replace(THD *thd,
|
||||
Item *subj,
|
||||
Item *find,
|
||||
Item *replace) const;
|
||||
Item *replace) const override;
|
||||
Item *make_item_func_substr(THD *thd,
|
||||
const Lex_substring_spec_st &spec) const;
|
||||
Item *make_item_func_trim(THD *thd, const Lex_trim_st &spec) const;
|
||||
const Lex_substring_spec_st &spec) const override;
|
||||
Item *make_item_func_trim(THD *thd, const Lex_trim_st &spec) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
:Schema(name)
|
||||
{ }
|
||||
const Type_handler *map_data_type(THD *thd, const Type_handler *src)
|
||||
const
|
||||
const override
|
||||
{
|
||||
if (src == &type_handler_timestamp ||
|
||||
src == &type_handler_timestamp2)
|
||||
|
@ -770,13 +770,13 @@ class Duplicate_weedout_picker : public Semi_join_strategy_picker
|
||||
|
||||
bool is_used;
|
||||
public:
|
||||
void set_empty()
|
||||
void set_empty() override
|
||||
{
|
||||
dupsweedout_tables= 0;
|
||||
first_dupsweedout_table= MAX_TABLES;
|
||||
is_used= FALSE;
|
||||
}
|
||||
void set_from_prev(POSITION *prev);
|
||||
void set_from_prev(POSITION *prev) override;
|
||||
|
||||
bool check_qep(JOIN *join,
|
||||
uint idx,
|
||||
@ -786,9 +786,9 @@ public:
|
||||
double *read_time,
|
||||
table_map *handled_fanout,
|
||||
sj_strategy_enum *stratey,
|
||||
POSITION *loose_scan_pos);
|
||||
POSITION *loose_scan_pos) override;
|
||||
|
||||
void mark_used() { is_used= TRUE; }
|
||||
void mark_used() override { is_used= TRUE; }
|
||||
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
|
||||
};
|
||||
|
||||
@ -816,13 +816,13 @@ class Firstmatch_picker : public Semi_join_strategy_picker
|
||||
bool in_firstmatch_prefix() { return (first_firstmatch_table != MAX_TABLES); }
|
||||
void invalidate_firstmatch_prefix() { first_firstmatch_table= MAX_TABLES; }
|
||||
public:
|
||||
void set_empty()
|
||||
void set_empty() override
|
||||
{
|
||||
invalidate_firstmatch_prefix();
|
||||
is_used= FALSE;
|
||||
}
|
||||
|
||||
void set_from_prev(POSITION *prev);
|
||||
void set_from_prev(POSITION *prev) override;
|
||||
bool check_qep(JOIN *join,
|
||||
uint idx,
|
||||
table_map remaining_tables,
|
||||
@ -831,9 +831,9 @@ public:
|
||||
double *read_time,
|
||||
table_map *handled_fanout,
|
||||
sj_strategy_enum *strategy,
|
||||
POSITION *loose_scan_pos);
|
||||
POSITION *loose_scan_pos) override;
|
||||
|
||||
void mark_used() { is_used= TRUE; }
|
||||
void mark_used() override { is_used= TRUE; }
|
||||
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
|
||||
};
|
||||
|
||||
@ -859,13 +859,13 @@ public:
|
||||
uint loosescan_parts; /* Number of keyparts to be kept distinct */
|
||||
|
||||
bool is_used;
|
||||
void set_empty()
|
||||
void set_empty() override
|
||||
{
|
||||
first_loosescan_table= MAX_TABLES;
|
||||
is_used= FALSE;
|
||||
}
|
||||
|
||||
void set_from_prev(POSITION *prev);
|
||||
void set_from_prev(POSITION *prev) override;
|
||||
bool check_qep(JOIN *join,
|
||||
uint idx,
|
||||
table_map remaining_tables,
|
||||
@ -874,8 +874,8 @@ public:
|
||||
double *read_time,
|
||||
table_map *handled_fanout,
|
||||
sj_strategy_enum *strategy,
|
||||
POSITION *loose_scan_pos);
|
||||
void mark_used() { is_used= TRUE; }
|
||||
POSITION *loose_scan_pos) override;
|
||||
void mark_used() override { is_used= TRUE; }
|
||||
|
||||
friend class Loose_scan_opt;
|
||||
friend void best_access_path(JOIN *join,
|
||||
@ -907,13 +907,13 @@ class Sj_materialization_picker : public Semi_join_strategy_picker
|
||||
table_map sjm_scan_need_tables;
|
||||
|
||||
public:
|
||||
void set_empty()
|
||||
void set_empty() override
|
||||
{
|
||||
sjm_scan_need_tables= 0;
|
||||
sjm_scan_last_inner= 0;
|
||||
is_used= FALSE;
|
||||
}
|
||||
void set_from_prev(POSITION *prev);
|
||||
void set_from_prev(POSITION *prev) override;
|
||||
bool check_qep(JOIN *join,
|
||||
uint idx,
|
||||
table_map remaining_tables,
|
||||
@ -922,8 +922,8 @@ public:
|
||||
double *read_time,
|
||||
table_map *handled_fanout,
|
||||
sj_strategy_enum *strategy,
|
||||
POSITION *loose_scan_pos);
|
||||
void mark_used() { is_used= TRUE; }
|
||||
POSITION *loose_scan_pos) override;
|
||||
void mark_used() override { is_used= TRUE; }
|
||||
|
||||
friend void fix_semijoin_strategies_for_picked_join_order(JOIN *join);
|
||||
};
|
||||
@ -2012,8 +2012,8 @@ class store_key_field: public store_key
|
||||
}
|
||||
}
|
||||
|
||||
enum Type type() const { return FIELD_STORE_KEY; }
|
||||
const char *name() const { return field_name; }
|
||||
enum Type type() const override { return FIELD_STORE_KEY; }
|
||||
const char *name() const override { return field_name; }
|
||||
|
||||
void change_source_field(Item_field *fld_item)
|
||||
{
|
||||
@ -2022,7 +2022,7 @@ class store_key_field: public store_key
|
||||
}
|
||||
|
||||
protected:
|
||||
enum store_key_result copy_inner()
|
||||
enum store_key_result copy_inner() override
|
||||
{
|
||||
TABLE *table= copy_field.to_field->table;
|
||||
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table,
|
||||
@ -2065,11 +2065,11 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
enum Type type() const { return ITEM_STORE_KEY; }
|
||||
const char *name() const { return "func"; }
|
||||
enum Type type() const override { return ITEM_STORE_KEY; }
|
||||
const char *name() const override { return "func"; }
|
||||
|
||||
protected:
|
||||
enum store_key_result copy_inner()
|
||||
enum store_key_result copy_inner() override
|
||||
{
|
||||
TABLE *table= to_field->table;
|
||||
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table,
|
||||
@ -2118,12 +2118,12 @@ public:
|
||||
:store_key_item(arg, new_item, FALSE), inited(0)
|
||||
{}
|
||||
|
||||
enum Type type() const { return CONST_ITEM_STORE_KEY; }
|
||||
const char *name() const { return "const"; }
|
||||
bool store_key_is_const() { return true; }
|
||||
enum Type type() const override { return CONST_ITEM_STORE_KEY; }
|
||||
const char *name() const override { return "const"; }
|
||||
bool store_key_is_const() override { return true; }
|
||||
|
||||
protected:
|
||||
enum store_key_result copy_inner()
|
||||
enum store_key_result copy_inner() override
|
||||
{
|
||||
int res;
|
||||
if (!inited)
|
||||
|
@ -1061,7 +1061,7 @@ public:
|
||||
|
||||
bool handle_condition(THD *thd, uint sql_errno, const char * /* sqlstate */,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char *message, Sql_condition ** /* cond_hdl */)
|
||||
const char *message, Sql_condition ** /* cond_hdl */) override
|
||||
{
|
||||
/*
|
||||
The handler does not handle the errors raised by itself.
|
||||
@ -5101,7 +5101,7 @@ class Warnings_only_error_handler : public Internal_error_handler
|
||||
public:
|
||||
bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg, Sql_condition ** cond_hdl)
|
||||
const char* msg, Sql_condition ** cond_hdl) override
|
||||
{
|
||||
if (sql_errno == ER_TRG_NO_DEFINER || sql_errno == ER_TRG_NO_CREATION_CTX
|
||||
|| sql_errno == ER_PARSE_ERROR)
|
||||
@ -10304,12 +10304,12 @@ class IS_internal_schema_access : public ACL_internal_schema_access
|
||||
public:
|
||||
IS_internal_schema_access() = default;
|
||||
|
||||
~IS_internal_schema_access() = default;
|
||||
~IS_internal_schema_access() override = default;
|
||||
|
||||
ACL_internal_access_result check(privilege_t want_access,
|
||||
privilege_t *save_priv) const;
|
||||
privilege_t *save_priv) const override;
|
||||
|
||||
const ACL_internal_table_access *lookup(const char *name) const;
|
||||
const ACL_internal_table_access *lookup(const char *name) const override;
|
||||
};
|
||||
|
||||
ACL_internal_access_result
|
||||
|
@ -174,7 +174,7 @@ public:
|
||||
String query_str;
|
||||
|
||||
/* Overloaded virtual function */
|
||||
void call_in_target_thread();
|
||||
void call_in_target_thread() override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -85,12 +85,12 @@ public:
|
||||
|
||||
virtual ~Sql_cmd_signal() = default;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_SIGNAL;
|
||||
}
|
||||
|
||||
virtual bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -111,12 +111,12 @@ public:
|
||||
|
||||
virtual ~Sql_cmd_resignal() = default;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_RESIGNAL;
|
||||
}
|
||||
|
||||
virtual bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -746,7 +746,7 @@ private:
|
||||
table_name_field= stat_table->field[TABLE_STAT_TABLE_NAME];
|
||||
}
|
||||
|
||||
void change_full_table_name(const LEX_CSTRING *db, const LEX_CSTRING *tab)
|
||||
void change_full_table_name(const LEX_CSTRING *db, const LEX_CSTRING *tab) override
|
||||
{
|
||||
db_name_field->store(db->str, db->length, system_charset_info);
|
||||
table_name_field->store(tab->str, tab->length, system_charset_info);
|
||||
@ -816,7 +816,7 @@ public:
|
||||
the field write_stat.cardinality' from the TABLE structure for 'table'.
|
||||
*/
|
||||
|
||||
void store_stat_fields()
|
||||
void store_stat_fields() override
|
||||
{
|
||||
Field *stat_field= stat_table->field[TABLE_STAT_CARDINALITY];
|
||||
if (table->collected_stats->cardinality_is_null)
|
||||
@ -843,7 +843,7 @@ public:
|
||||
for 'table' accordingly.
|
||||
*/
|
||||
|
||||
void get_stat_values()
|
||||
void get_stat_values() override
|
||||
{
|
||||
Table_statistics *read_stats= table_share->stats_cb.table_stats;
|
||||
read_stats->cardinality_is_null= TRUE;
|
||||
@ -890,7 +890,7 @@ private:
|
||||
column_name_field= stat_table->field[COLUMN_STAT_COLUMN_NAME];
|
||||
}
|
||||
|
||||
void change_full_table_name(const LEX_CSTRING *db, const LEX_CSTRING *tab)
|
||||
void change_full_table_name(const LEX_CSTRING *db, const LEX_CSTRING *tab) override
|
||||
{
|
||||
db_name_field->store(db->str, db->length, system_charset_info);
|
||||
table_name_field->store(tab->str, tab->length, system_charset_info);
|
||||
@ -1019,7 +1019,7 @@ public:
|
||||
length of the column.
|
||||
*/
|
||||
|
||||
void store_stat_fields()
|
||||
void store_stat_fields() override
|
||||
{
|
||||
StringBuffer<MAX_FIELD_WIDTH> val;
|
||||
|
||||
@ -1097,7 +1097,7 @@ public:
|
||||
'table_field'.
|
||||
*/
|
||||
|
||||
void get_stat_values()
|
||||
void get_stat_values() override
|
||||
{
|
||||
table_field->read_stats->set_all_nulls();
|
||||
|
||||
@ -1233,7 +1233,7 @@ private:
|
||||
prefix_arity_field= stat_table->field[INDEX_STAT_PREFIX_ARITY];
|
||||
}
|
||||
|
||||
void change_full_table_name(const LEX_CSTRING *db, const LEX_CSTRING *tab)
|
||||
void change_full_table_name(const LEX_CSTRING *db, const LEX_CSTRING *tab) override
|
||||
{
|
||||
db_name_field->store(db->str, db->length, system_charset_info);
|
||||
table_name_field->store(tab->str, tab->length, system_charset_info);
|
||||
@ -1355,7 +1355,7 @@ public:
|
||||
equal to 0, the value of the column is set to NULL.
|
||||
*/
|
||||
|
||||
void store_stat_fields()
|
||||
void store_stat_fields() override
|
||||
{
|
||||
Field *stat_field= stat_table->field[INDEX_STAT_AVG_FREQUENCY];
|
||||
double avg_frequency=
|
||||
@ -1386,7 +1386,7 @@ public:
|
||||
set to the value of the column.
|
||||
*/
|
||||
|
||||
void get_stat_values()
|
||||
void get_stat_values() override
|
||||
{
|
||||
double avg_frequency= 0;
|
||||
if(find_stat())
|
||||
@ -1760,7 +1760,7 @@ public:
|
||||
tree_key_length, max_heap_table_size, 1);
|
||||
}
|
||||
|
||||
bool add()
|
||||
bool add() override
|
||||
{
|
||||
longlong val= table_field->val_int();
|
||||
return tree->unique_add(&val);
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
:Stored_program_creation_ctx(client_cs, connection_cl, db_cl)
|
||||
{ }
|
||||
|
||||
virtual Stored_program_creation_ctx *clone(MEM_ROOT *mem_root)
|
||||
Stored_program_creation_ctx *clone(MEM_ROOT *mem_root) override
|
||||
{
|
||||
return new (mem_root) Trigger_creation_ctx(m_client_cs,
|
||||
m_connection_cl,
|
||||
@ -70,7 +70,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Object_creation_ctx *create_backup_ctx(THD *thd) const
|
||||
Object_creation_ctx *create_backup_ctx(THD *thd) const override
|
||||
{
|
||||
return new Trigger_creation_ctx(thd);
|
||||
}
|
||||
@ -261,8 +261,8 @@ public:
|
||||
Handle_old_incorrect_sql_modes_hook(const char *file_path)
|
||||
:path(file_path)
|
||||
{};
|
||||
virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
|
||||
MEM_ROOT *mem_root, const char *end);
|
||||
bool process_unknown_string(const char *&unknown_key, uchar* base,
|
||||
MEM_ROOT *mem_root, const char *end) override;
|
||||
};
|
||||
|
||||
|
||||
@ -273,8 +273,8 @@ public:
|
||||
LEX_CSTRING *trigger_table_arg)
|
||||
:path(file_path), trigger_table_value(trigger_table_arg)
|
||||
{};
|
||||
virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
|
||||
MEM_ROOT *mem_root, const char *end);
|
||||
bool process_unknown_string(const char *&unknown_key, uchar* base,
|
||||
MEM_ROOT *mem_root, const char *end) override;
|
||||
private:
|
||||
const char *path;
|
||||
LEX_CSTRING *trigger_table_value;
|
||||
@ -301,12 +301,12 @@ public:
|
||||
|
||||
Deprecated_trigger_syntax_handler() : m_trigger_name(NULL) {}
|
||||
|
||||
virtual bool handle_condition(THD *thd,
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* message,
|
||||
Sql_condition ** cond_hdl)
|
||||
Sql_condition ** cond_hdl) override
|
||||
{
|
||||
if (sql_errno != EE_OUTOFMEMORY &&
|
||||
sql_errno != ER_OUT_OF_RESOURCES)
|
||||
|
@ -40,9 +40,9 @@ public:
|
||||
@param thd the current thread.
|
||||
@return false on success.
|
||||
*/
|
||||
bool execute(THD *thd);
|
||||
bool execute(THD *thd) override;
|
||||
|
||||
virtual enum_sql_command sql_command_code() const
|
||||
enum_sql_command sql_command_code() const override
|
||||
{
|
||||
return SQLCOM_TRUNCATE;
|
||||
}
|
||||
|
@ -3583,13 +3583,13 @@ public:
|
||||
class Vers_type_timestamp: public Vers_type_handler
|
||||
{
|
||||
public:
|
||||
virtual vers_kind_t kind() const
|
||||
vers_kind_t kind() const override
|
||||
{
|
||||
return VERS_TIMESTAMP;
|
||||
}
|
||||
bool check_sys_fields(const LEX_CSTRING &table_name,
|
||||
const Column_definition *row_start,
|
||||
const Column_definition *row_end) const;
|
||||
const Column_definition *row_end) const override;
|
||||
};
|
||||
extern Vers_type_timestamp vers_type_timestamp;
|
||||
|
||||
@ -3597,13 +3597,13 @@ extern Vers_type_timestamp vers_type_timestamp;
|
||||
class Vers_type_trx: public Vers_type_handler
|
||||
{
|
||||
public:
|
||||
virtual vers_kind_t kind() const
|
||||
vers_kind_t kind() const override
|
||||
{
|
||||
return VERS_TRX_ID;
|
||||
}
|
||||
bool check_sys_fields(const LEX_CSTRING &table_name,
|
||||
const Column_definition *row_start,
|
||||
const Column_definition *row_end) const;
|
||||
const Column_definition *row_end) const override;
|
||||
};
|
||||
extern MYSQL_PLUGIN_IMPORT Vers_type_trx vers_type_trx;
|
||||
|
||||
|
@ -1689,8 +1689,8 @@ class Multiupdate_prelocking_strategy : public DML_prelocking_strategy
|
||||
bool done;
|
||||
bool has_prelocking_list;
|
||||
public:
|
||||
void reset(THD *thd);
|
||||
bool handle_end(THD *thd);
|
||||
void reset(THD *thd) override;
|
||||
bool handle_end(THD *thd) override;
|
||||
};
|
||||
|
||||
void Multiupdate_prelocking_strategy::reset(THD *thd)
|
||||
|
@ -954,7 +954,7 @@ protected:
|
||||
class Table_read_cursor : public Rowid_seq_cursor
|
||||
{
|
||||
public:
|
||||
virtual ~Table_read_cursor() = default;
|
||||
~Table_read_cursor() override = default;
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
{
|
||||
@ -1022,7 +1022,7 @@ public:
|
||||
/*
|
||||
This returns -1 when end of partition was reached.
|
||||
*/
|
||||
int next()
|
||||
int next() override
|
||||
{
|
||||
int res;
|
||||
if (end_of_partition)
|
||||
@ -1312,12 +1312,12 @@ public:
|
||||
item_add->fix_fields(thd, &item_add);
|
||||
}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
// Save the value of FUNC(current_row)
|
||||
range_expr->fetch_value_from(item_add);
|
||||
@ -1326,19 +1326,19 @@ public:
|
||||
end_of_partition= false;
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
if (end_of_partition)
|
||||
return;
|
||||
range_expr->fetch_value_from(item_add);
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
if (end_of_partition)
|
||||
return;
|
||||
@ -1350,12 +1350,12 @@ public:
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
|
||||
bool is_outside_computation_bounds() const
|
||||
bool is_outside_computation_bounds() const override
|
||||
{
|
||||
if (end_of_partition)
|
||||
return true;
|
||||
@ -1452,12 +1452,12 @@ public:
|
||||
item_add->fix_fields(thd, &item_add);
|
||||
}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
// Save the value of FUNC(current_row)
|
||||
range_expr->fetch_value_from(item_add);
|
||||
@ -1467,20 +1467,20 @@ public:
|
||||
added_values= false;
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
cursor.move_to(rownum);
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
if (end_of_partition)
|
||||
return;
|
||||
range_expr->fetch_value_from(item_add);
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
if (end_of_partition)
|
||||
return;
|
||||
@ -1492,14 +1492,14 @@ public:
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
bool is_outside_computation_bounds() const
|
||||
bool is_outside_computation_bounds() const override
|
||||
{
|
||||
if (!added_values)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
if (end_of_partition)
|
||||
return cursor.get_rownum(); // Cursor does not pass over partition bound.
|
||||
@ -1561,13 +1561,13 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
peer_tracker.init();
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
// Save the value of the current_row
|
||||
peer_tracker.check_if_next_group();
|
||||
@ -1576,17 +1576,17 @@ public:
|
||||
add_value_to_items();
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
dont_move= !peer_tracker.check_if_next_group();
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
// Check if our cursor is pointing at a peer of the current row.
|
||||
// If not, move forward until that becomes true
|
||||
@ -1601,7 +1601,7 @@ public:
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1658,7 +1658,7 @@ public:
|
||||
move(false)
|
||||
{}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
bound_tracker.init();
|
||||
|
||||
@ -1666,23 +1666,23 @@ public:
|
||||
peer_tracker.init();
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
// Fetch the value from the first row
|
||||
peer_tracker.check_if_next_group();
|
||||
cursor.move_to(rownum);
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum) {}
|
||||
void next_partition(ha_rows rownum) override {}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
// Check if the new current_row is a peer of the row that our cursor is
|
||||
// pointing to.
|
||||
move= peer_tracker.check_if_next_group();
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
if (move)
|
||||
{
|
||||
@ -1710,7 +1710,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1732,9 +1732,9 @@ public:
|
||||
SQL_I_List<ORDER> *order_list)
|
||||
{}
|
||||
|
||||
void init(READ_RECORD *info) {}
|
||||
void init(READ_RECORD *info) override {}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
/*
|
||||
UNBOUNDED PRECEDING frame end just stays on the first row of the
|
||||
@ -1744,12 +1744,12 @@ public:
|
||||
curr_rownum= rownum;
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
/* Do nothing, UNBOUNDED PRECEDING frame end doesn't move. */
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return curr_rownum;
|
||||
}
|
||||
@ -1774,17 +1774,17 @@ public:
|
||||
SQL_I_List<ORDER> *order_list) :
|
||||
cursor(thd, partition_list) {}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
cursor.on_next_partition(rownum);
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
/* Activate the first row */
|
||||
cursor.fetch();
|
||||
@ -1797,12 +1797,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
/* Do nothing, UNBOUNDED FOLLOWING frame end doesn't move */
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1817,7 +1817,7 @@ public:
|
||||
SQL_I_List<ORDER> *partition_list, SQL_I_List<ORDER> *order_list) :
|
||||
Frame_unbounded_following(thd, partition_list, order_list) {}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
ha_rows num_rows_in_partition= 0;
|
||||
if (cursor.fetch())
|
||||
@ -1830,7 +1830,7 @@ public:
|
||||
set_win_funcs_row_count(num_rows_in_partition);
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1857,7 +1857,7 @@ public:
|
||||
{
|
||||
order_item= order_list->first->item[0];
|
||||
}
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
ha_rows num_rows_in_partition= 0;
|
||||
if (cursor.fetch())
|
||||
@ -1873,7 +1873,7 @@ public:
|
||||
set_win_funcs_row_count(num_rows_in_partition);
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1904,12 +1904,12 @@ public:
|
||||
is_top_bound(is_top_bound_arg), n_rows(n_rows_arg), n_rows_behind(0)
|
||||
{}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
/*
|
||||
Position our cursor to point at the first row in the new partition
|
||||
@ -1935,13 +1935,13 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
n_rows_behind++;
|
||||
move_cursor_if_possible();
|
||||
}
|
||||
|
||||
bool is_outside_computation_bounds() const
|
||||
bool is_outside_computation_bounds() const override
|
||||
{
|
||||
/* As a bottom boundary, rows have not yet been added. */
|
||||
if (!is_top_bound && n_rows - n_rows_behind)
|
||||
@ -1949,7 +1949,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -2007,26 +2007,26 @@ public:
|
||||
|
||||
Frame_rows_current_row_bottom() : curr_rownum(0) {}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
add_value_to_items();
|
||||
curr_rownum= rownum;
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum) {}
|
||||
void next_partition(ha_rows rownum) override {}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
/* Temp table's current row is current_row. Add it to the window func */
|
||||
add_value_to_items();
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
curr_rownum++;
|
||||
};
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return curr_rownum;
|
||||
}
|
||||
@ -2083,13 +2083,13 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
at_partition_end= false;
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
at_partition_end= false;
|
||||
|
||||
@ -2097,7 +2097,7 @@ public:
|
||||
}
|
||||
|
||||
/* Move our cursor to be n_rows ahead. */
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
if (is_top_bound)
|
||||
next_part_top(rownum);
|
||||
@ -2105,7 +2105,7 @@ public:
|
||||
next_part_bottom(rownum);
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
if (is_top_bound)
|
||||
next_row_top();
|
||||
@ -2113,7 +2113,7 @@ public:
|
||||
next_row_bottom();
|
||||
}
|
||||
|
||||
bool is_outside_computation_bounds() const
|
||||
bool is_outside_computation_bounds() const override
|
||||
{
|
||||
/*
|
||||
The top bound can go over the current partition. In this case,
|
||||
@ -2124,7 +2124,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -2210,12 +2210,12 @@ public:
|
||||
const Frame_cursor &bottom_bound) :
|
||||
top_bound(top_bound), bottom_bound(bottom_bound) {}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
/* TODO(cvicentiu) Sum functions get cleared on next partition anyway during
|
||||
the window function computation algorithm. Either perform this only in
|
||||
@ -2225,23 +2225,23 @@ public:
|
||||
clear_sum_functions();
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
compute_values_for_current_row();
|
||||
}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
clear_sum_functions();
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
curr_rownum++;
|
||||
compute_values_for_current_row();
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return curr_rownum;
|
||||
}
|
||||
@ -2301,36 +2301,36 @@ class Frame_positional_cursor : public Frame_cursor
|
||||
bottom_bound(&bottom_bound), offset(&offset),
|
||||
negative_offset(negative_offset) {}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
cursor.init(info);
|
||||
}
|
||||
|
||||
void pre_next_partition(ha_rows rownum)
|
||||
void pre_next_partition(ha_rows rownum) override
|
||||
{
|
||||
/* The offset is dependant on the current row values. We can only get
|
||||
* it here accurately. When fetching other rows, it changes. */
|
||||
save_offset_value();
|
||||
}
|
||||
|
||||
void next_partition(ha_rows rownum)
|
||||
void next_partition(ha_rows rownum) override
|
||||
{
|
||||
save_positional_value();
|
||||
}
|
||||
|
||||
void pre_next_row()
|
||||
void pre_next_row() override
|
||||
{
|
||||
/* The offset is dependant on the current row values. We can only get
|
||||
* it here accurately. When fetching other rows, it changes. */
|
||||
save_offset_value();
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
save_positional_value();
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return position_cursor.get_curr_rownum();
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ class Window_def : public Window_spec
|
||||
: Window_spec(win_ref, part_list, ord_list, win_frame),
|
||||
window_name(win_name) {}
|
||||
|
||||
const char *name() { return window_name->str; }
|
||||
const char *name() override { return window_name->str; }
|
||||
|
||||
};
|
||||
|
||||
|
410
sql/sys_vars.inl
410
sql/sys_vars.inl
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user