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 2020/07/01 02:55:05 UTC

[GitHub] [shardingsphere] chrissata opened a new issue #6223: Sharding proxy can't identify schema from SQL if not explicity use schema.

chrissata opened a new issue #6223:
URL: https://github.com/apache/shardingsphere/issues/6223


   ## 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.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   mysql> show databases;
   +----------+
   | Database |
   +----------+
   | db1          |
   | db2          |
   +----------+
   mysql> use db1;
   mysql> select * from db2.test_table;
   ERROR 1146 (42S02): Table 'db2.test_table' doesn't exist
   
   ### Actual behavior
   SQL run well.
   
   ### Reason analyze (If you can)
   
   sql parser does not  extract schema from sql to modify sql statement context.
   Only "use db2 " can change schema.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   shardingrule config: any config.
   
   ### Example codes for reproduce this issue (such as a github link).
   use db1; 
   do any sql on db2.table.
   


----------------------------------------------------------------
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] tristaZero commented on issue #6223: Sharding proxy can't identify schema from SQL if not explicity use schema.

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


   Hi Thanks for your feedback.
   Cloud you try the following SQLs?
   > user db2; select * from test_table;
   
   That will work well, won't it?
   If it is convenient, you can package master branch and give it a try. We have fixed it on the master branch already.
   
   Bests,
   Trista


----------------------------------------------------------------
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] tristaZero commented on issue #6223: Sharding proxy can't identify schema from SQL if not explicity use schema.

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


   @chrissata 
   Hi [#6117](https://github.com/apache/shardingsphere/pull/6117/files) is what you want.


----------------------------------------------------------------
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] chrissata commented on issue #6223: Sharding proxy can't identify schema from SQL if not explicity use schema.

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


   > Hi Thanks for your feedback.
   > Cloud you try the following SQLs?
   > 
   > > user db2; select * from test_table;
   > 
   > That will work well, won't it?
   > If it is convenient, you can package master branch and give it a try. We have fixed it on the master branch already.
   > 
   > Bests,
   > Trista
   
   
   Yes, of cource it will work inside the same schema without any schema switch.  But it's not the senario that I reported.  Sometimes we just use db.table to switch schema instead of using "use db".  Glad to hear it's fixed on master branch and It would be nice if you could attach the fix commit here.
   
   Thanks,
   Chrissta 
   


----------------------------------------------------------------
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] tristaZero closed issue #6223: Sharding proxy can't identify schema from SQL if not explicity use schema.

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


   


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