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:
[email protected]


Reply via email to