8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00

Fixed CORE-4740 - SIMILAR TO with quantifier {n,} in the pattern: 1) fails on 2.5 ("Invalid pattern"), 2) strange result in 3.0.

This commit is contained in:
asfernandes 2015-05-20 15:27:02 +00:00
parent 364995fb88
commit 003be8071e

View File

@ -1380,6 +1380,7 @@ bool SimilarToMatcher<CharType, StrConverter>::Evaluator::match()
if (*repeatCount < repeatNode->len2)
{
++*repeatCount;
scope->save = bufferPos;
scopeStack.push(repeatNode + 1);
continue;
}
@ -1389,6 +1390,8 @@ bool SimilarToMatcher<CharType, StrConverter>::Evaluator::match()
case ENCODE_OP_STATE(opRepeatEnd, msReturningFalse):
{
bufferPos = scope->save;
const Node* repeatNode = scope->i + node->ref;
SLONG* repeatCount = repeatStack.back;