Skip to content
Permalink
Browse files

cleanup: remove Regexp_processor_pcre::m_subpatterns_needed

it's unused now.
  • Loading branch information...
vuvova committed May 29, 2017
1 parent 2372bfa commit 5e0038b376b79ee5a2f47da1e0d71caa7d8fa99c
Showing with 6 additions and 9 deletions.
  1. +2 −2 sql/item_cmpfunc.cc
  2. +2 −5 sql/item_cmpfunc.h
  3. +2 −2 sql/item_strfunc.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]);
}

@@ -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 @@ class Regexp_processor_pcre
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 @@ class Regexp_processor_pcre

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);
@@ -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]);
}

0 comments on commit 5e0038b

Please sign in to comment.
You can’t perform that action at this time.