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?
tag-5.3.2
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Can run in win10 ,when h2 mode is file
Actual behavior
When h2 use file mode,can not connect database,because url check is error
Reason analyze (If you can)
shardingsphere\infra\common\src\main\java\org\apache\shardingsphere\infra\database\metadata\dialect\H2DataSourceMetaData.java
private static final Pattern PATTERN = Pattern.compile("jdbc:h2:((?mem|~):/|"
"(?file:)[/~\w\-]+/(?[\-\w]));?\S", Pattern.CASE_INSENSITIVE);
not concerned about url like jdbc:h2:file:D:/h2/data;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE in windows
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Only use in file mode,and url like jdbc:h2:file:D:/h2/data;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE,it will be reproduced
Example codes for reproduce this issue (such as a github link).
You can use this config
dataSources:
ds0:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
jdbcUrl: jdbc:h2:file:D:/05/h2/data;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=MySQL
username: admin
password: admin
rules:
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?
tag-5.3.2
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Can run in win10 ,when h2 mode is file
Actual behavior
When h2 use file mode,can not connect database,because url check is error
Reason analyze (If you can)
shardingsphere\infra\common\src\main\java\org\apache\shardingsphere\infra\database\metadata\dialect\H2DataSourceMetaData.java private static final Pattern PATTERN = Pattern.compile("jdbc:h2:((?mem|~):/|"
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Only use in file mode,and url like jdbc:h2:file:D:/h2/data;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE,it will be reproduced
Example codes for reproduce this issue (such as a github link).
You can use this config dataSources: ds0: dataSourceClassName: com.zaxxer.hikari.HikariDataSource driverClassName: org.h2.Driver jdbcUrl: jdbc:h2:file:D:/05/h2/data;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=MySQL username: admin password: admin rules: