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:
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).
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:
Error log in proxy:
Reason analyze (If you can)
Screenshot:
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:
Example codes for reproduce this issue (such as a github link).