Fix [I]LIKE function

This commit is contained in:
Nikolay Degterinsky 2021-10-15 19:59:28 +03:00
parent c668696047
commit f861da2dd1

View File

@ -200,7 +200,7 @@ struct MatchImpl
}
/// We check that the entry does not pass through the boundaries of strings.
if (pos + strstr_pattern.size() < begin + offsets[i])
if (pos + required_substring.size() < begin + offsets[i])
{
/// And if it does not, if necessary, we check the regexp.
@ -344,7 +344,7 @@ struct MatchImpl
const UInt8 * next_pos = begin;
/// If required substring is larger than string size - it cannot be found.
if (strstr_pattern.size() <= n)
if (required_substring.size() <= n)
{
Searcher searcher(required_substring.data(), required_substring.size(), end - pos);
@ -360,7 +360,7 @@ struct MatchImpl
}
next_pos += n;
if (pos + strstr_pattern.size() <= next_pos)
if (pos + required_substring.size() <= next_pos)
{
/// And if it does not, if necessary, we check the regexp.