diff options
| author | Alexander Barkov <bar@mariadb.org> | 2017-10-01 00:30:58 +0400 |
|---|---|---|
| committer | Alexander Barkov <bar@mariadb.org> | 2017-10-01 00:30:58 +0400 |
| commit | 6857cb57fe7090f131b272f31485b7a478a0b324 (patch) | |
| tree | 44cd80409ab7d173b7263c55d3f37ddc8b6914ab /sql/item_strfunc.h | |
| parent | aa582dedcbd22182e06355b94d1de4fc62f71910 (diff) | |
| download | mariadb-git-6857cb57fe7090f131b272f31485b7a478a0b324.tar.gz | |
MDEV-13967 Parameter data type control for Item_long_func
- Implementing stricter data type control for Item_long_func descendants
- Cleanup: renaming Type_handler::can_return_str_ascii() to can_return_text()
(a better name).
Diffstat (limited to 'sql/item_strfunc.h')
| -rw-r--r-- | sql/item_strfunc.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index d73bd0b76d7..1c35588f884 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -1451,6 +1451,8 @@ public: class Item_func_crc32 :public Item_long_func { + bool check_arguments() const + { return args[0]->check_type_can_return_str(func_name()); } String value; public: Item_func_crc32(THD *thd, Item *a): Item_long_func(thd, a) @@ -1462,11 +1464,12 @@ public: { return get_item_copy<Item_func_crc32>(thd, mem_root, this); } }; -class Item_func_uncompressed_length : public Item_long_func +class Item_func_uncompressed_length : public Item_long_func_length { String value; public: - Item_func_uncompressed_length(THD *thd, Item *a): Item_long_func(thd, a) {} + Item_func_uncompressed_length(THD *thd, Item *a) + :Item_long_func_length(thd, a) {} const char *func_name() const{return "uncompressed_length";} void fix_length_and_dec() { max_length=10; maybe_null= true; } longlong val_int(); |
