Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] sql节点中正则表达式中的问号影响变量替换,导致查询出错 #738

Closed
chenyuan9028 opened this issue Aug 27, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@chenyuan9028
Copy link

版本:1.1.0
在sql节点中正则表达式有问号,有两个局部变量,在执行时出错
image
错误日志如下:
[ERROR] 2019-08-27 14:05:02.225 cn.escheduler.server.worker.log.TaskLogger:[313] - [taskAppId=TASK_93_13101_29425] Index: 3, Size: 3
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at cn.escheduler.common.task.sql.LoggableStatement.getQueryString(LoggableStatement.java:89)
at cn.escheduler.server.worker.task.sql.SqlTask.prepareStatementAndBind(SqlTask.java:344)
at cn.escheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:278)
at cn.escheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:160)
at cn.escheduler.server.worker.runner.TaskScheduleThread.call(TaskScheduleThread.java:212)
at cn.escheduler.server.worker.runner.TaskScheduleThread.call(TaskScheduleThread.java:62)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2019-08-27 14:05:02.225 cn.escheduler.server.worker.runner.TaskScheduleThread:[249] - task escheduler failure : Index: 3, Size: 3
java.lang.RuntimeException: Index: 3, Size: 3
at cn.escheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:327)
at cn.escheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:160)
at cn.escheduler.server.worker.runner.TaskScheduleThread.call(TaskScheduleThread.java:212)
at cn.escheduler.server.worker.runner.TaskScheduleThread.call(TaskScheduleThread.java:62)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 2019-08-27 14:05:02.225 cn.escheduler.server.worker.runner.TaskScheduleThread:[251] - task process exception, process id : 13101 , task : push_status
java.lang.RuntimeException: Index: 3, Size: 3
at cn.escheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:327)
at cn.escheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:160)
at cn.escheduler.server.worker.runner.TaskScheduleThread.call(TaskScheduleThread.java:212)
at cn.escheduler.server.worker.runner.TaskScheduleThread.call(TaskScheduleThread.java:62)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

@chenyuan9028 chenyuan9028 added the bug Something isn't working label Aug 27, 2019
@lgcareer
Copy link
Contributor

when print real sql will find ? in sql,this cause IndexOutOfBoundsException,will fix it in next version.

lgcareer added a commit to lgcareer/EasyScheduler that referenced this issue Sep 4, 2019
qiaozhanwei pushed a commit that referenced this issue Sep 4, 2019
* refactor code from SqlTask class to SqlTaskUtils class

* add paramIndexMap in SqlBinds

* add paramIndexMap

* refactor code from SqlTask class to SqlTaskUtils class

* fix bug #738 to print the actual SQL statement executed

* refactor code from SqlTask class to SqlTaskUtils class

* add SqlTaskUtilsTest
EricJoy2048 pushed a commit that referenced this issue Sep 9, 2019
…) (#770)

* refactor code from SqlTask class to SqlTaskUtils class

* add paramIndexMap in SqlBinds

* add paramIndexMap

* refactor code from SqlTask class to SqlTaskUtils class

* fix bug #738 to print the actual SQL statement executed

* refactor code from SqlTask class to SqlTaskUtils class

* add SqlTaskUtilsTest

* fix bug."Statistics" menu, there are not datas display on the page(#636)

* fix bug."Statistics" menu, there are not datas display on the page(#636)
EricJoy2048 pushed a commit that referenced this issue Sep 9, 2019
* refactor code from SqlTask class to SqlTaskUtils class

* add paramIndexMap in SqlBinds

* add paramIndexMap

* refactor code from SqlTask class to SqlTaskUtils class

* fix bug #738 to print the actual SQL statement executed

* refactor code from SqlTask class to SqlTaskUtils class

* add SqlTaskUtilsTest

* fix bug."Statistics" menu, there are not datas display on the page(#636)

* fix bug."Statistics" menu, there are not datas display on the page(#636)

* fix bug.Enterprise WeChat message failed to push(#621)

* fix bug.Enterprise WeChat message failed to push(#621)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants