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 03:42:15 UTC

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

Ikki-Dai opened a new issue #12097:
URL: https://github.com/apache/shardingsphere/issues/12097


   ## 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!
   
   ### Which version of ShardingSphere did you use?
   4.1.1
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   1. execute sql like `select * from <db>.<table>limit 1`
   2. show table result
   ### Actual behavior
   1. db is the logic db name, table is a broadcast table
   2. ERROR 1146 (42S02): Table 'db.table' doesn't exist
   ### Reason analyze (If you can)
   table `<db>.<table>`  doesn't exist
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   while use binlog todo data sync, it report errors
   
   ### 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[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

Posted by GitBox <gi...@apache.org>.
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
   
   certainly, it works as `select * from test_0.t2` or `select * from test_1.t2`, but when i transfer from binlog, the sql is `update from test.t2 set=....` and report `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



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

Posted by GitBox <gi...@apache.org>.
Ikki-Dai commented on issue #12097:
URL: https://github.com/apache/shardingsphere/issues/12097#issuecomment-908130554


   I found that proxy can't process binlog with logic dbname or table name such as db_x, table_x


-- 
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] tristaZero edited a comment on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #12097:
URL: https://github.com/apache/shardingsphere/issues/12097#issuecomment-910165944


   @Ikki-Dai  `db.table` query has been supported in the master branch, could you try to install the proxy from the master branch?


-- 
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] Ikki-Dai edited a comment on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [shardingsphere] terrymanu closed issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

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


   


-- 
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] terrymanu commented on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

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


   Fixed at 5.0.0-beta


-- 
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] Ikki-Dai commented on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

Posted by GitBox <gi...@apache.org>.
Ikki-Dai commented 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



[GitHub] [shardingsphere] taojintianxia commented on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

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


   would you please provide your proxy config file which without confidential info for reproduction.


-- 
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] SteNicholas commented on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

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


   > I found that proxy can't process binlog with logic dbname or table name such as db_x, table_x
   
   @Ikki-Dai , do you have interest to support to process binlog with logic dbname or table name?


-- 
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] tristaZero commented on issue #12097: SQL use logic dbname and broadcast table doesn't work show table doesn't exist

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


   @Ikki-Dai We support `db.table` query in the master branch, could you try to install the proxy from the master branch?


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