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/01/29 08:52:00 UTC

[GitHub] [shardingsphere] fengchao-GitHub opened a new issue #9219: Table 'testdb1.t_order' doesn't exist

fengchao-GitHub opened a new issue #9219:
URL: https://github.com/apache/shardingsphere/issues/9219


   version: sharding proxy 4.1.1
   
   config-sharding.yml:
   
   schemaName: sharding_db
   
   dataSources:
     ds1:
       url: jdbc:mysql://192.168.255.115/testdb1?serverTimezone=UTC&useSSL=false&characterEncoding=utf8
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds1_slave:
       url: jdbc:mysql://192.168.255.116/testdb1?serverTimezone=UTC&useSSL=false&characterEncoding=utf8
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds2:
       url: jdbc:mysql://192.168.255.115/testdb2?serverTimezone=UTC&useSSL=false&characterEncoding=utf8
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds2_slave:
       url: jdbc:mysql://192.168.255.116/testdb2?serverTimezone=UTC&useSSL=false&characterEncoding=utf8
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   shardingRule:
     tables:
       t_order:
         actualDataNodes: ms_ds${1..2}.t_order${1..2}
         databaseStrategy:
           inline:
             shardingColumn: uid
             algorithmExpression: ms_ds${uid % 2+1}
         tableStrategy:
           inline:
             shardingColumn: id
             algorithmExpression: t_order${id % 2 + 1}
         keyGenerator:
           type: SNOWFLAKE
           column: id
     bindingTables:
       - t_order
     broadcastTables:
       - t_user
       - t_org
   #  defaultDataSourceName: ds1
     defaultTableStrategy:
       none:
   
     masterSlaveRules:
       ms_ds1:
         masterDataSourceName: ds1
         slaveDataSourceNames:
           - ds1_slave
         loadBalanceAlgorithmType: ROUND_ROBIN
       ms_ds2:
         masterDataSourceName: ds2
         slaveDataSourceNames:
           - ds2_slave
         loadBalanceAlgorithmType: ROUND_ROBIN
   
   I can`t use these sql : 
   select count(1) from(select * from t_order) c ;
   select count(1)  from (select u.id , count(1)  from t_order o inner JOIN t_user u on o.uid=u.id GROUP BY u.id )c ;
   select count(1) from (select count(1) from(select * from t_order) c )b ;
   
   ![image](https://user-images.githubusercontent.com/64132316/106252941-cf9d5600-6251-11eb-9f17-1bcb024b13ae.png)
   ![image](https://user-images.githubusercontent.com/64132316/106252978-d926be00-6251-11eb-9100-ceb4c74720b1.png)
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #9219: Table 'testdb1.t_order' doesn't exist

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


   The `5.0.0-beta` version supports federation engine which can process subquery, please try it, thank you.


-- 
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] fengchao-GitHub edited a comment on issue #9219: Table 'testdb1.t_order' doesn't exist

Posted by GitBox <gi...@apache.org>.
fengchao-GitHub edited a comment on issue #9219:
URL: https://github.com/apache/shardingsphere/issues/9219#issuecomment-770351096


   > Hi @fengchao-GitHub ~
   > Could you try whether other statements are effective? Such as "select * from t_order" or "SELECT COUNT(*) FROM t_order".
   > Or could you try to check the proxy status by viewing the proxy log?
   
    "select * from t_order" and "SELECT COUNT(*) FROM t_order" is effective


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] JiekerTime commented on issue #9219: Table 'testdb1.t_order' doesn't exist

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


   Hi @fengchao-GitHub ~
   Could you try whether other statements are effective? Such as "select * from t_order" or "SELECT COUNT(*) FROM t_order". 
   Or could you try to check the proxy status by viewing the proxy log?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] fengchao-GitHub commented on issue #9219: Table 'testdb1.t_order' doesn't exist

Posted by GitBox <gi...@apache.org>.
fengchao-GitHub commented on issue #9219:
URL: https://github.com/apache/shardingsphere/issues/9219#issuecomment-770351096


   > Hi @fengchao-GitHub ~
   > Could you try whether other statements are effective? Such as "select * from t_order" or "SELECT COUNT(*) FROM t_order".
   > Or could you try to check the proxy status by viewing the proxy log?
    "select * from t_order" and "SELECT COUNT(*) FROM t_order" is effective


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu closed issue #9219: Table 'testdb1.t_order' doesn't exist

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #9219:
URL: https://github.com/apache/shardingsphere/issues/9219


   


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