数据库字段end_date 为timestamp类型 我发现更新到2038年份的日期就会报错 报错信息如下:
Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '2038-02-25 15:09:03' for column 'end_date' at row 1
The error may involve UsersMapper.UpdateCodes-Inline
The error occurred while setting parameters
SQL:
UPDATE users set codes=?,end_date=date_add(IFNULL(end_date,NOW()), interval ? DAY),type=1,begin_date=NOW() WHERE id=?
Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '2038-02-25 15:09:03' for column 'end_date' at row 1