TiDB handles Incorrect datetime values differently from MySQL's behavior
Open
component/expression
severity/minor
sig/execution
sig/planner
type/bug
type/compatibility
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Question

用户版本6.11
TiDB 处理 Incorrect datetime 时,遇到程序传入错误的 datetime 时,是 warning,客户程序设置的只处理 error,不处理 warning。MySQL 5.7 处理这个问题时,不报错,没有 warning,能返回结果。MySQL 8.0 在遇到这个问题时,直接是 error。
另外麻烦确认:是不是咱们的兼容性有点问题,如果想暂时绕的话,jdbc 这边不论 statement 还是 preparedsatement 都可以通过 getwarning 获取警告,ibatis 估计也有类似的功能?
Now, please describe your question here:
[_Incorrect datetime MySQL TiDB.docx](https://github.com/pingcap/docs-cn/files/10148009/_Incorrect.datetime.MySQL.TiDB.docx)
Contributor guide
Assessment
This issue has not been assessed yet.