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/11/11 09:33:50 UTC

[GitHub] [shardingsphere] wsm12138 opened a new issue, #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.

wsm12138 opened a new issue, #22081:
URL: https://github.com/apache/shardingsphere/issues/22081

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   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?
   ShardingSphere-5.2.2-SNAPSHOT
   Commit ID: 1fb8766851700ec17f2d4b2967a63bc42985288c
   Commit Message: Data consistency check job support breakpoint resume transmission (#22048)
   Branch: master
   Build time: 2022-11-11T14:05:03+0800
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   `export database configuration;` contents equal a.yml
   
   ### Actual behavior
   ```
   [root@localhost apache-shardingsphere-5.2.2-SNAPSHOT-shardingsphere-proxy-bin]# mysql -uroot -proot -P7777 -hip
   mysql: [Warning] Using a password on the command line interface can be insecure.
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 3
   Server version: 5.7.22-ShardingSphere-Proxy 5.2.2-SNAPSHOT-1fb8766
   
   Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
   
   Oracle is a registered trademark of Oracle Corporation and/or its
   affiliates. Other names may be trademarks of their respective
   owners.
   
   Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
   
   mysql> import database CONFIGURATION FROM FILE '/tmp/apache-shardingsphere-5.2.2-SNAPSHOT-shardingsphere-proxy-bin/a.yml';
   Query OK, 0 rows affected (0.44 sec)
   
   mysql> show databases;
   +------------------------+
   | schema_name            |
   +------------------------+
   | information_schema     |
   | performance_schema     |
   | sys                    |
   | shardingsphere         |
   | readwrite_splliting_db |
   | mysql                  |
   +------------------------+
   6 rows in set (0.03 sec)
   
   mysql> use readwrite_splliting_db
   Reading table information for completion of table and column names
   You can turn off this feature to get a quicker startup with -A
   
   Database changed
   mysql> show databases;
   +------------------------+
   | schema_name            |
   +------------------------+
   | information_schema     |
   | performance_schema     |
   | sys                    |
   | shardingsphere         |
   | readwrite_splliting_db |
   | mysql                  |
   +------------------------+
   6 rows in set (0.00 sec)
   
   mysql> export database configuration;
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | result                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | databaseName: readwrite_splliting_db
   dataSources:
     ds_1:
       password: test@2021
       url: jdbc:mysql://192.168.10.20:13306/test?useSSL=false&useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=8192&prepStmtCacheSqlLimit=8000
       username: root
       minPoolSize: 1
       connectionTimeoutMilliseconds: 30000
       maxLifetimeMilliseconds: 1800000
       readOnly: false
       idleTimeoutMilliseconds: 60000
       maxPoolSize: 500
     ds_0:
       password: test@2021
       url: jdbc:mysql://192.168.10.20:13306/test?useSSL=false&useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=8192&prepStmtCacheSqlLimit=8000
       username: test
       minPoolSize: 1
       connectionTimeoutMilliseconds: 10000
       maxLifetimeMilliseconds: 1800000
       readOnly: false
       idleTimeoutMilliseconds: 60000
       maxPoolSize: 500
   rules:
    |
   +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0.01 sec)
   ```
   ### 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).
   
   #### a.yml
   ```
   databaseName: readwrite_splliting_db
   dataSources:
   
     ds_0:
       url: jdbc:mysql://192.168.10.20:13306/test?useSSL=false&useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=8192&prepStmtCacheSqlLimit=8000
       username: test
       password: test@2021
       connectionTimeoutMilliseconds: 10000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 500
       minPoolSize: 1
     ds_1:
       url: jdbc:mysql://192.168.10.20:13306/test?useSSL=false&useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=8192&prepStmtCacheSqlLimit=8000
       username: root
       password: test@2021
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 500
       minPoolSize: 1
   
   
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       readwrite_ds:
         staticStrategy:
           writeDataSourceName: ds_0
           readDataSourceNames:
             - ds_1
         loadBalancerName: random
     loadBalancers:
       random:
         type: RANDOM
   ```


-- 
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] sandynz commented on issue #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #22081:
URL: https://github.com/apache/shardingsphere/issues/22081#issuecomment-1342712677

   Hi @wsm12138 , does it work on latest version now?


-- 
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] Pace2Car commented on issue #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.

Posted by GitBox <gi...@apache.org>.
Pace2Car commented on issue #22081:
URL: https://github.com/apache/shardingsphere/issues/22081#issuecomment-1383570842

   Hi @wsm12138, I just reproduced this issue, I will try to fix it


-- 
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 closed issue #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.
URL: https://github.com/apache/shardingsphere/issues/22081


-- 
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] yx9o commented on issue #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.

Posted by GitBox <gi...@apache.org>.
yx9o commented on issue #22081:
URL: https://github.com/apache/shardingsphere/issues/22081#issuecomment-1311699414

   @wsm12138 My export on the master branch behaves as expected.


-- 
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] Qianyi951015 commented on issue #22081: USE `IMPORT DATABASE CONFIGURATION FROM FILE “filePath”;` ,BUT config is not right.

Posted by GitBox <gi...@apache.org>.
Qianyi951015 commented on issue #22081:
URL: https://github.com/apache/shardingsphere/issues/22081#issuecomment-1312378017

   I cant reproduce it, my import and export are the same


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