Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.0, 2.2.0
-
None
Description
Repro steps:
1. Create partitioned table and add 10000 partitions
create table test_partition(id int) partitioned by (dt int); alter table test_partition add partition(dt=1); alter table test_partition add partition(dt=3); alter table test_partition add partition(dt=4); ... alter table test_partition add partition(dt=10000);
2. Drop 9000 partitions:
alter table test_partition drop partition(dt<9000);
Step 2 will fail with StackOverflowError:
Exception in thread "pool-7-thread-161" java.lang.StackOverflowError
at org.datanucleus.query.expression.ExpressionCompiler.isOperator(ExpressionCompiler.java:819)
at org.datanucleus.query.expression.ExpressionCompiler.compileOrAndExpression(ExpressionCompiler.java:190)
at org.datanucleus.query.expression.ExpressionCompiler.compileExpression(ExpressionCompiler.java:179)
at org.datanucleus.query.expression.ExpressionCompiler.compileOrAndExpression(ExpressionCompiler.java:192)
at org.datanucleus.query.expression.ExpressionCompiler.compileExpression(ExpressionCompiler.java:179)
at org.datanucleus.query.expression.ExpressionCompiler.compileOrAndExpression(ExpressionCompiler.java:192)
at org.datanucleus.query.expression.ExpressionCompiler.compileExpression(ExpressionCompiler.java:179)
Exception in thread "pool-7-thread-198" java.lang.StackOverflowError
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:83)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)