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

   ## Bug Report
   
   session variables set in jdbc url is not supported when using dsql to 
add/alter resource to shardingproxy.
   
   ```bash
   
jdbc:mysql://127.0.0.1:3306/aa?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&sessionVariables=ob_query_timeout=30000000,ob_read_consistency='weak'
   ```
   
   Shardigproxy will throw not a valid entry exception when parsing jdbc url 
containing sessionVariables params.
   
   
![image](https://user-images.githubusercontent.com/41630875/173322715-4c2c0496-2985-4d15-bdcf-eec3834889f0.png)
   
   ### Which version of ShardingSphere did you use?
   5.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   Adding resource using dsql with sessionVariables params is suppored because 
sessionVariables is a widely-used jdbc url param for mysql
   
   ### Actual behavior
   Shardigproxy will throw not a valid entry exception when parsing jdbc url 
containing sessionVariables params.
   
   
![image](https://user-images.githubusercontent.com/41630875/173322715-4c2c0496-2985-4d15-bdcf-eec3834889f0.png)
   
   ### Reason analyze (If you can)
   the '=' character must not be used as the separator directly. 
   
![image](https://user-images.githubusercontent.com/41630875/173323125-633e7115-b148-46e5-b445-181756e1ec14.png)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
jdbc:mysql://127.0.0.1:3306/aa?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&sessionVariables=ob_query_timeout=30000000,ob_read_consistency='weak'
   
   adding resource using jdbcurl above will reproduce the bug.
   
   ### Example codes for reproduce this issue (such as a github link).
   none


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to