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 2022/01/21 07:05:38 UTC
[GitHub] [shardingsphere] maxiaof opened a new issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
maxiaof opened a new issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977
## Bug Report
org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
### version
springboot: 2.4.1
mybatisSpringBootStarter: 2.2.0
druid: 1.2.8
ojdbc: 12.2.0.1
oracle_version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
### Which version of ShardingSphere did you use?
ShardingSphere5.0.0
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphereJDBC
### Expected behavior
Get sequence
### Actual behavior
org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```sql
SELECT test_a.NEXTVAL as id FROM DUAL
```
```yaml
spring:
shardingsphere:
props:
sql-show: true
datasource:
names: ds
ds:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@127.0.0.1:1521/orcl
username: test
password: test
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
sharding-algorithms:
charge-detail:
type: CLASS_BASED
props: {}
tables:
test_a:
actual-data-nodes: ds.test_a_$->{2021..2022}_$->{1..4}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: charge-detail
key-generate-strategy:
column: id
key-generator-name: snowflake
```
```sql
CREATE TABLE "MERCURY"."test_a" (
"id" NUMBER,
"name" VARCHAR2(255),
PRIMARY KEY ("id")
)
;
COMMENT ON COLUMN "MERCURY"."test_a"."id" IS 'id';
COMMENT ON COLUMN "MERCURY"."test_a"."name" IS 'name'
create sequence test_a
increment by 1
start with 10
nomaxvalue
nominvalue
cache 20;
```
```shell
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051) ~[guava-29.0-jre.jar:na]
at com.google.common.cache.LocalCache.get(LocalCache.java:3951) ~[guava-29.0-jre.jar:na]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[guava-29.0-jre.jar:na]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958) ~[guava-29.0-jre.jar:na]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964) ~[guava-29.0-jre.jar:na]
at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:48) ~[shardingsphere-infra-parser-5.0.0.jar:5.0.0]
at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse0(ShardingSphereSQLParserEngine.java:71) ~[shardingsphere-infra-parser-5.0.0.jar:5.0.0]
at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:60) ~[shardingsphere-infra-parser-5.0.0.jar:5.0.0]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:157) ~[shardingsphere-jdbc-core-5.0.0.jar:5.0.0]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:128) ~[shardingsphere-jdbc-core-5.0.0.jar:5.0.0]
at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:78) ~[shardingsphere-jdbc-core-5.0.0.jar:5.0.0]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86) ~[mybatis-3.5.7.jar:3.5.7]
at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88) ~[mybatis-3.5.7.jar:3.5.7]
... 29 common frames omitted
```
### Example codes for reproduce this issue (such as a github link).
[demo.zip][https://wss1.cn/f/7ezh2v7ach6 ]
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1019641749
Are you willing to submit a pr?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] maxiaof closed issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
maxiaof closed issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1018329808
I will check it. Seems there are some parse error.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] maxiaof commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
maxiaof commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1019637781
> @maxiaof yes.
can it be fixed asap, thanks
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] maxiaof commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
maxiaof commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1019647335
> Are you willing to submit a pr?
Well, I'll try
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tuichenchuxin commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1019636309
@maxiaof yes.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] maxiaof commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
maxiaof commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1019635946
> I will check it. Seems there are some parse error.
Is it a parsing error
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] maxiaof commented on issue #14977: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
Posted by GitBox <gi...@apache.org>.
maxiaof commented on issue #14977:
URL: https://github.com/apache/shardingsphere/issues/14977#issuecomment-1019846379
If I try to use the master branch, this problem will not occur
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org