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/10/09 04:53:18 UTC

[GitHub] [shardingsphere] 15806659098 opened a new issue, #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

15806659098 opened a new issue, #18763:
URL: https://github.com/apache/shardingsphere/issues/18763

   ## Question
   I have a problem when i execute select statement. I use ShardingSphere-Proxy, version is 5.1.2 and Mysql JDBC Driver is 8.0.28. The error is as follows. It similar to another  problem #17888 . I think it may be caused by PrepareStatement.
   ` Error querying database.  Cause: java.sql.SQLSyntaxErrorException: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'
   The error may exist in file [D:\apache-tomcat-9.0.58\webapps\service_war\WEB-INF\classes\mapper\AcademicMapper.xml]
   The error may involve com.dao.AcademicDao.queryAcademicByMingcheng-Inline
    The error occurred while setting parameters
   SQL: SELECT knowledgename,knowledgecontent FROM Academic WHERE knowledgename like "%"?"%"
   Cause: java.sql.SQLSyntaxErrorException: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'`
   The select statement in my AcademicMapper.xml show in next picture.
   ![image](https://user-images.githubusercontent.com/35335913/176841521-0146e7b2-7370-4d5a-81e6-880fae683b1b.png)
   It has no problem when i use MySql connected directly. 
   Thanks.
   #17888
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] 15806659098 commented on issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

Posted by GitBox <gi...@apache.org>.
15806659098 commented on issue #18763:
URL: https://github.com/apache/shardingsphere/issues/18763#issuecomment-1172056364

   > 
   Only read-write separation is configured.
   The server.xml as follows:
   ```
    rules:
    - !AUTHORITY
      users:
        - root@%:987534
      provider:
        type: ALL_PRIVILEGES_PERMITTED
   props:
      sql-show: true
      proxy-mysql-default-version: 5.7.38
      proxy-default-port: 3310
   ```
   The config-readwrite-splitting.yaml as follows.
   ```
   databaseName: test
   dataSources:
    master:
      url: jdbc:mysql://10.30.24.174:3306/tcm?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC&characterEncoding=utf8&useSSL=false
      username: root
      password: 98753
      connectionTimeoutMilliseconds: 3000
      idleTimeoutMilliseconds: 5000
      maxLifetimeMilliseconds: 9000
      maxPoolSize: 50
      minPoolSize: 1
    slave:
      url: jdbc:mysql://10.30.24.176:3306/tcm?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC&characterEncoding=utf8&useSSL=false
      username: root
      password: 98753
      connectionTimeoutMilliseconds: 3000
      idleTimeoutMilliseconds: 5000
      maxLifetimeMilliseconds: 9000
      maxPoolSize: 50
      minPoolSize: 1
   rules:
   - !READWRITE_SPLITTING
    dataSources:
      readwrite_ds:
        type: Static
        props:
          write-data-source-name: master
          read-data-source-names: master,slave
        loadBalancerName: round
    loadBalancers:
      round:
        type: ROUND_ROBIN`
   ```


-- 
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] github-actions[bot] commented on issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #18763:
URL: https://github.com/apache/shardingsphere/issues/18763#issuecomment-1272349516

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] 15806659098 commented on issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

Posted by GitBox <gi...@apache.org>.
15806659098 commented on issue #18763:
URL: https://github.com/apache/shardingsphere/issues/18763#issuecomment-1173443546

   @strongduanmu 
   Thank you. This is My configuration. Only read-write separation is configured.
   server.xml 
   ```
    rules:
    - !AUTHORITY
      users:
        - root@%:987534
      provider:
        type: ALL_PRIVILEGES_PERMITTED
   props:
      sql-show: true
      proxy-mysql-default-version: 5.7.38
      proxy-default-port: 3310
   ```
   config-readwrite-splitting.yaml
   ```
   databaseName: test
   dataSources:
    master:
      url: jdbc:mysql://10.30.24.174:3306/tcm?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC&characterEncoding=utf8&useSSL=false
      username: root
      password: 98753
      connectionTimeoutMilliseconds: 3000
      idleTimeoutMilliseconds: 5000
      maxLifetimeMilliseconds: 9000
      maxPoolSize: 50
      minPoolSize: 1
    slave:
      url: jdbc:mysql://10.30.24.176:3306/tcm?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC&characterEncoding=utf8&useSSL=false
      username: root
      password: 98753
      connectionTimeoutMilliseconds: 3000
      idleTimeoutMilliseconds: 5000
      maxLifetimeMilliseconds: 9000
      maxPoolSize: 50
      minPoolSize: 1
   rules:
   - !READWRITE_SPLITTING
    dataSources:
      readwrite_ds:
        type: Static
        props:
          write-data-source-name: master
          read-data-source-names: master,slave
        loadBalancerName: round
    loadBalancers:
      round:
        type: ROUND_ROBIN
   ```


-- 
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] github-actions[bot] closed issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'
URL: https://github.com/apache/shardingsphere/issues/18763


-- 
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] strongduanmu commented on issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #18763:
URL: https://github.com/apache/shardingsphere/issues/18763#issuecomment-1172033780

   @15806659098 Thank you for your feedback. What is your sharding configuration?


-- 
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] strongduanmu commented on issue #18763: when i execute select statement, it cause an error: This version of ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your SQL syntax'

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #18763:
URL: https://github.com/apache/shardingsphere/issues/18763#issuecomment-1272455306

   This issue has not been finished, so I will reopen 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org