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:
[email protected]