diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-29 20:57:34 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-29 21:07:54 +0200 |
commit | 5e0038b376b79ee5a2f47da1e0d71caa7d8fa99c (patch) | |
tree | e64b3a0cbfbc3e26a48be0c78b124dadbfe590a1 | |
parent | 2372bfaa7b4b9a40e418cbfec480d30eb84eaf21 (diff) | |
download | mariadb-git-5e0038b376b79ee5a2f47da1e0d71caa7d8fa99c.tar.gz |
cleanup: remove Regexp_processor_pcre::m_subpatterns_needed
it's unused now.
-rw-r--r-- | sql/item_cmpfunc.cc | 4 | ||||
-rw-r--r-- | sql/item_cmpfunc.h | 7 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 369cdeda62d..fe79e5f083d 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5589,7 +5589,7 @@ Item_func_regex::fix_length_and_dec() if (agg_arg_charsets_for_comparison(cmp_collation, args, 2)) return; - re.init(cmp_collation.collation, 0, 0); + re.init(cmp_collation.collation, 0); re.fix_owner(this, args[0], args[1]); } @@ -5613,7 +5613,7 @@ Item_func_regexp_instr::fix_length_and_dec() if (agg_arg_charsets_for_comparison(cmp_collation, args, 2)) return; - re.init(cmp_collation.collation, 0, 1); + re.init(cmp_collation.collation, 0); re.fix_owner(this, args[0], args[1]); } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 964a174f330..56c5a4afe54 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1901,7 +1901,6 @@ class Regexp_processor_pcre String m_prev_pattern; int m_pcre_exec_rc; int m_SubStrVec[30]; - uint m_subpatterns_needed; void pcre_exec_warn(int rc) const; int pcre_exec_with_warn(const pcre *code, const pcre_extra *extra, const char *subject, int length, int startoffset, @@ -1915,15 +1914,14 @@ public: m_pcre(NULL), m_conversion_is_needed(true), m_is_const(0), m_library_flags(0), m_data_charset(&my_charset_utf8_general_ci), - m_library_charset(&my_charset_utf8_general_ci), - m_subpatterns_needed(0) + m_library_charset(&my_charset_utf8_general_ci) { m_pcre_extra.flags= PCRE_EXTRA_MATCH_LIMIT_RECURSION; m_pcre_extra.match_limit_recursion= 100L; } int default_regex_flags(); void set_recursion_limit(THD *); - void init(CHARSET_INFO *data_charset, int extra_flags, uint nsubpatterns_arg) + void init(CHARSET_INFO *data_charset, int extra_flags) { m_library_flags= default_regex_flags() | extra_flags | (data_charset != &my_charset_bin ? @@ -1937,7 +1935,6 @@ public: m_conversion_is_needed= (data_charset != &my_charset_bin) && !my_charset_same(data_charset, m_library_charset); - m_subpatterns_needed= nsubpatterns_arg; } void fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg); bool compile(String *pattern, bool send_error); diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 40c2ab8f231..c54128db964 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1278,7 +1278,7 @@ void Item_func_regexp_replace::fix_length_and_dec() if (agg_arg_charsets_for_string_result_with_comparison(collation, args, 3)) return; max_length= MAX_BLOB_WIDTH; - re.init(collation.collation, 0, 10); + re.init(collation.collation, 0); re.fix_owner(this, args[0], args[1]); } @@ -1413,7 +1413,7 @@ void Item_func_regexp_substr::fix_length_and_dec() if (agg_arg_charsets_for_string_result_with_comparison(collation, args, 2)) return; fix_char_length(args[0]->max_char_length()); - re.init(collation.collation, 0, 10); + re.init(collation.collation, 0); re.fix_owner(this, args[0], args[1]); } |