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 2020/08/08 17:49:29 UTC

[GitHub] [shardingsphere] harvies opened a new pull request #6726: Issues#6714

harvies opened a new pull request #6726:
URL: https://github.com/apache/shardingsphere/pull/6726


   Fixes #6714.
   
   Changes proposed in this pull request:
   -
   -
   -
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] harvies closed pull request #6726: Issues#6714

Posted by GitBox <gi...@apache.org>.
harvies closed pull request #6726:
URL: https://github.com/apache/shardingsphere/pull/6726


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on a change in pull request #6726: Issues#6714

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #6726:
URL: https://github.com/apache/shardingsphere/pull/6726#discussion_r467533804



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/H2DataSourceMetaData.java
##########
@@ -29,27 +29,27 @@
  */
 @Getter
 public final class H2DataSourceMetaData implements MemorizedDataSourceMetaData {
-    
+
     private static final int DEFAULT_PORT = -1;
-    
+
     private final String hostName;
-    
+
     private final int port;
-    
+
     private final String catalog;
-    
+
     private final String schema;
-    
+
     private final Pattern pattern = Pattern.compile("jdbc:h2:(mem|~)[:/]([\\w\\-]+);?\\S*", Pattern.CASE_INSENSITIVE);
-    
-    public H2DataSourceMetaData(final String url) {
+
+    public H2DataSourceMetaData(final String url, final String username) {

Review comment:
       Please do not change the original indent

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/H2DataSourceMetaData.java
##########
@@ -29,27 +29,27 @@
  */
 @Getter
 public final class H2DataSourceMetaData implements MemorizedDataSourceMetaData {
-    
+
     private static final int DEFAULT_PORT = -1;
-    
+
     private final String hostName;
-    
+
     private final int port;
-    
+
     private final String catalog;
-    
+
     private final String schema;
-    
+
     private final Pattern pattern = Pattern.compile("jdbc:h2:(mem|~)[:/]([\\w\\-]+);?\\S*", Pattern.CASE_INSENSITIVE);
-    
-    public H2DataSourceMetaData(final String url) {
+
+    public H2DataSourceMetaData(final String url, final String username) {
         Matcher matcher = pattern.matcher(url);
         if (!matcher.find()) {
             throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
         }
         hostName = "";
         port = DEFAULT_PORT;
         catalog = matcher.group(2);
-        schema = null;
+        schema = username;

Review comment:
       Does the change correct?
   If the proposal of this issue is adding more test cases, why change the production code?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org