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 2021/08/30 05:08:30 UTC

[GitHub] [shardingsphere] Ikki-Dai edited a comment on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

Ikki-Dai edited a comment on issue #12097:
URL: https://github.com/apache/shardingsphere/issues/12097#issuecomment-908033204


   ```yaml
   schemaName: test
   
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/test_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 5
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/test_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 5
   
   shardingRule:
     tables:	
       t1:
         actualDataNodes: ds_${0..1}.t1
         databaseStrategy:
           inline:
             algorithmExpression: ds_${id % 2}
             shardingColumn: id
         keyGenerator:
           type: SNOWFLAKE
           column: id
     broadcastTables:
       - t2
   ```
   
   1. `mysql -h 127.0.0.1 -P 3307 -A -u root -p`
   2. execute `select * from test.t2`, it shows test.t2 doesn't exist
   
   
   


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