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

   springboot:1.5.4.RELEASE
   sharding.sphere:3.0.0.M2
   mysql:5.7.24-log
   
   config:
   `sharding:
     jdbc:
       db:
         schema: crm_was
       datasource:
          names: 
crm_was,main_data,crm_was_0,crm_was_1,crm_was_2,crm_was_3,crm_was_4,crm_was_5,crm_was_6,crm_was_7,crm_was_8,crm_was_9
          main_data:
                type: com.zaxxer.hikari.HikariDataSource
                .......
          crm_was:
                .......
          crm_was_0:
           .......
          crm_was_1:
                .......
          crm_was_2:
                .......
       config:
         sharding:
           tables:
             waybill_analysis_base:
                actual-data-nodes: 
crm_was_$->{0..9}.waybill_analysis_base_$->{0..99}
                table-strategy:
                  inline:
                    sharding-column: waybill_id
                    algorithm-expression: 
waybill_analysis_base_$->{waybill_id%100}
                database-strategy:
                   inline:
                     sharding-column: waybill_id
                     algorithm-expression: 
crm_was_$->{(waybill_id/100).longValue()%10}
                key-generator-column-name: waybill_id
             employee:
                actual-data-nodes: main_data.employee
                table-strategy:
                  inline:
                    sharding-column: id
                    algorithm-expression: employee
                database-strategy:
                   inline:
                     sharding-column: id
                     algorithm-expression: main_data
                key-generator-column-name: id
             department:
                actual-data-nodes: main_data.department
                table-strategy:
                  inline:
                    sharding-column: id
                    algorithm-expression: department
                database-strategy:
                   inline:
                     sharding-column: id
                     algorithm-expression: main_data
                key-generator-column-name: id             
           default-data-source-name: crm_was`
   
   There is multiple dataNodes. crm_was_0~9 are sub database and sub table, 
crm_was and main_data are single dataNode. 'default-data-source-name' is 
configed with 'crm_was', so i config 'main_data' in sharding rules. 
   
   problems:
   query single table of crm_was is ok.  but when i use sub or join to query 
table of crm_was, then routing to main_data error occurs.  like this: 
   
   
![image](https://user-images.githubusercontent.com/4444055/174577053-2441d93e-6994-424a-a9b1-2cd851c34f78.png)
   
   
   thanks for your answer!!!
   


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