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_cmpfunc.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_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 0756899f47c..0cb66cd1d33 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -930,6 +930,8 @@ public: class Item_func_strcmp :public Item_long_func { + bool check_arguments() const + { return check_argument_types_can_return_str(0, 2); } String value1, value2; DTCollation cmp_collation; public: @@ -2829,6 +2831,11 @@ public: */ class Item_func_regexp_instr :public Item_long_func { + bool check_arguments() const + { + return args[0]->check_type_can_return_str(func_name()) || + args[1]->check_type_can_return_text(func_name()); + } Regexp_processor_pcre re; DTCollation cmp_collation; public: |