From f861da2dd10d894d12c2d2e6f2b6316b0813889f Mon Sep 17 00:00:00 2001 From: Nikolay Degterinsky Date: Fri, 15 Oct 2021 19:59:28 +0300 Subject: [PATCH] Fix [I]LIKE function --- src/Functions/MatchImpl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Functions/MatchImpl.h b/src/Functions/MatchImpl.h index d71a5a1ffe3..7dc0712023f 100644 --- a/src/Functions/MatchImpl.h +++ b/src/Functions/MatchImpl.h @@ -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.