pingcap/tidb

Incompatible with MySQL 8.0 about decimal truncate

Open

#10,446 opened on 2019年5月14日

GitHub で見る
 (4 comments) (0 reactions) (0 assignees)Go (40,090 stars) (6,186 forks)batch import
good first issuepriority/P4type/compatibility

説明

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
➜  ~ tidiff select 163585273409850809968011255877234629633094624779352518618441553657572897147135360553499480433030391348391690719534799010900398570378470003899837991878694011218651963309356255321688614631601533479175603508137169276827637180801063442877431907302534035121352827985983573079532645288562448964138247704595392364544
MySQL(127.0.0.1:3306)> select 163585273409850809968011255877234629633094624779352518618441553657572897147135360553499480433030391348391690719534799010900398570378470003899837991878694011218651963309356255321688614631601533479175603508137169276827637180801063442877431907302534035121352827985983573079532645288562448964138247704595392364544
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 163585273409850809968011255877234629633094624779352518618441553657572897147135360553499480433030391348391690719534799010900398570378470003899837991878694011218651963309356255321688614631601533479175603508137169276827637180801063442877431907302534035121352827985983573079532645288562448964138247704595392364544 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 99999999999999999999999999999999999999999999999999999999999999999                                                                                                                                                                                                                                                     |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.003 sec)

TiDB(127.0.0.1:4000)> select 163585273409850809968011255877234629633094624779352518618441553657572897147135360553499480433030391348391690719534799010900398570378470003899837991878694011218651963309356255321688614631601533479175603508137169276827637180801063442877431907302534035121352827985983573079532645288562448964138247704595392364544
Error 1105: line 1 column 316 near ""decimal literal: [types:1690]%s value is out of range in '%s' (total length 316)
  1. What did you expect to see?

The same as MySQL 8.0.

  1. What did you see instead?

See above.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
TiDB(127.0.0.1:4000)> select tidb_version()
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                            |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.8-24-g7b36cdfb6-dirty
Git Commit Hash: 7b36cdfb6e8a4c279fc360ed79cf1c499b553688
Git Branch: failpoint-2.1
UTC Build Time: 2019-04-30 08:26:17
GoVersion: go version go1.12 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.007 sec)

コントリビューターガイド