terrymanu commented on issue #37595:
URL:
https://github.com/apache/shardingsphere/issues/37595#issuecomment-3702399740
Problem Understanding
- Version 5.5.2, ShardingSphere-JDBC. Hibernate/JPA generates insert into
... (filterid, filterValues_ORDER, field, values) values (?, ?, ?, ?) and
parsing fails with no viable alternative at the column list.
Root Cause
- The column name uses the reserved keyword values without quoting per
dialect. The parser treats values as a keyword, so the SQL is invalid for the
target dialect. This is expected behavior, not a ShardingSphere defect.
Problem Analysis
- The error stops at (filterid, filterValues_ORDER, field, values, showing
parsing breaks when hitting values.
- Hibernate does not auto-avoid reserved words; if you choose a reserved
word as a column name, you must rename it or quote it according to the database
dialect (e.g., backticks in MySQL).
- ShardingSphere enforces dialect syntax and will not auto-fix invalid
identifiers.
- Relevant official docs: MySQL keywords
https://dev.mysql.com/doc/refman/8.0/en/keywords.html and identifier quoting
rules https://dev.mysql.com/doc/refman/8.0/en/identifiers.html.
Conclusion
- This is a SQL naming issue, not a ShardingSphere bug. Please rename the
column to a non-reserved word or quote it per your database dialect so the SQL
can be parsed and executed.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]