diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-09-29 22:44:07 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-09-29 22:44:07 +0400 |
commit | ca38b93e354baa5bbcaea00543dc1a99940072e4 (patch) | |
tree | e63f26bf9fcdd6da150dca779f2e109c90611728 /sql/item_func.h | |
parent | dc41bc14e05dc7b8fa55e7f47e7930f3d28e27f8 (diff) | |
download | mariadb-git-ca38b93e354baa5bbcaea00543dc1a99940072e4.tar.gz |
MDEV-13965 Parameter data type control for Item_longlong_func
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index f7a80d85467..6d59cae616e 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -48,6 +48,8 @@ protected: uint start, uint end) const; bool check_argument_types_can_return_int(uint start, uint end) const; bool check_argument_types_can_return_real(uint start, uint end) const; + bool check_argument_types_can_return_str_ascii(uint start, uint end) const; + bool check_argument_types_can_return_date(uint start, uint end) const; public: table_map not_null_tables_cache; @@ -1742,6 +1744,8 @@ public: class Item_func_bit: public Item_longlong_func { + bool check_arguments() const + { return check_argument_types_can_return_int(0, arg_count); } public: Item_func_bit(THD *thd, Item *a, Item *b): Item_longlong_func(thd, a, b) {} Item_func_bit(THD *thd, Item *a): Item_longlong_func(thd, a) {} @@ -1828,6 +1832,8 @@ public: class Item_func_last_insert_id :public Item_longlong_func { + bool check_arguments() const + { return check_argument_types_can_return_int(0, arg_count); } public: Item_func_last_insert_id(THD *thd): Item_longlong_func(thd) {} Item_func_last_insert_id(THD *thd, Item *a): Item_longlong_func(thd, a) {} @@ -2199,6 +2205,14 @@ public: class Item_master_pos_wait :public Item_longlong_func { + bool check_arguments() const + { + return + args[0]->check_type_general_purpose_string(func_name()) || + args[1]->check_type_can_return_int(func_name()) || + (arg_count > 2 && args[2]->check_type_can_return_int(func_name())) || + (arg_count > 3 && args[3]->check_type_general_purpose_string(func_name())); + } String value; public: Item_master_pos_wait(THD *thd, Item *a, Item *b) |