Roronoa-Zoro opened a new issue #8671:
URL: https://github.com/apache/shardingsphere/issues/8671


   ## 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!
   Background:
   jdk:1.8
   springboot:2.1.8
   
   in our one project, we have two datasource, one is normal, the other is 
sharding datasource.
   we encapsulate an class,named MixDataSourceProperties,and in our auto 
configuration class,we parse this MixDataSourceProperties,when type is 
'normal', we use DruidDataSourceFactory to create an normal datasource object, 
when type is 'sharding', we read a yaml file,see below
   
   ======
   dataSources:
     ds:  !!com.alibaba.druid.pool.DruidDataSource
       password: Welcome
       url: 
jdbc:mysql://xxxx:3306/common?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&useAffectedRows=true&useSSL=false
       username: hello
   props:
     sql:
       show: true
   shardingRule:
     tables:
       t_short_url:
         actualDataNodes: ds.t_short_url_$->{0..31}
         logicTable: t_short_url
         tableStrategy:
           standard:
             preciseAlgorithmClassName: com.xxx.ShortUrlTableShardingAlgorithm
             shardingColumn: short_url
   
   ======
   when I use ShortUrlDao to insert one record, actual sql is same with logic 
sql,
   and I try to debug the sharding logic, ShardingConnection is get, and 
ShardingPreparedStatement is also invoked,
   but actual sql is not changed.
   
   Please help to figure it out. Thanks.
    
   ### Which version of ShardingSphere did you use?
   4.0.1
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC 
   ### Expected behavior
   
   ### Actual behavior
   
   ### 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).
   


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


Reply via email to