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/10/23 12:17:08 UTC

[GitHub] [shardingsphere] WilliamShoww opened a new issue #7900: CURRENT_TIMESTAMP SQL NullException

WilliamShoww opened a new issue #7900:
URL: https://github.com/apache/shardingsphere/issues/7900


   ## CURRENT_TIMESTAMP SQL NullException
   
   ### sharding-jdbc-spring-boot-starter:4.1.1
   
   ### ShardingSphere-JDBC
   
   ### Support CURRENT_TIMESTAMP no exception
   
   ### SQL contain CURRENT_TIMESTAMP will exception
   ```mysql
   update a set
           
               a.enter_num = IF(a.enter_num + 1 < 0, 0, a.enter_num + 1),
   	
           a.update_time = CURRENT_TIMESTAMP
           where id = 42908
   ```
   line 6:8 no viable alternative at input 'CURRENT_TIMESTAMPwhere'
   line 6:8 no viable alternative at input 'CURRENT_TIMESTAMPwhere'
   2020-10-23 20:02:33,225 [http-nio-8084-exec-1] ERROR c.g.a.exception.ExceptionController [ExceptionController.java : 73] - Server is error: 
   org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: java.lang.NullPointerException
   	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
   	at com.sun.proxy.$Proxy118.update(Unknown Source)
   	at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287)
   **But 3.x version not exception**


----------------------------------------------------------------
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 closed issue #7900: CURRENT_TIMESTAMP SQL NullException

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #7900:
URL: https://github.com/apache/shardingsphere/issues/7900


   


----------------------------------------------------------------
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] WilliamShoww commented on issue #7900: CURRENT_TIMESTAMP SQL NullException

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


   use CURRENT_TIMESTAMP() replace CURRENT_TIMESTAMP not exception.


----------------------------------------------------------------
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] strongduanmu commented on issue #7900: CURRENT_TIMESTAMP SQL NullException

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


   @WilliamShoww Hi, thank you very much for your feedback. 😁 This exception is a SQL parsing bug in version 4.1.1 and has been fixed in the master branch. Please be patient and wait for the 5.x version, it will be released soon.
   
   


----------------------------------------------------------------
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