Sharding-JDBC 4.0.0-RC1 Compatibility?
I'm trying to upgrade from legacy version 2.0.3 -> Sharding-JDBC 4.0.0-RC1, here I have many compatibility issue, such as:
- FORCE INDEX will cause BAD SQL.
- LIMIT NOT WORKING with sum etc.
so I am wondering how much SQL test case is included in this project?
We never released the version 2.0.6
And all test cases are passed. If some SQL cannot pass, could you provide the SQL to let us add to test case?
INSERT INTO `mobile`
(`mobile`,
`id`,
`lock`
)
values (#{mobile, jdbcType=VARCHAR}, #{id, jdbcType=BIGINT}, 1)
on duplicate key update
`lock` = IF(`lock` = 0, 1, 0)
please check this one, works in 3.1.0, but failed in 4.0.0-RC1, reporting com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
also tried
INSERT INTO `mobile`
(`mobile`,
`id`,
`lock`
)
values (#{mobile, jdbcType=VARCHAR}, #{id, jdbcType=BIGINT}, 1)
on duplicate key update
`lock` = IF(`lock` != VALUES(`lock`), `lock`, VALUES(`lock`))
not working in 4.0.0-RC either
We never released the version
2.0.6
sorry, it's 2.0.3 :)
Version: 4.0.0-RC1
ISSUE: FORCE INDEX
Logic SQL:
SELECT
pp.merchant,
pp.plate,
pp.park_uuid,
pp.pay_serial
FROM `_parking_payment_plus` pp FORCE INDEX (`IDX-RESULT_TIME`)
WHERE pp.result = 1
ORDER BY pp.`id` DESC
Actual SQL: parking_default :::
SELECT
pp.merchant,
pp.plate,
pp.park_uuid,
pp.pay_serial,
pp.id AS ORDER_BY_DERIVED_0
FROM `_parking_payment` pp FORCE INDEX (`IDX-RESULT_TIME`__parking_payment)
WHERE pp.result = 1
ORDER BY pp.`id` DESC
Error:
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '__parking_payment)
WHERE pp.result = 1
' at line 44
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '__parking_payment)
WHERE pp.result = 1
' at line 44
@jakara duplicated #2319
@Anricx FORCE INDEX will cause BAD SQL. this issue was fixed dev branch
@Anricx LIMIT NOT WORKING with sum etc:Please give a detailed description
@Anricx LIMIT NOT WORKING with sum etc:Please give a detailed description
It was Fixed in 4.0.0-RC1
@Anricx Then can you close this issue?
I'm using sharding-jdbc since 2016, last month I'm upgrading from 2.0.3(the legacy) to 3.1.0, some sql not working, so this month I try 4.0.0-RC1, some are still not working.
All the sql are working nicely with 2.0.3,
Now i'm fallback to 2.0.3, due to it may having some unexpected issue.
So, I want to know when is the best time for upgrading to 4.x?
And thx for your guys working!
4.0.0-RC1 is a release candidate for 4.0.0, we plan release 3 or 4 release candidate version on this
Thank you for use sharding-jdbc so earlier, but I just say, 2.0.3 is past 2 years, some SQL supported which is not correct for sometime.
3.x and 4.x is more accurate than 2.x because we change a new parse engine.
If some SQL still not support, can you provide the details of the SQL?
I will waiting for the future version and try, thx for feeding back :)