Bug #83589 | DECIMAL(4,1) turns into DECIMAL (4,0) | ||
---|---|---|---|
Submitted: | 27 Oct 2016 23:41 | Modified: | 28 Oct 2016 1:51 |
Reporter: | Rick James | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | decimal precision |
[27 Oct 2016 23:41]
Rick James
[28 Oct 2016 1:51]
MySQL Verification Team
Thank you for the bug report. c:\dbs>c:\dbs\8.0\bin\mysql -uroot --port=3580 -p --prompt="mysql 8.0 > " Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 8.0.1-dmr Source distribution PULL: 2016-OCT-14 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 8.0 > CREATE DATABASE g; Query OK, 1 row affected (0.23 sec) mysql 8.0 > USE g Database changed mysql 8.0 > CREATE TABLE f651873 ( x DECIMAL(4,1) ); << see here 4,1 instead of 4.1 from your test case Query OK, 0 rows affected (0.19 sec) mysql 8.0 > SHOW CREATE TABLE f651873 \G *************************** 1. row *************************** Table: f651873 Create Table: CREATE TABLE `f651873` ( `x` decimal(4,1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql 8.0 > INSERT INTO f651873 (x) VALUE (4.7); Query OK, 1 row affected (0.04 sec) mysql 8.0 > SELECT * FROM f651873; +------+ | x | +------+ | 4.7 | +------+ 1 row in set (0.00 sec) mysql 8.0 >