-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
NPE on SELECT INFORMATION_SCHEMA.PARAMETERS #21562
Comments
By adding an intermediate configuration, this problem has been resolved config-mate.yaml schemaName: information_schema
dataSources:
ds:
url: jdbc:mysql://mysql:3306/information_schema?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
username: root
password: root
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 1
minPoolSize: 1 If I have a lot of data source, it will be very stupid,could you tell me is there a better solution |
it's worked, but why? Does filename "config-mate.yaml" is special? |
Explicitly specify how sharding-proxy should route filename "config-mate.yaml" not special |
ok, thx |
Hi @mzzsfy, thank you for your feedback, I think we can optimize the route logic when user only config one group readwrite splitting datasource. |
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
5.2
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy in docker
Expected behavior
SQL result
Actual behavior
java.lang.NullPointerException: Cannot invoke "org.apache.shardingsphere.infra.federation.optimizer.context.parser.OptimizerParserContext.getDialectProps()" because the return value of "java.util.Map.get(Object)" is null
at org.apache.shardingsphere.infra.federation.executor.original.OriginalFederationExecutor.createConnection(OriginalFederationExecutor.java:92)
at org.apache.shardingsphere.infra.federation.executor.original.OriginalFederationExecutor.executeQuery(OriginalFederationExecutor.java:83)
at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecuteFederation(JDBCDatabaseCommunicationEngine.java:165)
at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:123)
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:110)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Reason analyze (If you can)
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
Use only READWRITE_SPLITTING
mysql: 8.0.27
server.yml
config-test.yaml
The text was updated successfully, but these errors were encountered: