Time truncation and rounding inconsistency with MySQL #31641
Labels
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
severity/moderate
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
This report is related to issue(#29406).
Currently,
TIME_TRUNCATE_FRACTIONAL
sql mode is not supported in TiDB. But, it behaves as if it enabled in some cases, which is inconsistent with MySQL behavior.It looks desirable to provide user sql mode option to decide truncation or round so as to get an expected result user prefer.
1. Minimal reproduce step
2/3. What did you expect to see? What did you see instead
Testing time truncation
Testing rounding from TIME(N) to INT --> In negative cases, the results are different.
Testing rounding with CAST
4. What is your TiDB version?
The text was updated successfully, but these errors were encountered: