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/11/16 02:28:29 UTC
[GitHub] [shardingsphere] Anricx opened a new issue #8167: Actual SQL PrepareStatement argument error while where contains MATH Expression
Anricx opened a new issue #8167:
URL: https://github.com/apache/shardingsphere/issues/8167
## Bug Report
### Which version of ShardingSphere did you use?
4.1.1
### Which project did you use?
ShardingSphere-JDBC
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
#### CASE1
*Logic SQL*
```sql
SELECT id
FROM `_parking_payment_plus`
WHERE `identity` = ?
AND `pay_value` >= ?
ORDER BY `id` ASC
LIMIT ?, ?
```
*Actual SQL*
```sql
[2020-11-16 10:14:15.792] INFO [main] [ShardingSphere-SQL] - Actual SQL: parking_2020 ::: SELECT
`id`
FROM `_parking_payment`
WHERE `identity` = ?
AND `pay_value` >= ?
ORDER BY `id` ASC
LIMIT ?, ? ::: [6qyE6JG04KSO5Ymc64Kq4buO, 1, 0, 10]
```
Works fine!
#### CASE2
*Logic SQL*
```sql
SELECT id
FROM `_parking_payment_plus`
WHERE `identity` = ?
AND `pay_value` + `free+value` >= ?
ORDER BY `id` ASC
LIMIT ?, ?
```
*Actual SQL*
```sql
[2020-11-16 10:18:50.868] INFO [main] [ShardingSphere-SQL] - Actual SQL: parking_2020 ::: SELECT
`id`
FROM `_parking_payment`
WHERE `identity` = ?
AND `pay_value` + `free_value` >= ?
ORDER BY `id` ASC
LIMIT ?, ? ::: [6qyE6JG04KSO5Ymc64Kq4buO, 0, 1, 10]
```
While where contains `a + b`(here is `pay_value` + `free_value` >= ? ) expression SQL PrepareStatement argument order changed!
PS: this code works fine version `4.0.0`!
----------------------------------------------------------------
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 #8167: Actual SQL PrepareStatement argument error while where contains MATH Expression
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8167:
URL: https://github.com/apache/shardingsphere/issues/8167#issuecomment-731912442
Sorry, we have no plan to maintain multiple versions.
----------------------------------------------------------------
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] Anricx commented on issue #8167: Actual SQL PrepareStatement argument error while where contains MATH Expression
Posted by GitBox <gi...@apache.org>.
Anricx commented on issue #8167:
URL: https://github.com/apache/shardingsphere/issues/8167#issuecomment-732104577
but 5.0.0 not is not stable GA.
:(
----------------------------------------------------------------
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 #8167: Actual SQL PrepareStatement argument error while where contains MATH Expression
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #8167:
URL: https://github.com/apache/shardingsphere/issues/8167#issuecomment-727716047
Hi @Anricx ,
I suppose we fixed this issue in the latest 5.0.0-alpha, could you try with 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] terrymanu closed issue #8167: Actual SQL PrepareStatement argument error while where contains MATH Expression
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8167:
URL: https://github.com/apache/shardingsphere/issues/8167
----------------------------------------------------------------
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] Anricx commented on issue #8167: Actual SQL PrepareStatement argument error while where contains MATH Expression
Posted by GitBox <gi...@apache.org>.
Anricx commented on issue #8167:
URL: https://github.com/apache/shardingsphere/issues/8167#issuecomment-727716597
but 5.0.0 has huge change, and may has another issue? I hope you can release a hotfix version 4.1.2?
----------------------------------------------------------------
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