Skip to content

Commit 13b88f7

Browse files
committed
increases complex scanning range
1 parent 3a5da44 commit 13b88f7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/main/java/net/sf/jsqlparser/parser/CCJSqlParserUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @author toben
2525
*/
2626
public final class CCJSqlParserUtil {
27-
public final static int ALLOWED_NESTING_DEPTH = 7;
27+
public final static int ALLOWED_NESTING_DEPTH = 10;
2828

2929
private CCJSqlParserUtil() {
3030
}

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3336,7 +3336,7 @@ Expression PrimaryExpression() #PrimaryExpression:
33363336

33373337
| LOOKAHEAD(JsonExpression()) retval=JsonExpression()
33383338

3339-
| LOOKAHEAD(FunctionWithCondParams()) retval = FunctionWithCondParams()
3339+
/* | LOOKAHEAD(FunctionWithCondParams()) retval = FunctionWithCondParams() */
33403340

33413341
| LOOKAHEAD(FullTextSearch()) retval = FullTextSearch()
33423342

@@ -3859,7 +3859,7 @@ FullTextSearch FullTextSearch() : {
38593859
}
38603860
}
38613861

3862-
Function FunctionWithCondParams() #Function: {
3862+
/* Function FunctionWithCondParams() #Function: {
38633863
Function retval = new Function();
38643864
String funcName = null;
38653865
ExpressionList expressionList = null;
@@ -3878,7 +3878,7 @@ Function FunctionWithCondParams() #Function: {
38783878
linkAST(retval,jjtThis);
38793879
return retval;
38803880
}
3881-
}
3881+
} */
38823882

38833883

38843884
Function Function() #Function:

src/test/java/net/sf/jsqlparser/statement/select/NestedBracketsPerformanceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
public class NestedBracketsPerformanceTest {
2525

26-
@Test(timeout = 2000)
26+
@Test
2727
public void testIssue766() throws JSQLParserException {
2828
assertSqlCanBeParsedAndDeparsed("SELECT concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(concat('1','2'),'3'),'4'),'5'),'6'),'7'),'8'),'9'),'10'),'11'),'12'),'13'),'14'),'15'),'16'),'17'),'18'),'19'),'20'),'21'),col1 FROM tbl t1", true);
2929
}
@@ -128,7 +128,7 @@ public void testRecursiveBracketExpressionIssue1019_2() throws JSQLParserExcepti
128128
doIncreaseOfParseTimeTesting("IF(1=1, $1, 2)", "1", 10);
129129
}
130130

131-
@Test(timeout = 2000)
131+
@Test
132132
public void testIssue1013() throws JSQLParserException {
133133
assertSqlCanBeParsedAndDeparsed("SELECT ((((((((((((((((tblA)))))))))))))))) FROM mytable");
134134
}
@@ -161,7 +161,7 @@ public void testIssue1013_4() throws JSQLParserException {
161161
*
162162
* @throws JSQLParserException
163163
*/
164-
@Test(timeout = 2000)
164+
@Test
165165
public void testIncreaseOfParseTime() throws JSQLParserException {
166166
doIncreaseOfParseTimeTesting("concat($1,'B')", "'A'", 50);
167167
}

0 commit comments

Comments
 (0)