Commit 5e0038b3 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove Regexp_processor_pcre::m_subpatterns_needed

it's unused now.
parent 2372bfaa
......@@ -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]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment