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/10/30 08:39:03 UTC

[GitHub] [shardingsphere] lwtdev opened a new issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

lwtdev opened a new issue #7978:
URL: https://github.com/apache/shardingsphere/issues/7978


   ## Bug Report
   
   I have tested some SQL  between older and newest version , and found some SQL parsing errors but work wells before.
   
   ### Which version of ShardingSphere did you use?
   
   - **Older version**
       5.0.0-RC1 ( 2020-10-26T16 master)
   
   - **Newest version**
       5.0.0-RC1 ( 2020-10-30T15 master)
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
    ShardingSphere-Proxy
   ### Expected behavior
   parse correct 
   ### Actual behavior
   parse error
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   - **Results in 5.0.0.RC1-older and 5.0.0.RC1-newest**
   
   ```
   ShardingProxy(5.0.0.RC1-older)No Sharding
   deleteMultiTable[hasShardingKey:none];	 Support:true;	SQL: delete customer, customer_email from customer , customer_email where customer.status = 3;
   ds_00|delete customer, customer_email from customer , customer_email where customer.status = 3|
   
   
   ShardingProxy(5.0.0.RC1-newest)No Sharding
   deleteMultiTable[hasShardingKey:none];	 Support:false;	SQL: delete customer, customer_email from customer , customer_email where customer.status = 3;
   java.sql.SQLException: 2Unknown exception: [null]
   
   
   ShardingProxy(5.0.0.RC1-older)No Sharding
   selectIntoVarAfterFrom[hasShardingKey:none];	 Support:true;	SQL: select * from customer into @myvar;
   ds_00|select * from customer into @myvar|
   
   ShardingProxy(5.0.0.RC1-newest)No Sharding
   selectIntoVarAfterFrom[hasShardingKey:none];	 Support:false;	SQL: select * from customer into @myvar;
   java.sql.SQLException: 2Unknown exception: [org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue cannot be cast to org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLSelectStatement]
   
   ```
   -  **5.0.0-RC1 config**
   
   ```yaml
   schemaName: spsqltest_nosharding
   #
   dataSourceCommon:
     username: root
     password: root135
     connectionTimeoutMilliseconds: 30000
     idleTimeoutMilliseconds: 60000
     maxLifetimeMilliseconds: 1800000
     maxPoolSize: 50
     minPoolSize: 1
     maintenanceIntervalMilliseconds: 30000
   #
   dataSources:
     ds_00:
       url: jdbc:mysql://127.0.0.1:3306/spsqltest_nosharding?serverTimezone=UTC&useSSL=false
   
   #
   rules:
   - !SHARDING
     defaultDatabaseStrategy:
       none:
     defaultTableStrategy:
       none:
   ```
   
   -  **SQL for creating tables**
   create before shardingsphere start
   ```sql
   -- @title:deleteMultiTable,hasShardingKey:none
   delete customer, customer_email from customer , customer_email where customer.status = 3;
   
   -- @title:selectIntoVarAfterFrom,hasShardingKey:none
   select * from customer into @myvar;
   
   ```
   ### 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.

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



[GitHub] [shardingsphere] kimmking commented on issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   @lwtdev your code now is standing on your repo, not pr to this repo.


----------------------------------------------------------------
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] kimmking commented on issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   SQL for testing
   
   ```
   -- @title:deleteMultiTable,hasShardingKey:none
   delete customer, customer_email from customer , customer_email where customer.status = 3;
   
   -- @title:selectIntoVarAfterFrom,hasShardingKey:none
   select * from customer into @myvar;
   ```
   
   Thanks a lot @lwtdev .
   There is no plan for these case.
   Can you make a pr for it?


----------------------------------------------------------------
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] jingshanglu closed issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   


----------------------------------------------------------------
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] lwtdev commented on issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   @SteNicholas  Hi, I just pushed the pull request.


----------------------------------------------------------------
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] lwtdev commented on issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   @kimmking In fact, these sql also works well in 4.11
   
   ```
   ShardingProxy(4.1.1)No Sharding
   deleteMultiTable[hasShardingKey:none];	 Support:true;	SQL: delete customer, customer_email from customer , customer_email where customer.status = 3;
   ds_0|delete customer, customer_email from customer , customer_email where customer.status = 3|
   
   ShardingProxy(4.1.1)No Sharding
   selectIntoVarAfterFrom[hasShardingKey:all];	 Support:true;	SQL: select * from customer where id = 3 into @myvar;
   ds_0|select * from customer where id = 3 into @myvar|
   ```
   > There is no plan for these case.
   Can you make a pr for it?
   
   Maybe we can fix it at beta version ~


----------------------------------------------------------------
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] lwtdev commented on issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   @kimmking OK, I will repush it to `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.

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



[GitHub] [shardingsphere] kimmking edited a comment on issue #7978: When the table is not sharding , in 5.0.0, SQL parsing is wrong, but it is correct before

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


   SQL for testing
   
   ```
   -- @title:deleteMultiTable,hasShardingKey:none
   delete customer, customer_email from customer , customer_email where customer.status = 3;
   
   -- @title:selectIntoVarAfterFrom,hasShardingKey:none
   select * from customer into @myvar;
   ```
   
   Thanks a lot @lwtdev .
   These cases are marked as UNSupported in docs.
   
   There is no plan for these case.
   Can you make a pr for it?


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