Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set Decimal Places on Columns #12551

Closed
gitsnow opened this issue Sep 11, 2016 · 6 comments
Closed

Can't set Decimal Places on Columns #12551

gitsnow opened this issue Sep 11, 2016 · 6 comments
Assignees

Comments

@gitsnow
Copy link

gitsnow commented Sep 11, 2016

Steps to reproduce

  1. Create or Edit any column and set the Length/Values with a decimal place, i.e. 10,2
  2. Click Preview SQL and the comma and decimal place value is missing.
  3. Save the change and the Length/Value is saved as (10,0). If any other change is made to a column who had its decimal place set by any other means gets truncated and reset to no decimal place value

Expected behaviour

The Length/Value should accept the format 10,2

Actual behaviour

The comma and decimal value is truncated and the Length Value is only submitted as 10. This seems to happen regardless of the number type selected but have tested extensively with Decimal type.

Server configuration

Ubuntu 16.04 x64

Web server:
Apache 2.4.18
Database:
MySQL 5.7.13
PHP version:
PHP 7.0
phpMyAdmin version:
phpMyAdmin 4.6.4

Client configuration

Browser:
Firefox, Safari, Chrome
Operating system:
Ubuntu 16.04 x64 & IOS 9.3

@devenbansod devenbansod self-assigned this Sep 11, 2016
@devenbansod
Copy link
Member

Hi @gitsnow thanks for the detailed report, but this has already been reported and fixed at #12480. The fix would be a part of the next bug-fix release i.e. 4.6.5

@Gemorroj
Copy link
Contributor

@devenbansod this is critical bug. need quick patch

@devenbansod
Copy link
Member

@Gemorroj
Copy link
Contributor

Thanks, I have already updated Table.php
I just wanted to draw attention to the fact that the problem is serious. For example, I had to change a decimal 15.2 to 15.4.
phpmyadmin did a 15.0. I lost user data.

@dariojr
Copy link

dariojr commented Feb 10, 2018

Hi!
The same thing happened to me today.
The fastest solution is the change by console.
The console will ask me for the root password.
Then:
USE databaseexapmle;
ALTER TABLE exaple_table CHANGE field_to_change field_to_change DECIMAL(10,10) NULL DEFAULT NULL;
The number of decimals can't greater than left number.

@ErikThiart
Copy link

Good lord, so glad I found this issue on github - 2 hours of struggling, I thought I was going crazy.

updated to latest version, all fixed.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants