Skip to content

Commit 5e0038b

Browse files
committed
cleanup: remove Regexp_processor_pcre::m_subpatterns_needed
it's unused now.
1 parent 2372bfa commit 5e0038b

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

sql/item_cmpfunc.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5589,7 +5589,7 @@ Item_func_regex::fix_length_and_dec()
55895589
if (agg_arg_charsets_for_comparison(cmp_collation, args, 2))
55905590
return;
55915591

5592-
re.init(cmp_collation.collation, 0, 0);
5592+
re.init(cmp_collation.collation, 0);
55935593
re.fix_owner(this, args[0], args[1]);
55945594
}
55955595

@@ -5613,7 +5613,7 @@ Item_func_regexp_instr::fix_length_and_dec()
56135613
if (agg_arg_charsets_for_comparison(cmp_collation, args, 2))
56145614
return;
56155615

5616-
re.init(cmp_collation.collation, 0, 1);
5616+
re.init(cmp_collation.collation, 0);
56175617
re.fix_owner(this, args[0], args[1]);
56185618
}
56195619

sql/item_cmpfunc.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,6 @@ class Regexp_processor_pcre
19011901
String m_prev_pattern;
19021902
int m_pcre_exec_rc;
19031903
int m_SubStrVec[30];
1904-
uint m_subpatterns_needed;
19051904
void pcre_exec_warn(int rc) const;
19061905
int pcre_exec_with_warn(const pcre *code, const pcre_extra *extra,
19071906
const char *subject, int length, int startoffset,
@@ -1915,15 +1914,14 @@ class Regexp_processor_pcre
19151914
m_pcre(NULL), m_conversion_is_needed(true), m_is_const(0),
19161915
m_library_flags(0),
19171916
m_data_charset(&my_charset_utf8_general_ci),
1918-
m_library_charset(&my_charset_utf8_general_ci),
1919-
m_subpatterns_needed(0)
1917+
m_library_charset(&my_charset_utf8_general_ci)
19201918
{
19211919
m_pcre_extra.flags= PCRE_EXTRA_MATCH_LIMIT_RECURSION;
19221920
m_pcre_extra.match_limit_recursion= 100L;
19231921
}
19241922
int default_regex_flags();
19251923
void set_recursion_limit(THD *);
1926-
void init(CHARSET_INFO *data_charset, int extra_flags, uint nsubpatterns_arg)
1924+
void init(CHARSET_INFO *data_charset, int extra_flags)
19271925
{
19281926
m_library_flags= default_regex_flags() | extra_flags |
19291927
(data_charset != &my_charset_bin ?
@@ -1937,7 +1935,6 @@ class Regexp_processor_pcre
19371935

19381936
m_conversion_is_needed= (data_charset != &my_charset_bin) &&
19391937
!my_charset_same(data_charset, m_library_charset);
1940-
m_subpatterns_needed= nsubpatterns_arg;
19411938
}
19421939
void fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg);
19431940
bool compile(String *pattern, bool send_error);

sql/item_strfunc.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ void Item_func_regexp_replace::fix_length_and_dec()
12781278
if (agg_arg_charsets_for_string_result_with_comparison(collation, args, 3))
12791279
return;
12801280
max_length= MAX_BLOB_WIDTH;
1281-
re.init(collation.collation, 0, 10);
1281+
re.init(collation.collation, 0);
12821282
re.fix_owner(this, args[0], args[1]);
12831283
}
12841284

@@ -1413,7 +1413,7 @@ void Item_func_regexp_substr::fix_length_and_dec()
14131413
if (agg_arg_charsets_for_string_result_with_comparison(collation, args, 2))
14141414
return;
14151415
fix_char_length(args[0]->max_char_length());
1416-
re.init(collation.collation, 0, 10);
1416+
re.init(collation.collation, 0);
14171417
re.fix_owner(this, args[0], args[1]);
14181418
}
14191419

0 commit comments

Comments
 (0)