You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:32:34 UTC
[GitHub] [shardingsphere] sandynz opened a new issue, #20258: Execute 'select count(1) from sharding_db.t_order' on proxy 'sys' database throw NPE
sandynz opened a new issue, #20258:
URL: https://github.com/apache/shardingsphere/issues/20258
## Bug Report
### Which version of ShardingSphere did you use?
master branch, 0bcf67adffa0c617892cab0c318e0d79992145a5
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
proxy
### Expected behavior
No exception thrown
### Actual behavior
Error occur:
```
mysql> use sys
Database changed
mysql> select count(1) from sharding_db.t_order;
ERROR 1999 (42000): Unknown exception: null
```
Error log in proxy:
```
[ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.lang.NullPointerException: null
at org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.JDBCBackendStatement.setFetchSize(JDBCBackendStatement.java:81)
at org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.JDBCBackendStatement.createStorageResource(JDBCBackendStatement.java:52)
at org.apache.shardingsphere.proxy.backend.communication.jdbc.statement.JDBCBackendStatement.createStorageResource(JDBCBackendStatement.java:42)
at org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.builder.StatementExecutionUnitBuilder.createStatement(StatementExecutionUnitBuilder.java:44)
at org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.builder.StatementExecutionUnitBuilder.build(StatementExecutionUnitBuilder.java:39)
at org.apache.shardingsphere.infra.executor.sql.prepare.driver.jdbc.builder.StatementExecutionUnitBuilder.build(StatementExecutionUnitBuilder.java:34)
at org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine.createExecutionGroup(DriverExecutionPrepareEngine.java:94)
at org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine.group(DriverExecutionPrepareEngine.java:85)
at org.apache.shardingsphere.infra.executor.sql.prepare.AbstractExecutionPrepareEngine.prepare(AbstractExecutionPrepareEngine.java:62)
at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.useDriverToExecute(ProxySQLExecutor.java:187)
at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:153)
at org.apache.shardingsphere.proxy.backend.communication.ProxySQLExecutor.execute(ProxySQLExecutor.java:147)
at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:132)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:94)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:112)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:78)
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)
```
### Reason analyze (If you can)
Screenshot:
<img width="1396" alt="图片" src="https://user-images.githubusercontent.com/42492540/185292016-5a69b4b2-8568-4865-9249-5bb4802806c9.png">
JDBCBackendStatement could not get databaseType by current databaseName.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1, Prepare sharding_db and t_order
2, Execute SQL:
```
mysql> use mysql
mysql> select count(1) from sharding_db.t_order;
```
### Example codes for reproduce this issue (such as a github link).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] commented on issue #20258: Execute 'select count(1) from sharding_db.t_order' on proxy 'sys' database throw NPE
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20258:
URL: https://github.com/apache/shardingsphere/issues/20258#issuecomment-1272348832
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] closed issue #20258: Execute 'select count(1) from sharding_db.t_order' on proxy 'sys' database throw NPE
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #20258: Execute 'select count(1) from sharding_db.t_order' on proxy 'sys' database throw NPE
URL: https://github.com/apache/shardingsphere/issues/20258
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on issue #20258: Execute 'select count(1) from sharding_db.t_order' on proxy 'sys' database throw NPE
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #20258:
URL: https://github.com/apache/shardingsphere/issues/20258#issuecomment-1407558313
Similar to #16325, but not the same issue.
Hi @tuichenchuxin can you take a look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on issue #20258: Execute 'select count(1) from sharding_db.t_order' on proxy 'sys' database throw NPE
Posted by "tuichenchuxin (via GitHub)" <gi...@apache.org>.
tuichenchuxin commented on issue #20258:
URL: https://github.com/apache/shardingsphere/issues/20258#issuecomment-1409718513
sure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org