Shrinking decimal or double field precision behaves differently #41281
Labels
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.
affects-6.0
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.2
affects-6.3
affects-6.4
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-6.6
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
We found that TiDB has different behavior reducing the precision of
DECIMAL
andDOUBLE
afterALTER TABLE MODIFY/CHANGE COLUMN
syntax:DOUBLE
types, the new data will be changed but the old data will be kept the same. For example:2、For
DECIMAL
types, both new and old data will be changed. For example:However, in MySQL, the new and old data will be always changed for
DOUBLE
andDECIMAL
types.2. What did you expect to see? (Required)
Same behavior as mysql
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v5.4.1 & 6.5.0
The text was updated successfully, but these errors were encountered: