[plsql] Parse Exception when using '||' operator in where clause
Fixes #1507
This commit is contained in:
@ -28,6 +28,8 @@ This is a {{ site.pmd.release_type }} release.
|
|||||||
* [#1513](https://github.com/pmd/pmd/issues/1513): \[java] LocalVariableCouldBeFinal: allow excluding the variable in a for-each loop
|
* [#1513](https://github.com/pmd/pmd/issues/1513): \[java] LocalVariableCouldBeFinal: allow excluding the variable in a for-each loop
|
||||||
* java-errorprone
|
* java-errorprone
|
||||||
* [#1035](https://github.com/pmd/pmd/issues/1035): \[java] ReturnFromFinallyBlock: False positive on lambda expression in finally block
|
* [#1035](https://github.com/pmd/pmd/issues/1035): \[java] ReturnFromFinallyBlock: False positive on lambda expression in finally block
|
||||||
|
* plsql
|
||||||
|
* [#1507](https://github.com/pmd/pmd/issues/1507): \[plsql] Parse Exception when using '||' operator in where clause
|
||||||
|
|
||||||
### API Changes
|
### API Changes
|
||||||
|
|
||||||
|
@ -1414,7 +1414,7 @@ ASTSqlExpression SqlExpression() :
|
|||||||
|
|
|
|
||||||
LOOKAHEAD(2) <ROWNUM>
|
LOOKAHEAD(2) <ROWNUM>
|
||||||
|
|
|
|
||||||
LOOKAHEAD(2) Literal()
|
LOOKAHEAD(2) AdditiveExpression() // this can be a literal or a simple expression, but no conditional
|
||||||
)
|
)
|
||||||
{ return jjtThis; }
|
{ return jjtThis; }
|
||||||
}
|
}
|
||||||
|
@ -54,4 +54,11 @@ public class WhereClauseTest extends AbstractPLSQLParserTst {
|
|||||||
StandardCharsets.UTF_8);
|
StandardCharsets.UTF_8);
|
||||||
ASTInput input = parsePLSQL(code);
|
ASTInput input = parsePLSQL(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testConcatenationOperator() throws Exception {
|
||||||
|
String code = IOUtils.toString(this.getClass().getResourceAsStream("WhereClauseConcatenation.pls"),
|
||||||
|
StandardCharsets.UTF_8);
|
||||||
|
ASTInput input = parsePLSQL(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
--
|
||||||
|
-- BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||||
|
--
|
||||||
|
-- See https://github.com/pmd/pmd/issues/1507
|
||||||
|
--
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
SELECT *
|
||||||
|
INTO x
|
||||||
|
FROM y
|
||||||
|
WHERE a = 'a' || 'b';
|
||||||
|
|
||||||
|
END;
|
||||||
|
/
|
Reference in New Issue
Block a user